ModbusClientSerialAscii class
The serial Modbus ASCII client class.
Constructors
- ModbusClientSerialAscii({required String portName, int? unitId, ModbusConnectionMode connectionMode = ModbusConnectionMode.autoConnectAndKeepConnected, SerialBaudRate baudRate = SerialBaudRate.b19200, SerialDataBits dataBits = SerialDataBits.bits8, SerialStopBits stopBits = SerialStopBits.one, SerialParity parity = SerialParity.none, SerialFlowControl flowControl = SerialFlowControl.rtsCts, Duration responseTimeout = const Duration(seconds: 3)})
Properties
- checksumByteCount → int
-
Returns the serial telegram checksum length
no setterinherited
- connectionMode → ModbusConnectionMode
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Returns true if connection is established
no setterinherited
- responseTimeout → Duration
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serialPort ↔ ModbusSerialPort
-
getter/setter pairinherited
- unitId → int?
-
finalinherited
Methods
-
connect(
) → Future< bool> -
Connect the port if not already done or disconnected
inherited
-
disconnect(
) → Future< void> -
Close the connection
inherited
-
getResponseTimeout(
ModbusRequest request) → Duration -
If
request
has its ownresponseTimeout
defined, then it will override this clientresponseTimeout
.inherited -
getUnitId(
ModbusRequest request) → int -
If
request
has its ownunitId
defined, then it will override this clientunitId
. If bothunitId
are not defined the a 0 is returned.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
ModbusRequest request) → Future< ModbusResponseCode> -
Sends a modbus request
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited