Jim Flynn / Mbed OS aws-iot-device-sdk-mbed-c
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers aws_iot_config.h Source File

aws_iot_config.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 /**
00017  * @file aws_iot_config.h
00018  * @brief AWS IoT specific configuration file
00019  */
00020 
00021 #ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
00022 #define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
00023 
00024 //#define _ENABLE_THREAD_SUPPORT_
00025 
00026 // Get from console
00027 // =================================================
00028 #define AWS_IOT_MQTT_HOST              "a1075elwyht7bd.iot.us-west-2.amazonaws.com"
00029 #define AWS_IOT_MQTT_PORT              443                      
00030 #define AWS_IOT_MQTT_CLIENT_ID         (char*)"c-sdk-client-id" 
00031 #define AWS_IOT_MY_THING_NAME          (char*)"AWS-IoT-C-SDK"   
00032 #define AWS_IOT_ROOT_CA_FILENAME       (char*)"rootCA.crt"      
00033 #define AWS_IOT_CERTIFICATE_FILENAME   (char*)"cert.pem"        
00034 #define AWS_IOT_PRIVATE_KEY_FILENAME   (char*)"privkey.pem"     
00035 // =================================================
00036 
00037 // MQTT PubSub
00038 #define AWS_IOT_MQTT_TX_BUF_LEN 512                      
00039 #define AWS_IOT_MQTT_RX_BUF_LEN 512                      
00040 #define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5            
00041 
00042 // Thing Shadow specific configs
00043 #define SHADOW_MAX_SIZE_OF_RX_BUFFER (AWS_IOT_MQTT_RX_BUF_LEN+1) 
00044 #define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80            
00045 #define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 
00046 #define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 
00047 #define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10          
00048 #define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10       
00049 #define MAX_JSON_TOKEN_EXPECTED 120                      
00050 #define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60     
00051 #define MAX_SIZE_OF_THING_NAME 20                        
00052 #define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME 
00053 
00054 // Auto Reconnect specific config
00055 #define AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL 1000    
00056 #define AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL 128000  
00057 
00058 #define DISABLE_METRICS false                            
00059 
00060 #endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */
00061