NodeClassis used to define objects as parts involved in the underling real-time process. Each
Objectin the Address Space has an assigned object type. The OPC UA specification has defined a
BaseObjectTypefrom which all other
ObjectTypes shall either inherit, directly or indirectly.
BaseObjectTypeare listed in Table 1.
BaseEventTypehas many specialized subtypes to allow handling most common transient Events. System configuration changes, operator interaction and system errors are examples of Events. OPC UA Part 9 – Alarm and Conditions expands on this object type to define alarm and condition events.
HasTypeDefinitionreference to its type definition (depicted as double closed and filled arrows).
BaseVariableType(Figure 2). This means that all other types must inherit from it. The
BaseDataVariableTypeare most important for information representation. Consequently, there are two independent inheritance sub-trees.
BaseDataType, which is abstract and defines a value that can have any valid type (Figure 3). The double closed arrows point to the source of the
HasSubtypereference. An interesting feature of these types is that even though they have an abstract
BaseDataTypeboth are concrete and therefore can be instantiated. Abstract
DataTypes do not have any encoding and cannot be exchanged on the wire; therefore the instantiated variables with an abstract
DataTypemust redefine it. The
DataTypeattribute can only be changed to a new one if it is a subtype of the original
PropertyTypemust not have subtypes. Additionally, it is not permitted to have a Property as source of the
HierarchicalReferences type or any type inherited from it. In other words properties cannot be complex. To prevent recursion, properties are also not allowed to have properties defined for them. Additionally, a node and all its properties shall always reside in the same server.
BaseDataVariableTypeis a parent of two sets of types dedicated to:
DataItemTypethat derives from the
BaseDataVariableTypeto represent any item of data (see Figure 4). Users can create new types from the already defined ones to meet specific requirements of the application (see example case below). A detailed description of the types derived from the
BaseDataVariableTypeis beyond the scope of this chapter, but some features of this inheritance branch are worth noting. As opposed to the properties, the variables may be complex. One example of a complex
ServerStatusTypeshown in Figure 5. Components of the complex variable can be accessed independently. The next very important future of the variables is that new user specific types can be freely defined by deriving them from those already defined.
Valueattribute is defined by the associated
DataTypeis pointed out by the
DataTypeattribute of the
DataTypeattribute is of the
NodeIdtype (Table 2). In many cases, the value of the
DataTypeattribute – called
DataTypeId– will be well-known to clients and servers. Well-known values of
DataTypeIdallow clients to use random addressing and interpret values without having to read the type description from the server. Therefore, servers may use well-known
DataTypeIdvalues without representing the corresponding
DataTypenodes in their Address Space.
NodeClassis dedicated to describe types. In this case, the represented types have a special mission, because they describe data provided by the UA Server to clients. For example, a node of the DataType can provide information to clients that the data has a numeric value and the clients reading it can use this knowledge to interpret and process the obtained value – stream of bits.
BaseDataTypeis the root of the inheritance tree. The simplified inheritance hierarchy of the standard data types is shown in Figure 6, where the whole sub-tree of built-in types are represented commonly by a single symbol.
Double. The built-in data types with a short description are listed in the Table 2
NodeIdtype. This type needs some comments, because it is intended to be used by the random addressing mechanism to represent information allowing clients to uniquely identify and access the nodes. This built-in data type is a structure composed of:
namespaceIndex: numeric values used to identify namespace
identifierType: identifies the type of the
NodeId, its format and its scope
identifier: a unique identifier within the context of the namespace
NodeId. Namespace URIs are identified by numeric values in OPC UA Services to permit a more efficient transfer and processing (e.g. table lookups).
identifierTypefield may have the following values:
BaseDataType, that needs some comments. It is to be used to represent a limited set of simple information entities. Therefore it is a simple and abstract type. All enumerations, like
NodeClass, have to inherit from it. All types inheriting from the
Enumerationhave a special processing for the encoding.
Structure(Figure 6) is an abstract data type defined as the base for all structured types. All data types inheriting from it have a special processing for the encoding. All complex data, if not defined explicitly as primitive in the specification, are created by defining of new types derived from the
ServerStatusTypehas components of a simple data type. Advantages of this approach:
ServerStatusDataTypethat inherits from the Structure. The
ServerStatusDataTypearranges the server status data as a collection of fields. Advantages of this approach:
DataTypeDescriptionto interpret the data. The data structure is not visible in the Address Space; additional Properties describing the data structure cannot be added to the data type. Individual parts of data cannot be read without accessing the whole data structure.
HierarchicalReferencesdo not forbid loops. For example, starting from node “A” and following
HierarchicalReferencesmay lead to browse to node “A” again.
HasChildis an abstract type derived from
HierarchicalReferencesthat creates a branch of types, which forbids loops. In this case, starting from node “A” and only following references, which are subtypes of
HasChild, we shall never be able to return to “A”. But it is allowed that there may be more than one path leading to another node “B”.
HasProperty. Both are derived from the Aggregates type and used to reflect the parent – child relationship. There is also
HasSubtypeon this branch, but in this case it is used to expose the inheritance hierarchy.
HasComponentis derived from the
Aggregates(Figure 8) is defined to build the part of relationship, i.e. the target node of
HasComponentis a part of the source node. This type is used to relate objects, object types, variables and methods. Table 3 contains the allowed composite nodes (source) and allowed components as the target of this type of reference. By using this reference, the variable is defined as a
Aggregates(Figure 8) is to identify the properties of a node. The source node of this type can be of any
NodeClass. The target node shall be a variable. By using the
HasProperty, the variable is defined as
Property. Since properties shall not have properties, a property shall never be the source node of a
HasPropertyreferences pointing to the
ServiceLeveland Auditing properties. The
ServerStatusis a child variable pointed by a reference of the
HasComponenttype. Objects of this type have also components:
ServerRedundancyobjects pointed also by a reference of the
HasSubtypeis a subtype of the
HasChildtype. It is worth noting, that inheritance using HasSubtype is represented using the one-to-many (parent/child) relationship. Because new types can be freely derived from the existing ones we cannot enumerate all children in advance - the tree must be built and maintained dynamically during the life-cycle of the Address Space. This means that when a new type is created it is created with a reference to its base (parent), which results in a new subtype being added to the parent.
Organizesis the next subtype of
HierarchicalReferences. The semantics of it is to organize nodes in the Address Space. It can be used to span multiple hierarchies independent of any hierarchy created with the non-looping
Aggregatesreferences. The source node of references of this type shall be an object or a view. If it is an object it should be an object of the
FolderTypeor one of its subtypes. The target node of this type can be of any
StateMachineTypethat defines a single variable of the
StateVariableType, which represents the current state of the machine. An instance of the
StateMachineTypeshall generate an event whenever a state change occurs. Transitions are represented as objects of the
TransitionType. Each valid transition shall have exactly one
FromStatereference and exactly one
ToStatereference, each pointing to an object of the
MyStateMachineTypeis derived directly or indirectly from the
StateMachineType. All states, transitions and methods are components of this type.