Demo application for using the AT&T IoT Starter Kit Powered by AWS.
Dependencies: SDFileSystem
Fork of ATT_AWS_IoT_demo by
aws_iot_shadow_records.h
00001 /* 00002 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"). 00005 * You may not use this file except in compliance with the License. 00006 * A copy of the License is located at 00007 * 00008 * http://aws.amazon.com/apache2.0 00009 * 00010 * or in the "license" file accompanying this file. This file is distributed 00011 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 00012 * express or implied. See the License for the specific language governing 00013 * permissions and limitations under the License. 00014 */ 00015 00016 #ifndef SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ 00017 #define SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ 00018 00019 #include <stdbool.h> 00020 00021 #include "aws_iot_shadow_interface.h" 00022 #include "aws_iot_config.h" 00023 00024 00025 extern uint32_t shadowJsonVersionNum; 00026 extern bool shadowDiscardOldDeltaFlag; 00027 00028 extern char myThingName[MAX_SIZE_OF_THING_NAME]; 00029 extern char mqttClientID[MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES]; 00030 00031 void initializeRecords(MQTTClient_t *pClient); 00032 bool isSubscriptionPresent(const char *pThingName, ShadowActions_t action); 00033 IoT_Error_t subscribeToShadowActionAcks(const char *pThingName, ShadowActions_t action, bool isSticky); 00034 void incrementSubscriptionCnt(const char *pThingName, ShadowActions_t action, bool isSticky); 00035 00036 IoT_Error_t publishToShadowAction(const char * pThingName, ShadowActions_t action, const char *pJsonDocumentToBeSent); 00037 void addToAckWaitList(uint8_t indexAckWaitList, const char *pThingName, ShadowActions_t action, 00038 const char *pExtractedClientToken, fpActionCallback_t callback, void *pCallbackContext, 00039 uint32_t timeout_seconds); 00040 bool getNextFreeIndexOfAckWaitList(uint8_t *pIndex); 00041 void HandleExpiredResponseCallbacks(void); 00042 void initDeltaTokens(void); 00043 IoT_Error_t registerJsonTokenOnDelta(jsonStruct_t *pStruct); 00044 00045 #endif /* SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ */ 00046
Generated on Tue Jul 12 2022 22:13:20 by 1.7.2