nRF Connect SDK API 2.8.99
|
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.
[in] | path | The path of the resource or resource instance which is to be set. The path contains in order:
|
[in] | path_len | The length of the path. Must be: |
[in] | buffer | Buffer 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_len | Number of bytes in the buffer. |
0 | If the resource has been set successfully. |
-ENOENT | If the object is not initialized. |
-EINVAL | If at least one input argument is incorrect. |
-ENOMEM | If there is not enough memory to copy the buffer contents to the resource model. |