(Go: >> BACK << -|- >> HOME <<)

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

Does not support signed integers #2

Open
pwood opened this issue Dec 20, 2020 · 1 comment
Open

Does not support signed integers #2

pwood opened this issue Dec 20, 2020 · 1 comment

Comments

@pwood
Copy link
Member
pwood commented Dec 20, 2020

Bytecodec needs to support marshalling signed integers, this is currently done in shimmeringbee/zcl so some knowledge can be transfered.

@pwood
Copy link
Member Author
pwood commented Dec 20, 2020

Correction, the code that's has support for signed ints is the bitbuffer in bytecodec.

https://github.com/shimmeringbee/bytecodec/blob/master/bitbuffer/int.go#L17

This might just be a case of adding catches for the reflection types in marshalValue/unmarshalValue, and calling the right bitbuffer function.

Needs tests, and beer after dealing with 2's complement negative numbers in tests.

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