5.1.2 Built-in Types

All OPC UA DataEncodings are based on rules that are defined for a standard set of built-in types. These built-in types are then used to construct structures, arrays and Messages. The built-in types are described in Table 1.

Table 1 – Built-in Data Types
IDNameNullableDefaultDescription
1BooleanNofalseA two-state logical value (true or false).
2SByteNo0An integer value between −128 and 127 inclusive.
3ByteNo0An integer value between 0 and 255 inclusive.
4Int16No0An integer value between −32768 and 32767 inclusive.
5UInt16No0An integer value between 0 and 65535 inclusive.
6Int32No0An integer value between −2,147,483,648 and 2,147,483,647 inclusive.
7UInt32No0An integer value between 0 and 4,294,967,295 inclusive.
8Int64No0An integer value between −9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 inclusive.
9UInt64No0An integer value between 0 and 18,446,744,073,709,551,615 inclusive.
10FloatNo0An IEEE single precision (32 bit) floating-point value.
11DoubleNo0An IEEE double precision (64 bit) floating-point value.
12StringYesnullA sequence of Unicode characters.
13DateTimeYesDateTime.MinValue (see 5.1.4)An instance in time.
14GuidYesAll zerosA 16-byte value that can be used as a globally unique identifier.
15ByteStringYesnullA sequence of octets.
16XmlElementYesnull

A sequence of Unicode characters that is an XML element.

This built-in type shall not have subtypes.

17NodeIdYesi=0 (see 5.1.12)An identifier for a node in the address space of an OPC UA Server.
18ExpandedNodeIdYesi=0 (see 5.1.12).A NodeId that allows the namespace URI to be specified instead of an index.
19StatusCodeNoGoodA numeric identifier for an error or condition that is associated with a value or an operation.
20QualifiedNameYesAll fields set to default.A name qualified by a namespace.
21LocalizedTextYesAll fields set to default.Human readable text with an optional locale identifier.
22ExtensionObjectYesAll fields set to default.A structure that contains an application specific data type that can be processed even if the receiver does not have knowledge of the DataType.
23DataValueYesAll fields set to default.A data value with an associated status code and timestamps.
24VariantYesNullA union of all of the types specified above.
25DiagnosticInfoYesNo fields specified.A structure that contains detailed error and diagnostic information associated with a StatusCode.

Most of these data types are the same as the abstract types defined in OPC 10000-3 and OPC 10000-4. However, the ExtensionObject and Variant types are defined in this document. In addition, this document defines a representation for the Guid type defined in OPC 10000-3.

The Nullable column indicates whether a ‘null’ value exists for the DataType in all DataEncodings. A ‘null’ value is a value that is equivalent ‘no value specified’. A nullable type with a default value means the default value shall be interpreted equivalent to a null.

The Default column specifies the default value for the type. The default value for all arrays is ‘null’.