Click or drag to resize

Variable

Home

This topic contains the following sections:

Variables are used to represent values. Two types of variables are defined:

  • Properties

  • Data variables

They differ in the kind of data they represent and whether they can contain other variables.

Properties

Properties are server-defined characteristics of objects, data variables and other nodes. Properties differ from attributes in that they characterise what the node represents, such as a device or a purchase order, instead of defining additional metadata that is used to instantiate all nodes from a node class.

For example, if a data variable is defined by a data structure that contains two fields, startTime and endTime, it might have a property specific to that data structure, such as earliestStartTime.

Note Note

To prevent recursion, properties are not allowed to have properties defined for them.

To uniquely identify properties, the BrowseName attribute of a property must be unique in the context of the node containing the properties.

An object and its properties shall always reside in the same server Address Space.

Data Variables

Data variables represent the content of an object. For example, a file object may be defined that contains a stream of bytes. The stream of bytes may be defined as a DataVariable node that is an array of bytes. Properties may be used to expose the creation time and owner of the file object.

As another example, function blocks in control systems might be represented as objects. The parameters of the function block, such as its setpoints, may be represented as data variables. The function block object might also have properties that describe its execution time and its type.

Data variable may have additional data variables, but only if they are complex. In this case, their data variables shall always be elements of their complex definitions. Following the example introduced by the description of properties, the server could expose startTime and endTime as separate components of the data structure.

As another example, a complex DataVariable node may define an aggregate of temperature values generated by three separate temperature transmitters that are also visible in the Address Space. In this case, this complex DataVariable could define HasComponent references from it to the individual temperature values that it is composed of.

See Also