net: lwm2m: fix senml cbor object link encoding

use text format instead of tlv format

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
This commit is contained in:
Pascal Brogle 2022-11-24 14:38:04 +01:00 committed by Carles Cufí
commit 60bf310aae
2 changed files with 57 additions and 12 deletions

View file

@ -791,10 +791,12 @@ ZTEST(net_content_senml_cbor, test_put_objlnk)
(0x00 << 5) | 0,
(0x03 << 5) | 1,
'7',
(0x00 << 5) | 2,
(0x00 << 5) | 0
(0x03 << 5) | 3,
'v', 'l', 'o',
(0x03 << 5) | 3,
'0', ':', '0',
},
.len = 18
.len = 24
},
{
.data = {
@ -806,11 +808,12 @@ ZTEST(net_content_senml_cbor, test_put_objlnk)
(0x00 << 5) | 0,
(0x03 << 5) | 1,
'7',
(0x00 << 5) | 2,
(0x00 << 5) | 26,
0, 1, 0, 2
(0x03 << 5) | 3,
'v', 'l', 'o',
(0x03 << 5) | 3,
'1', ':', '2',
},
.len = 22
.len = 24
},
{
.data = {
@ -822,10 +825,12 @@ ZTEST(net_content_senml_cbor, test_put_objlnk)
(0x00 << 5) | 0,
(0x03 << 5) | 1,
'7',
(0x00 << 5) | 2,
(0x01 << 5) | 0,
(0x03 << 5) | 3,
'v', 'l', 'o',
(0x03 << 5) | 11,
'6', '5', '5', '3', '5', ':', '6', '5', '5', '3', '5',
},
.len = 18
.len = 32
},
};