Conversation
AlexanderWells-diamond
left a comment
There was a problem hiding this comment.
I have reviewed the "practical" folder and its contents. I like what I'm seeing; the code is generally well structured and well commented. I was able to follow most of it easily.
There's a few comments that I think do need addressing before we merge this, hence the request for changes.
Co-authored-by: Alexander Wells <79699091+AlexanderWells-diamond@users.noreply.github.com>
Added a set to track bacnet_subcontroller background tasks This means tasks cant be garbage collected whilst they are running
63f3b5f to
bb8197a
Compare
AlexanderWells-diamond
left a comment
There was a problem hiding this comment.
Looking good. Just a few bits of tidying up left from what I can see.
| def stop_subscription(self): | ||
| """ | ||
| Stops the subscription from restarting or running a callback function | ||
| Can't restart a subscription after its been stopped | ||
| Create a new ObjectSubscription instead | ||
| """ | ||
| # You cant send a "stop subscription" message to bacnet devices | ||
| # The best we can do is wait out the last subscription | ||
| self._subscription_stopped = True |
There was a problem hiding this comment.
I think we have to call BAC0's cancel_cov() method as well as cancelling our own task. Docs here.
I'm unsure of the impacts of not doing this; could you please investigate whether there's already some mechanism that might be automatically resubscribing based on the lifetime? Setting a really short one, and turning on logging, should make it fairly obvious.
Provides python classes to subscribe to real bacnet objects and output their value to an EPICS IOC using FastCS.
Also provides classes to create dummy objects for BAC0 and FastCS to interact with.
As well as diagnostic tools and examples on how to use them.