ModbusClientSerialRtuBase class
The serial Modbus RTU client class.
- Inheritance
-
- Object
- ModbusClient
- ModbusClientSerial
- ModbusClientSerialRtuBase
Constructors
- ModbusClientSerialRtuBase({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 setteroverride
- 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 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
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
computeCRC16(
Iterable< int> bytes) → Uint8List