-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP on 297 unsolicited messages, from initial connection and on device events #298
base: main
Are you sure you want to change the base?
WIP on 297 unsolicited messages, from initial connection and on device events #298
Conversation
A CRUDE but working first attempt (But throws Errors and Eventually Disconnects)
to all stream handlers check method names check attachement of adapters to devices in simulation
I'm on holiday now until the 28th but will hopefully have a chance to look on my return. Do you have any thoughts @mattclarke? |
@@ -178,7 +195,12 @@ def close(self): | |||
|
|||
def process(self, msec): | |||
for handler in self._accepted_connections: | |||
if self._device_event_message: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I am missing something but where does self._device_event_message
get set?
I think this looks promising, obviously as a WIP there are a few rough edges. I am wondering about whether we need an new abstraction for this type of thing, but I would need to remind myself of how lewis works ;) We'll see what @DominicOram thinks when he gets back, but I think this implementation would be okay. |
Sorry, I haven't forgotten about this, it's just low priority for me right now. Are you wanting it to be merged soon @auphofBSF? |
No problem, I have been on other issues as well, I have been using my forked branch very effectively, but had issues when wanting to push messages from a child device. @mattclarke comment about abstraction is valid and needs some thought. I have added some quick hacks to have messages emitted by the parent device, which got me into looking how hierarchy of devices and partitioning devices works and getting lost in that. I got to a good working solution, I need to tidy these up and add to this PR As initially discussed this PR is still WIP, so do not expect it to be Merged as is. I don't know what bandwidth I will have to abstract this messaging further. I will look to push a more refined child/parent message handler and update this PR next week and that may be as far as I can go, Thanks for keeping in touch |
This PR attempts to solve #297 , it provides mechanisms to
StreamHandlers
with connected clients. This could be from regular periodic events or any other non regular computed eventsIn addition an example is provided in
lewis.examples
accessible aslewis -k lewis.examples simple_eventing_state_device
Subject to initial review, docs and possibly some tests need to be generated