Class: ModBus::RTUClient
- Inherits:
-
Client
- Object
- Client
- ModBus::RTUClient
- Includes:
- RTU, SP
- Defined in:
- lib/rmodbus/rtu_client.rb
Overview
RTU client implementation
Constant Summary
Constant Summary
Constants included from RTU
ModBus::RTU::CHUNK_SIZE, ModBus::RTU::CrcHiTable, ModBus::RTU::CrcLoTable
Instance Attribute Summary
Attributes included from SP
#baud, #data_bits, #parity, #port, #read_timeout, #stop_bits
Attributes included from Options
#raise_exception_on_mismatch, #read_retries, #read_retry_timeout
Attributes included from Debug
#debug, #raise_exception_on_mismatch, #read_retries, #read_retry_timeout
Instance Method Summary (collapse)
- - (Object) get_slave(uid, io) protected
-
- (Object) open_connection(port, baud = 9600, opts = {})
protected
Open serial port.
Methods included from SP
Methods included from RTU
#clean_input_buff, #crc16, #read_rtu_pdu, #read_rtu_request, #read_rtu_response, #send_rtu_pdu, #serv_rtu_requests
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
- (Object) get_slave(uid, io) (protected)
35 36 37 |
# File 'lib/rmodbus/rtu_client.rb', line 35 def get_slave(uid, io) RTUSlave.new(uid, io) end |
- (Object) open_connection(port, baud = 9600, opts = {}) (protected)
Open serial port
31 32 33 |
# File 'lib/rmodbus/rtu_client.rb', line 31 def open_connection(port, baud=9600, opts = {}) open_serial_port(port, baud, opts) end |