OPC UA provides a framework that can be used to represent complex information as Objects in an AddressSpace which can be accessed with standard web services. These consist of Nodes connected by References. Different classes of Nodes convey different semantics. For example, a Variable Node represents a value that can be read or written. The Variable Node has an associated DataType that can define the actual value, such as a string, float, structure etc. It can also describe the Variable value as a variant. A Method Node represents a function that can be called. Every Node has a number of Attributes including a unique identifier called a NodeId and non-localised name called a BrowseName. An Object representing a Heater is shown in Figure 2.
Object and Variable Nodes are called Instance Nodes and they always reference a TypeDefinition (ObjectType or VariableType) Node which describes their semantics and structure. Figure 3 illustrates the relationship between an instance and its TypeDefinition.
Type Nodes are templates that define all of the children that can be present in an instance of the type. In the example in Figure 3 the BoilerType ObjectType defines two sensors: Pressure and Temperature. All instances of BoilerType are expected to have the same children with the same BrowseNames. Within a type the BrowseNames uniquely identify the child. This means Client applications can be designed to search for children based on the BrowseNames from the type instead of NodeIds. This eliminates the need for manual reconfiguration of systems if a Client uses types that multiple devices implement.
OPC UA also supports the concept of subtyping. This allows a modeller to take an existing type and extend it. There are rules regarding subtyping defined in OPC 10000-3, but in general they allow the extension of a given type or the restriction of a DataType. For example, the modeller may decide that the existing ObjectType in some cases needs an additional Variable. The modeller can create a subtype of the Object and add the Variable. A Client that is expecting the parent type can treat the new type as if it was of the parent type. With regard to DataTypes, if a Variable is defined to have a numeric value, a subtype could restrict the value to a float. This standard adds additional rules for extensions.
References allow Nodes to be connected together in ways that describe their relationships. All References have a ReferenceType that specifies the semantics of the relationship. References can be hierarchical or non-hierarchical. Hierarchical References are used to create the structure of Objects and Variables. Non-hierarchical References are used to create arbitrary associations. Applications can define their own ReferenceType by creating subtypes of the existing ReferenceType. Subtypes inherit the semantics of the parent but may add additional restrictions. Figure 4 depicts several References connecting different Objects.
The figures above use a notation that was developed for the OPC UA specification. The notation is summarised in Figure 5. UML representations can also be used; however, the OPC UA notation is less ambiguous because there is a direct mapping from the elements in the figures to Nodes in the AddressSpace of an OPC UA Server.
The OPC UA specification defines a very wide range of functionality in its basic information model. It is not expected that all Clients or Servers support all functionality in the OPC UA specifications. OPC UA includes the concept of Profiles, which segment the functionality into testable certifiable units. This allows the development of companion specifications (such as OPC UA MDIS) that can describe the subset of functionality that is expected to be implemented. The Profiles do not restrict functionality but generate requirements for a minimum set of functionality (see OPC 10000-7).
The OPC Foundation also defines a set of InformationModels that provide a basic set of functionalities. The Data Access specification (see OPC 10000-8) provides a basic InformationModel for typical process or measured data. The Alarm and Condition specification (see OPC 10000-9) defines a standard InformationModel for Alarms and Conditions. The Programs specification (see OPC 10000-10) defines a standard InformationModel for extending the functionality available via Method calls and state machines. The Historical Access specification (see OPC 10000-11) defines the InformationModel associated with Historical Data and Historical Events. The aggregates specification (see OPC 10000-13) defines a series of standard aggregate functions that allow a Client to request summary data. Examples of aggregates include averages, minimums, time in state, standard deviation, etc.