-
Notifications
You must be signed in to change notification settings - Fork 19
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
What is the correct way to send unsolicited replies based on events ? #297
Comments
@DominicOram Any ideas/tips for this? |
Does https://github.com/ess-dmsc/lewis/tree/message_on_init fix point 1? You should be able to add something like the following in your strream interface:
I'll think about 2 and 3 later today... |
Thank you @DominicOram With regard to 2&3 I have spent a few hours trying to see how find the current active |
Yh, the issue is that |
Selfishly only considering the Could Then It is then logic in
|
I have explored this in https://github.com/auphofBSF/lewis/tree/wip_297_unsolicited_messages In principle it works but generates deque errors and eventually crashes the connection. The across thread comms needs addressing |
Ok I have fixed the It is achieving what I required but I am sure it needs to be aligned with I have created an example With a bit more work, some docs, possibly a test or 2 and I think it can be converted to a PR, but before that I would like to get comment |
Can you create a draft PR please? |
My use case is to simulate a basic serial device over tcp that responds to commands but also sends unsolicited messages
The doc's strings and Readthedocs are great but I feel I am missing something
I am using a TCP Stream Based on Motor Example
I have successfully implemented Cmd's and get the correct responses
I would like to get an
unsolicited_reply()
from theStreamHandler
when the following events happenStateMachineDevice
and sends anunsolicited_reply
to the TCP client, ie simulating a state change throughlewis-control device ....
The text was updated successfully, but these errors were encountered: