Skip to content
代码片段 群组 项目
提交 9671c39b 编辑于 作者: Bharat Dandu's avatar Bharat Dandu 提交者: Bharat Raju
浏览文件

Fixing the endianness issue for floats, negative values and strings

- Handling the negative default values and float values for attributes correctly in terms of endianness(little/big)
- Testing as_generated_default_macro helper for negative and float values
- Adding valid hex values for testing
- Moving the util functions into type.js and resolving the endian issue for both zap-config and helper-endpoint templates
- renaming the functions since we use get for helpers
- Switching to DataView and ArrayBuffer to resolve the endianess for float and negative values
- Making changes to as_generated_default_macro helper which now handles endianness conversion for float, negative and string values
- Doing the same as above for longTypeDefaultValue.
- Cleaning up endian formatting code using dataView and other minor cleanup
- Reading from the right index when reading big endian formats in convertIntToBigEndian.
- When attribute size is greater than 4 then using an array buffer of size 8 such that there are no array offset issues when tackling negative integers
- CLeaning up typos
- Adding more tests
- Switching to BigInt for numbers outside the 4 byte range
- Cleaning up Code generation for long string attributes
- In helper-zcl#format_zcl_string_as_characters_for_generated_defaults, Accounting for 2 byte strings length and formatting it to little endian.
- In zcl-loader-silabs, making sure that max length for long strings is set properly when not mentioned correctly in the xml
- Adding tests for the changes in helpers.test.js
- Github: ZAP#509
上级 e64791dd
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册