Class: ModBus::RTUViaTCPServer
- Inherits:
-
GServer
- Object
- GServer
- ModBus::RTUViaTCPServer
- Defined in:
- lib/rmodbus/rtu_via_tcp_server.rb
Overview
RTU over TCP server implementation
Constant Summary
Constants included from Server
Instance Attribute Summary
Attributes included from Server
#coils, #discrete_inputs, #holding_registers, #input_registers, #uid
Attributes included from Debug
#debug, #raise_exception_on_mismatch, #read_retries, #read_retry_timeout
Instance Method Summary collapse
-
#initialize(port = 10002, uid = 1, opts = {}) ⇒ RTUViaTCPServer
constructor
Init server.
Constructor Details
#initialize(port = 10002, uid = 1, opts = {}) ⇒ RTUViaTCPServer
Init server
28 29 30 31 32 33 |
# File 'lib/rmodbus/rtu_via_tcp_server.rb', line 28 def initialize(port = 10002, uid = 1, opts = {}) @uid = uid opts[:host] = DEFAULT_HOST unless opts[:host] opts[:max_connection] = 4 unless opts[:max_connection] super(port, host = opts[:host], maxConnection = opts[:max_connection]) end |