class XBeeRuby::Response

Public Class Methods

frame_type(type) click to toggle source
# File lib/xbee-ruby/response.rb, line 17
def self.frame_type type
        @@response_types[type] = self
end
from_packet(packet) click to toggle source
# File lib/xbee-ruby/response.rb, line 21
def self.from_packet packet
        @@response_types[packet.data[0]].new packet.data rescue raise IOError, "Unknown response type 0x#{packet.data[0].to_s 16}"
end

Public Instance Methods

to_s() click to toggle source
# File lib/xbee-ruby/response.rb, line 25
def to_s
        'Response'
end