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

◆ nrf_cloud_obj_num_add()

int nrf_cloud_obj_num_add ( struct nrf_cloud_obj *const obj,
const char *const key,
const double val,
const bool data_child )

#include <include/net/nrf_cloud_codec.h>

Add a key string and number value to the provided object.

Parameters
[out]objObject to contain key and value.
[in]keyKey string; must be valid and constant for the life of the object.
[in]valNumber value.
[in]data_childIf true, key and number will be added as a child to a "data" object. If false, key and number will be added as a child to the provided object.
Return values
-EINVALInvalid parameter.
-ENOENTObject is not initialized.
-ENOMEMOut of memory.
-ENOTSUPAction not supported for the object's type.
0Success; item added.