mikroSDK Reference Manual
mqtt_sn_client_message.h
Go to the documentation of this file.
1
31#ifndef _MQTT_SN_CLIENT_MESSAGE_H
32#define _MQTT_SN_CLIENT_MESSAGE_H
33
34//Dependencies
35#include "core/net.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//MQTT-SN client related functions
44error_t mqttSnClientProcessMessage(MqttSnClientContext *context,
45 MqttSnMessage *message, const IpAddr *ipAddr, uint16_t port);
46
47error_t mqttSnClientProcessGwInfo(MqttSnClientContext *context,
48 const MqttSnMessage *message, const IpAddr *ipAddr, uint16_t port);
49
50error_t mqttSnClientProcessConnAck(MqttSnClientContext *context,
51 const MqttSnMessage *message);
52
53error_t mqttSnClientProcessWillTopicReq(MqttSnClientContext *context,
54 const MqttSnMessage *message);
55
56error_t mqttSnClientProcessWillMsgReq(MqttSnClientContext *context,
57 const MqttSnMessage *message);
58
59error_t mqttSnClientProcessRegister(MqttSnClientContext *context,
60 const MqttSnMessage *message);
61
62error_t mqttSnClientProcessRegAck(MqttSnClientContext *context,
63 const MqttSnMessage *message);
64
65error_t mqttSnClientProcessPublish(MqttSnClientContext *context,
66 const MqttSnMessage *message);
67
68error_t mqttSnClientProcessPubAck(MqttSnClientContext *context,
69 const MqttSnMessage *message);
70
71error_t mqttSnClientProcessPubRec(MqttSnClientContext *context,
72 const MqttSnMessage *message);
73
74error_t mqttSnClientProcessPubRel(MqttSnClientContext *context,
75 const MqttSnMessage *message);
76
77error_t mqttSnClientProcessPubComp(MqttSnClientContext *context,
78 const MqttSnMessage *message);
79
80error_t mqttSnClientProcessSubAck(MqttSnClientContext *context,
81 const MqttSnMessage *message);
82
83error_t mqttSnClientProcessUnsubAck(MqttSnClientContext *context,
84 const MqttSnMessage *message);
85
86error_t mqttSnClientProcessPingReq(MqttSnClientContext *context,
87 const MqttSnMessage *message);
88
89error_t mqttSnClientProcessPingResp(MqttSnClientContext *context,
90 const MqttSnMessage *message);
91
92error_t mqttSnClientProcessDisconnect(MqttSnClientContext *context,
93 const MqttSnMessage *message);
94
95error_t mqttSnClientProcessWillTopicResp(MqttSnClientContext *context,
96 const MqttSnMessage *message);
97
98error_t mqttSnClientProcessWillMsgResp(MqttSnClientContext *context,
99 const MqttSnMessage *message);
100
101error_t mqttSnClientSendSearchGw(MqttSnClientContext *context, uint8_t radius,
102 const IpAddr *destIpAddr, uint16_t destPort);
103
104error_t mqttSnClientSendConnect(MqttSnClientContext *context,
105 bool_t cleanSession);
106
107error_t mqttSnClientSendWillTopic(MqttSnClientContext *context);
108error_t mqttSnClientSendWillMsg(MqttSnClientContext *context);
109
110error_t mqttSnClientSendRegister(MqttSnClientContext *context,
111 const char_t *topicName);
112
113error_t mqttSnClientSendRegAck(MqttSnClientContext *context, uint16_t msgId,
114 uint16_t topicId, MqttSnReturnCode returnCode);
115
116error_t mqttSnClientSendPublish(MqttSnClientContext *context,
117 uint16_t msgId, const char_t *topicName, const uint8_t *data,
118 size_t length, MqttSnQosLevel qos, bool_t retain, bool_t dup);
119
120error_t mqttSnClientSendPubAck(MqttSnClientContext *context, uint16_t msgId,
121 uint16_t topicId, MqttSnReturnCode returnCode);
122
123error_t mqttSnClientSendPubRec(MqttSnClientContext *context, uint16_t msgId);
124error_t mqttSnClientSendPubRel(MqttSnClientContext *context, uint16_t msgId);
125error_t mqttSnClientSendPubComp(MqttSnClientContext *context, uint16_t msgId);
126
127error_t mqttSnClientSendSubscribe(MqttSnClientContext *context,
128 const char_t *topicName, MqttSnQosLevel qos);
129
130error_t mqttSnClientSendUnsubscribe(MqttSnClientContext *context,
131 const char_t *topicName);
132
133error_t mqttSnClientSendPingReq(MqttSnClientContext *context);
134error_t mqttSnClientSendPingResp(MqttSnClientContext *context);
135
136error_t mqttSnClientSendDisconnect(MqttSnClientContext *context,
137 uint16_t duration);
138
139error_t mqttSnClientSendWillTopicUpd(MqttSnClientContext *context);
140error_t mqttSnClientSendWillMsgUpd(MqttSnClientContext *context);
141
142//C++ guard
143#ifdef __cplusplus
144}
145#endif
146
147#endif
error_t
Error codes.
Definition error.h:43
MQTT-SN client.
MqttSnQosLevel
Quality of service level.
Definition mqtt_sn_common.h:66
MqttSnReturnCode
MQTT-SN return codes.
Definition mqtt_sn_common.h:129
TCP/IP stack core.
IP network address.
Definition ip.h:72
MQTT-SN message.
Definition mqtt_sn_message.h:56