# File lib/mqtt/sn/packet.rb, line 417 def encode_body unless id.is_a?(Integer) raise "id must be an Integer" end [encode_flags, encode_topic_id, id, data].pack('Cnna*') end
# File lib/mqtt/sn/packet.rb, line 425 def parse_body(buffer) flags, topic_id, self.id, self.data = buffer.unpack('Cnna*') parse_flags(flags) parse_topic_id(topic_id) end