AWS IoT Embedded C Device SDK
samples/linux/shadow_sample_console_echo/aws_iot_config.h
1 /*
2  * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
21 #ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
22 #define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
23 
24 // Get from console
25 // =================================================
26 #define AWS_IOT_MQTT_HOST ""
27 #define AWS_IOT_MQTT_PORT 8883
28 #define AWS_IOT_MQTT_CLIENT_ID "c-sdk-client-id"
29 #define AWS_IOT_MY_THING_NAME "AWS-IoT-C-SDK"
30 #define AWS_IOT_ROOT_CA_FILENAME "rootCA.crt"
31 #define AWS_IOT_CERTIFICATE_FILENAME "cert.pem"
32 #define AWS_IOT_PRIVATE_KEY_FILENAME "privkey.pem"
33 // =================================================
34 
35 // MQTT PubSub
36 #define AWS_IOT_MQTT_TX_BUF_LEN 512
37 #define AWS_IOT_MQTT_RX_BUF_LEN 512
38 #define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5
39 
40 // Thing Shadow specific configs
41 #define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN+1
42 #define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80
43 #define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10
44 #define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20
45 #define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10
46 #define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10
47 #define MAX_JSON_TOKEN_EXPECTED 120
48 #define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60
49 #define MAX_SIZE_OF_THING_NAME 20
50 #define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME
51 
52 // Auto Reconnect specific config
53 #define AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL 1000
54 #define AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL 8000
55 
56 #endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */