OMA LWM2M object TLV encoder and decoder API.
More...
OMA LWM2M object TLV encoder and decoder API.
uint32_t lwm2m_tlv_security_decode |
( |
lwm2m_security_t * |
p_security, |
|
|
uint8_t * |
p_buffer, |
|
|
uint32_t |
buffer_len |
|
) |
| |
Decode a LWM2M security 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_security | 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 lwm2m_tlv_security_encode |
( |
uint8_t * |
p_buffer, |
|
|
uint32_t * |
p_buffer_len, |
|
|
lwm2m_security_t * |
p_security |
|
) |
| |
Encode a LWM2M security 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_security | Pointer to the LWM2M security object to be encoded into TLVs. |
- Return values
-
NRF_SUCCESS | If the encoded was successfull. |
uint32_t lwm2m_tlv_server_decode |
( |
lwm2m_server_t * |
p_server, |
|
|
uint8_t * |
p_buffer, |
|
|
uint32_t |
buffer_len |
|
) |
| |
Decode a LWM2M server 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_server | 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 lwm2m_tlv_server_encode |
( |
uint8_t * |
p_buffer, |
|
|
uint32_t * |
p_buffer_len, |
|
|
lwm2m_server_t * |
p_server |
|
) |
| |
Encode a LWM2M server 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 indicating the size of the buffer provided. Will return the number of used bytes on return. |
[in] | p_server | Pointer to the LWM2M server object to be encoded into TLVs. |
- Return values
-
NRF_SUCCESS | If the encoded was successfull. |