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

How to reset the STREAM2 subsystem? #5

Open
sdebionne opened this issue Mar 1, 2023 · 3 comments
Open

How to reset the STREAM2 subsystem? #5

sdebionne opened this issue Mar 1, 2023 · 3 comments

Comments

@sdebionne
Copy link

sdebionne commented Mar 1, 2023

When my application closes the zmq sockets not in graceful way (crash), after restarts it gets messages from the previous acquisition. Is there a way to discard/reset the message queue, aka flush old messages? I try to disable/enable the STREAM2 subsystem but I am still getting unexpected message types from older instance of the application . When my application restart, the state of the DCU is "ready" so I would think abort would not help. What would be the right way to do a clean cold-and-dark start of STREAM2?

@kalcutter
Copy link
Contributor

This is currently not possible without re-initializing the detector which is a slow operation.

I don't think it is necessary to clear the message queue. You can easily filter incoming messages based on the series_id field. Is there any reason this approach won't work for you?

@sdebionne
Copy link
Author

This is not ideal, but I have implemented a workaround that skips any message until I get a STREAM2_MSG_START. This means that we still have to receive all the messages of the previous acquisition.

At startup, I don't know the series_id until I get a start message.

@GDYendell
Copy link

I do a similar thing, but it is more as a sanity check that we are receiving image messages with a series_id matching the most recent start message. If not it logs a warning and throws it away.

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

3 participants