class MQTT::SN::Packet::Gwinfo
Constants
- DEFAULTS
Attributes
gateway_address[RW]
gateway_id[RW]
Public Instance Methods
encode_body()
click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 225 def encode_body [gateway_id,gateway_address].pack('Ca*') end
parse_body(buffer)
click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 229 def parse_body(buffer) if buffer.length > 1 self.gateway_id, self.gateway_address = buffer.unpack('Ca*') else self.gateway_id, _ignore = buffer.unpack('C') self.gateway_address = nil end end