Go to the documentation of this file.
23 #ifndef _MQTT_CONFIG_H
24 #define _MQTT_CONFIG_H
30 #define MQTT_ROOT_TOPIC_LENGTH (50)
36 #define MQTT_MAINT_TOPIC_LENGTH (MQTT_ROOT_TOPIC_LENGTH)
42 #define MQTT_RPC_TOPIC_LENGTH (MQTT_ROOT_TOPIC_LENGTH)
48 #define MQTT_SENSOR_TOPIC_LENGTH (38)
54 #define MQTT_CLIENT_ID_LENGTH (MQTT_ROOT_TOPIC_LENGTH)
60 #define MQTT_MESSAGE_LENGTH (100)
66 #define MQTT_RPC_COMMAND_LENGTH (200)
72 #define MQTT_RPC_RESPONSE_LENGTH (80)
78 #define MQTT_PACKET_SIZE (220)
84 #define MQTT_SERVER_LENGTH (30)
90 #define MQTT_USERNAME_LENGTH (30)
96 #define MQTT_PASSWORD_LENGTH (30)
102 #define STATIONSLUG_LENGTH (30)
108 #define BOARDSLUG_LENGTH (30)
114 #define MQTT_TIMEOUT_MS (6000)
120 #define MQTT_DEFAULT_SERVER ("rmap.cc")
126 #define MQTT_DEFAULT_PORT (1883)
132 #define MQTT_DEFAULT_ROOT_TOPIC ("test")
138 #define MQTT_DEFAULT_MAINT_TOPIC ("test")
144 #define MQTT_DEFAULT_RPC_TOPIC ("test")
150 #define MQTT_DEFAULT_USERNAME ("")
156 #define MQTT_DEFAULT_PASSWORD ("")
162 #define DEFAULT_STATIONSLUG ("")
168 #define DEFAULT_BOARDSLUG ("")
174 #define MQTT_STATUS_TOPIC ("254,0,0/265,0,-,-/B01213")
180 #define MQTT_ON_CONNECT_MESSAGE ("{\"v\":\"conn\",\"s\":%d,\"m\":%d}")
186 #define MQTT_ON_DISCONNECT_MESSAGE ("{\"v\":\"disconn\"}")
192 #define MQTT_ON_ERROR_MESSAGE ("{\"v\":\"error01\"}")
194 #if (MQTT_ROOT_TOPIC_LENGTH + MQTT_SENSOR_TOPIC_LENGTH > 100)
195 #error MQTT root/sensor topic is too big!