AWS IoT Device SDK C:
Shadow
AWS IoT Device Shadow library
|
Return to main page ↑ |
Parameter to a Shadow callback function. More...
#include <aws_iot_shadow_types.h>
Data Fields | |
AwsIotShadowCallbackType_t | callbackType |
Reason for invoking the Shadow callback function to provide context. | |
const char * | pThingName |
The Thing Name associated with this Shadow callback. | |
size_t | thingNameLength |
Length of AwsIotShadowCallbackParam_t.pThingName. | |
IotMqttConnection_t | mqttConnection |
The MQTT connection associated with the Shadow callback. | |
union { | |
struct { | |
struct { | |
const char * pDocument | |
Retrieved Shadow document. | |
size_t documentLength | |
Length of retrieved Shadow document. | |
} get | |
Retrieved Shadow document, valid only for a completed Shadow Get. | |
AwsIotShadowError_t result | |
Result of Shadow operation, e.g. succeeded or failed. | |
AwsIotShadowOperation_t reference | |
Reference to the Shadow operation that completed. | |
} operation | |
Information on a completed Shadow operation. | |
struct { | |
const char * pDocument | |
Shadow delta or updated document. | |
size_t documentLength | |
Length of Shadow delta or updated document. | |
} callback | |
Shadow document from an incoming delta or updated topic. | |
} | u |
Valid member depends on callback type. | |
Parameter to a Shadow callback function.
Parameter for: Shadow callback functions
The Shadow library passes this struct to a callback function whenever a Shadow operation completes or a message is received on a Shadow delta or updated topic.
The valid members of this struct are different based on AwsIotShadowCallbackParam_t.callbackType. If the callback type is AWS_IOT_SHADOW_DELETE_COMPLETE, AWS_IOT_SHADOW_GET_COMPLETE, or AWS_IOT_SHADOW_UPDATE_COMPLETE, then AwsIotShadowCallbackParam_t.operation is valid. Otherwise, if the callback type is AWS_IOT_SHADOW_DELTA_CALLBACK or AWS_IOT_SHADOW_UPDATED_CALLBACK, then AwsIotShadowCallbackParam_t.callback is valid.
const char* AwsIotShadowCallbackParam_t::pDocument |
Retrieved Shadow document.
Shadow delta or updated document.
size_t AwsIotShadowCallbackParam_t::documentLength |
Length of retrieved Shadow document.
Length of Shadow delta or updated document.