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

◆ nrf_cloud_coap_shadow_state_update()

int nrf_cloud_coap_shadow_state_update ( const char *const shadow_json)

#include <include/net/nrf_cloud_coap.h>

Update the device's "reported state" in the shadow through the state/update CoAP resource. This is used both to report the current state of the device as well as to accept settings changes received in a shadow delta.

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.