![]() |
nRF Connect SDK API 3.3.99
|
| 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.
| [out] | obj | Object to encode. |
| -EINVAL | Invalid parameter. |
| -ENOMEM | Out of memory. |
| -ENOTSUP | Action not supported for the object's type. |
| 0 | Success; object initialized. |