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

◆ nrf_cloud_shadow_transform_request()

int nrf_cloud_shadow_transform_request ( char const *const transform,
const size_t max_response_len )

#include <include/net/nrf_cloud.h>

Request shadow data over MQTT using a JSONata expression. For example, to request the reported device info section, the transform would be: "state.reported.device.deviceInfo". The application will receive response data in an NRF_CLOUD_EVT_RX_DATA_SHADOW event. The nrf_cloud_obj_shadow_data will be of the type NRF_CLOUD_OBJ_SHADOW_TYPE_TF.

Parameters
transformThe JSONata expression.
max_response_lenThe maximum allowable length of the cloud's response. Set to 0 to use the default length: NRF_CLOUD_TRANSFORM_MAX_RESPONSE_LEN.
Return values
0Request was sent successfully.
-ENOTSUPError;
CONFIG_NRF_CLOUD_MQTT_SHADOW_TRANSFORMS 
is not enabled.
-EINVALError; invalid parameter.
Returns
A negative value indicates an error.