nRF5 IoT SDK  v0.9.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
IPSO Smart Object TLV encoder and decoder API

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_outputPointer to a LWM2M server object to be filled by the decoded TLVs.
[in]p_bufferPointer to the TLV byte buffer to be decoded.
[in]buffer_lenSize of the buffer to be decoded.
Return values
NRF_SUCCESSIf 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_bufferPointer to a byte buffer to be used to fill the encoded TLVs.
[in,out]p_buffer_lenValue by reference inicating the size of the buffer provided. Will return the number of used bytes on return.
[in]p_digital_outputPointer to the IPSO digital output object to be encoded into TLVs.
Return values
NRF_SUCCESSIf the encoded was successfull.