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 = 10002, opts = {}) ⇒ RTUViaTCPServer
constructor
Init server.
Methods included from Server
#exec_req, #parse_mask_write_register_func, #parse_read_func, #parse_read_write_multiple_registers_func, #parse_request, #parse_response, #parse_write_coil_func, #parse_write_multiple_coils_func, #parse_write_multiple_registers_func, #parse_write_register_func, #process_func, #slaves, #validate_read_func, #validate_read_write_multiple_registers_func, #validate_write_coil_func, #validate_write_multiple_coils_func, #validate_write_multiple_registers_func, #validate_write_register_func, #with_slave
Methods included from RTU
#clean_input_buff, #crc16, #read, #read_rtu_request, #read_rtu_response, #serve
Methods included from Debug
Constructor Details
#initialize(port = 10002, opts = {}) ⇒ RTUViaTCPServer
Init server
29 30 31 32 33 |
# File 'lib/rmodbus/rtu_via_tcp_server.rb', line 29 def initialize(port = 10002, opts = {}) 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 |