Class: LadderDrive::Protocol::Emulator::EmuProtocol
- Inherits:
-
Keyence::KvProtocol
- Object
- Protocol
- Keyence::KvProtocol
- LadderDrive::Protocol::Emulator::EmuProtocol
- Defined in:
- lib/ladder_drive/protocol/emulator/emu_protocol.rb
Constant Summary
Constants inherited from Protocol
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
#available_bits_range, #available_words_range, #close, #device_by_name, #dump_packet, #get_bits_from_device, #get_words_from_device, #open, #open!, #receive, #set_bits_to_device, #set_words_to_device
Methods inherited from Protocol
#[], #[]=, #available_bits_range, #available_words_range, #close, #destination_ipv4, #device_by_name, #get_bit_from_device, #get_bits_from_device, #get_from_devices, #get_word_from_device, #get_words_from_device, #log_level, #log_level=, #open, #self_ipv4, #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/ladder_drive/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/ladder_drive/protocol/emulator/emu_protocol.rb', line 35 def execute line @socket.puts(line) @socket.gets end |