Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scpi-sensor: make read/write cycle more robust to errors? #19

Open
ddkohler opened this issue Mar 4, 2023 · 0 comments
Open

scpi-sensor: make read/write cycle more robust to errors? #19

ddkohler opened this issue Mar 4, 2023 · 0 comments

Comments

@ddkohler
Copy link

ddkohler commented Mar 4, 2023

I have a scpi-sensor daemon that experiences a comm snafu with a frequency of ~1 per week. The issue I observe is, after some time, all of my measurement key-value pairs become shifted by one:

>>> # normal
>>> client.get_measured()
>>> {"power": 4.34, "temperature": 21.12, "shutter": 1.0, "measurement_id": x}
>>> # after comm issue
>>> client.get_measured()
>>> {"power": 21.12, "temperature": 1.0, "shutter": 4.34, "measurement_id": y}

I have not yet identified exactly what happens that makes the write/read calls get unsynchronized, but the measurements keep coming without issue, just with the wrong channel map.

Client side restarts do not fix the issue; the daemon needs to be hard stopped and restarted.

Hoping to have a solution that (a) prevents key value errors from persisting after the bad measurement, and/or (b) fixes the issue through a client restart command.

Presumably the other scpi daemons would also benefit from whatever fix we come up with here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant