PUBLISH_PACKET
This commit is contained in:
parent
1a0d536cd0
commit
51a10328f3
|
@ -209,6 +209,11 @@
|
||||||
#mqtt_packet{header = #mqtt_packet_header{type = ?CONNACK},
|
#mqtt_packet{header = #mqtt_packet_header{type = ?CONNACK},
|
||||||
variable = #mqtt_packet_connack{return_code = ReturnCode}}).
|
variable = #mqtt_packet_connack{return_code = ReturnCode}}).
|
||||||
|
|
||||||
|
-define(PUBLISH_PACKET(Qos, PacketId),
|
||||||
|
#mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH,
|
||||||
|
qos = Qos},
|
||||||
|
variable = #mqtt_packet_publish{packet_id = PacketId}}).
|
||||||
|
|
||||||
-define(PUBLISH_PACKET(Qos, Topic, PacketId, Payload),
|
-define(PUBLISH_PACKET(Qos, Topic, PacketId, Payload),
|
||||||
#mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH,
|
#mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH,
|
||||||
qos = Qos},
|
qos = Qos},
|
||||||
|
@ -216,11 +221,6 @@
|
||||||
packet_id = PacketId},
|
packet_id = PacketId},
|
||||||
payload = Payload}).
|
payload = Payload}).
|
||||||
|
|
||||||
-define(PUBLISH(Qos, PacketId),
|
|
||||||
#mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH,
|
|
||||||
qos = Qos},
|
|
||||||
variable = #mqtt_packet_publish{packet_id = PacketId}}).
|
|
||||||
|
|
||||||
-define(PUBACK_PACKET(Type, PacketId),
|
-define(PUBACK_PACKET(Type, PacketId),
|
||||||
#mqtt_packet{header = #mqtt_packet_header{type = Type},
|
#mqtt_packet{header = #mqtt_packet_header{type = Type},
|
||||||
variable = #mqtt_packet_puback{packet_id = PacketId}}).
|
variable = #mqtt_packet_puback{packet_id = PacketId}}).
|
||||||
|
|
Loading…
Reference in New Issue