IPSO Smart Object TLV encoder and decoder API

nRF5 SDK v15.0.0

IPSO Smart Object TLV encoder and decoder API. More...

Functions

uint32_t ipso_tlv_ipso_digital_output_decode ( ipso_digital_output_t *p_digital_output, uint8_t *p_buffer, uint32_t buffer_len)
Decode an IPSO digital output object from a TLV byte buffer. More...
uint32_t ipso_tlv_ipso_digital_output_encode (uint8_t *p_buffer, uint32_t *p_buffer_len, ipso_digital_output_t *p_digital_output)
Encode an IPSO digital output object to a TLV byte buffer. More...

Detailed Description

IPSO Smart Object TLV encoder and decoder API.

Function Documentation

uint32_t ipso_tlv_ipso_digital_output_decode ( ipso_digital_output_t * p_digital_output ,
uint8_t * p_buffer ,
uint32_t buffer_len
)

Decode an IPSO digital output object from a TLV byte buffer.

Note
Resource values NOT found in the tlv will not be altered.
Warning
lwm2m_string_t and lwm2m_opaque_t values will point to the byte buffer and needs to be copied by the application before the byte buffer is freed.
Parameters
[out] p_digital_output Pointer to a LWM2M server object to be filled by the decoded TLVs.
[in] p_buffer Pointer to the TLV byte buffer to be decoded.
[in] buffer_len Size of the buffer to be decoded.
Return values
NRF_SUCCESS If decoding was successfull.
uint32_t ipso_tlv_ipso_digital_output_encode ( uint8_t * p_buffer ,
uint32_t * p_buffer_len ,
ipso_digital_output_t * p_digital_output
)

Encode an IPSO digital output object to a TLV byte buffer.

Parameters
[out] p_buffer Pointer to a byte buffer to be used to fill the encoded TLVs.
[in,out] p_buffer_len Value by reference inicating the size of the buffer provided. Will return the number of used bytes on return.
[in] p_digital_output Pointer to the IPSO digital output object to be encoded into TLVs.
Return values
NRF_SUCCESS If the encoded was successfull.