Class: Escalator::Protocol::Emulator::EmuProtocol
- Inherits:
-
Keyence::KvProtocol
- Object
- Protocol
- Keyence::KvProtocol
- Escalator::Protocol::Emulator::EmuProtocol
- Defined in:
- lib/escalator/protocol/emulator/emu_protocol.rb
Instance Attribute Summary
Attributes inherited from Protocol
Instance Method Summary collapse
- #execute(line) ⇒ Object
-
#initialize(options = {}) ⇒ EmuProtocol
constructor
A new instance of EmuProtocol.
Methods inherited from Keyence::KvProtocol
#close, #device_by_name, #dump_packet, #get_bit_from_device, #get_bits_from_device, #get_word_from_device, #get_words_from_device, #open, #open!, #receive, #set_bits_to_device, #set_words_to_device
Methods inherited from Protocol
#close, #device_by_name, #get_bit_from_device, #get_bits_from_device, #get_from_devices, #get_word_from_device, #get_words_from_device, #open, #set_bit_to_device, #set_bits_to_device, #set_to_devices, #set_word_to_device, #set_words_to_device
Constructor Details
#initialize(options = {}) ⇒ EmuProtocol
Returns a new instance of EmuProtocol.
30 31 32 33 |
# File 'lib/escalator/protocol/emulator/emu_protocol.rb', line 30 def initialize ={} .merge host:"localhost", port:5555 super end |
Instance Method Details
#execute(line) ⇒ Object
35 36 37 38 |
# File 'lib/escalator/protocol/emulator/emu_protocol.rb', line 35 def execute line @socket.puts(line) @socket.gets end |