Class: XBeeRuby::ModemStatusResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/xbee-ruby/modem_status_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Response

frame_type, from_packet

Constructor Details

#initialize(bytes) ⇒ ModemStatusResponse

Returns a new instance of ModemStatusResponse.



21
22
23
# File 'lib/xbee-ruby/modem_status_response.rb', line 21

def initialize bytes
	@modem_status = bytes[1]
end

Instance Attribute Details

#modem_statusObject (readonly)

Returns the value of attribute modem_status.



19
20
21
# File 'lib/xbee-ruby/modem_status_response.rb', line 19

def modem_status
  @modem_status
end

Instance Method Details

#==(other) ⇒ Object



25
26
27
# File 'lib/xbee-ruby/modem_status_response.rb', line 25

def == other
	other.class == ModemStatusResponse && self.modem_status == other.modem_status
end

#to_sObject



29
30
31
# File 'lib/xbee-ruby/modem_status_response.rb', line 29

def to_s
	"ModemStatusResponse[#{super}](modem_status=0x#{modem_status})"
end