ModbusNumRegister<T extends num> class abstract

A numeric register where type can be ModbusElementType.inputRegister or ModbusElementType.inputRegister. The returned device value (i.e. raw value) can be of type Int16, Uint16, Int32 or Uint32.

This raw value might be converted into an engineering value by this formula: engineering value = raw value * multiplier + offset

The string representation of the engineering value can have a unit of measure uom and rounded decimal places viewDecimalPlaces.

Inheritance
Implementers

Constructors

ModbusNumRegister({required String name, String description = "", dynamic onUpdate(ModbusElement self)?, required ModbusElementType type, required int address, required int byteCount, String uom = "", double multiplier = 1, double offset = 0, int viewDecimalPlaces = 2, ModbusEndianness endianness = ModbusEndianness.ABCD})

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
multiplier double
final
name String
finalinherited
offset double
final
onUpdate → dynamic Function(ModbusElement self)?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ModbusElementType
finalinherited
uom String
final
value ↔ T?
getter/setter pairinherited
viewDecimalPlaces int
final

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}) ModbusWriteRequest
Gets a write request from this register element. value is set to the element once request is successfully completed. If rawValue is true then the integer value is 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) → T?
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited