zephyr/subsys
Benjamin Lindqvist 660ad9791b net: lwm2m: Pack TLV integers more efficiently
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>
2020-10-26 11:31:28 +02:00
..
bluetooth Bluetooth: Mesh: Add queue_size and recv_win to lpn_cb 2020-10-24 10:57:45 +03:00
canbus
console
cpp
debug
dfu
disk
emul
fb
fs fs: Move fs_file_system_t declaration out of fs.h 2020-10-23 12:55:41 +02:00
jwt
logging logging: make log_backend_std header public 2020-10-21 10:21:05 -04:00
lorawan
mgmt mgmt/osdp: Fix early check of no-data that holds PD online 2020-10-21 17:36:16 +02:00
net net: lwm2m: Pack TLV integers more efficiently 2020-10-26 11:31:28 +02:00
power
random
settings
shell
stats
storage
testsuite
timing
tracing
usb usb: hci: Remove handling of unused DC statuses. 2020-10-20 10:04:32 -05:00
CMakeLists.txt
Kconfig