Field class

Implementers

Constructors

Field({String name = '', int id = 0, BaseType type = BaseType.ENUM, double? offset, double? scale, String units = '', bool isAccumulated = false, bool isExpandedField = false, List<SubField>? subFields, List<FieldComponent>? components, int size = 0, bool growable = false, String mainTypeName = ''})
Field.fromField(Field other)
Field.fromFieldDefinition(FieldDefinition definition)

Properties

components List<FieldComponent>
final
encodedValues List
getter/setter pair
growable bool
final
hashCode int
The hash code for this object.
no setterinherited
id int
final
isAccumulated bool
final
isExpandedField bool
final
length int
no setter
mainTypeName String
final
name String
final
offset double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double?
final
size int
getter/setter pair
subFields List<SubField>
final
type BaseType
final
units String
final

Methods

calculateSize() int
clear() → void
decodeValue(dynamic encodedValue, SubField? subField) → dynamic
encodedValueToBytes(dynamic encodedValue, {Endian endian = Endian.little}) Uint8List
encodeValue(dynamic value, SubField? subField) → dynamic
getEncodedValueFromBytes(Uint8List bytes, {int offset = 0, Endian endian = Endian.little}) → dynamic
getName({SubField? subField, String? subFieldName, int? subFieldIndex}) String
getOffset({SubField? subField, String? subFieldName, int? subFieldIndex}) double?
getScale({SubField? subField, String? subFieldName, int? subFieldIndex}) double?
getSubField({String? name, int? index}) SubField?
getType({SubField? subField, String? subFieldName, int? subFieldIndex}) BaseType
getUnits({SubField? subField, String? subFieldName, int? subFieldIndex}) String
getValidSubField(List<Field> fields) SubField?
getValue({int index = 0, SubField? subField}) → dynamic
getValues() → dynamic
isNotValid() bool
isValid() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAllFromBytes(Uint8List bytes, {SubField? subField, Endian endian = Endian.little}) → void
readFromBytes(Uint8List bytes, int index, {Endian endian = Endian.little}) → void
readStringsFromBytes(Uint8List bytes) → void
scaleOffsetValue(double value, double scale, double offset) int
setEncodedValue(int index, dynamic encodedValue) → void
setValue(int index, dynamic value, SubField? subField) → void
setValues(List values) → void
toBytes({Endian endian = Endian.little}) Uint8List
toRow({SubField? subField}) List
toString() String
A string representation of this object.
inherited
unScaleOffsetValue(int encodedValue, double scale, double offset) double

Operators

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

Static Methods

getLengthFromSize(BaseType type, int size) int