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

Line consumed by AdcptAcfgmPd8Parser needs to be put back if not used #66

Open
rgov opened this issue Dec 28, 2018 · 0 comments
Open

Line consumed by AdcptAcfgmPd8Parser needs to be put back if not used #66

rgov opened this issue Dec 28, 2018 · 0 comments

Comments

@rgov
Copy link

rgov commented Dec 28, 2018

line = self._stream_handle.readline() # READ NEXT LINE

While parsing a data burst, the inner loop consumes a line at a time and tests if it matches the sensor data format. If it does not, the data burst is over, so the new particle is emitted, and the function jumps back to the top o the outer loop to start looking for the next data burst.

However, that line has now been consumed and cannot be read again by the outer loop. If the discarded line is the header of the next data burst, parsing will fail.

In existing logs, the DCL happens to be recording power state messages between data bursts, and these can be safely skipped. However it is fragile to expect this and in the near future these messages will not be present in some logs.

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

Successfully merging a pull request may close this issue.

1 participant