Package nl.basjes.modbus.schema
Class Field
-
- All Implemented Interfaces:
-
kotlin.Comparable
public final class Field implements Comparable<Field>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classField.FieldBuilder
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final ReturnTypereturnTypeprivate StringfetchGroupprivate final BooleanfetchGroupIsDefaultprivate final Booleaninitializedprivate final ExpressionparsedExpressionprivate final BooleanisSystemprivate final BooleanisImmutableprivate final Objectvalueprivate final StringstringValueprivate final List<String>stringListValueprivate final DoubledoubleValueprivate final LonglongValueprivate final LongvalueEpochMsprivate final List<String>requiredFieldNamesprivate final List<Field>requiredFieldsprivate final List<Address>requiredRegistersprivate IntegerneededCountprivate final List<String>testCompareValueprivate final Blockblockprivate final Stringdescriptionprivate final StringshortDescriptionprivate final Stringexpressionprivate final Stringunit
-
Method Summary
Modifier and Type Method Description final StringgetId()final ReturnTypegetReturnType()The return type that the programming language must support. final StringgetFetchGroup()final UnitsetFetchGroup(String fetchGroup)final BooleangetFetchGroupIsDefault()final BooleangetInitialized()final ExpressiongetParsedExpression()The parsed version of the expression that is actually executed final BooleanisSystem()Some fields are system fields which means they should not be used by the application. final BooleanisImmutable()final ObjectgetValue()final StringgetStringValue()final List<String>getStringListValue()final DoublegetDoubleValue()final LonggetLongValue()final LonggetValueEpochMs()final List<String>getRequiredFieldNames()final List<Field>getRequiredFields()final List<Address>getRequiredRegisters()final IntegergetNeededCount()final UnitsetNeededCount(Integer neededCount)final List<String>getTestCompareValue()final BlockgetBlock()The block in which this field is located final StringgetDescription()Human-readable description of the field. final StringgetShortDescription()A shorter variant of the Human-readable description of the field. final StringgetExpression()The expression that defines how this Field gets its value. final StringgetUnit()Human-readable unit of the field (like 'V' for Volt or '%' for percentage). final Booleaninitialize()final List<Address>usedReadErrorAddresses()final BooleanisUsingReadErrorRegisters()final List<Address>usedHardReadErrorAddresses()final BooleanisUsingHardReadErrorRegisters()final List<RegisterBlockFetcher.FetchBatch>update()Directly update this field. final Unitneed()This field must be kept up-to-date final UnitunNeed()The field no longer needs to be kept up-to-date final BooleanisNeeded()IntegercompareTo(Field other)StringtoString()final static Field.FieldBuilderbuilder()-
-
Method Detail
-
getReturnType
final ReturnType getReturnType()
The return type that the programming language must support.
-
getFetchGroup
final String getFetchGroup()
-
setFetchGroup
final Unit setFetchGroup(String fetchGroup)
-
getFetchGroupIsDefault
final Boolean getFetchGroupIsDefault()
-
getInitialized
final Boolean getInitialized()
-
getParsedExpression
final Expression getParsedExpression()
The parsed version of the expression that is actually executed
-
isSystem
final Boolean isSystem()
Some fields are system fields which means they should not be used by the application.
-
isImmutable
final Boolean isImmutable()
-
getStringValue
final String getStringValue()
-
getStringListValue
final List<String> getStringListValue()
-
getDoubleValue
final Double getDoubleValue()
-
getLongValue
final Long getLongValue()
-
getValueEpochMs
final Long getValueEpochMs()
-
getRequiredFieldNames
final List<String> getRequiredFieldNames()
-
getRequiredFields
final List<Field> getRequiredFields()
-
getRequiredRegisters
final List<Address> getRequiredRegisters()
-
getNeededCount
final Integer getNeededCount()
-
setNeededCount
final Unit setNeededCount(Integer neededCount)
-
getTestCompareValue
final List<String> getTestCompareValue()
-
getDescription
final String getDescription()
Human-readable description of the field.
-
getShortDescription
final String getShortDescription()
A shorter variant of the Human-readable description of the field. If no shorter version is available then it will be the same as the 'long' description.
-
getExpression
final String getExpression()
The expression that defines how this Field gets its value.
-
getUnit
final String getUnit()
Human-readable unit of the field (like 'V' for Volt or '%' for percentage).
-
initialize
final Boolean initialize()
-
usedReadErrorAddresses
final List<Address> usedReadErrorAddresses()
-
isUsingReadErrorRegisters
final Boolean isUsingReadErrorRegisters()
-
usedHardReadErrorAddresses
final List<Address> usedHardReadErrorAddresses()
-
isUsingHardReadErrorRegisters
final Boolean isUsingHardReadErrorRegisters()
-
update
final List<RegisterBlockFetcher.FetchBatch> update()
Directly update this field.
- Returns:
A (possibly empty) list of all fetches that have been done (with duration and status)
-
builder
final static Field.FieldBuilder builder()
-
-
-
-