Diagram DatatypeLibrary
DatatypeLibrary
A DatatypeLibrary holds the datatypes and constants used by a project and its controllers - enumerations, record types, function-block types and named constants. Controller interface and local variables are typed by its contents; a master library aggregates per-controller sub-libraries.
class DatatypeLibrary extends NamedResource, AOoDomainRoot, DatatypeLibraryOwner, ACallingBaseElement, AAutoPrefix, Commentable
Constant
A Constant is a named compile-time constant defined in a DatatypeLibrary - a shared value such as a limit, timing or size that code references instead of hardcoding the literal. AConstant is the abstract range used by the library.
class Constant extends AConstant, ValidatableType, IndexValue
Type
abstract class Type extends Type, AReturnType, APrefixedResource
RecordType
A RecordType is a structured (struct) datatype defined in a DatatypeLibrary, composed of named fields. It defines a shared data shape that many controller variables, such as configuration or recipe structures, can be typed by.
class RecordType extends RecordType, AStructureType, APrefixedResource
StringConstant
Use StringConstant for string value with length.
class StringConstant extends Constant
FunctionBlockType
class FunctionBlockType extends RecordType
DatatypeLibraryExtension
class DatatypeLibraryExtension extends Resource, AnnotableComment, DatatypeLibraryOwner
ATypeExtension
abstract class ATypeExtension extends NamedResource, Resource
RecordTypeExtension
class RecordTypeExtension extends ATypeExtension
ClassType
The ClassType enables the implementation of object oriented patterns in the application. This type can be used for both local controller variables and variables in the interfaces of a controller. A ClassType instance can extend an existing ClassType instance.
class ClassType extends AOoExtendable, ACallingBaseElement, AStructureType
FieldComplexMember
class FieldComplexMember extends AFieldComplex
MethodModel
class MethodModel extends NamedResource, AnnotableComment, AOoOverride, AMethodParameter, AFunctionModel, APrefixedResource
AStructureType
Structure type allows to handle RecordType and ClassType with same methods to access fields, members of structured types.
abstract class AStructureType extends Type
AConstant
A named compile-time constant in a DatatypeLibrary, held via the library's constant relation. The concrete kind used in practice is Constant; AConstant is the abstract range.
Each constant has a type (a standard/IEC type) and an init value literal.
Naming convention is UPPER_SNAKE_CASE.
Use library constants for shared magic numbers (limits, timings, sizes) instead of hardcoding them in code snippets.
abstract class AConstant extends AValue, NamedResource, Comment
ModelConstant
Use model constant if value is model dependent. Value is calculated while generating.
class ModelConstant extends AConstant
ModelType
Use model type if a datatype is different in the platforms. A model type can be used like an enum type.
ModelTypeValue
class ModelTypeValue extends NamedResource, AnnotableComment, ValidatableType
EnumType
An EnumType is an enumeration datatype defined in a DatatypeLibrary, with an underlying integer type and one or more named values. Interface data and local variables can be typed by it.
class EnumType extends EnumType, Type, AResourceWithType
StandardType
class StandardType extends StandardType, Type
AFieldComplex
abstract class AFieldComplex extends FieldComplex, FieldUnit, APrefixedResource, AValue, ValidatableType
FieldComplex
A FieldComplex is a single field of a RecordType. Its type may be an IEC base type, an enumeration, or a nested record.
class FieldComplex extends AFieldComplex