Class: PlcAccess::Protocol::PlcShare::PlcShareProtocol
- Inherits:
-
Keyence::KvProtocol
- Object
- PlcAccess::Protocol::Protocol
- Keyence::KvProtocol
- PlcAccess::Protocol::PlcShare::PlcShareProtocol
- Defined in:
- lib/plc_access/protocol/plc_share/plc_share_protocol.rb
Constant Summary
Constants inherited from PlcAccess::Protocol::Protocol
PlcAccess::Protocol::Protocol::TIMEOUT
Instance Attribute Summary collapse
-
#device_type ⇒ Object
Returns the value of attribute device_type.
Attributes inherited from PlcAccess::Protocol::Protocol
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PlcShareProtocol
constructor
A new instance of PlcShareProtocol.
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 PlcAccess::Protocol::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, #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 = {}) ⇒ PlcShareProtocol
Returns a new instance of PlcShareProtocol.
32 33 34 35 36 37 38 |
# File 'lib/plc_access/protocol/plc_share/plc_share_protocol.rb', line 32 def initialize( = {}) super @socket = nil @host = [:host] || '192.168.0.10' @port = [:port] || 10000 self.device_type = [:device_type] if [:device_type] end |
Instance Attribute Details
#device_type ⇒ Object
Returns the value of attribute device_type.
30 31 32 |
# File 'lib/plc_access/protocol/plc_share/plc_share_protocol.rb', line 30 def device_type @device_type end |