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

ArrayOf(ListOf(Thing)) not working #31

Open
JoelBender opened this issue Mar 3, 2024 · 1 comment
Open

ArrayOf(ListOf(Thing)) not working #31

JoelBender opened this issue Mar 3, 2024 · 1 comment

Comments

@JoelBender
Copy link
Owner

Reference Clause 20.2.20 Encoding of a BACnetARRAY of BACnetLIST datatype, the following example should work but doesn't:

    s = ListOf(Integer)
    t = ArrayOf(ListOf(Integer))
    x = t([[1,2,3], [], [4,5,6]])

The test where everything is explicitly created works:

    x = t([s([1,2,3]), s(), s([4,5,6])])

While there are no BACnetArray of BACnetList properties, the type was added in Addendum bu to ANSI/ASHRAE Standard 135-2016. This shows up in the AddListElement, RemoveListElement, and ReadRange services.

@JoelBender
Copy link
Owner Author

And more importantly, the encoding is wrong, it doesn't contain the opening and closing tags:

    t = x.encode()
    t.debug_contents()

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

No branches or pull requests

1 participant