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

◆ nrf_cloud_obj_cloud_encode()

int nrf_cloud_obj_cloud_encode ( struct nrf_cloud_obj *const  obj)

#include <include/net/nrf_cloud_codec.h>

Encode the object's data for transport to nRF Cloud.

If successful, memory is allocated for the encoded data. The nrf_cloud_obj_cloud_encoded_free function should be called when finished with the object.

Parameters
[out]objObject to encode.
Return values
-EINVALInvalid parameter.
-ENOMEMOut of memory.
-ENOTSUPAction not supported for the object's type.
0Success; object initialized.