class MQTT::SN::Packet::Advertise

Constants

DEFAULTS

Attributes

duration[RW]
gateway_id[RW]

Public Instance Methods

encode_body() click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 193
def encode_body
  [gateway_id, duration].pack('Cn')
end
parse_body(buffer) click to toggle source
# File lib/mqttbridge/sn/packet.rb, line 197
def parse_body(buffer)
  self.gateway_id, self.duration = buffer.unpack('Cn')
end