mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-25 20:56:02 +00:00
Prior to this commit, the LwM2M stack would TLV-encode integers depending on their internal storage size. An integer with value 5 stored in an int8_t would be encoded with length 1, but an integer stored in an int32_t would be encoded as "00 00 00 05" with length 4. This commit checks if the value is castable to a smaller int and encodes it as such if so. This is cascading, so even a 64 bit integer with value 5 will be encoded with length 1. Note that this does not seem to be required by the specification, but this is how Anjay and the other LwM2M stack seem to do it. Signed-off-by: Benjamin Lindqvist <benjamin.lindqvist@endian.se> |
||
---|---|---|
.. | ||
bluetooth | ||
canbus | ||
console | ||
cpp | ||
debug | ||
dfu | ||
disk | ||
emul | ||
fb | ||
fs | ||
jwt | ||
logging | ||
lorawan | ||
mgmt | ||
net | ||
power | ||
random | ||
settings | ||
shell | ||
stats | ||
storage | ||
testsuite | ||
timing | ||
tracing | ||
usb | ||
CMakeLists.txt | ||
Kconfig |