#include <include/net/nrf_cloud_coap.h>
Query the device's delta or desired shadow section. The delta section indicates differences between the desired and reported sections. Clear the delta by aligning the desired and reported sections using nrf_cloud_coap_shadow_desired_update or nrf_cloud_coap_shadow_state_update, respectively.
- Parameters
-
[in,out] | buf | Pointer to memory in which to receive the delta. |
[in,out] | buf_len | Size of buffer, will be set to the incoming length. |
[in] | delta | True to request only changes in the shadow, if any; otherwise, all of the desired section. If there is no data in the specified section, the return value will be 0 and the value of buf_len will be 0. |
[in] | format | Content format of the returned data. Supported values are COAP_CONTENT_FORMAT_APP_OCTET_STREAM, COAP_CONTENT_FORMAT_APP_JSON, and COAP_CONTENT_FORMAT_APP_CBOR. |
- Return values
-
-EACCES | Device does not have a valid nRF Cloud CoAP connection. |
-E2BIG | Shadow data was received, but truncated because the provided buffer was not big enough. |
- 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.