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

◆ nrf_cloud_coap_shadow_desired_update()

int nrf_cloud_coap_shadow_desired_update ( const char *const  shadow_json)

#include <include/net/nrf_cloud_coap.h>

Update the device's "desired state" in the shadow through the state/desired CoAP resource. Normally, this is only used to silence a shadow delta that is incompatible with the device, by overwriting the invalid desired values with the reported values.

Parameters
[in]shadow_jsonNull-terminated JSON string to be written to the device's shadow.
Return values
-EACCESDevice does not have a valid nRF Cloud CoAP connection.
Returns
0 If successful, nonzero if failed. Negative values are device-side errors defined in errno.h. Positive values are cloud-side errors (CoAP result codes) defined in zephyr/net/coap.h.