![]() |
nRF Connect SDK API 3.3.99
|
| 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.
| [out] | obj | Object to be initialized with the decoded data. |
| [in] | input | Data received from nRF Cloud. |
| -EINVAL | Invalid parameter. |
| -ENOTSUP | Action not supported for the object's type. |
| -ENOMSG | Unable to decode data to a known type. |
| 0 | Data successfully decoded. |