ModbusClientSerial class abstract
The serial Modbus client class.
- Inheritance
-
- Object
- ModbusClient
- ModbusClientSerial
- Implementers
Constructors
- ModbusClientSerial({required ModbusSerialPort serialPort, int? unitId, ModbusConnectionMode connectionMode = ModbusConnectionMode.autoConnectAndKeepConnected, Duration responseTimeout = const Duration(seconds: 3)})
Properties
- checksumByteCount → int
-
Returns the serial telegram checksum length
no setter
- connectionMode → ModbusConnectionMode
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Returns true if connection is established
no setteroverride
- responseTimeout → Duration
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serialPort ↔ ModbusSerialPort
-
getter/setter pair
- unitId → int?
-
finalinherited
Methods
-
connect(
) → Future< bool> -
Connect the port if not already done or disconnected
override
-
disconnect(
) → Future< void> -
Close the connection
override
-
getResponseTimeout(
ModbusRequest request) → Duration -
If
request
has its own responseTimeout defined, then it will override this client responseTimeout.inherited -
getUnitId(
ModbusRequest request) → int -
If
request
has its own unitId defined, then it will override this client unitId. If both unitId 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
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited