mikroSDK Reference Manual
mqtt_sn_client_misc.h
Go to the documentation of this file.
1
31#ifndef _MQTT_SN_CLIENT_MISC_H
32#define _MQTT_SN_CLIENT_MISC_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 mqttSnClientProcessEvents(MqttSnClientContext *context,
45 systime_t timeout);
46
47MqttSnReturnCode mqttSnDeliverPublishMessage(MqttSnClientContext *context,
48 MqttSnFlags flags, uint16_t topicId, const uint8_t *data, size_t dataLen);
49
50error_t mqttSnClientAddTopic(MqttSnClientContext *context,
51 const char_t *topicName, uint16_t topicId);
52
53error_t mqttSnClientDeleteTopic(MqttSnClientContext *context,
54 const char_t *topicName);
55
56const char_t *mqttSnClientFindTopicId(MqttSnClientContext *context,
57 uint16_t topicId);
58
59uint16_t mqttSnClientFindTopicName(MqttSnClientContext *context,
60 const char_t *topicName);
61
62const char_t *mqttSnClientFindPredefTopicId(MqttSnClientContext *context,
63 uint16_t topicId);
64
65uint16_t mqttSnClientFindPredefTopicName(MqttSnClientContext *context,
66 const char_t *topicName);
67
68uint16_t mqttSnClientGenerateMessageId(MqttSnClientContext *context);
69
70error_t mqttSnClientStoreMessageId(MqttSnClientContext *context,
71 uint16_t msgId);
72
73error_t mqttSnClientDiscardMessageId(MqttSnClientContext *context,
74 uint16_t msgId);
75
76bool_t mqttSnClientIsDuplicateMessageId(MqttSnClientContext *context,
77 uint16_t msgId);
78
79bool_t mqttSnClientIsShortTopicName(const char_t *topicName);
80
81//C++ guard
82#ifdef __cplusplus
83}
84#endif
85
86#endif
error_t
Error codes.
Definition error.h:43
MQTT-SN client.
MqttSnReturnCode
MQTT-SN return codes.
Definition mqtt_sn_common.h:129
TCP/IP stack core.
uint32_t systime_t
System time.
Definition os_port_none.h:90