15 #ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_H_
16 #define AWS_IOT_SDK_SRC_IOT_SHADOW_H_
115 SHADOW_ACK_TIMEOUT, SHADOW_ACK_REJECTED, SHADOW_ACK_ACCEPTED
125 SHADOW_GET, SHADOW_UPDATE, SHADOW_DELETE
142 const char *pReceivedJsonDocument,
void *pContextData);
168 fpActionCallback_t callback,
void *pContextData, uint8_t timeout_seconds,
bool isPersistentSubscribe);
185 void *pContextData, uint8_t timeout_seconds,
bool isPersistentSubscribe);
201 void *pContextData, uint8_t timeout_seconds,
bool isPersistentSubscriptions);
242 #endif //AWS_IOT_SDK_SRC_IOT_SHADOW_H_
IoT_Error_t aws_iot_shadow_connect(MQTTClient_t *pClient, ShadowParameters_t *pParams)
Connect to the AWS IoT Thing Shadow service over MQTT.
Definition: aws_iot_shadow.c:63
IoT_Error_t aws_iot_shadow_get(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe)
This function is the one used to perform an Get action to a Thing Name's Shadow.
Definition: aws_iot_shadow.c:158
MQTT Client Type Definition.
Definition: aws_iot_mqtt_interface.h:301
char * pHost
This will be unique to a customer and can be retrieved from the console.
Definition: aws_iot_shadow_interface.h:51
Shadow Connect parameters.
Definition: aws_iot_shadow_interface.h:48
uint32_t aws_iot_shadow_get_last_received_version(void)
Version of a document is received with every accepted/rejected and the SDK keeps track of the last re...
Definition: aws_iot_shadow.c:37
IoT_Error_t aws_iot_shadow_disconnect(MQTTClient_t *pClient)
Disconnect from the AWS IoT Thing Shadow service over MQTT.
Definition: aws_iot_shadow.c:123
void aws_iot_shadow_disable_discard_old_delta_msgs(void)
Disable the ignoring of delta messages with old version number.
Definition: aws_iot_shadow.c:45
This file is the interface for all the Shadow related JSON functions.
IoT_Error_t aws_iot_shadow_delete(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscriptions)
This function is the one used to perform an Delete action to a Thing Name's Shadow.
Definition: aws_iot_shadow.c:142
IoT_Error_t aws_iot_shadow_register_delta(MQTTClient_t *pClient, jsonStruct_t *pStruct)
This function is used to listen on the delta topic of AWS_IOT_MY_THING_NAME mentioned in the aws_iot_...
Definition: aws_iot_shadow.c:106
IoT_Error_t
IoT Error enum.
Definition: aws_iot_error.h:30
void aws_iot_shadow_reset_last_received_version(void)
Reset the last received version number to zero. This will be useful if the Thing Shadow is deleted an...
Definition: aws_iot_shadow.c:33
void aws_iot_shadow_enable_discard_old_delta_msgs(void)
Enable the ignoring of delta messages with old version number.
Definition: aws_iot_shadow.c:41
IoT_Error_t aws_iot_shadow_yield(MQTTClient_t *pClient, int timeout)
Yield function to let the background tasks of MQTT and Shadow.
Definition: aws_iot_shadow.c:118
IoT_Error_t aws_iot_shadow_init(MQTTClient_t *pClient)
Initialize the Thing Shadow before use.
Definition: aws_iot_shadow.c:49
ShadowActions_t
Thing Shadow Action type enum.
Definition: aws_iot_shadow_interface.h:124
Shadow_Ack_Status_t
Thing Shadow Acknowledgment enum.
Definition: aws_iot_shadow_interface.h:114
This is the struct form of a JSON Key value pair.
Definition: aws_iot_shadow_json_data.h:58
const ShadowParameters_t ShadowParametersDefault
This is set to defaults from the configuration file The certs are set to NULL because they need the p...
Definition: aws_iot_shadow_interface.h:64
char * pClientKey
Location of Device private key.
Definition: aws_iot_shadow_interface.h:55
char * pMyThingName
Every device has a Thing Shadow and this is the placeholder for name.
Definition: aws_iot_shadow_interface.h:49
IoT_Error_t aws_iot_shadow_update(MQTTClient_t *pClient, const char *pThingName, char *pJsonString, fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe)
This function is the one used to perform an Update action to a Thing Name's Shadow.
Definition: aws_iot_shadow.c:127
Interface definition for MQTT client.
char * pMqttClientId
Currently the Shadow uses MQTT to connect and it is important to ensure we have unique client id...
Definition: aws_iot_shadow_interface.h:50
int port
By default the port is 8883.
Definition: aws_iot_shadow_interface.h:52
char * pClientCRT
Location of Device certs signed by AWS IoT service.
Definition: aws_iot_shadow_interface.h:54
char * pRootCA
Location with the Filename of the Root CA.
Definition: aws_iot_shadow_interface.h:53
void(* fpActionCallback_t)(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status, const char *pReceivedJsonDocument, void *pContextData)
Function Pointer typedef used as the callback for every action.
Definition: aws_iot_shadow_interface.h:141