AWS IoT Device Shadow v1.1.0
AWS IoT Device Shadow client library
Constants

Constants defined in the Shadow library. More...

Macros

#define SHADOW_PREFIX   "$aws/things/"
 The common prefix of all Shadow MQTT topics from here https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html.
 
#define SHADOW_PREFIX_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_PREFIX ) - 1U ) )
 The length of SHADOW_PREFIX.
 
#define SHADOW_CLASSIC_ROOT   "/shadow"
 The root of all unnamed "Classic" Shadow MQTT topics from here https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html.
 
#define SHADOW_CLASSIC_ROOT_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_CLASSIC_ROOT ) - 1U ) )
 The length of SHADOW_CLASSIC_ROOT.
 
#define SHADOW_NAMED_ROOT   "/shadow/name/"
 The common root of all named Shadow MQTT topics from here https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html.
 
#define SHADOW_NAMED_ROOT_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_NAMED_ROOT ) - 1U ) )
 The length of SHADOW_NAMED_ROOT.
 
#define SHADOW_OP_DELETE   "/delete"
 The string representing a Shadow "DELETE" operation in a Shadow MQTT topic.
 
#define SHADOW_OP_DELETE_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_OP_DELETE ) - 1U ) )
 The length of SHADOW_OP_DELETE.
 
#define SHADOW_OP_GET   "/get"
 The string representing a Shadow "GET" operation in a Shadow MQTT topic.
 
#define SHADOW_OP_GET_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_OP_GET ) - 1U ) )
 The length of SHADOW_OP_GET.
 
#define SHADOW_OP_UPDATE   "/update"
 The string representing a Shadow "UPDATE" operation in a Shadow MQTT topic.
 
#define SHADOW_OP_UPDATE_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_OP_UPDATE ) - 1U ) )
 The length of SHADOW_OP_UPDATE.
 
#define SHADOW_SUFFIX_ACCEPTED   "/accepted"
 The suffix for a Shadow operation "accepted" topic.
 
#define SHADOW_SUFFIX_ACCEPTED_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_SUFFIX_ACCEPTED ) - 1U ) )
 The length of SHADOW_SUFFIX_ACCEPTED.
 
#define SHADOW_SUFFIX_REJECTED   "/rejected"
 The suffix for a Shadow operation "rejected" topic.
 
#define SHADOW_SUFFIX_REJECTED_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_SUFFIX_REJECTED ) - 1U ) )
 The length of SHADOW_SUFFIX_REJECTED.
 
#define SHADOW_SUFFIX_DELTA   "/delta"
 The suffix for a Shadow "delta" topic.
 
#define SHADOW_SUFFIX_DELTA_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_SUFFIX_DELTA ) - 1U ) )
 The length of SHADOW_SUFFIX_DELTA.
 
#define SHADOW_SUFFIX_DOCUMENTS   "/documents"
 The suffix for a Shadow "documents" topic.
 
#define SHADOW_SUFFIX_DOCUMENTS_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_SUFFIX_DOCUMENTS ) - 1U ) )
 The length of SHADOW_SUFFIX_DOCUMENTS.
 
#define SHADOW_SUFFIX_NULL
 The suffix for a "null" suffix.
 
#define SHADOW_SUFFIX_NULL_LENGTH   ( 0U )
 The length of null suffix.
 
#define SHADOW_THINGNAME_LENGTH_MAX   ( 128U )
 The maximum length of Thing Name.
 
#define SHADOW_NAME_LENGTH_MAX   ( 64U )
 The maximum length of Shadow Name.
 
#define SHADOW_NAME_CLASSIC   ""
 The name string for the unnamed "Classic" shadow.
 
#define SHADOW_NAME_CLASSIC_LENGTH   ( ( uint16_t ) ( sizeof( SHADOW_NAME_CLASSIC ) - 1U ) )
 The length of SHADOW_NAME_CLASSIC.
 
#define SHADOW_TOPIC_LEN(operationLength, suffixLength, thingNameLength, shadowNameLength)
 Compute shadow topic length. More...
 
#define SHADOW_TOPIC_LEN_UPDATE(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_NULL_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/update" or "$aws/things/<thingName>/shadow/name/<shadowName>/update". More...
 
#define SHADOW_TOPIC_LEN_UPDATE_ACC(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_ACCEPTED_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/accepted". More...
 
#define SHADOW_TOPIC_LEN_UPDATE_REJ(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_REJECTED_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/rejected". More...
 
#define SHADOW_TOPIC_LEN_UPDATE_DOCS(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DOCUMENTS_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/documents" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/documents". More...
 
#define SHADOW_TOPIC_LEN_UPDATE_DELTA(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DELTA_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/delta" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/delta". More...
 
#define SHADOW_TOPIC_LEN_GET(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_GET_LENGTH, SHADOW_SUFFIX_NULL_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/get" or "$aws/things/<thingName>/shadow/name/<shadowName>/get". More...
 
#define SHADOW_TOPIC_LEN_GET_ACC(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_GET_LENGTH, SHADOW_SUFFIX_ACCEPTED_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/get/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/accepted". More...
 
#define SHADOW_TOPIC_LEN_GET_REJ(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_GET_LENGTH, SHADOW_SUFFIX_REJECTED_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/get/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/rejected". More...
 
#define SHADOW_TOPIC_LEN_DELETE(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_DELETE_LENGTH, SHADOW_SUFFIX_NULL_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/delete" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete". More...
 
#define SHADOW_TOPIC_LEN_DELETE_ACC(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_DELETE_LENGTH, SHADOW_SUFFIX_ACCEPTED_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/delete/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/accepted". More...
 
#define SHADOW_TOPIC_LEN_DELETE_REJ(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_DELETE_LENGTH, SHADOW_SUFFIX_REJECTED_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of shadow topic "$aws/things/<thingName>/shadow/delete/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/rejected". More...
 
#define SHADOW_TOPIC_LEN_MAX(thingNameLength, shadowNameLength)    SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DOCUMENTS_LENGTH, thingNameLength, shadowNameLength )
 Compute the length of the longest shadow topic. More...
 
#define SHADOW_TOPIC_STR(thingName, shadowName, operation, suffix)
 Assemble constant shadow topic strings when Thing Name is known at compile time. More...
 
#define SHADOW_TOPIC_STR_UPDATE(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_NULL )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/update" or "$aws/things/<thingName>/shadow/name/<shadowName>/update". More...
 
#define SHADOW_TOPIC_STR_UPDATE_ACC(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_ACCEPTED )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/update/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/accepted". More...
 
#define SHADOW_TOPIC_STR_UPDATE_REJ(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_REJECTED )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/update/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/rejected". More...
 
#define SHADOW_TOPIC_STR_UPDATE_DOCS(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_DOCUMENTS )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/update/documents" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/documents". More...
 
#define SHADOW_TOPIC_STR_UPDATE_DELTA(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_DELTA )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/update/delta" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/delta". More...
 
#define SHADOW_TOPIC_STR_GET(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_GET, SHADOW_SUFFIX_NULL )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/get" or "$aws/things/<thingName>/shadow/name/<shadowName>/get". More...
 
#define SHADOW_TOPIC_STR_GET_ACC(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_GET, SHADOW_SUFFIX_ACCEPTED )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/get/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/accepted". More...
 
#define SHADOW_TOPIC_STR_GET_REJ(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_GET, SHADOW_SUFFIX_REJECTED )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/get/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/rejected". More...
 
#define SHADOW_TOPIC_STR_DELETE(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_DELETE, SHADOW_SUFFIX_NULL )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/delete" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete". More...
 
#define SHADOW_TOPIC_STR_DELETE_ACC(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_DELETE, SHADOW_SUFFIX_ACCEPTED )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/delete/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/accepted". More...
 
#define SHADOW_TOPIC_STR_DELETE_REJ(thingName, shadowName)    SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_DELETE, SHADOW_SUFFIX_REJECTED )
 Assemble shadow topic string "$aws/things/<thingName>/shadow/delete/rejected". or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/rejected". More...
 

Detailed Description

Constants defined in the Shadow library.

Macro Definition Documentation

◆ SHADOW_TOPIC_LEN

#define SHADOW_TOPIC_LEN (   operationLength,
  suffixLength,
  thingNameLength,
  shadowNameLength 
)
Value:
( operationLength + suffixLength + thingNameLength + shadowNameLength + \
SHADOW_PREFIX_LENGTH + \
( ( shadowNameLength > 0 ) ? SHADOW_NAMED_ROOT_LENGTH : SHADOW_CLASSIC_ROOT_LENGTH ) )
#define SHADOW_CLASSIC_ROOT_LENGTH
The length of SHADOW_CLASSIC_ROOT.
Definition: shadow.h:131
#define SHADOW_NAMED_ROOT_LENGTH
The length of SHADOW_NAMED_ROOT.
Definition: shadow.h:144

Compute shadow topic length.

The format of shadow topic strings is defined at https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html

A shadow topic string takes one of the two forms, in the case of an unnamed ("Classic") shadow: $aws/things/<thingName>/shadow/<operation> $aws/things/<thingName>/shadow/<operation>/<suffix>

Or as follows, in the case of a named shadow: $aws/things/<thingName>/shadow/name/<shadowName>/<operation> $aws/things/<thingName>/shadow/name/<shadowName>/<operation>/<suffix>

The <thingName>, <shadowName>, <operation> and <suffix> segments correspond to the four input parameters of this macro. The <suffix> part can be null.

When thingName and shadow name are known to be "myThing" and "myShadow" at compile time, invoke the macro like this: (In this case, the length is a constant at compile time.)

SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DELTA_LENGTH, 7, 8 )

When thingName and shadowName are only known at run time, and held in variables myThingName and myShadowName, invoke the macro like this:

SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DELTA_LENGTH,
                  strlen( ( const char * ) myThingName ),
                  strlen( ( const char * ) myShadowName ) )

To compute an unnamed ("Classic") shadow length, the shadowName length passed must be zero.

Parameters
[in]operationLengthCan be one of:
[in]suffixLengthCan be one of:
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_UPDATE

#define SHADOW_TOPIC_LEN_UPDATE (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_NULL_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/update" or "$aws/things/<thingName>/shadow/name/<shadowName>/update".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_UPDATE_ACC

#define SHADOW_TOPIC_LEN_UPDATE_ACC (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_ACCEPTED_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/accepted".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_UPDATE_REJ

#define SHADOW_TOPIC_LEN_UPDATE_REJ (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_REJECTED_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/rejected".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_UPDATE_DOCS

#define SHADOW_TOPIC_LEN_UPDATE_DOCS (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DOCUMENTS_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/documents" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/documents".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_UPDATE_DELTA

#define SHADOW_TOPIC_LEN_UPDATE_DELTA (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DELTA_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/update/delta" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/delta".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_GET

#define SHADOW_TOPIC_LEN_GET (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_GET_LENGTH, SHADOW_SUFFIX_NULL_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/get" or "$aws/things/<thingName>/shadow/name/<shadowName>/get".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_GET_ACC

#define SHADOW_TOPIC_LEN_GET_ACC (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_GET_LENGTH, SHADOW_SUFFIX_ACCEPTED_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/get/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/accepted".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_GET_REJ

#define SHADOW_TOPIC_LEN_GET_REJ (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_GET_LENGTH, SHADOW_SUFFIX_REJECTED_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/get/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/rejected".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_DELETE

#define SHADOW_TOPIC_LEN_DELETE (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_DELETE_LENGTH, SHADOW_SUFFIX_NULL_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/delete" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_DELETE_ACC

#define SHADOW_TOPIC_LEN_DELETE_ACC (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_DELETE_LENGTH, SHADOW_SUFFIX_ACCEPTED_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/delete/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/accepted".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_DELETE_REJ

#define SHADOW_TOPIC_LEN_DELETE_REJ (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_DELETE_LENGTH, SHADOW_SUFFIX_REJECTED_LENGTH, thingNameLength, shadowNameLength )

Compute the length of shadow topic "$aws/things/<thingName>/shadow/delete/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/rejected".

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_LEN_MAX

#define SHADOW_TOPIC_LEN_MAX (   thingNameLength,
  shadowNameLength 
)     SHADOW_TOPIC_LEN( SHADOW_OP_UPDATE_LENGTH, SHADOW_SUFFIX_DOCUMENTS_LENGTH, thingNameLength, shadowNameLength )

Compute the length of the longest shadow topic.

Parameters
[in]thingNameLengthLength of the thingName excluding the ending NULL.
[in]shadowNameLengthLength of the shadowName excluding the ending NULL. Zero for "Classic" shadow.
Returns
Length of the shadow topic in bytes.

◆ SHADOW_TOPIC_STR

#define SHADOW_TOPIC_STR (   thingName,
  shadowName,
  operation,
  suffix 
)
Value:
( ( sizeof( shadowName ) > 1 ) ? \
( SHADOW_PREFIX thingName SHADOW_NAMED_ROOT shadowName operation suffix ) : \
( SHADOW_PREFIX thingName SHADOW_CLASSIC_ROOT operation suffix ) )
#define SHADOW_NAMED_ROOT
The common root of all named Shadow MQTT topics from here https://docs.aws.amazon....
Definition: shadow.h:138
#define SHADOW_PREFIX
The common prefix of all Shadow MQTT topics from here https://docs.aws.amazon.com/iot/latest/develope...
Definition: shadow.h:112
#define SHADOW_CLASSIC_ROOT
The root of all unnamed "Classic" Shadow MQTT topics from here https://docs.aws.amazon....
Definition: shadow.h:125

Assemble constant shadow topic strings when Thing Name is known at compile time.

When thingName is known to be "myThing" at compile time, invoke the macro like this:

SHADOW_TOPIC_STR( SHADOW_OP_UPDATE, SHADOW_SUFFIX_DELTA, "myThing" )

When thingName is only known at run time, do not use this macro. Use the Shadow_GetTopicString() function instead.

Parameters
[in]operationCan be one of:
[in]suffixCan be one of:
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_UPDATE

#define SHADOW_TOPIC_STR_UPDATE (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_NULL )

Assemble shadow topic string "$aws/things/<thingName>/shadow/update" or "$aws/things/<thingName>/shadow/name/<shadowName>/update".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_UPDATE_ACC

#define SHADOW_TOPIC_STR_UPDATE_ACC (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_ACCEPTED )

Assemble shadow topic string "$aws/things/<thingName>/shadow/update/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/accepted".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_UPDATE_REJ

#define SHADOW_TOPIC_STR_UPDATE_REJ (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_REJECTED )

Assemble shadow topic string "$aws/things/<thingName>/shadow/update/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/rejected".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_UPDATE_DOCS

#define SHADOW_TOPIC_STR_UPDATE_DOCS (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_DOCUMENTS )

Assemble shadow topic string "$aws/things/<thingName>/shadow/update/documents" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/documents".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_UPDATE_DELTA

#define SHADOW_TOPIC_STR_UPDATE_DELTA (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_UPDATE, SHADOW_SUFFIX_DELTA )

Assemble shadow topic string "$aws/things/<thingName>/shadow/update/delta" or "$aws/things/<thingName>/shadow/name/<shadowName>/update/delta".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_GET

#define SHADOW_TOPIC_STR_GET (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_GET, SHADOW_SUFFIX_NULL )

Assemble shadow topic string "$aws/things/<thingName>/shadow/get" or "$aws/things/<thingName>/shadow/name/<shadowName>/get".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_GET_ACC

#define SHADOW_TOPIC_STR_GET_ACC (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_GET, SHADOW_SUFFIX_ACCEPTED )

Assemble shadow topic string "$aws/things/<thingName>/shadow/get/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/accepted".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_GET_REJ

#define SHADOW_TOPIC_STR_GET_REJ (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_GET, SHADOW_SUFFIX_REJECTED )

Assemble shadow topic string "$aws/things/<thingName>/shadow/get/rejected" or "$aws/things/<thingName>/shadow/name/<shadowName>/get/rejected".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_DELETE

#define SHADOW_TOPIC_STR_DELETE (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_DELETE, SHADOW_SUFFIX_NULL )

Assemble shadow topic string "$aws/things/<thingName>/shadow/delete" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_DELETE_ACC

#define SHADOW_TOPIC_STR_DELETE_ACC (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_DELETE, SHADOW_SUFFIX_ACCEPTED )

Assemble shadow topic string "$aws/things/<thingName>/shadow/delete/accepted" or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/accepted".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.

◆ SHADOW_TOPIC_STR_DELETE_REJ

#define SHADOW_TOPIC_STR_DELETE_REJ (   thingName,
  shadowName 
)     SHADOW_TOPIC_STR( thingName, shadowName, SHADOW_OP_DELETE, SHADOW_SUFFIX_REJECTED )

Assemble shadow topic string "$aws/things/<thingName>/shadow/delete/rejected". or "$aws/things/<thingName>/shadow/name/<shadowName>/delete/rejected".

Parameters
[in]thingNameThing Name.
[in]shadowNameShadow Name. Empty string for an unnamed ("Classic") shadow.
Returns
Topic string.