Click or drag to resize

VariableType Node Class

Home

This topic contains the following sections:

VariableType nodes are used to provide type definitions for variables. Variable types are defined using the VariableType node class.

The VariableType node class inherits the base attributes from the Base node class. The VariableType node class also defines a set of attributes that describe the default or initial value of its instance variables. The Value attribute represents the default value. The DataType, ValueRank and ArrayDimensions attributes provide the capability to describe simple and complex values. The IsAbstract attribute defines if the type can be directly instantiated.

The VariableType node class uses HasProperty references to define the properties and HasComponent references to define data variables. Whether they are instantiated depends on the modelling rules.

The property NodeVersion indicates the version of the VariableType. Section Data Access describes a set of properties that can be used for the VariableType.

HasSubtype references are used to subtype variable types. VariableType subtypes inherit the general semantics from the parent type. It is not required to provide the HasSubtype reference for the supertype, but it is required that the subtype provides the inverse reference to its supertype.

GeneratesEvent references identify that variables of the VariableType may be the source of an Event of the specified event type or one of its subtypes. Servers should make GeneratesEvent references bidirectional references. However, it is allowed to be unidirectional when the server is not able to expose the inverse direction pointing from the event type to each VariableType supporting the event type.

GeneratesEvent references are optional, i.e. variables may generate events of an event type that is not exposed by its VariableType.

Variable types may use any additional references to define relationships to other nodes. No restrictions are placed on the types of references used or on the node classes of the nodes that may be referenced. However, restrictions may be defined by the ReferenceType excluding its use for variable types. Standard reference types are described in Standard Reference Types.

Note Note

All nodes referenced with hierarchical references shall have unique browse names in the context of the VariableType (see Type Definition).

Client-side creation of Variables

Variables are always based on a VariableType, i.e. they have a HasTypeDefinition reference pointing to its VariableType.

Clients can create variables using the AddNodes service described in section Services. The service requires specifying the type definition node of the Variable. A variable created by the AddNodes service contains all components defined by its VariableType dependent on the modelling rules specified for the components. However, the server may add additional components and references to the variable node and its components that are not defined by the VariableType. This behaviour is server dependent. The VariableType only specifies the minimum set of components that shall exist for each variable of a VariableType.

See Also