ModbusElement<T> class
abstract
The base element class
Constructors
- ModbusElement({required String name, String description = "", required ModbusElementType type, required int address, required int byteCount, ModbusEndianness endianness = ModbusEndianness.ABCD, dynamic onUpdate(ModbusElement self)?})
Properties
- address ↔ int
-
getter/setter pair
- byteCount → int
-
final
- description → String
-
final
- endianness ↔ ModbusEndianness
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
final
- onUpdate → dynamic Function(ModbusElement self)?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → ModbusElementType
-
final
- value ↔ T?
-
getter/setter pair
Methods
-
getMultipleWriteRequest(
Uint8List bytes, {int? unitId, Duration? responseTimeout, ModbusEndianness? endianness}) → ModbusWriteRequest - Gets a write request from multiple register elements.
-
getReadRequest(
{int? unitId, Duration? responseTimeout, ModbusEndianness? endianness}) → ModbusReadRequest - Gets a read request from this element
-
getWriteRequest(
dynamic value, {bool rawValue = false, int? unitId, Duration? responseTimeout, ModbusEndianness? endianness}) → ModbusWriteRequest -
Gets a write request from this register element.
value
is set to the element once request is successfully completed. IfrawValue
is true then the integervalue
is written as it is without any value or type conversion. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setValueFromBytes(
Uint8List rawValues) → T? -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited