1 Star 0 Fork 3

wzh/Codesys-Mqtt-lib_1

forked from Herry/Codesys-Mqtt-lib 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mqtt.h 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
wim 提交于 2014-12-16 13:34 . Initial Commit
typedef struct
{
BYTE DATA[1501];
DWORD IPOS;
}
BUFFERtyp;
typedef struct
{
BYTE BMESSAGETYPE;
BOOL XDUP_FLAG;
BYTE XQOS;
BOOL XRETAIN;
}
FIXEDHEADERtyp;
typedef struct
{
BOOL XUSERNAME;
BOOL XPASSWORD;
BOOL XWILLRETAIN;
BOOL XWILLQOS1;
BOOL XWILLQOS2;
BOOL XWILLFLAG;
BOOL XCLEANSESSION;
}
CONNECTFLAGStyp;
typedef struct
{
BYTE VERSION;
BYTE RESERVED;
BYTE CONNECT;
BYTE CONNACK;
BYTE PUBLISH;
BYTE PUBACK;
BYTE PUBREC;
BYTE PUBREL;
BYTE PUBCOMP;
BYTE SUBSCRIBE;
BYTE SUBACK;
BYTE UNSUBSCRIBE;
BYTE UNSUBACK;
BYTE PINGREQ;
BYTE PINGRESP;
BYTE DISCONNECT;
BYTE RESERVED2;
INT CONNECTED;
INT NOT_CONNECTED;
INT TIMEOUT;
INT WAIT_RESPONSE;
DWORD CONNECTION_TIMEOUT;
BUFFERtyp SENDBUFFER;
BUFFERtyp RECEIVEBUFFER;
FIXEDHEADERtyp FIXEDHEADER;
BUFFERtyp VARIABLEHEADER;
BUFFERtyp PAYLOAD;
CONNECTFLAGStyp CONNECTFLAGS;
TCP_CLIENTtyp TCPCLIENT;
BOOL XTCPCONNECTED;
BOOL XSTARTSEND;
DINT DIRECEIVECOUNT;
TONtyp CONNECTIONTIMER;
BOOL XTIMEOUT;
BYTE INCOMINGMESSAGETYPE;
INT ESTATE;
BOOL XSTARTTIMER;
char STOPIC[81];
char SPAYLOAD[81];
BOOL XCONNECTED;
BOOL *XPUBLISH;
BOOL *XSUBSCRIBE;
}
MQTT_CLIENTtyp;
/* Enum definitions */
/* The Prototypes */
BOOL BUFFERinit(BUFFERtyp* inst, BOOL bRetain);
BOOL _BUFFER_CONCAT(BUFFERtyp *PTparam, BUFFERtyp *PTCONTACTparam);
;
BOOL _BUFFER_PUSH(BUFFERtyp *PTparam, BYTE INparam);
;
BOOL _BUFFER_PUSH_STRING(BUFFERtyp *PTparam, char* INparam, BOOL INCLUDE_LENGTHparam);
;
BOOL _BUFFER_SET(BUFFERtyp *PTparam, BYTE INparam, WORD POSparam);
;
BOOL FIXEDHEADERinit(FIXEDHEADERtyp* inst, BOOL bRetain);
BOOL CREATE_MESSAGE(BUFFERtyp *PTparam, FIXEDHEADERtyp FIXEDHEADERparam, BUFFERtyp VARIABLEHEADERparam, BUFFERtyp PAYLOADparam);
;
BOOL ENCODE_REMAINING_LENGTH(BUFFERtyp *PTparam, DWORD LENGTHparam);
;
BOOL CONNECTFLAGSinit(CONNECTFLAGStyp* inst, BOOL bRetain);
void MQTT_CLIENT(MQTT_CLIENTtyp* inst);
BOOL MQTT_CLIENTinit(MQTT_CLIENTtyp* inst, BOOL bRetain);
void PLC_PRG(void);
;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhenghuiwu/Codesys-Mqtt-lib_1.git
git@gitee.com:zhenghuiwu/Codesys-Mqtt-lib_1.git
zhenghuiwu
Codesys-Mqtt-lib_1
Codesys-Mqtt-lib_1
master

搜索帮助