Click or drag to resize

Standard Data Types

Home

This topic contains the following sections:

The following subclauses define data types. Their representation in the Address Space and the data type hierarchy is described in section Standard Data Types. Additional data types may by specified.

NodeId

This section contains the following subsections:

This built-in DataType is composed of three elements that identify a node within a server.

NodeId structure definition

Field

Type

Description

namespaceIndex

UInt16

The index for a namespace URI.

identifierType

IdType

The format and data type of the identifier.

identifier

*

The identifier for a node in the Address Space of an OPC Unified Architecture server.

See section Mappings for a description of the encoding of the identifier into OPC Unified Architecture messages.

namespaceIndex

The namespace is a URI that identifies the naming authority responsible for assigning the identifier element of the NodeId. Naming authorities include the local server, the underlying system, standards bodies and consortia. It is expected that most nodes will use the URI of the server or of the underlying system.

Using a namespace URI allows multiple OPC Unified Architecture servers attached to the same underlying system to use the same identifier to identify the same object. This enables clients that connect to those servers to recognise objects that they have in common.

Namespace URIs, like server names, are identified by numeric values in OPC Unified Architecture services to permit more efficient transfer and processing (e.g. table lookups). The numeric values used to identify namespaces correspond to the index into the NamespaceArray. The NamespaceArray is a Variable that is part of the Server object in the Address Space (see section Information Model for its definition).

The URI for the OPC Unified Architecture namespace is: “http://opcfoundation.org/UA/”

Its corresponding index in the namespace table is 0.

identifierType

The identifierType field of the IdType type identifies the type of a NodeId value, its format and its scope.

Normally the scope of NodeId values is the server in which they are defined. For certain types of NodeId values, they can uniquely identify a node within a system, or across systems (e.g. GUIDs). System-wide and globally-unique identifiers allow clients to track nodes, such as work orders, as they move between OPC Unified Architecture servers as they progress through the system.

Opaque identifiers are identifiers that are free-format byte strings that might or might not be human interpretable.

identifier

The identifier value element is used within the context of the first two elements to identify the node. Its data type and format is defined by the identifierType field.

Identifier values of IdType STRING_1 are restricted to 4096 characters. Identifier values of IdType OPAQUE_3 are restricted to 4096 bytes.

A Null NodeId has special meaning. For example, many services described in section Services define special behaviour if a Null NodeId is passed as a parameter. Each IdType has a set of identifier values that represent a Null NodeId.

A Null NodeId always has a NamespaceIndex equal to 0.

A node in the Address Space shall not have a Null as its NodeId attribute.

QualifiedName

This built-in DataType contains a qualified name. It is, for example, used as BrowseName.

Note Note

The name part of the QualifiedName is restricted to 512 characters.

QualifiedName structure filds:

Name

Type

Description

NamespaceIndex

UInt16

Index that identifies the namespace that defines the name. This index is the index of that namespace in the local server’s NamespaceArray. The client may read the NamespaceArray variable to access the string value of the namespace.

name

String

The unqualified name.

LocaleId

This simple DataType is specified as a string that is composed of a language component and a country/region component as specified by RFC 3066. The <country/region> component is always preceded by a hyphen. The format of the LocaleId string is shown below:

scr
<language>
         [-<country/region>], where
         <language>
           is the two letter ISO 639 code for a language,
           <country/region> is the two letter ISO 3166 code for the country/region.

The rules for constructing LocaleId values defined by RFC 3066 are restricted as follows:

  • The OPC Unified Architecture specification permits only zero or one <country/region> component to follow the <language> component,

  • The OPC Unified Architecture specification also permits the -CHS and -CHT three-letter <country/region> codes for Simplified and Traditional Chinese locales.

  • The OPC Unified Architecture specification also allows the use of other <country/region> codes as deemed necessary by the client or the server.

Clients and servers always provide LocaleId values that explicitly identify the language and the country/region.

An empty or NULL string indicates that the LocaleId vlaue is unknown.

LocalizedText

This built-in DataType defines a structure containing a string in a locale-specific translation specified in the identifier for the locale. Its elements are defined in the following table:

LocalizedText structure definition

Field

Type

Description

text

String

The localized text.

locale

LocaleId

The identifier for the locale (e.g. “en-US”).

Argument

This structured DataType defines a method input or output argument specification. It is for example used in the input and output argument properties for methods.

Argument structure definition

Name

Type

Description

name

String

The name of the argument

dataType

NodeId

The NodeId of the DataType of this argument

valueRank

Int32

Indicates whether the DataType is an array and how many dimensions the array has. It may have the following values:

  • n>1: the DataType is an array with the specified number of dimensions.

  • OneDimension (1): The DataType is an array with one dimension.

  • OneOrMoreDimensions (0): The DataType is an array with one or more dimensions.

  • Scalar (-1): The DataType is not an array.

  • Any (-2): The DataType can be a scalar or an array with any number of dimensions.

  • ScalarOrOneDimension (-3): The DataType can be a scalar or a one dimensional array.

arrayDimensions

UInt32[]

Specifies the length of each dimension for an array dataType. It is intended to describe the capability of the DataType, not the current size. The number of elements shall be equal to the value of the valueRank. Must be null if valueRank <= 0.

A value of 0 for an individual dimension indicates that the dimension has a variable length.

description

LocalizedText

A localised description of the argument

BaseDataType

This abstract DataType defines a value that can have any valid DataType.

It defines a special value NULL indicating that a value is not present.

Boolean

This built-in DataType defines a value that is either TRUE or FALSE.

Byte

This built-in DataType defines a value in the range of 0 to 255.

ByteString

This built-in DataType defines a value that is a sequence of Byte values.

DateTime

This built-in DataType defines a Gregorian calendar date.

Double

This built-in DataType defines a value that adheres to the IEEE 754 double precision data type definition.

Duration

This simple DataType is a Double that defines an interval of time in milliseconds (fractions can be used to define sub-millisecond values). Negative values are generally invalid but may have special meanings where the Duration is used.

Enumeration

This abstract DataType is the base for all enumeration types like NodeClass. All types inheriting from this type have a special handling for the encoding as defined in Mappings. All enumeration types have to inherit from this DataType.

Float

This built-in DataType defines a value that adheres to the IEEE 754 single precision data type definition.

SByte

This built-in DataType defines a value that is a signed integer between -128 and 127 inclusive.

IdType

This DataType is an enumeration that identifies the IdType of a NodeId.

IdType values

Value type

Value

NUMERIC_0

Numeric value

STRING_1

String value

GUID_2

Globally Unique Identifier

OPAQUE_3

Namespace specific format

Image

This abstract DataType defines a ByteString representing an image.

ImageBMP

This simple DataType defines a ByteString representing an image in BMP format.

ImageGIF

This simple DataType defines a ByteString representing an image in GIF format.

ImageJPG

This simple DataType defines a ByteString representing an image in JPG format. JPG is defined in ISO/IEC IS 10918-1.

ImagePNG

This simple DataType defines a ByteString representing an image in PNG format. PNG is defined in ISO/IEC 15948:2003.

Integer

This abstract DataType defines an integer which length is defined by its subtypes.

Int16

This built-in DataType defines a value that is a signed integer between 32,768 and 32,767 inclusive.

Int32

This built-in DataType defines a value that is a signed integer between 2,147,483,648 and 2,147,483,647 inclusive.

Int64

This built-in DataType defines a value that is a signed integer between 9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 inclusive.

NamingRuleType

This DataType is an enumeration that identifies the naming rule.

NamingRuleType values

Name

MANDATORY_1

OPTIONAL_2

CONSTRAINT_3

NodeClass

This DataType is an enumeration that identifies a node class. Its values are defined in the following table.

NodeClass values

Name

OBJECT_1

VARIABLE_2

METHOD_4

OBJECT_TYPE_8

VARIABLE_TYPE_16

REFERENCE_TYPE_32

DATA_TYPE_64

VIEW_128

Number

This abstract DataType defines a number. Details are defined by its subtypes.

String

This built-in DataType defines a Unicode character string that should exclude control characters that are not whitespaces (0x00 - 0x08, 0x0E-0x1F or 0x7F).

Structure

This abstract DataType is the base all structured types like Argument. All types inheriting from this DataType have a special handling for the encoding as described in section Mappings. All structured types have to inherit from this DataType if they are not defined as primitives in this section (like NodeId, a NodeId is structured but treated in a special way as described in section Mappings).

UInteger

This abstract DataType defines an unsigned integer which length is defined by its subtypes.

UInt16

This built-in DataType defines a value that is an unsigned integer between 0 and 65,535 inclusive

UInt32

This built-in DataType defines a value that is an unsigned integer between 0 and 4,294,967,295 inclusive.

UInt64

This built-in DataType defines a value that is an unsigned integer between 0 and 18,446,744,073,709,551,615 inclusive.

UtcTime

This simple DataType is a type used to define Coordinated Universal Time (UTC) values. All time values conveyed between OPC Unified Architecture servers and clients are UTC values. Clients shall provide any conversions between UTC and local time. section Mappings describes details about this DataType.

XmlElement

This built-in DataType is used to define XML elements. section Mappings describes details about this DataType.

XML data can always be modelled as a subtype of the Structure with a single data type encoding that represents the XML complexType that defines the XML element (it is not necessary to have access to the XML Schema to define a data type encoding). For this reason a Server should never define variables that use the XmlElement DataType unless the server has no information about the XML elements that might be in the VariableValue attribute.

See Also