nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ lwm2m_carrier_app_data_set()

int lwm2m_carrier_app_data_set ( const uint16_t *  path,
uint16_t  path_len,
const uint8_t *  buffer,
size_t  buffer_len 
)

#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>

Set application data in either the OMA LwM2M BinaryAppDataContainer Object (/19/x/1/y), or the Huawei LwM2M App Data Container Object (/10250/0/1).

This function sets the resource given by the path to the desired value. The resource can then be read by, or reported to, the LwM2M Server.

Note
LWM2M_CARRIER_OBJECT_BINARY_APP_DATA_CONTAINER is available in LWM2M_CARRIER_SOFTBANK and LWM2M_CARRIER_GENERIC. LWM2M_CARRIER_OBJECT_APP_DATA_CONTAINER is available in LWM2M_CARRIER_LG_UPLUS.
Parameters
[in]pathThe path of the resource or resource instance which is to be set. The path contains in order:
[in]path_lenThe length of the path. Must be:
[in]bufferBuffer containing the application data to be set. If this is set to null the resource instance is deleted instead when using the Binary App Data Container object.
[in]buffer_lenNumber of bytes in the buffer.
Return values
0If the resource has been set successfully.
-ENOENTIf the object is not initialized.
-EINVALIf at least one input argument is incorrect.
-ENOMEMIf there is not enough memory to copy the buffer contents to the resource model.