AWS IoT Device SDK C: Shadow
AWS IoT Device Shadow library
Return to main page ↑
AwsIotShadowDocumentInfo_t Struct Reference

Information on a Shadow document for AwsIotShadow_GetAsync or AwsIotShadow_UpdateAsync. More...

#include <aws_iot_shadow_types.h>

Data Fields

const char * pThingName
 The Thing Name associated with this Shadow document.
 
size_t thingNameLength
 Length of AwsIotShadowDocumentInfo_t.pThingName.
 
IotMqttQos_t qos
 QoS when sending a Shadow get or update message. See IotMqttPublishInfo_t.qos.
 
uint32_t retryLimit
 Maximum number of retries for a Shadow get or update message. See IotMqttPublishInfo_t.retryLimit.
 
uint32_t retryMs
 First retry time for a Shadow get or update message. See IotMqttPublishInfo_t.retryMs.
 
union {
   struct {
      void *(*   mallocDocument )(size_t documentLength)
 Function to allocate memory for an incoming Shadow document. More...
 
   }   get
 Valid members for AwsIotShadow_GetAsync.
 
   struct {
      const char *   pUpdateDocument
 The Shadow document to send in the update.
 
      size_t   updateDocumentLength
 Length of Shadow update document.
 
   }   update
 Valid members for AwsIotShadow_UpdateAsync.
 
u
 Valid member depends on operation type.
 

Detailed Description

Information on a Shadow document for AwsIotShadow_GetAsync or AwsIotShadow_UpdateAsync.

Parameter for: AwsIotShadow_GetAsync, AwsIotShadow_UpdateAsync

The valid members of this struct are different based on whether this struct is passed to AwsIotShadow_GetAsync or AwsIotShadow_UpdateAsync. When passed to AwsIotShadow_GetAsync, the get member is valid. When passed to AwsIotShadow_UpdateAsync, the update member is valid. All other members must always be set.

All instances of AwsIotShadowDocumentInfo_t should be initialized with AWS_IOT_SHADOW_DOCUMENT_INFO_INITIALIZER.

Field Documentation

◆ mallocDocument

void*( * AwsIotShadowDocumentInfo_t::mallocDocument) (size_t documentLength)

Function to allocate memory for an incoming Shadow document.

Parameters
[in]documentLengthLength of the document that needs to be allocated. This only needs to be set if AWS_IOT_SHADOW_FLAG_WAITABLE is passed to AwsIotShadow_GetAsync.

The documentation for this struct was generated from the following file: