Class: Player::Device
- Inherits:
-
Object
- Object
- Player::Device
- Includes:
- Common
- Defined in:
- lib/ruby-player/device.rb
Overview
Basic class for all intrefaces
Direct Known Subclasses
AIO, ActArray, BlobFinder, Client, Gripper, Position2d, Power, Ranger
Instance Attribute Summary collapse
-
#addr ⇒ Object
readonly
Device address.
Instance Method Summary collapse
- #fill(hdr, msg) ⇒ Object
- #handle_response(hdr, msg) ⇒ Object
-
#initialize(addr, client) ⇒ Device
constructor
A new instance of Device.
- #send_message(type, subtype, msg = "") ⇒ Object
Constructor Details
#initialize(addr, client) ⇒ Device
Returns a new instance of Device.
23 24 25 26 |
# File 'lib/ruby-player/device.rb', line 23 def initialize(addr, client) @addr, @client = addr, client @log_level = client.log_level end |
Instance Attribute Details
#addr ⇒ Object (readonly)
Device address
21 22 23 |
# File 'lib/ruby-player/device.rb', line 21 def addr @addr end |
Instance Method Details
#fill(hdr, msg) ⇒ Object
28 29 30 |
# File 'lib/ruby-player/device.rb', line 28 def fill(hdr,msg) raise_error "Method `fill` isn't implemented for `#{self.class}`" end |
#handle_response(hdr, msg) ⇒ Object
32 33 34 |
# File 'lib/ruby-player/device.rb', line 32 def handle_response(hdr, msg) raise_error "Method `handle_response` isn't implemented for `#{self.class}`" end |