Constructors

Properties

clientId: number
connectTimeout: number
connectionType: MODBUSConnectionType
hiByte: boolean

SHORT/USHORT: we read the first byte under the configured byte order. If your device actually uses the other byte.

host: string
id?: number
maxRegistryGroupLength: number
mostSignificantByte: boolean
mostSignificantWord: boolean
poolInterval: number
port: number
reconnectTimeout: number
rtuBaudRate: number

How fast bits are sent. Common Modbus values: 9600, 19200, 38400, 57600, 115200. Tip: Start with the slave’s documented baud. Higher ≠ better if the line is long/noisy.

rtuBufferSize: number

Driver/read buffer size. Modbus-RTU max response is ~256 bytes (253 PDU + addr + CRC). Give headroom. Typical: 512 or 1024.

rtuDataBits: number

Bits per character, usually 8 for Modbus (a.k.a. “8N1” or “8E1”). Some very old gear uses 7. Typical: 8.

rtuParity: MODBUSRTUParity

parity?: 'none' | 'even' | 'mark' | 'odd' | 'space' Error detection bit in each character. Modbus-RTU devices most often use even or none. Typical: 'even' (8E1) or 'none' (8N1). Match the slave exactly.

rtuPath: string
rtuRtsCts: boolean

Hardware flow control (RTS/CTS). RS-485 adapters often don’t use CTS/RTS for flow; many do auto-direction. Enable only if your adapter/slave requires it. Typical: false for Modbus-RTU.

rtuStopBits: number

Time between characters to let receivers resync. Usually 1; some devices require 2 at high baud or with parity=none. Typical: 1 (or 2 if the device manual says so).

rtuX: boolean
rtuXany: boolean
rtuXoff: boolean
rtuXon: boolean

Software (in-band) flow control. Modbus frames are binary and should not use XON/XOFF. Typical: false for all three.

timeout: number
uuid: string = ...
zeroBasedAddressing: boolean