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

ID

Name

Nullable

Default

Description

1

Boolean

No

false

A two-state logical value (true or false).

2

SByte

No

0

An integer value between −128 and 127 inclusive.

3

Byte

No

0

An integer value between 0 and 255 inclusive.

4

Int16

No

0

An integer value between −32 768 and 32 767 inclusive.

5

UInt16

No

0

An integer value between 0 and 65 535 inclusive.

6

Int32

No

0

An integer value between −2 147 483 648 and 2 147 483 647 inclusive.

7

UInt32

No

0

An integer value between 0 and 4 294 967 295 inclusive.

8

Int64

No

0

An integer value between −9 223 372 036 854 775 808 and 9 223 372 036 854 775 807 inclusive.

9

UInt64

No

0

An integer value between 0 and 18 446 744 073 709 551 615 inclusive.

10

Float

No

0

An IEEE single precision (32 bit) floating point value.

11

Double

No

0

An IEEE double precision (64 bit) floating point value.

12

String

Yes

null

A sequence of Unicode characters.

13

DateTime

Yes

DateTime.MinValue (see 5.1.4)

An instance in time.

14

Guid

Yes

All zeros

A 16-byte value that can be used as a globally unique identifier.

15

ByteString

Yes

null

A sequence of octets.

16

XmlElement

Yes

null

A sequence of Unicode characters that is an XML element.

17

NodeId

Yes

All fields set to default.

An identifier for a node in the address space of an OPC UA Server.

18

ExpandedNodeId

Yes

All fields set to default.

A NodeId that allows the namespace URI to be specified instead of an index.

19

StatusCode

No

Good

A numeric identifier for an error or condition that is associated with a value or an operation.

20

QualifiedName

Yes

All fields set to default.

A name qualified by a namespace.

21

LocalizedText

Yes

All fields set to default.

Human readable text with an optional locale identifier.

22

ExtensionObject

Yes

All fields set to default.

A structure that contains an application specific data type that may not be recognized by the receiver.

23

DataValue

Yes

All fields set to default.

A data value with an associated status code and timestamps.

24

Variant

Yes

Null

A union of all of the types specified above.

25

DiagnosticInfo

Yes

No 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 equavalent ‘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 if a default value is needed. The default value for all arrays is ‘null’.