Skip to content

bacnet-fastcs code so far#1

Open
Oli-Jones475 wants to merge 176 commits intomainfrom
final-touches
Open

bacnet-fastcs code so far#1
Oli-Jones475 wants to merge 176 commits intomainfrom
final-touches

Conversation

@Oli-Jones475
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Collaborator

@AlexanderWells-diamond AlexanderWells-diamond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/fastcs_bacnet/dummy/BAC0/analog_output_object.py Outdated
Comment thread src/fastcs_bacnet/examples/BAC0/single_client_single_device.py Outdated
Comment thread src/fastcs_bacnet/practical/BAC0/object_subscription.py Outdated
Comment thread src/fastcs_bacnet/practical/BAC0/bacnet_client.py Outdated
Comment thread src/fastcs_bacnet/practical/BAC0/bacnet_client.py Outdated
Comment thread src/fastcs_bacnet/practical/FastCS/bacnet_controller.py Outdated
Comment thread src/fastcs_bacnet/practical/FastCS/bacnet_controller.py Outdated
Comment thread src/fastcs_bacnet/practical/BAC0/object_subscription.py Outdated
Comment thread pyproject.toml Outdated
Comment thread src/fastcs_bacnet/examples/BAC0/single_client_single_device.py Outdated
Copy link
Copy Markdown
Collaborator

@AlexanderWells-diamond AlexanderWells-diamond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just a few bits of tidying up left from what I can see.

Comment thread src/fastcs_bacnet/diagnostics/BAC0/subscription_pair.py
Comment thread src/fastcs_bacnet/examples/hybrid/CA_full_pipeline.py
Comment thread src/fastcs_bacnet/practical/BAC0/bacnet_client.py
Comment thread src/fastcs_bacnet/practical/BAC0/bacnet_client.py
Comment thread src/fastcs_bacnet/practical/BAC0/object_subscription.py
Comment on lines +102 to +110
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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/fastcs_bacnet/practical/BAC0/subscription_id.py
Comment thread src/fastcs_bacnet/practical/FastCS/bacnet_controller.py
Comment thread src/fastcs_bacnet/practical/FastCS/bacnet_subcontroller.py
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 this pull request may close these issues.

2 participants