Go to the documentation of this file.
31 #ifndef _MQTT_SN_COMMON_H
32 #define _MQTT_SN_COMMON_H
38 #define MQTT_SN_PORT 1883
46 #define MQTT_SN_PROTOCOL_ID 0x01
48 #define MQTT_SN_INVALID_TOPIC_ID 0x0000
138 #if defined(__CCRX__)
140 #elif defined(__CWCC__) || defined(_WIN32)
141 #pragma pack(push, 1)
156 #if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
161 uint8_t cleanSession : 1;
162 uint8_t topicIdType : 2;
164 uint8_t topicIdType : 2;
165 uint8_t cleanSession : 1;
477 #if defined(__CCRX__)
479 #elif defined(__CWCC__) || defined(_WIN32)
typedef __packed_struct
MQTT-SN flags.
@ MQTT_SN_MSG_TYPE_PINGRESP
@ MQTT_SN_MSG_TYPE_WILLMSG
@ MQTT_SN_MSG_TYPE_ADVERTISE
@ MQTT_SN_MSG_TYPE_REGISTER
@ MQTT_SN_SHORT_TOPIC_NAME
Short topic name.
@ MQTT_SN_MSG_TYPE_PINGREQ
@ MQTT_SN_TRANSPORT_PROTOCOL_DTLS
DTLS protocol.
void MqttSnWillMsgReq
WILLMSGREQ message.
@ MQTT_SN_MSG_TYPE_CONNECT
@ MQTT_SN_QOS_LEVEL_1
At least once delivery.
MqttSnReturnCode
MQTT-SN return codes.
@ MQTT_SN_PREDEFINED_TOPIC_ID
Predefined topic ID.
MqttSnQosLevel
Quality of service level.
@ MQTT_SN_NORMAL_TOPIC_NAME
Normal topic name.
@ MQTT_SN_RETURN_CODE_REJECTED_NOT_SUPPORTED
@ MQTT_SN_MSG_TYPE_GWINFO
@ MQTT_SN_RETURN_CODE_REJECTED_CONGESTION
@ MQTT_SN_MSG_TYPE_WILLTOPICRESP
@ MQTT_SN_MSG_TYPE_PUBREL
@ MQTT_SN_MSG_TYPE_WILLTOPICREQ
@ MQTT_SN_MSG_TYPE_WILLMSGREQ
@ MQTT_SN_NORMAL_TOPIC_ID
Normal topic ID.
void MqttSnPingResp
PINGRESP message.
@ MQTT_SN_MSG_TYPE_PUBREC
@ MQTT_SN_TRANSPORT_PROTOCOL_UDP
UDP protocol.
@ MQTT_SN_MSG_TYPE_WILLTOPICUPD
@ MQTT_SN_MSG_TYPE_SUBSCRIBE
@ MQTT_SN_MSG_TYPE_PUBLISH
@ MQTT_SN_MSG_TYPE_WILLMSGRESP
@ MQTT_SN_MSG_TYPE_PUBCOMP
@ MQTT_SN_MSG_TYPE_DISCONNECT
MqttSnTopicIdType
Topic ID types.
@ MQTT_SN_MSG_TYPE_REGACK
MqttSnMsgType
MQTT-SN message types.
void MqttSnWillTopicReq
WILLTOPICREQ message.
const char_t * topicName
Topic name.
@ MQTT_SN_MSG_TYPE_WILLMSGUPD
@ MQTT_SN_MSG_TYPE_SEARCHGW
@ MQTT_SN_RETURN_CODE_REJECTED_INVALID_TOPIC_ID
void MqttSnWillMsg
WILLMSG message.
@ MQTT_SN_RETURN_CODE_ACCEPTED
void MqttSnPingReq
PINGREQ message.
void MqttSnWillMsgUpd
WILLMSGUPD message.
@ MQTT_SN_MSG_TYPE_UNSUBACK
uint16_t topicId
Topic identifier.
MqttSnTransportProtocol
MQTT-SN transport protocols.
@ MQTT_SN_MSG_TYPE_UNSUBSCRIBE
@ MQTT_SN_MSG_TYPE_ENCAPSULATED
@ MQTT_SN_QOS_LEVEL_MINUS_1
No connection setup.
@ MQTT_SN_MSG_TYPE_WILLTOPIC
@ MQTT_SN_MSG_TYPE_CONNACK
@ MQTT_SN_QOS_LEVEL_2
Exactly once delivery.
@ MQTT_SN_QOS_LEVEL_0
At most once delivery.
@ MQTT_SN_MSG_TYPE_PUBACK
@ MQTT_SN_MSG_TYPE_SUBACK