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
显示
- src-electron/generator/helper-zcl.js 49 个添加, 20 个删除src-electron/generator/helper-zcl.js
- src-electron/util/types.js 106 个添加, 10 个删除src-electron/util/types.js
- src-electron/zcl/zcl-loader-silabs.js 27 个添加, 0 个删除src-electron/zcl/zcl-loader-silabs.js
- test/gen-zigbee-1.test.js 3 个添加, 3 个删除test/gen-zigbee-1.test.js
- test/helpers.test.js 232 个添加, 1 个删除test/helpers.test.js
- test/resource/gp-combo-basic-test.zap 38 个添加, 9 个删除test/resource/gp-combo-basic-test.zap
加载中
想要评论请 注册 或 登录