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

BinaryDataEncoding element not handled #68

Closed
jphickey opened this issue Dec 12, 2023 · 0 comments · Fixed by #69
Closed

BinaryDataEncoding element not handled #68

jphickey opened this issue Dec 12, 2023 · 0 comments · Fixed by #69
Assignees

Comments

@jphickey
Copy link
Contributor

Describe the bug
EdsLib encodes all binary data types as 1 bit. The XML schema was since extended to have a "BinaryDataEncoding" which allows larger sizes - in which case all other bits should be padding. But EdsLib is not honoring this element currently.

To Reproduce
Use BinaryDataEncoding to make a boolean value stored in an octet (8 bits) for byte alignment. Pack the object, and the binary value will be just 1 bit, with all subsequent elements shifted by 7 bits.

Expected behavior
Should be packed as 8 bits, with 7 bits of padding, as the XML intended.

System observed on:
Debian

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Dec 12, 2023
jphickey added a commit to jphickey/EdsLib that referenced this issue Dec 12, 2023
Use the sizeInBits specified in the encoding.  Anything beyond
1 will be padding.
jphickey added a commit that referenced this issue Dec 14, 2023
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 a pull request may close this issue.

1 participant