class MQTT::SN::Packet::Subscribe
Constants
- DEFAULTS
Attributes
id[RW]
topic_id[RW]
topic_name[RW]
Public Instance Methods
encode_body()
click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 530 def encode_body unless id.is_a?(Integer) raise "id must be an Integer" end [encode_flags, id, encode_topic].pack('Cna*') end
parse_body(buffer)
click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 538 def parse_body(buffer) flags, self.id, topic = buffer.unpack('Cna*') parse_flags(flags) parse_topic(topic) end