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

Add support for integer types with width of 24, 40, 48, 56. #8202

Closed
vivien-apple opened this issue Jul 8, 2021 · 0 comments · Fixed by #11870
Closed

Add support for integer types with width of 24, 40, 48, 56. #8202

vivien-apple opened this issue Jul 8, 2021 · 0 comments · Fixed by #11870

Comments

@vivien-apple
Copy link
Contributor

Problem

The specification allows non-standard signed and unsigned integer with a width of 24, 40, 48 or 56. While those types are used into some clusters (e.g

<attribute side="server" code="0x000D" define="AVAILABLE_POWER" type="INT24S" min="0x000000" max="0xFFFFFF" writable="false" optional="false">available power</attribute>
) the resulting code does not compile.

Proposed Solution

If those types are not supported natively, we need some sort of support

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Nov 16, 2021
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Nov 16, 2021
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Nov 16, 2021
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Nov 23, 2021
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Nov 24, 2021
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Nov 24, 2021
bzbarsky-apple added a commit that referenced this issue Nov 24, 2021
…utes (#11870)

* Add support for odd-sized (3, 5, 6, 7 bytes) integer types for attributes.

Fixes #8202

* Make it easier to test both endian-nesses of NumericAttributeTraits.

* Fix null representation for the signed case.

* Add unit tests for NumericAttributeTraits for unusual integer sizes.

Co-authored-by: Thomas Lykkeberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant