mqttsn.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
23 #ifndef NET_MQTTSN_H
24 #define NET_MQTTSN_H
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 
31 #ifndef MQTTSN_DEFAULT_PORT
32 
35 #define MQTTSN_DEFAULT_PORT (1883U)
36 #endif
37 
46 enum {
47  MQTTSN_DUP = 0x80,
48  MQTTSN_QOS_MASK = 0x60,
49  MQTTSN_QOS_2 = 0x40,
50  MQTTSN_QOS_1 = 0x20,
51  MQTTSN_QOS_0 = 0x00,
52  MQTTSN_RETAIN = 0x10,
53  MQTTSN_WILL = 0x08,
54  MQTTSN_CS = 0x04,
55  MQTTSN_TIT_MASK = 0x03,
59 };
60 
64 enum {
66  MQTTSN_SEARCHGW = 0x01,
67  MQTTSN_GWINFO = 0x02,
68  MQTTSN_CONNECT = 0x04,
69  MQTTSN_CONNACK = 0x05,
73  MQTTSN_WILLMSG = 0x09,
74  MQTTSN_REGISTER = 0x0a,
75  MQTTSN_REGACK = 0x0b,
76  MQTTSN_PUBLISH = 0x0c,
77  MQTTSN_PUBACK = 0x0d,
78  MQTTSN_PUBCOMP = 0x0e,
79  MQTTSN_PUBREC = 0x0f,
80  MQTTSN_PUBREL = 0x10,
82  MQTTSN_SUBACK = 0x13,
84  MQTTSN_UNSUBACK = 0x15,
85  MQTTSN_PINGREQ = 0x16,
86  MQTTSN_PINGRESP = 0x17,
92 };
93 
99 enum {
104 };
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* NET_MQTTSN_H */
111 
connect message
Definition: mqttsn.h:68
will topic update response
Definition: mqttsn.h:89
subscription acknowledgment
Definition: mqttsn.h:82
QoS level mask.
Definition: mqttsn.h:48
rejected: congestion
Definition: mqttsn.h:101
disconnect message
Definition: mqttsn.h:87
ping request
Definition: mqttsn.h:85
will topic update request
Definition: mqttsn.h:88
ping response
Definition: mqttsn.h:86
publish received (QoS 2)
Definition: mqttsn.h:78
rejected: invalid topic id
Definition: mqttsn.h:102
will topic
Definition: mqttsn.h:71
rejected: not supported
Definition: mqttsn.h:103
will message
Definition: mqttsn.h:73
will message update request
Definition: mqttsn.h:90
topic ID: short
Definition: mqttsn.h:56
topic ID type mask
Definition: mqttsn.h:55
search gateway message
Definition: mqttsn.h:66
clean session flag
Definition: mqttsn.h:54
publish complete (QoS 2)
Definition: mqttsn.h:79
QoS level 1.
Definition: mqttsn.h:50
unsubscription acknowledgment
Definition: mqttsn.h:84
publish release (QoS 2)
Definition: mqttsn.h:80
unsubscribe message
Definition: mqttsn.h:83
advertise message
Definition: mqttsn.h:65
QoS level 0.
Definition: mqttsn.h:51
gateway info message
Definition: mqttsn.h:67
will message request
Definition: mqttsn.h:72
topic ID: pre-defined
Definition: mqttsn.h:57
will topic request
Definition: mqttsn.h:70
duplicate flag
Definition: mqttsn.h:47
publish acknowledgment
Definition: mqttsn.h:77
will flag, used during CONNECT
Definition: mqttsn.h:53
accepted
Definition: mqttsn.h:100
QoS level 2.
Definition: mqttsn.h:49
publish message
Definition: mqttsn.h:76
connection acknowledgment message
Definition: mqttsn.h:69
topic registration acknowledgment
Definition: mqttsn.h:75
subscribe message
Definition: mqttsn.h:81
topic ID: normal
Definition: mqttsn.h:58
topic registration request
Definition: mqttsn.h:74
retain flag
Definition: mqttsn.h:52
will topic update response
Definition: mqttsn.h:91