Package nl.basjes.modbus.schema
Class Block
-
- All Implemented Interfaces:
public class Block
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBlock.BlockBuilder
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final List<Field>fieldsprivate final IntegermaxFieldIdLengthprivate final SchemaDeviceschemaDeviceprivate final Stringdescription
-
Constructor Summary
Constructors Constructor Description Block(SchemaDevice schemaDevice, String id, String description)
-
Method Summary
Modifier and Type Method Description final StringgetId()The technical id of the block. final List<Field>getFields()final IntegergetMaxFieldIdLength()final SchemaDevicegetSchemaDevice()The schema device of which this block is a part final StringgetDescription()The human-readable description of the block. final BlockaddField(Field fields)final FieldgetField(String fieldId)final Booleaninitialize()Verify the basics StringtoString()final Unitupdate()Directly update all fields in this Block final UnitneedAll()All fields in this Block must be kept up-to-date final UnitunNeedAll()All fields in this Block no longer need to be kept up-to-date final List<Field>neededFields()Get the list of needed fields final static Block.BlockBuilderbuilder()-
-
Constructor Detail
-
Block
Block(SchemaDevice schemaDevice, String id, String description)
-
-
Method Detail
-
getId
final String getId()
The technical id of the block. Must be usable as an identifier in 'all' common programming languages. So "CamelCase" (without spaces, starting with a letter) is a good choice.
-
getMaxFieldIdLength
final Integer getMaxFieldIdLength()
-
getSchemaDevice
final SchemaDevice getSchemaDevice()
The schema device of which this block is a part
-
getDescription
final String getDescription()
The human-readable description of the block.
-
initialize
final Boolean initialize()
Verify the basics
-
neededFields
final List<Field> neededFields()
Get the list of needed fields
-
builder
final static Block.BlockBuilder builder()
-
-
-
-