|
|
@@ -2,7 +2,7 @@
|
|
|
#define __MQTT_Hx__
|
|
|
|
|
|
#include <stdint.h>
|
|
|
-
|
|
|
+#include "cfg.h"
|
|
|
|
|
|
enum {
|
|
|
MQTT_SUB_CMD_POWER_ALL=0,
|
|
|
@@ -27,6 +27,20 @@ enum {
|
|
|
|
|
|
MQTT_PUB_MAX
|
|
|
};
|
|
|
+enum {
|
|
|
+ SERV_NTP=0,
|
|
|
+ SERV_SMTP,
|
|
|
+ SERV_MESG,
|
|
|
+ SERV_MQTT,
|
|
|
+ SERV_CLOUD,
|
|
|
+ SERV_TELNET,
|
|
|
+ SERV_SNMP_V1,
|
|
|
+ SERV_SNMP_V2C,
|
|
|
+ SERV_SNMP_V3,
|
|
|
+ SERV_SNMP_TRAP,
|
|
|
+
|
|
|
+ SERV_MAX
|
|
|
+};
|
|
|
|
|
|
typedef struct {
|
|
|
int id;
|
|
|
@@ -41,4 +55,12 @@ int mqtt_deinit(void);
|
|
|
int mqtt_post_alarm(int type, int subtype, char *content, alarm_para_t *para);
|
|
|
int mqtt_test(void);
|
|
|
|
|
|
+
|
|
|
+#ifdef USE_MQTT
|
|
|
+extern char *topic_sub[MQTT_SUB_MAX];
|
|
|
+extern char *topic_pub[MQTT_PUB_MAX];
|
|
|
+extern const char *serv_str[SERV_MAX];
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
#endif
|