#ifndef __LTE_MQTT_H #define __LTE_MQTT_H #include "sys_mqtt.h" #include "malloc.h" #define MQTT_SENDBUF_LENGTH 10 * 1024 #define MQTT_RECVBUF_LENTH 512 #define client_recv_idx 1 // MQTT 客户端标识符 0~5 #define client_send_idx 0 // MQTT 客户端标识符 0~5 #define keepalive 60 // 保活时间 范围:0~3600;默认值:120;单位:秒 #define MQTT_3 3 // version 3.1 #define MQTT_4 4 // version 3.1.1 #define clientid1 "LTE_TEST_SEND" #define username1 "LTE" #define password1 "1234" #define clientid2 "LTE_TEST_RECV" #define username1 "LTE" #define password1 "1234" #define recv_id 1 //表示每条接收数据的序号。范围:0~4 #define NETSUCCESS 0 #define NETERR -1 //打开网络失败 #define PARAMERR 1 //参数错误 #define IDFERR 2 //MQTT 标识符被占用 #define PDPERR 3 //激活 PDP 失败 #define DNSERR 4 //域名解析失败 #define DISCONERR 5 //网络断开导致错误 typedef struct _PAYLOAD_config { int stringLength; char* p; }PAYLOAD_config; void MQ_threadCreate(void); #endif