Class: Smartware::SankyoConnection
- Inherits:
-
CommandBasedDevice
- Object
- EventMachine::Connection
- CommandBasedDevice
- Smartware::SankyoConnection
- Defined in:
- lib/smartware/drivers/common/sankyo_connection.rb
Defined Under Namespace
Classes: CommandResponse
Constant Summary collapse
- STX =
0xF2
- ACK =
0x06
- NAK =
0x15
Instance Attribute Summary collapse
-
#initialize_device ⇒ Object
Returns the value of attribute initialize_device.
Instance Method Summary collapse
-
#initialize ⇒ SankyoConnection
constructor
A new instance of SankyoConnection.
Methods inherited from CommandBasedDevice
Constructor Details
#initialize ⇒ SankyoConnection
Returns a new instance of SankyoConnection.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/smartware/drivers/common/sankyo_connection.rb', line 30 def initialize super @command_timer = nil @initialize_device = nil @ready_for_commands = false @state = :drop EventMachine.add_periodic_timer(10) { check_dsr! } EventMachine.next_tick { check_dsr! } end |
Instance Attribute Details
#initialize_device ⇒ Object
Returns the value of attribute initialize_device.
28 29 30 |
# File 'lib/smartware/drivers/common/sankyo_connection.rb', line 28 def initialize_device @initialize_device end |