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

Update Read.py #407

Closed
wants to merge 8 commits into from
Closed

Conversation

TehStroj
Copy link

So I am working on BACnet controllers that implement objects with standard object types, but are "enhanced" by proprietary properties.

In readMultiple()-calls with "show_property_name=True" for those standard/registered objects with proprietary/non-registered properties (which can be manually made with "@prop_" OR get in there automatically with the "all" keyword), there will be a TypeError thrown for line 384 in Read.py, because bacpypes won't find the proprietary property in the registered object.

To fix this, there is now a check implemented to skip that search for the proprietary properties of a standard/registered object_type.
This will make readMultiple() return all standard and proprietary properties of "enhanced" standard objects correctly.

ChristianTremblay and others added 8 commits July 3, 2023 21:04
Bumping version
auth token...
In readMultiple()-calls with "show_property_name=True" for standard/registered objects with proprietary/non-registered properties (which can be manually made with "@prop_<INT>" OR get in there automatically with the "all" keyword), there will be a TypeError thrown for line 384 in Read.py, because bacpypes won't find the proprietary property in the registered object.
To fix this, there is now a check implemented to skip that search for the proprietary properties of a standard/registered object_type.
Also for all read()- and readMultiple()-calls, there were unconcise dictionaries returned.
They are created by the cast_datatype_from_tag()-function, that gets called on proprietary/non-registered objects (datatype unknown).

To streamline outputs, it is enough to make both read() and readMultiple() rework that dictionary to extract only the actual value of the proprietary property.

Now, calls to read() and readMultiple() WITHOUT AND WITH "show_property_name" will show proprietary values like standard ones.
@ChristianTremblay ChristianTremblay changed the base branch from master to develop July 19, 2023 01:43
@github-actions
Copy link

This pull request has not been processed yet, please proceed or close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants