ModbusBytesRegister class
This register type reads and writes byte array.
The byteCount cannot exceed 250 bytes which is the multiple read bytes limit for Modbus/RTU. Note that the protocol limit depends on multiple factors:
- Read & Write have different limits
- Modbus RTU and TCP have different limits
- Device dependent limits To get the right limit please refer to Modbus specs and your device manual.
- Inheritance
-
- Object
- ModbusElement<
Uint8List> - ModbusBytesRegister
Constructors
- ModbusBytesRegister({required String name, required int address, required int byteCount, String description = "", dynamic onUpdate(ModbusElement self)?, ModbusElementType type = ModbusElementType.holdingRegister})
Properties
- address ↔ int
-
getter/setter pairinherited
- byteCount → int
-
finalinherited
- description → String
-
finalinherited
- endianness ↔ ModbusEndianness
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
finalinherited
- onUpdate → dynamic Function(ModbusElement self)?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → ModbusElementType
-
finalinherited
- value ↔ Uint8List?
-
getter/setter pairinherited
Methods
-
getMultipleWriteRequest(
Uint8List bytes, {int? unitId, Duration? responseTimeout, ModbusEndianness? endianness}) → ModbusWriteRequest -
Gets a write request from multiple register elements.
inherited
-
getReadRequest(
{int? unitId, Duration? responseTimeout, ModbusEndianness? endianness}) → ModbusReadRequest -
Gets a read request from this element
inherited
-
getWriteRequest(
dynamic value, {bool rawValue = false, int? unitId, Duration? responseTimeout, ModbusEndianness? endianness, bool isSingleWriteRegister = false}) → ModbusWriteRequest -
Gets a write request from this register element.
valueis set to the element once request is successfully completed. IfrawValueis true then the integervalueis written as it is without any value or type conversion.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setValueFromBytes(
Uint8List rawValues) → Uint8List? -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited