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
#promiscuous, #request_callback, #response_callback
Attributes included from Debug
#logger, #raise_exception_on_mismatch, #read_retries, #read_retry_timeout
Instance Method Summary collapse
-
#initialize(port = 10_002, opts = {}) ⇒ RTUViaTCPServer
constructor
Init server.
Methods included from Server
Constructor Details
#initialize(port = 10_002, opts = {}) ⇒ RTUViaTCPServer
Init server
31 32 33 34 35 |
# File 'lib/rmodbus/rtu_via_tcp_server.rb', line 31 def initialize(port = 10_002, opts = {}) opts[:host] = DEFAULT_HOST unless opts[:host] opts[:max_connection] = 4 unless opts[:max_connection] super(port, opts[:host], opts[:max_connection]) end |