Class: ModBus::TCPClient
- Includes:
- TCP
- Defined in:
- lib/rmodbus/tcp_client.rb
Overview
TCP client implementation
Instance Attribute Summary
Attributes included from TCP
Attributes included from Options
#raise_exception_on_mismatch, #read_retries, #read_retry_timeout
Attributes included from Debug
#logger, #raise_exception_on_mismatch, #read_retries, #read_retry_timeout
Instance Method Summary collapse
- #get_slave(uid, io) ⇒ Object protected
-
#open_connection(ipaddr, port = 502, opts = {}) ⇒ Object
protected
Open TCPIP connection.
Methods included from TCP
Methods inherited from Client
#close, #closed?, #initialize, #with_slave
Methods included from Debug
Constructor Details
This class inherits a constructor from ModBus::Client
Instance Method Details
#get_slave(uid, io) ⇒ Object (protected)
21 22 23 |
# File 'lib/rmodbus/tcp_client.rb', line 21 def get_slave(uid, io) TCPSlave.new(uid, io) end |
#open_connection(ipaddr, port = 502, opts = {}) ⇒ Object (protected)
Open TCPIP connection
17 18 19 |
# File 'lib/rmodbus/tcp_client.rb', line 17 def open_connection(ipaddr, port = 502, opts = {}) open_tcp_connection(ipaddr, port, opts) end |