mikroSDK Reference Manual
mqtt_client_packet.h
Go to the documentation of this file.
1
31#ifndef _MQTT_CLIENT_PACKET_H
32#define _MQTT_CLIENT_PACKET_H
33
34//Dependencies
35#include "core/net.h"
36#include "mqtt/mqtt_client.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//MQTT client related functions
44error_t mqttClientReceivePacket(MqttClientContext *context);
45error_t mqttClientProcessPacket(MqttClientContext *context);
46
47error_t mqttClientProcessConnAck(MqttClientContext *context,
48 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
49
50error_t mqttClientProcessPubAck(MqttClientContext *context,
51 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
52
53error_t mqttClientProcessPublish(MqttClientContext *context,
54 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
55
56error_t mqttClientProcessPubRec(MqttClientContext *context,
57 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
58
59error_t mqttClientProcessPubRel(MqttClientContext *context,
60 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
61
62error_t mqttClientProcessPubComp(MqttClientContext *context,
63 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
64
65error_t mqttClientProcessSubAck(MqttClientContext *context,
66 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
67
68error_t mqttClientProcessUnsubAck(MqttClientContext *context,
69 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
70
71error_t mqttClientProcessPingResp(MqttClientContext *context,
72 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
73
74error_t mqttClientFormatConnect(MqttClientContext *context,
75 bool_t cleanSession);
76
77error_t mqttClientFormatPublish(MqttClientContext *context, const char_t *topic,
78 const void *message, size_t length, MqttQosLevel qos, bool_t retain);
79
80error_t mqttClientFormatPubAck(MqttClientContext *context, uint16_t packetId);
81error_t mqttClientFormatPubRec(MqttClientContext *context, uint16_t packetId);
82error_t mqttClientFormatPubRel(MqttClientContext *context, uint16_t packetId);
83error_t mqttClientFormatPubComp(MqttClientContext *context, uint16_t packetId);
84
85error_t mqttClientFormatSubscribe(MqttClientContext *context,
86 const char_t *topic, MqttQosLevel qos);
87
88error_t mqttClientFormatUnsubscribe(MqttClientContext *context,
89 const char_t *topic);
90
91error_t mqttClientFormatPingReq(MqttClientContext *context);
92error_t mqttClientFormatDisconnect(MqttClientContext *context);
93
94//C++ guard
95#ifdef __cplusplus
96}
97#endif
98
99#endif
error_t
Error codes.
Definition error.h:43
MQTT client.
MqttQosLevel
Quality of service level.
Definition mqtt_common.h:87
TCP/IP stack core.