![]() |
nRF Connect SDK API 3.3.99
|
| int nrf_cloud_shadow_config_delta_process | ( | struct nrf_cloud_obj *const | delta_obj, |
| int(* | process_cfg )(struct nrf_cloud_obj *cfg_obj), | ||
| int(* | add_cfg_data )(struct nrf_cloud_obj *cfg_obj) ) |
#include <include/net/nrf_cloud_codec.h>
Process a shadow config delta using application-provided callbacks.
Extracts the "config" object from delta_obj, calls process_cfg to apply it, and on rejection (-EBADF) repopulates it via add_cfg_data before reinserting it into delta_obj so the caller can send a shadow response.
| [in,out] | delta_obj | The "state" object from a shadow delta. |
| [in] | process_cfg | Callback to apply the received config; returns -EBADF to reject. |
| [in] | add_cfg_data | Callback to populate a replacement config object on rejection. |
| 0 | Config applied successfully. |
| -EINVAL | Invalid parameter. |
| -ENOMSG | No config found in delta. |
| -ENOMEM | Failed to reconstruct delta object. |