Go to the documentation of this file.
31 #ifndef _MQTT_COMMON_H
32 #define _MQTT_COMMON_H
38 #define MQTT_PORT 1883
40 #define MQTT_TLS_PORT 8883
43 #define MQTT_PROTOCOL_NAME_3_1 "MQIsdp"
45 #define MQTT_PROTOCOL_NAME_3_1_1 "MQTT"
48 #define MQTT_MIN_HEADER_SIZE 2
50 #define MQTT_MAX_HEADER_SIZE 5
161 #if defined(__CCRX__)
163 #elif defined(__CWCC__) || defined(_WIN32)
164 #pragma pack(push, 1)
174 #if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
201 #if defined(__CCRX__)
203 #elif defined(__CWCC__) || defined(_WIN32)
@ MQTT_CONNECT_FLAG_USERNAME
@ MQTT_CONNECT_RET_CODE_NOT_AUTHORIZED
@ MQTT_PACKET_TYPE_INVALID
Invalid packet.
@ MQTT_PACKET_TYPE_DISCONNECT
Client is disconnecting.
@ MQTT_QOS_LEVEL_2
Exactly once delivery.
MqttTransportProtocol
Transport protocol.
@ MQTT_CONNECT_RET_CODE_ACCEPTED
MqttConnectRetCode
Connect return codes.
@ MQTT_CONNECT_RET_CODE_ID_REJECTED
@ MQTT_CONNECT_FLAG_WILL_QOS_1
@ MQTT_PACKET_TYPE_PUBLISH
Publish message.
@ MQTT_PACKET_TYPE_PUBREC
Publish received (assured delivery part 1)
@ MQTT_TRANSPORT_PROTOCOL_WS
TLS protocol.
@ MQTT_PACKET_TYPE_CONNACK
Connect acknowledgment.
@ MQTT_CONNECT_FLAG_WILL_RETAIN
typedef __packed_struct
Fixed header.
@ MQTT_PACKET_TYPE_PINGRESP
Ping response.
@ MQTT_QOS_LEVEL_0
At most once delivery.
@ MQTT_PACKET_TYPE_PUBACK
Publish acknowledgment.
MqttQosLevel
Quality of service level.
@ MQTT_PACKET_TYPE_PINGREQ
Ping request.
@ MQTT_PACKET_TYPE_SUBACK
Subscribe acknowledgment.
@ MQTT_TRANSPORT_PROTOCOL_TCP
@ MQTT_CONNECT_RET_CODE_BAD_USER_NAME
@ MQTT_PACKET_TYPE_CONNECT
Client request to connect to server.
@ MQTT_PACKET_TYPE_SUBSCRIBE
Client subscribe request.
@ MQTT_PACKET_TYPE_UNSUBACK
Unsubscribe acknowledgment.
MqttVersion
MQTT protocol level.
@ MQTT_PACKET_TYPE_UNSUBSCRIBE
Unsubscribe request.
@ MQTT_CONNECT_RET_CODE_UNACCEPTABLE_VERSION
@ MQTT_CONNECT_FLAG_WILL_QOS_2
@ MQTT_CONNECT_ACK_FLAG_SESSION_PRESENT
MqttConnectAckFlags
Connect Acknowledge flags.
@ MQTT_TRANSPORT_PROTOCOL_TLS
TCP protocol.
@ MQTT_CONNECT_FLAG_PASSWORD
@ MQTT_PACKET_TYPE_PUBCOMP
Publish complete (assured delivery part 3)
MqttConnectFlags
Connect flags.
@ MQTT_TRANSPORT_PROTOCOL_WSS
WebSocket protocol.
@ MQTT_CONNECT_FLAG_CLEAN_SESSION
@ MQTT_PACKET_TYPE_PUBREL
Publish release (assured delivery part 2)
@ MQTT_CONNECT_FLAG_WILL_QOS_0
@ MQTT_VERSION_3_1_1
MQTT version 3.1.1.
@ MQTT_QOS_LEVEL_1
At least once delivery.
@ MQTT_VERSION_3_1
MQTT version 3.1.
@ MQTT_CONNECT_RET_CODE_SERVER_UNAVAILABLE
MqttPacketType
MQTT control packet type.