C++ Based OPC UA Client/Server/PubSub SDK  1.8.3.628
SDK Migration Guide

This section contains instructions for migrating existing applications to a new SDK release.

Migration from 1.7.x to 1.8.0

General

  • Due to the change to support OpenSSL 3.0 the PKI related classes changed. All places that used private keys as ByteStrings or accesses the key directly (EVP_PKEY) have been replaces and use the key classes instead (UaPkiPrivateKey, UaPkiRsaKeyPair).
  • The precompiled binaries for OpenSSL on Windows that have been provided for convenience are no longer part of the SDK delivery. Either compile OpenSSL from source or use one of the available installers (see: - Third-Party Libraries).
  • The defines OpcUa_DateTime_Min and OpcUa_DateTime_Max have been replaced with OpcUa_DateTime_Min64 and OpcUa_DateTime_Max64.
  • For the class UaDataTypeDictionary the include file was renamed from uadatatypedefinition.h to uadatatypedictionary.h

UA Client applications

UA Server applications

  • The define SUPPORT_Method_Server_Facet is no longer supported / used.

  • ServerConfiguration has new elements see Server Configuration.

  • Session::setClientUserId was removed. Use a UserToken instead if a name is required.


    before:

    m_pSession->setClientUserId("InternalHistorizing");

    after:

    userPwdToken.sUserName = "InternalHistorizing";
    pUserContext->setIdentity(&userPwdToken);
    m_pSession->setUserContext(pUserContext);
    Class representing an User and Password user identity token.
    Definition: uauseridentitytoken.h:78
    UaString sUserName
    User name string.
    Definition: uauseridentitytoken.h:89

  • UaServerApplicationCallback was revised and a UaPasswordManager is now integrated into the SDK. Handling UserTokens of Type UserPassword and Certificate is now completely handled by the SDK. There is no need anymore to implement logonSessionUser as before. Further on the UaServerApplicationCallback was extended and provides methods specific to the UserToken type (logonSessionUserCertificate, logonSessionUserIssued, logonSessionUserPw). This way an application can just override the specific method to take some custom action.

  • The outdated PLCopen companion model code was removed from the SDK delivery. Like all other companion information models, the code for the PLCopen model can be generated with UaModeler.

PubSub configuration

OPC UA defines configuration structures for PubSub with PubSubConfigurationDataType as root structure. This structure can be stored in a file using the UABinaryFileDataType. This standard format is used by the PubSub module to store the PubSub configuration.

In SDK version 1.7.x, the OPC UA access on-line access to the PubSubConfiguration was provided with a Unified Automation defined FileType object. This object is used by UaExpert to read and write the PubSub configuration in an atomic operation. Such functionality was not available in OPC UA 1.04.

In OPC UA 1.05, the PubSubConfigurationDataType was extended to PubSubConfiguration2DataType and a FileType object was added to the standard for atomic configuration operations. The read operation provides the complete configuration to a configuration client. The write operation is completed with the CloseAndUpdate method which provides the processing of a list of delta changes in one atomic operation.

With SDK version 1.8.0, the Unified Automation specific FileType object was deprecated and replaced with the standard OPC UA defined PubSubConfiguration FileType object. The new configuration access requires UaExpert version 1.7.0 or later.

Another major change is the configuration of UDP unicast communication with OPC UA 1.05. The SDK version 1.8.0 complies with the OPC UA 1.05 definition where the receive port for UPD unicast is configured on PubSubConnection level but the send address is configured on WriterGroup level.

The configuration of the PubSub module is now available through the ServerConfig interface see Server Configuration and PubSub Module Configuration. The configuration parameters are required to activate PubSub security options.

Migration from V1.5.x to V1.6.0 and later

Renaming SDK libraries

Rename UaClient library from 'uaclient' to 'uaclientcpp' to match the project name Rename UaBase library from 'uabase' to 'uabasecpp' to match the project name Rename UaPki library from 'uapki' to 'uapkicpp' to match the project name Rename XmlParser library from 'xmlparser' to 'xmlparsercpp' to match the project name

New Role and Permission management

Changed the node permission and role management from SDK specific implementation to new standard OPC UA 1.04 functionality. Removed ServerConfig::getIdsForDefaultRoles().

Other API changes

  • The signature of UaSession::close() was changed by adding a new parameter with default value. The effect is that any overwrite implementation in a derived class will no longer be called.
  • Remove UaServerApplication::closeEndpoint() UaServerApplication::openEndpoint() and closeEndpoint() was replaced with UaServerApplication::pauseUaServer() and restartUaServer() due to race conditions when closeEndpoint() was called with active Service call transactions.

See CHANGELOG.txt for more changes and details.

Migration from V1.4.x to V1.5.0 and later

With version 1.5.0, the certificate store configuration has been improved to better fit the new features of central certificate configuration using the Global Discovery Service (GDS). The configuration is backward compatible, but it is highly recommended to review the new configuration options. See CHANGELOG.txt for more details.

See also the documentation for Server Configuration.

Make sure you update the files from examples/utilities in your own server code. If these files are not updated when moving from 1.4.x to 1.5.x or later, the new GDS functionality is not working.

Migration from V1.3.x to V1.4.0 and later

Breaking changes to utilities

To make sure that the utilities provided for the OPC UA Server applications are maintained and updated with the SDK, most of the utility functionality like the class ServerConfigXml and main parts of the class OpcServer are now covered by the SDK CoreModule.

When updating from an SDK version 1.3 to V1.4 or later, you must update the files from examples/utilities in your OPC UA Server application project. Remove the files serverconfigxml.cpp/h from your server project. They are now part of the SDK core module library. Update opcserver.cpp/h from the examples/utilities directory. Main parts are now included in the SDK core module library.

Breaking changes to IOManager

If you have implemented the SDK interface IOManager directly, you must update the enumeration values of the enumeration IOMananger::TransactionType. Due to conflicts on VxWorks we had to change the enumeration value names.

See CHANGELOG.txt for more details.