class MQTT::SN::Packet::Willtopicupd
Constants
- DEFAULTS
Attributes
topic_name[RW]
Public Instance Methods
encode_body()
click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 658 def encode_body if topic_name.nil? or topic_name.empty? '' else [encode_flags, topic_name].pack('Ca*') end end
parse_body(buffer)
click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 666 def parse_body(buffer) if buffer.length > 1 flags, self.topic_name = buffer.unpack('Ca*') parse_flags(flags) else self.topic_name = nil end end