Qt OPC UA Overview

OPC UA is a protocol for data modelling and exchange of data in industrial applications.

An OPC UA server offers access to data that is organized in a mesh of nodes connected by references. The use of different reference types and nodes containing metadata enable a client to navigate and interpret the data without knowing their structure in advance.

Each node has a unique identifier and attributes that can be read and written. Among others, there are Variable nodes that store values and callable Method nodes with attached nodes describing parameters and return values. Notifications in case of events and monitoring of Variable nodes for value changes are offered too.

Complex objects can be created by combining nodes using references. Inheritance is also possible. OPC UA offers support for pre-made models that can be extended to fit special needs.

OPC UA is the platform-independent successor of OPC Classic intended for usage on all levels, from embedded sensors up to manufacturing execution and enterprise resource planning systems. It has a service-oriented architecture based on standardized messages for service requests and responses. There are different ways for these messages to be encoded and transported over the network. The most common way is binary encoding over TCP.

Implemented Features from the OPC UA Protocol

The following table summarizes the features of OPC UA that are supported by Qt OPC UA.

Feature

Read

Batch read

HistoryRead (Raw)

Write

Batch write

Multidimensional arrays

Browse

Data change subscriptions

Event subscriptions

Modify subscriptions / monitored Items

Method calls

Browse path resolution

GetEndpoints

FindServers

NodeManagement

RegisterNodes

UnregisterNodes

Data Types

A subset of the OPC UA data types is currently supported in Qt OPC UA.

Data type

Qt OPC UA data type

Int16, Int32, Int64

Directly used

UInt16, UInt32, UInt64

Directly used

Byte

quint8

SByte

qint8

Boolean

Directly used

Double

Directly used

Float

Directly used

String

QString

LocalizedText

QOpcUaLocalizedText

DateTime

QDateTime

ByteString

QByteArray

XmlElement

QString

NodeId

QString

GUID

QUuid

QualifiedName

QOpcUaQualifiedName

StatusCode

UaStatusCode

Range

QOpcUaRange

EUInformation

QOpcUaEUInformation

ComplexNumber

QOpcUaComplexNumber

DoubleComplexNumber

QOpcUaDoubleComplexNumber

AxisInformation

QOpcUaAxisInformation

XV

QOpcUaXValue

Argument

QOpcUaArgument

ExpandedNodeId

QOpcUaExpandedNodeId

ExtensionObject

QOpcUaExtensionObject

StructureDefinition

QOpcUaStructureDefinition

StructureField

QOpcUaStructureField

EnumDefinition

QOpcUaEnumDefinition

EnumField

QOpcUaEnumField

DiagnosticInfo

QOpcUaDiagnosticInfo

SimpleAttributeOperand

QOpcUaSimpleAttributeOperand

AttributeOperand

QOpcUaAttributeOperand

LiteralOperand

QOpcUaLiteralOperand

ElementOperand

QOpcUaElementOperand

RelativePathElement

QOpcUaRelativePathElement

ContentFilterElement

QOpcUaContentFilterElement

EventFilter

EventFilter

Classes and Ownership

Two important classes are exposed to the user: QOpcUaClient and QOpcUaNode .

Objects of both classes are owned by the user and must be deleted when they are no longer needed.

Logging Categories

The following table summarizes the logging categories that are used by Qt OPC UA.

Logging Category

Description

qt.opcua

Plugin independent messages generated by QOpcUaProvider and QOpcUaClient

qt.opcua.plugins.open62541

Messages generated by the open62541 plugin

Open62541 specific Logging Categories

The open62541 sdk logging categories depend on the log level for open62541, which is configured at compile time. The default is 300, which enables: info, warning, error and critical. To obtain less or more verbose output, the open62541 sdk needs to be rebuilt with a different configuration.

The following table shows the logging categories used by open62541:

Open62541 Logging Category

Description

qt.opcua.plugins.open62541.sdk.network

Messages generated by the open62541 network

qt.opcua.plugins.open62541.sdk.securechannel

Messages generated by the open62541 channel

qt.opcua.plugins.open62541.sdk.session

Messages generated by the open62541 session

qt.opcua.plugins.open62541.sdk.server

Messages generated by open62541 server components

qt.opcua.plugins.open62541.sdk.client

Messages generated by the open62541 client

qt.opcua.plugins.open62541.sdk.userland

Messages generated by the open62541 userland

qt.opcua.plugins.open62541.sdk.securitypolicy

Messages generated by the open62541 security policies

Licenses

The Qt OPC UA module is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. These free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 2. See Qt Licensing for further details.

Qt OPC UA in Qt 6.8.0 may contain third party modules under following permissive licenses:

Linking to external libraries involves licenses from the backend providers.

Open62541

The Open62541 plugin is available under the same licenses as Qt OPC UA. The Open62541 library itself is licensed under Mozilla Public License v2.0 .

The security support is provided by the OpenSSL plugins of the open62541 library. If the open62541 plugin is built with security support and OpenSSL is not available on the target system, the open62541 plugin will fail to load.