1 /*
2  * Copyright (C) 2015-2018 Alibaba Group Holding Limited
3  */
4 
5 #ifndef IOTX_MQTT_CONFIG_H__
6 #define IOTX_MQTT_CONFIG_H__
7 
8 #ifndef WITH_MQTT_DYN_BUF
9 #define WITH_MQTT_DYN_BUF (1)
10 #endif
11 
12 #ifndef WITH_MQTT_QOS2_PACKET
13 #define WITH_MQTT_QOS2_PACKET (0)
14 #endif
15 
16 #ifndef WITH_MQTT_FLOW_CTRL
17 #define WITH_MQTT_FLOW_CTRL (0)
18 #endif
19 
20 #ifndef WITH_MQTT_ONLY_QOS0
21 #define WITH_MQTT_ONLY_QOS0 (0)
22 #endif
23 
24 #ifndef WITH_MQTT_DYN_CONNINFO
25 #define WITH_MQTT_DYN_CONNINFO (1)
26 #endif
27 
28 #ifndef WITH_MQTT_ZIP_TOPIC
29 #define WITH_MQTT_ZIP_TOPIC (0)
30 #endif
31 
32 /* maximum republish elements in list */
33 #ifndef IOTX_MC_REPUB_NUM_MAX
34 #define IOTX_MC_REPUB_NUM_MAX (10)
35 #endif
36 /* MQTT client version number */
37 #define IOTX_MC_MQTT_VERSION              (4)
38 
39 /* maximum MQTT packet-id */
40 #define IOTX_MC_PACKET_ID_MAX             (65535)
41 
42 /* Minimum interval of MQTT reconnect in millisecond */
43 #define IOTX_MC_RECONNECT_INTERVAL_MIN_MS (1000)
44 
45 /* Maximum interval of MQTT reconnect in millisecond */
46 #define IOTX_MC_RECONNECT_INTERVAL_MAX_MS (30000)
47 
48 /* Max times of keepalive which has been send and did not received response
49  * package */
50 #define IOTX_MC_KEEPALIVE_PROBE_MAX       (2)
51 
52 /* Linked List Params When PLATFORM_HAS_DYNMEN Disabled */
53 #ifndef PLATFORM_HAS_DYNMEN
54 
55 /* mqtt sub sync list max length */
56 #ifndef IOTX_MC_SUBSYNC_LIST_MAX_LEN
57 #define IOTX_MC_SUBSYNC_LIST_MAX_LEN (5)
58 #endif
59 
60 /* mqtt sub handle list max length */
61 #ifndef IOTX_MC_SUBHANDLE_LIST_MAX_LEN
62 #define IOTX_MC_SUBHANDLE_LIST_MAX_LEN (5)
63 #endif
64 
65 /* mqtt client max count */
66 #ifndef IOTX_MC_CLIENT_MAX_COUNT
67 #define IOTX_MC_CLIENT_MAX_COUNT (1)
68 #endif
69 
70 #ifndef IOTX_MC_TX_MAX_LEN
71 #define IOTX_MC_TX_MAX_LEN (2048)
72 #endif
73 
74 #ifndef IOTX_MC_RX_MAX_LEN
75 #define IOTX_MC_RX_MAX_LEN (2048)
76 #endif
77 
78 #endif /* PLATFORM_HAS_DYNMEM */
79 
80 #endif /* IOTX_MQTT_CONFIG_H__ */
81