51 read_int(
const lwm2m_context_t *ctx,
const uint8_t *inbuf,
size_t len,
56 size = oma_tlv_read(&tlv, inbuf, len);
58 *value = oma_tlv_get_int32(&tlv);
64 read_string(
const lwm2m_context_t *ctx,
const uint8_t *inbuf,
size_t len,
65 uint8_t *value,
size_t stringlen)
69 size = oma_tlv_read(&tlv, inbuf, len);
71 if(stringlen <= tlv.length) {
75 memcpy(value, tlv.value, tlv.length);
76 value[tlv.length] =
'\0';
82 read_float32fix(
const lwm2m_context_t *ctx,
const uint8_t *inbuf,
size_t len,
83 int32_t *value,
int bits)
87 size = oma_tlv_read(&tlv, inbuf, len);
89 oma_tlv_float32_to_fix(&tlv, value, bits);
95 read_boolean(
const lwm2m_context_t *ctx,
const uint8_t *inbuf,
size_t len,
100 size = oma_tlv_read(&tlv, inbuf, len);
102 *value = oma_tlv_get_int32(&tlv) != 0;
107 const lwm2m_reader_t oma_tlv_reader = {
Header file for the Contiki OMA LWM2M TLV reader
Header file for the Contiki OMA LWM2M object API
Header file for the Contiki OMA LWM2M TLV