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

◆ nrf_cloud_obj_input_decode()

int nrf_cloud_obj_input_decode ( struct nrf_cloud_obj *const obj,
const struct nrf_cloud_data *const input )

#include <include/net/nrf_cloud_codec.h>

Decode data received from nRF Cloud.

If the provided obj has a valid type value, decoding for only that type is performed. If the provided obj does not have a valid type value, decoding for each type is performed until successful. If successful, memory is allocated for the provided object. The nrf_cloud_obj_free function should be called when finished with the object.

Parameters
[out]objObject to be initialized with the decoded data.
[in]inputData received from nRF Cloud.
Return values
-EINVALInvalid parameter.
-ENOTSUPAction not supported for the object's type.
-ENOMSGUnable to decode data to a known type.
0Data successfully decoded.