******************************************************************************** ******************************************************************************** ** ** ** Version 1.5.2.336 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * ServerConfigXml / ServerConfigIni - Adds option to disable sending of certificate chains Default is to send a certificate chain if CA signed certificate is configured See documentation of DefaultApplicationCertificateStore -> SendCertificateChain ------------------------ Bug Fixes ------------------------ * BrowseContext - Adds new method BrowseContext::isUserDataSet() * UaReferenceLists - Fixes crash in Browse handling for special case that created invalid continuation point - Enhances UaReferenceLists::browseReferences for handling of special references Only process HasTypeDefinition and HasModellingRule references if that didn't happen before within the BrowseContext * UaNodeSetXmlParserUaNode - Add StructureDefinition and EnumDefinition when loading XML * AcknowledgeableConditionType, AlarmConditionType, ConditionType, DialogConditionType ExclusiveLimitAlarmTypeBase and NonExclusiveLimitAlarmType - Fixes missing field init in Condition classes initializeAsBranch * Reverts removal of UaDataVariableDevice * TrustListType - Adds deletion of certificate from rejected list if AddCertificate succeeds * ServerConfigurationType - Fixes defaults for ServerConfiguraiton Certificate type ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * UaSubscriptionManager - Fixes memory leak in CreateMonitoredItems error scenario * UaTransactionManager - Fixes method error handling Fixes error return code if methods are called with invalid registered handle NodeIds * UaServer - Fixes User Certificates handling with Basic256Sha256 The server expected the UserTokenSignature Algorithm was always rsa-sha1 - Enhance trace output for invalid user tokens - Enhance signature check to handle signatures calculated with a chained certificate on the client side. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * UaSession - Fixes delayed connection error callback Moves callback before secure channel disconnect to make sure client application is informed before a potential longer running disconnect is executed. - Complete DisconnectChannel before notifying session callback - Fixes memory leak if OpcUa_ClientApi_BeginPublish fails - Adds missing locking of type definition maps when clearing them - Fixes hiding of continuation point if list of ReferenceDescriptions is empty * SessionSecurityInfo - Fixes unicode string encoding for use with toDERFile and toPEMFile methods ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * BaseNode - Adds BaseNode::extensionCount() * CertificateStoreConfiguration - Adds option to disable sending of certificate chains ------------------------ Bug Fixes ------------------------ * UaGenericStructureValue - Fixes return code for UaGenericStructureValue::setField(). Method always returned an error * UaAbstractDictionaryReader - Fixs memory leak if UaAbstractDictionaryReader::addStructureNodeIds() fails * HashTable / ChainEntry - Fixes memory leak if HashtableSize is smaller than number of nodes by resolving circular references in HashTable * UaString - Normalizes return of UaString::toUtf8() for null string Method now always return a '\0' terminated char* - fixes string length in UaString::attach() to use StrSize instead of StrLen * UaPkiProvider - fixes PkiProviders to handle paths with non ASCII characters * UaNodesetXmlParser / UaStructureField - Adds handing of structur definitions for nested structures during XML import - Adds missing setting of enum definition to structure fields ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * CertificateConfiguration - Adds new configuration flag to sendCertificate with chain or not ------------------------ Bug Fixes ------------------------ * CertificateConfiguration - Fixes unicode string encoding for use with toDERFile and toPEMFile methods ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * SecureListener - Fix occasional deadlock during shutdown. Main thread could deadlock with timer thread under certain timing conditions. - Fix crash triggered by message content. Attacker could create a server crash by sending a specific message. - Limit allowed timespan between two message chunks. A longer pause between two chunks is no longer allowed to prevent blocking of buffer resources. - Suppress SecureChannelClose event if inactive channel times out. These events would not have had a SecureChannelClose event before. - Create error if CLO is received during unfinished message. CLO messages received during an unfinished chunk stream would not be handled properly. - Close transport on secure channel times out. Socket stays no longer open when channel is closed actively by the server. - Fix secure channel leak which happened under certain conditions. SecureChannel in certain states would not be freed with a memory leak as a result. * TcpListener - Fix error in calculation of transport handshake parameters (IOP issue). Based on the outcome of the parameter handshake, the max number of chunks per message would be 1. With a small chunk size, the GetEndpoints response did not fit into one chunk and the connect process would fail. * Channel - Add missing delete of async state in OpcUa_Channel_Connect (memory leak). * SecureConnection - Fix possible hang during connect when the socket is closed by the server before the transport handshake could complete. - Fix timing dependent dead lock in disconnect caused by lock order inversion between timer thread and disconnect thread. - Fix issues where connection state was wrongly set to disconnected. This wrong state prevented a notification and the application did not get notified about the disconnect completion. * Win32 - Close shut down socket on occasion in FillFdSet to speed up disconnect. Disconnect could take a long time, depending on the servers behavior. * Platforms - Fix errorhandling of socket accept. The return code of accept was not handled properly and the error went missing. ******************************************************************************** ******************************************************************************** ** ** ** Version 1.5.1.326 ** ** ** ******************************************************************************** ******************************************************************************** Important notes: ---------------- 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, the new GDS functionality is not working. To comply with the OPC UA specification, the support for TLS and SSL versions below TLS 1.2 was deactivated. This may cause interoperability issues if HTTPS is used. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * CPP Sample Client - ClientConfig.ini - Adds missing user setting for GDS server connections * COM DA migration sample server - Fixes memory leak in sample code NodeManagerComDaMigration::browse() ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * ServerManager - Reverts remove of server shutdown callback registration Adds previously available ServerManager::registerServerShutdownCallback - Fixes full access to nodes for internal session The session setting to allow also access to nodes that require encryption was missing * NodeManagerRoot - Adds missing EnumValueType DataType node - Enhances locking of internal status members * SessionManager - Call Endpoint_CloseSecureChannel only for known SecureChannels OpcUa_Endpoint_CloseSecureChannel was always called if SessionManager::secureChannelTransportClosed() was called with an unknown SecureChannelId. This happened when the stack reported transport close for connections that had never a SecureChannel created. * EventManagerBase - Fixes reference counting of EventData in EventManagerBase::fireEvent - Reference for existing EventData was not released before replacing - Reference for new EventData was not added before replacing Affects only implementations replacing EventData object during the time Condition field Retain is set to true. * IOManagerUaNode - Enhances locking of internal status members - Thread handling enhancement with new UaThreadPool job pool feature - beginRead(), beginWrite(), beginStartMonitoring() default permission check For Attribute Value the check of the default permission was missing with the SessionUserContext if no NodeAccessInfo is set. * HistoryManagerBase - Changes thread pool handling to use new job pool of UaThreadPool or to return BadResourceUnavailable if threads and job pool are fully used This fixes the blocking of network threads if a large number of history operations is started by one or more clients * NodeManagerUaNode - Enhances error handling for user access restriction in Browse Return OpcUa_BadUserAccessDenied instead of OpcUa_BadSecurityModeInsufficient if user has no right to browse a node * UaVariable - getAttributeValue() enhances check of default permission on SessionUserContext For Attribute Value and UserAccessLevel the check of the default permission was missing with the SessionUserContext if no NodeAccessInfo is set on the node. - setAttributeValue() adds check of NodeAccessInfo and SessionUserContext * AcknowledgeableConditionType - Adds initialize of ConfirmedState with localized display names when optional property is set * AlarmConditionType - Adds initialize of SuppressedState with localized display names when optional property is set * TwoStateVariableType - Fixes crash if localized display names are not initialized * CoreTransactions used for server internal client - Fixes deadlock in CoreTransactions::dynamicEventManagerRegistered ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * UaSubscriptionManager - Enhances locking of internal status members * UaServer - Fixes ServerNonce memory leak for failing ActivateSession - Fixes Session creation to return always a ServerNonce since even connect without security but with user token requires a ServerNonce - Enhances locking of internal status members ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * Increases default socket and timer compiler settings for stack to allow 100 outgoing connections to OPC UA servers * UaSession - Fixes handling of callbacks for asynchronous history services calls in the case of a bad status code on service level - Adds additional locking of internal status members - Fixes insufficient hostname check during session creation Adds new internal method getHostFromUrl to handle IPv4 and IPv6 addresses and hostnames - Adds check of signature algorithm used by server after create session The signature algorithm used to sign the server signature need to match the signature algorithm defined by the security policy. - Fixes EndpointUrl matching necessary for user token handling in ActivateSession Fixes cases where URL used to connect does not match EndpointUrl provided by server. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * UaPlatformLayer - Adds configuration lock capability to UaPlatformLayer If the stack is shared between client and server in independent modules and the modules are loaded at independent times, the configuration of the platform layer must be done before the modules are loaded. The additional flag s_isConfigLocked and the method lockConfig() allow the frame application to lock down the configuration to avoid issues with configuration changes done automatically by the server SDK. * UaStatusCode - Adds COM OPC HDA quality codes * UaGenericStructureArray - Adds additional constructor * UANodeSet XML import - Adds support for access to XML namespace for Extensions in import file * Platform layer - Adds functions Local8BitToUtf8 and Local8BitToUtf16 * UaString - Adds UaString::fromLocal8Bit() * UaUniString - Adds UaUniString::attach() * UaThreadPool - Extends UaThreadPool with job pool - Adds flag to ensure behavior does not change for current users * Adds CMake option UASDK_WITH_COM_UTILITIES to disable COM utility methods on Windows platform for classes UaVariant and UaUniString * UaExtensionObject - Adds conversion from OPC UA Binary encoded ByteString to structure in UaExtensionObject::changeEncoding() ------------------------ Bug Fixes ------------------------ * UaApplication - Adds missing reset of global g_pUaApplication to NULL in destructor * UaAbstractDictionaryReader - Fixes handling of empty dictionaries - Fixes attaching dictionary values * UaBsdReader - Fixes crash for invalid type names - Fixes reading structures with documentation - Adds DiagnosticInfo handling to UaBsdReader * UaFileEngine - Fixes memory leak in UaFileEngine::count() in Linux platform layer * UaJobThread - Adds missing lock after completion of job execution * UaThreadPool - Fixes deadlock in UaThreadPool::addJob() - Fixes crash when destructor is called while a thread in the pool is still running * UaByteString - Fixes UaByteString::compare() for different variations of length <= 0 * BaseNode - Fixes XML import for nodes with unexpected parentId ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * Don't use OpenSSL functions taking FILE pointer as argument - UaPkiCSR - UaPkiCertificate - UaPkiRevocationList - UaPkiRsaKeyPair * UaPkiCertificate - Check for and fix errors in IP/DNS extension when creating certificates ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * TcpListener - CloseConnection now sends error message Error message is send if status parameter is bad. One internal call to this function has been corrected to prevent double sending of error messages. - Fixes lack of resource situation during accept of connection - Fixes error handling during opc.tcp transport protocol handshake - Ensures release of all locks before calling ProcessDisconnect - Set closing connection to not connected on listener closure. - Adds connection to secure channel watchdog directly after socket creation - Changes OPCUA_TCPLISTENER_USEEXTRAMAXCONNSOCKET to default ON This makes sure a client receives an error if the server runs out of connection resources * SecureListener - Close connection in ThreadPool handler, if Endpoint returns error Fix different behavior between standard and ThreadPool driven endpoints - Prevent status in ThreadPoolJobMain from being overwritten This prevented the transport listener from sending an proper status message before closing the connection, because the status parameter was usually good. - Don't report transport loss for non-opened channels to SDK layer - Release connection lock when informing about response Network thread would deadlock with timer thread due request and response lock order inversion when OpcUa_SecureConnection_BeginSendRequest is called in context of OpcUa_SecureConnection_OnNotify - Removes active nulling of transport connection handle on error Nulling the handle prevents further event handling because search of secure channel with OpcUa_SecureListener_ChannelManager_GetChannelByTransportConnection will fail. Disconnect notifications will be missing and SDK may access invalid memory. * SecureConnection - Fix event type translation for unexpected error during connected state - Add missing unlocks in error situations In several conditions, the secure connection would be left with a locked response mutex. This would block the timer thread permanently. * Channel - Enhances locking to prevent race condition for async state in connect and notify - Adds check of event type in OpcUa_Channel_InternalDisconnectComplete The API is extended by eOpcUa_Channel_Event_Error which is called when an asynchronous operation fails. This function now expects the event eOpcUa_Channel_Event_Error if the disconnect fails. eOpcUa_Channel_Event_Disconnected is treated as success not matter what the status is. * Transport: Change handling of TCP protocol parameters in server Chunk count should now be in sync between transport and secure conversation. Calculation has also changed and values in ACK now reflect the limits actually used instead of the independent configuration values. * Thread - Enhances locking of internal members * Platform Win32 - Fixes WinCrypt initialization on Windows CE * Platform Linux - Change mutex implementation to use PTHREAD_MUTEX_RECURSIVE This adds a compile time switch which can be used to switch between POSIX recursive mutexes and the fallback which converts a non-recursive mutex into a recursive one. * All platforms - Switch from TLS 1.0 to TLS 1.2 - Fixes overflow calculation bug in ProcessTimers - Changes an infinite wait for a semaphore to a timed wait in timer handling to prevent permanent block in case of wrong timer calculations ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Third-Party Components delivered with Windows version ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Updated OpenSSL to V1.0.1q * Deactivated SSLv2 and SSLv3 in OpenSSL on build time * Updated Libxml2 to V2.9.3 ******************************************************************************** ******************************************************************************** ** ** ** Version 1.5.0.318 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Major changes and enhancements ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Support for central certificate management define in OPC UA Part 12 version 1.03 - OPC UA Part 12 defines a Global Discovery Server used to manage certificates in a central place through the interfaces DirectoryType and CertificateDirectoryType. OPC UA client and server applications can use these standard interfaces to manage application instance certificates and to update trust lists. - The server SDK supports the ServerConfiguration object for the GDS push model. The push model allows remote configuration of certificates and trust lists in the server. This can be done through GDS related tools or through stand alone OPC UA clients like UaExpert. - The client SDK provides a library for access to the GDS interfaces. This library allows OPC UA client or server developers to integrate the GDS pull model. In the pull model, the OPC UA client or server requests certificates and trust lists from the GDS server. * Support for new OPC UA data type features added in OPC UA version 1.03 - Union data types - Structure data type with optional fields - OptionSet data type * General update to OPC UA 1.03 specification changes * Support for user authorization down to UaNode level - The UaNodes managed by the NodeManagerBase in the server tool-kit level do now support an additional access mask used to configure access to the nodes for different actions like browse, read, write and call for three user classes like owner, group and other. - During user authentication, the SDK user must set the user id and the group ids for the user on the Session object. - The SDK automatically checks the user authorization per node based on the access mask in the node and the user information in the Session. * Complete restructuring of CMake projects and management of options * Update of generated code for OPC UA types to include documentation * Added support for SecurityPolicy Basic256Sha256 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation, Examples and Utilities ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Complete new documentation sections - OPC UA Fundamentals -> Discovery and Security Configuration - OPC UA Information Models ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- * HistoryReadCPUserDataBase does not require setting of NodeId and transaction type Clients may mix up history service type and nodeId when calling a history function with a continuation point. The change extends HistoryReadCPUserDataBase continuation point management class with service type and NodeId to be able to check the continuation point before using it. The information must be set with the constructor of the history continuation point class. Adds check in UaTransactionManager to handle already wrong service type. Users of the SDK are responsible for checking the NodeId when the continuation point is passed in later to the HistoryManager * Default signature algorithm changed from Sha1 to Sha256 The signature algorithm used for certificate signatures can be configured. If the algorithm is not set in the configuration, the default is now Sha256. Sha1 is not longer considered secure any more. * User data used in IOManagerUaNode::readValues If a node is removed from address space, it is set invalid. This sets MonitoredItems to BadNodeIdUnkown if they are connected to UaVariableCache connection. If a node is monitored using readValues(), the implementer of this method is responsible for setting this status. This can be done now based on the valid state of the user data. When the Variable is made invalid, the user data is also set invalid by calling the new method UserDataBase::setInvalid(). The application specific user data class must implement this method and must set the user data invalid. If the user data is invalid for a Node, readValue shall return BadNodeIdInvalid in this case. ------------------------- Features ------------------------ * ServerConfigurationType - Adds new ServerConfiguration object defined by OPC UA Part 12 in OPC UA 1.03 The object allows remote certificate configuration through a GDS client or stand alone tool like UaExpert - First version is able to handle DefaultApplicationGroup and DefaultUserTokenGroup - Handling of two certificate types RsaMinApplicationCertificateType and RsaSha256ApplicationCertificateType * Added user authorization down to single node - Added class NodeAccessInfo defining the access mask for a node for three groups owner, group, others or for group1, group2, others. Access flags are available for - Read all non value attributes - Read value attribute - Write value attribute - Browse node - Read history - Insert into history - Modify existing history - Delete from history - Receive events - Execute method call - Write non value attributes dependent on write mask - Added NodeAccessInfo to UaNode (setter, getter and member) - Added SessionUserContext class - Added SessionUserContext to Session as member - Added check for user access for all flags based on NodeAccessInfo in a UaNode and the SessionUserContext in a Session * ServerConfig - Added getIdsForDefaultRoles() to get user and group IDs for predefined roles - Added getUserIdentityTokenSecurityPolicy() to be able to configure security policy used for user token encryption or signature - Added support for new SecurityPolicy Basic256Sha256 * UaServerApplicationCallback / UaCoreServerApplication - Added optional callback method beforeEndpointOpen() Provides a hook for certificate creation and certificate check by application - Added optional callback method requestServerShutDown() This allows the SDK to request a server shut-down - Adds option to remove NodeManagers from OpcServer with method removeNodeManager() - Adds option to remove Modules from OpcServer with method removeModule() * NodeManager - Derive NodeManager from UaServerApplicationModule UaServerApplicationModule defines the startUp(), shutDown() methods and this change allows NodeManagers to be loaded as application modules without changing the NodeManager interface. * IOManagerUaNode - Enhances Status and TimeStamp write configuration Adds capability to allow Status and TimeStamp write on a per Node base using the new OPC UA 1.03 AccessLevel flags StatusWrite and TimestampWrite * FileDirectoryType - Adds base support for new FileDirectory object by providing the base class FileDirectoryType that creates all necessary nodes - Functionality for directory handling must be added by user by deriving from base type and implementing the FileDirectory Methods * ConditionType - Adds handling of new ConditionType::ConditionRefresh2 method added by OPC UA 1.03 * Added CertificateExpirationAlarmType class * Added new OPC UA 1.03 capability property MaxByteStringLength to ServerCapabilities * Added new OPC UA 1.03 method Server::ResendData - Added new methods ResendData and SetSubscriptionDurable to ServerType * Added SemanticChangeEventTypeData * Added SystemStatusChangeEventTypeData * Added additional audit event types for Alarms & Conditions and Historical Access * Added support for Union and OptionSet data types * Added OPC UA Part 8 variable type classes - ArrayItemType - CubeItemType - ImageItemType - NDimensionArrayItemType - XYArrayItemType - YArrayItemType - OptionSetType ------------------------ Bug Fixes ------------------------ * IOManagerUaNode - Fixes deadlock inside IOManagerUaNode Fixes deadlock between IOManagerUaNodeJob::executeMonitorStop() access to IOManagerUaNode mutex and a lock of the same mutex in IOManagerUaNode::finishTransaction() where the access to the thread pool is locked but threadpool::addJob() is blocked by IOManagerUaNodeJob execution. - Adds handling of MaxAge for Read before calling readValues() now also for UaVariable_Value_Cache. This was done before only if UaVariable_Value_CacheIsUpdatedOnRequest was set. * NodeManagerRoot - Adds missing recursive handling of translateBrowsePathToNodeId() if not completed - Adds handling for OpcUa_UncertainReferenceOutOfServer -> call is returned to client. - If Good and partial result is returned, translate will be continued with next NodeManager. - Multiple browsePathTargets must be completely handled by the NodeManager that is responsible for the multiple paths. Updated documentation to describe this requirement * SessionManager - Moves setting of client information on session object before user check Makes sure all client related information is available before logonSessionUser() callback is called. - Add handling of temporary invalid secure channel to sessions eOpcUa_Endpoint_Event_TransportConnectionClosed event made secure channel invalid but eOpcUa_Endpoint_Event_SecureChannelRenewed did not make it valid again. In addition, the information was not forwarded to the session object. This is now fixed to avoid access to invalid secure channel with OpcUa_Endpoint_EndSendResponse. - Replaces initial SessionId with lower part of date time instead of tick count to make the same server start up time after reboot does not create the same starting SessionIds - Adds check to SessionManager if SecureChannel is valid even if no Session exists and adds locking of SessionManager instead of Session in this case * Session - Fixes race conditions in Session that cause access violation - Adds missing locks to some member access functions - Mark unsafe method getLocalIds() as deprecated - Adds new getter getLocalIdArray() * ServerManager - Adds creation of internal global session with full rights to use in methods where a session object is passed in or in other places where a session is used internally * EventManagerBase - Fixes possible memory leak in EventManagerBase::registerEventType Added check if an event type was registered already * AlarmConditionType - Fixes initialization of ShelvingState if AlarmConditionType object is created from UANodeSet XML import. * Changes behaviour of ArrayDimensions for scalar variables There are two options if the value is scalar Option 1: Return BadAttributeIdInvalid since the attribute is optional Option 2: Return a null array Changed to Option 1 to be consistent with other Unified Automation SKDs * FileType - Changes handling of FileType::Write with empty buffer Changes return to Good with no other action based on clarification in specification OPC UA Part 5 version 1.03 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ * UaServer - Request additional server entries in every call to FindServers to allow adding entries Redundant servers must show up in this list and can be added later during runtime now. - Adds return of complete certificate chain in CreateSession::ServerCertificate Returns chain in CreateSession::ServerCertificate instead of just the server certificate if a CA signed certificate is used - Security policy for discovery registration Replaced hard-coded check for Basic128Rsa15 and use best available security instead * UaSubscripitonManager - Replaces initial SubscriptionId with lower part of date time instead of tick count to make the same server start up time after reboot does not create the same starting SubscriptionIds * UaMonitoredItemData - Adds capability to check the remaining queue size Adds the capability for the caller of IOVariableCallback::dataChange to check the remaining free slots in the monitored item queue * Changes in UaServerApplication for new OPC UA 1.03 feature GDS push model - GDS and other methods require an on-line change of certificates and a restart or reinitialize of the server. - Renamed UaServerApplication in CoreModule to UaCoreServerApplication - Created new UaServerApplication in UaModule containing most of the code from utility class OpcServer. - Added callback for forwarding control functions from OPC UA object method calls to UaServerApplication - Added methods on UaServerApplication and UaServer for access to Endpoints ------------------------ Bug Fixes ------------------------ * UaSubscription - Enhances error handling for RemoveMonitoredItems * UaMonitoredItemEvent - Fixes dynamic adding of EventManagers - Adds suspended flags for EventManagers in EventMonitoredItem Suspended if MondifyMonitoredItem fails for one of the EventManagers. In this case the monitored item must be suspended in the EventManager. This change is doing this also for the EventMonitoredItem to make sure ConditionRefresh works. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ * UaSession - Added getMethodArguments() as helper for getting Method arguments from the server - Added UaSession getters for max. string, array and ByteString length The values are read from the server after connection establishment - Added constructor that takes another UaSession by reusing the internal session context. This is used in utility classes and object proxies that must used an existing session - Added disable optional security check flags to SessionSecurityInfo - disableErrorCertificateTimeInvalid - disableErrorCertificateIssuerTimeInvalid - disableErrorCertificateRevocationUnknown - disableErrorCertificateIssuerRevocationUnknown - Added SessionConnectInfo::internalServiceCallTimeout used for internal service calls - Added getter UaSession::serverCertificate() - Added support for security policy Basic256Sha256 * UaSubscription - Added setTriggering() to support Subscription feature for trigger monitored items * UaDiscovery - Added findServersOnNetwork() defined in OPC UA 1.03 for mDNS subnet server discovery - Added queryDirectory() defined in OPC UA 1.03 for GDS based server discovery * Adds Global Discovery Server (GDS) API access proxy classes - GDS features defined in OPC UA Part 12 of OPC UA 1.03 - Base model - UaTrustListObject - UaFileObject - GDS push model - UaServerConfigurationObject - GDS pull model - UaCertificateDirectoryObject ------------------------ Bug Fixes ------------------------ * UaSession - Fixes memory leak if server sends service fault but also a server nonce - Added missing null pointer checks for m_pSessionCallback - Fix calling connectError callback on certificate validation errors The callback was only called for the first error that occurred. If this error was overridden, the check was not done again, so a second error would never have shown up. Now we call the callback for every error that occurs. - Fixes endless loop on RT Linux with sleep(0) A parallel thread executing a DataChange with the same priority like the thread that is waiting with sleep(0) prevents the other thread from getting processing time and from completing its task. - Added missing host name check in client if server certificate is processed for secure connections - Fixed server certificate length checks in CreateSession - Added checks for Server Certificate returned from CreateSession - Fixed issue if server return sessionTimeout of 0 * UaSubscription - Added acknowledge of notifications received using UaSubscription::republish() - Enhanced handling of invalid subscriptions * UaDictionaryReader - Fixed memory leak when reading dictionary - Fixed continuation point and browseNext handling ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ * Adds data types and C++ wrapper classes for new OPC UA Part 12 (GDS) * Adds OptionSet base type * Add unions and structures with optional fields to BsdReader * Adds support for OpcUa_SecurityPolicy_Basic256Sha256 * UaVariant - Adds UaVariant::setBoolean() and toBoolean() in addition to setBool() to match OPC UA data type name - Adds conversion from hex string to unsigned integer conversion functions toUInt16(), toUInt32() and toUInt64() * UaGenericValue / UaGenericStructureValue - Adds methods to handle nested structures with UaGenericValue instead of requiring the encoding of the nested structure as ExtensionObject - Adds UaGenericStructureArray - Adds UaGenericUnion for handling of new OPC UA 1.03 Union data types - Adds UaGenericOptionSetValue for handling of new OPC UA 1.03 option set data types - Rename UaGenericValue to UaGenericStructureValue Adds typedef for UaGenericValue to avoid breaking the interface - Adds handling of optional structure elements (new OPC UA 1.03 feature) - Changes browse for dictionaries to inverse order to improve performance * UaStructureDefinition - Adds user data member * UaBinaryDecoder and UaBinaryEncoder - Made internally used classes available to SDK user - Enhanced API of classes * Adds new class UaApplication as base class for client and server side application classes. This class provides also the functionality to run the application as service. * UaDataStream - Adds support to load and save extension objects * UaThreadPool - Adds UaThreadPool::getCapacity() to get current capacity of thread pool * UaPkiProvider - Adds new method validateCertificate * UaTrace - Adds feature to allow setting of additional trace header entries Used to provide version information in every trace file header - Adds new method flushTrace() and the capability to disable flush - Adds pre trace buffer to store trace entries in a cache until the the trace configuration is not loaded to provide access to errors before or during configuration loading * UaNodesetXmlParser - Adds parsing of UANodeSet Extensions at document level * Adds attach to classes UaByteArray, UaExpandedNodeId, UaExtensionObject, UaLocalizedText, UaQualifiedName Adds detach to classes UaByteArray and UaString * UaByteSting - Adds method append() ------------------------ Bug Fixes ------------------------ * BaseNode - Fixes XML importer for aliases and double references - Splits adding inverse references from evaluating model parent * UaVariant - Fixes compare for NaN * UaUniStringList - Adds new method append() - appends a complete list to another list * UaStatusCode - Enhances status code mapping to COM DA error and quality - Adds operators == and != ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ * UaPkiCertificate - Adds creation of certificates signed with Sha256 - Adds signatureAlgorithm() method to get the used signature algorithm - Adds constructor for creating CA and CA-signed certificates - Adds UaPkiCertificateInfo::serialNumber() - Adds UaPkiCertificate::sign() - Adds UaPkiCSR class and UaPkiCertificate::createCSR()/fromCSR() for handling of certificate signing requests - Adds UaPkiCertificate::verifySignature() to verify the signature * UaPkiPrivateKey - Adds UaPkiPrivateKey::toDER() and fromDER() - Changes password handling for private key to use AES instead of DES to get rid of dependency * UaPkiRsaKeyPair - Adds UaPkiRsaKeyPair::toPEM() - Adds UaPkiPrivateKey::fromPEM() * Adds new classes CertificateStoreConfiguration and CertificateConfiguration Classes are used to manage the configuration and handling for certificates and certificate stores in OPC UA applications ------------------------ Bug Fixes ------------------------ * UaPkiCertificate - Improves check for self-signed certificates * UaPkiRevocationList - Fixes nextUpdate to return null if field is not provided and valid to skip next update if null ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Third-Party Components delivered with Windows version ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * OpenSSL Version: 1.0.1p * Libxml2 Version: 2.9.1 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ * Update types and identifiers to OPC UA version 1.03. * Implement alternative to CryptGenRandom, RtlGenRandom (for Win 10 IoT). * Update CMake projects to new SDK standards. * Closing sockets may now be completed asynchronously. ------------------------------------------------------------------------------- Bug Fixes ------------------------ * Closing sockets may now be completed asynchronously. * Improve PRNG initialization on certain systems. (Linux) Use thread-safe version of gmtime. (Linux, QNX, vxWorks) Rewrite GetTickCount implementation. (Linux and QNX) * Fix potential invalid memory access in OpcUa_String_StrnCpy. * Fix certificate parsing problems. * Fix OpcUa_ByteString_BinaryEncode to preserve empty ByteStrings. * Fix invalid lock order problem in TCP protocol servers. * Fix client side deadlock on connect. * Change return value of OpcUa_String_StrnCmp to match strncmp * Change OpcUa_VariantMatrix_GetElementCount to return a status code * Replace invocations of malloc/realloc/free with OpcUa_Alloc/ReAlloc/Free where possible * Use dwLowDateTime of current time as start value for SecureChannel IDs * Fix crash in TCP connection read event handler ******************************************************************************** ******************************************************************************** ** ** ** Version 1.4.3.291 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ * Enhances time-out handling to HistoryManagerBase - Added execution of operations in worker thread to avoid blocking of stack thread if a large number of operations is requested in one History Service. - Added error sending to operation thread jobs - Added time-out check to stop processing with error for each remaining operation after time-out is reached * Added limit settings for History services for MaxNodesPerHistoryReadData, MaxNodesPerHistoryReadEvents, MaxNodesPerHistoryUpdateData and MaxNodesPerHistoryUpdateEvents * Added instance counter variables for UaMutex class and SecureChannels - Added C++ object instance counter for UaMutex. - Added current count and cumulated count for SecureChannel. - The counters are available like other counters in the vendor server information. ------------------------ Bug Fixes ------------------------ * ServerConfigXml::loadConfiguration() Using multiple URLs to register server with LDS was broken * Added setting of new MaxNodesPerBrowse configuration option to corresponding OperationLimit capability property. * Fixed TwoStateVariableType::getStateName() to return status if bad The value of a TwoStateVariableType variable can be bad. In this case the method getStateName() returns the display name of the status instead of the display name of a state. * Fixed reference type for HistoryServerCapabilities * Fixed BaseEventTypeData::getSourceName() Fixed method to return SourceName instead of SourceNode. UaEndpoint * Fixed use of configuration option disableUserTokenPolicyIdCheck Setting in configuration files had no effect * Adds error trace for certificate validation errors ServerConfigIni * Fixed return code of loadConfiguration. * Added missing replaces of trace path place-holders with trace path and configuration path. UaServerApplication * Enhanced start up trace to use new pre file trace buffer from UaTrace Enhanced trace handling in case where configuration loading failed. Uses a new UaTrace feature to buffer trace entries before a file is configured to print after file is configured or in an error handler. IOManager2 * Fixed ModifyMonitoredItems issue * Fixed and enhanced SetMonitoringMode handling IOManagerUaNode * Fixed issue with invalid configuration of sampling intervals * Fixed access to empty lists of available sampling intervals if the list was not configured. * Fixed handling of attribute ArrayDimensions to return null (array length -1) in case of scalar ValueRank. * Completed monitoring of attributes other than value It was already possible to monitor all attributes but attributes other than value did not get checked for changes. This check for changes was added. Condition Classes * Fixed handling of EffectiveXxx properties - Fixes setting of EffectiveTransitionTime for EnabledState and ActiveState. - Made EffectiveTransistionTime properties visible. - Adds check if status is changed before transition times are set. EventFilter * Fixed crash of ModifyMonitoredItems for event monitored items Crash was caused by calling ModifyMonitoredItems two times with an empty select clause in the event filter. UaNodeSetXmlParserUaNode * Moved base class with XML loading code to base class in UaBase * Fixed XML importer for ReferenceTypes and references * Fixed adding references from children to other nodes * Fixed adding ReferenceTypes * Fixed the special handling for nodes that are referenced by nodes of a lower namespace index. * Fixed wrong adding of inverse references * Added missing ModellingRule to Methods in XML importer Set ModellingRuleId to Methods that are children of InstanceDeclarations, e.g. Type -> Object -> Method * Separated creation of ReferenceTypes and DataTypes ReferenceTypes must be added before adding any other nodes. Using the ReferenceTypes is not possible otherwise. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule (Server) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ * Fixes potential invalid state for EventMonitoredItem in UaSubscription If ModifyMonitoredItems failed for one EventManager, this event manager was set to invalid without stopping the monitoring for this item in the EventManager. This can lead to memory leaks or access to invalid callbacks if the EventMonitoredItem is deleted by the client. * Added a requirement for the EventManager::beginModifyMonitoring() to suspend the event item in the EventManager until another modify succeeds if the modify fails. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ UaSession * Always split server certificate to avoid passing a chain into stack for connect * Fixes missing reset of m_isSessionCreated if activate sessions fails m_isSessionCreated was not reset if session was closed during reconnect in case of failing ActivateSession * Added missing support of X509 tokens in UaSession::changeUser() * Log warning about time difference between server and client only on CreateSession Logging the warning with every publish response is too much and lead to the trace being spammed. Instead, the warning is only logged once after a successful CreateSession UaSubscription * Fix error handling of service results in Create-/Modify-/DeleteMonitoredItems UaDictionaryReader * Improved UaDictionaryReader::readDictionaries() - pass in namespaceArray, no need to read it again as session already knows that - change browse calls to browseList, reducing number of calls drastically - add length checks, do nothing if no results are returned - prevent deep copies of structures - read descriptions of enumerations only once - prevent copying type dictionaries, attach where possible - fixes trace of structure definition - added traces for all data types * Fixed UaDictionaryReader::browseList() for BadInvalidContinuationPoint * Improved error checks in UaDictionaryReader - reorder checks (only check value if status is good) - check if value has expected data type - browse results might have good status but no references, check for this scenario ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Features ------------------------ UaTrace * Adds feature to buffer trace outputs before a file is configured UaVariant * Added methods encodeToByteString and decodeFromByteString UaEventFilter * Added new getter for select and where clause ------------------------ Bug Fixes ------------------------ * Fixes VxWorks includes for atomic functions * Fixes uaatomic.h compilation on ARM This makes use of libstd++ functionality when the compiler is too old. BaseNode * Fix for XML importer for aliases and duplicated references * Separated adding reverse references from evaluating model parent * Fixes getting parent node if node is referenced twice * Added flag to set BaseNodes as processed * Fixes crash for incomplete reference in XML file UaNodesetXmlParser * Moves XML loading code to base class in UaBase * Move reading aliases to base class * Decode binary for ExtensionObject If the TypeId of an ExtensionObject is not well known, the ExtensionObject is interpreted as binary. * Check if all required attributes are set in UANodeSet XML file. Return a bad status code otherwise. * Format String before base64 decode * Adds missing parsing of Symmetric attribute * Adds parsing of EnumDefinitions * Adds parsing of ValueRank and IsAbstract for VariableType ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ UaPkiPublicKey * Fixes potential crash in operator= and copy constructor ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Third-Party Components delivered with Windows version ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Updated OpenSSL to V1.0.1j ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ * Fix handling when receiving multiple hello messages. Send error message with OpcUa_BadCommunicationError, close the socket and delete transport resources. * Added verification of secure channel state in message handlers. * Replaced SecureChannelIdInvalid with TcpSecureChannelUnknown on several occasions. SecureChannelIdInvalid is not mentioned in the specification and not returned by the .NET stack (only used internally in the session layer). TcpSecureChannelUnknown is also used for channels found, but closed on the server side. They should behave like they are no longer existing. There was an inconsistency between the period where the channel was closed but not yet grabbed by the gc mechanism where different error codes were returned. * Fixed internal string uLength to match compiler setting OPCUA_STRING_SHORT * HTTP fix: Compare header elements case insensitive. * Fix return code if server certificate thumbprint does not match. Was CertificateRevoked, is CertificateInvalid. * Fixed potential memory leak in NodeId decoding routine. * Fixed potential memory leak in message decoder.* Serializer: Added checks for valid matrix dimensions. * Enhanced validation of received sequence number. * Fixed copy and compare functions of DataValue * Switched to memset in secure stream initialization. * Set secure channel in stream in CloseSecureChannel. Correctly enables sequence number check for CSC messages in server * Added sanity checks in secure connection. Check for additional data an revised lifetimes. * Added check for additional data in secure listener. * Extend preconditions for abort message in secure connection. * Added additional data check to channel and endpoint. * vxWorks: Added correction for early overflow of tick count. * vxWorks: Added missing declaration of SplitCertificateChain. * vxWorks: Fixed incorrect socket value test. * vxWorks: Corrected variable data type in OpcUa_P_Semaphore_Post. * vxWorks: Corrected return value for OpcUa_P_Socket_Write. * vxWorks: Set socket to non-blocking. * Win32_v6 for WinCE: Fix wrong comparison in WinCE adoption. Affects certificate and CRL loading during store opening. * Win32_v6: Fix CRL loading in WinCE (and error handling also in Win32). * QNX: Do not check errno if socket API succeeded. * QNX: zero errno before use with socket API. * QNX: Set block mode of accepted socket. * All platforms: Different certificate validation fixes - Alternative self-signed check - Activation of CRL check for full chain - Specific error codes depending on error depth - Activation of strict X509 validation ******************************************************************************** ******************************************************************************** ** ** ** Version 1.4.2.275 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ * Fixed major security issue that allows a client with an invalid certificate to create a secure channel. Only version 1.4.1 is affected by this issue. * Fixed result code invalid certificate signature to OpcUa_BadCertificateInvalid * Fixes for c++11 compatibility ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ * Fixes for c++11 compatibility * FileType - fixed issues in open method - return error if neither read nor write flag is set - allow read-only with append mode * IOManagerUaNode::beginWrite - revised logic to allow write with index range on toolkit layer only for in memory nodes (ValueHandling = CacheIsSource) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ * UaServer::startUp - Added log entry for expired or not jet valid server application instance certificate ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Bug Fixes ------------------------ * Fixes for c++11 compatibility * UaPkiProviderOpenSSL - fixed string content check for issuer location * UaFile - Fix open method to handle all UA defined flags ******************************************************************************** ******************************************************************************** ** ** ** Version 1.4.1.271 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- With version 1.4.1 the handling of revocation lists assigned to CA certificates was fixed. This required also a fix in the file format used for CRL (certificate revocation lists). This change can cause problems when starting the UA Server with a certificate store that contains old or invalid CRL files. * CRL file format change. Previous versions expect files with .crl extension and PEM encoded content. This version looks for files with .crl extension and ASN1 encoded content and files with .pem extension and PEM encoded content. ------------------------ Bug Fixes ------------------------ * Fix client connect cancellation crash. Client could crash during connect if system timeout and application timeout created a race condition. * An explicitly trusted certificate in a chain no longer prevents full chain validation (certificate chain needs to be completely available). * Add nesting depth checks to several types in decoder. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Third-Party Components delivered with Windows version ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Updated OpenSSL to V1.0.1g ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Several documentation enhancements Server Getting Started * Added modelling rule mandatory handling to all controller type components Demo Server * Fixed crash in HistoryManagerCache::updateData * Fixed data types in NodeManagerDemoBase::afterStartUp() * NodeManagerDemo - added methods to create a larger number of static and dynamic mass nodes * NodeManagerDemo - added missing locking of ConditionTypeData classes ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ UaStatusCode * Added methods code(), infoType() and infoBits() to access the different parts of the StatusCode * Added method setOverflowBits() as helper to set the overflow bit in the StatusCode contained in the object * Added methods setStructureChangedBit() and isStructureChanged() to handle the StructureChanged flag * Added methods setSemanticsChangedBit() and isSemanticsChanged() to handle the SemanticsChanged flag UaVariant * Added constructor for UaByteString * Add UaVariant::noOfMatrixElements() * Added method UaExtensionObject::changeEncoding() Supports conversion from EncodableObject to Binary * Added method UaStructureDefinition::clear() ------------------------ Bug Fixes ------------------------ UaVariant * Fixed crash when detaching in UaVariant::setDataValue * Fixed UaVariant::adjustTypes for mixing signed and unsigned integer types UaFile * Enhanced UaFile::open() to cover all combinations of the open mode flags defined by OPC UA for file handling UaPkiProvider/UaPkiProviderWindowsStore * Added missing Issuer Store Location for Windows store * Added missing setting to check revocation lists for CA certificates * Fixed copy constructor for Issuer Store Location strings UaAbstractGenericValue * Added support for Variant and DataValue in UaAbstractGenericValue UaGenericValue * Fixed check for matching type in UaGenericValue::setField UaStatusCode * Adds handling of COM error for timeout to setComDaError() and getComDaStatus() Stack data type wrapper classes * Fixed detaching setter - no implicit call to copy constructor of private data class, doing a flat copy instead - made constructors explicit to avoid such errors in the future * Added additional null pointer checks * Fixed const in operator[] and rawValue() for stack type array classes * Adds initialization of allocated structures before using them Linux platform * arch/gcc/uaatomic.h Added atomic functions for old GCC on PowerPC * Remove type cast on alphasort for glibc versions < 2.10 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ UaPkiCertificate * Fixed opening Win32 cert stores for saving certificates/CRLs ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added missing overload for UaDiscovery::findServers The FindServers service provides the capability to filter for ServerUris. Added an overload that allows to pass in this filter. * Added capability to create a copy of UaSession with internal data class Added capability to share UaSessionPrivate across different UaSession object used to share a session in helper classes. * Added getter UaSession::sessionId() * Added data member ServiceSettings::responseTimestamp() to provide access to the timestamp returned from the server * Added split of Modify/DeleteMonitoredItems if exceeding MaxOperationsPerServiceCall to provide the same functionality as in CreateMonitoredItems ------------------------ Bug Fixes ------------------------ UaSession * Store new nonce only if ActivateSession was successful * Fixed handling of operation level diagnostics * Limit number of publishes to 1 for http(s) connections to reduce the number of used connections ClientSecurityInfo/SessionSecurityInfo * Added missing Issuer Store Location for Windows store * Added handling for Issuers location in Win32 PKI copy constructor and operator=() * Added setting of flag to check CRL in ClientSecurityInfo::initializePkiProviderOpenSSL UaDictionaryReader * Fixes reading of enum values if no dictionary is available ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added capability to register HistoryManager for single nodes in NodeManagerBase Added the following new methods to NodeManagerBase - NodeManagerBase::setHistoryManagerForUaNode() - NodeManagerBase::removeHistoryManagerForUaNode() * Enabled support of event history for Server object - Changed NodeManagerRoot to derive from NodeManagerBase to benefit from the capability to set a HistoryManager for single UaNodes - Adds capability to change the EventNotifier attribute of the Server object * BaseEventType - Added getXxxNode() functions for BaseEventType field variables Added missing functions already available in the derived condition type classes - Adds event field status code handling to BaseEventType Adds capability to set a status code for the event fields where a bad status is allowed instead of the event field value. This is used to indicate a communication error to the event source * Condition classes Added feature to set a StatusCode for event fields of Condition object instances * Configuration Options - Trace Events Trace outputs for Error, Warning and Info trace levels can be sent as OPC UA events and can be accessed via HistoryRead for events. This feature can be activated and deactivated by using a compiler switch. The update adds a configuration option via the configuration interface ServerConfig and the XML or INI configuration files. In addition, the configuration can be changed on-line through the trace configuration object. - Added configuration option to disable UserToken PolicyId check The check is required for compliant OPC UA servers but older clients may not provide the UserToken PolicyId. - Added configuration parameter MaxNodesToBrowse Allows to limit the number of NodesToBrowse accepted by the server * Added overall browse information to BrowseContex A BrowseContext represents only one of the nodes to browse in the Browse request. With the additional information about the number of browsed nodes and the current index it is now possible to stop the browse processing if a maximum number of results or a timeout is reached. * Update of PLCopen and OPC DI information model libraries to the latest specification update and the latest code generation template * Added feature to allow user check for event delivery EventManagerBase does now provide a method beforeSendEvent that can be overwritten by a derived class to check whether the user is allowed to receive the event before it is sent to the client. ------------------------ Bug Fixes ------------------------ TraceConfigObject * Fixed sporadic crash in TraceConfigObject shutdown Adds wait for thread termination in stop to make sure the thread is not accessing members of EventManagerBase in an already deleted worker thread. The existing wait position in the destructor was too late. * Fixes race condition with trace object event handling Splits up the lists for new events and sent events for history read. Moved the list for fireEvent to a local temp list for fireEvent before they are moved to the history list. NodeManagerRoot * Fixed cross node manager references back to NodeManagerRoot for namespace 0 Fixes stack overflow when creating cross node manager references back to NodeManagerRoot for namespace 0 nodes * Added missing data types ExceptionDeviationFormat and TimeZoneDataType * Fixed start-up errors during NodeManagerRoot start-up NodeManagerBase * Added automatic registration of event manager An new event manager can be registered with the SDK during runtime. Added automatic registration of EventManager in NodeManagerBase if firing of events is activated and the NodeManager is added. NodeManagerUaNode * Fixes race condition between browse and delete node Adds special handling for reference deletion if the source node is in a different namespace than the target node * Fixed deadlock in node creation/deletion of NodeManagerUaNode across different NodeManagers * Allowed user to add and use RefereceTypes for namespace 0 IOManagerUaNode * Added support of percent deadband for SamplingItemDevice * Allows deadband request for arrays in modify Removed check and error return for variables with array data types in beginModifyMonitoring, since the handling is implemented and the check was already removed from beginStartMonitoring EventManagerBase * Fixed deadlock between event creation and Refresh UaReferenceLists * Fixed handling of cross node manager references in browseReferences() where the forward target node is in a namespace not managed by the NodeManager where the reference was created. * Added missing support for UA_SINGLE_REFERENCE to translateBrowsePathToNodeId() * Fixes deleteAllChildren() for the case that children are in other namespaces than the parent node and managed by other NodeManagers than the parent node. BaseModelChangeEventTypeData * Adds initialization of event fields with same default values used for GeneralModelChangeEventType. For the default view no event field values must be set with this change. UaObjectServer * Fixed initialization of Server::Auditing property to use configuration value The auditing compiler switch and the ServerConfig setting is now used to initialize the Server::Auditing property * Fixed data type of ServerRedundancy.ServerUriArray The data type of the NonTransparentRedundancyType property ServerUriArray exposed in the ServerRedundancy object in the case of NonTransparentRedundancy support was wrong. The data type has been corrected to string array. UaServerApplication * Fixed error status codes for user token handling Changed error from Bad to BadIdentityTokenRejected if a token type is not supported or no callback for user log-on is registered. * Stops Server::startUp() if configuration load fails TwoStateVariables * Fixes source timestamp handling for TwoStateVariables ServerConfigXml * Adds missing Issuer Store Location for Windows store SessionManager * Fixes setting of maxRetransmissionQueueSize from configuration parameter * Fixes cleaning up of secure channel id map when shutting down server AggregateCalculator * Fixed access to empty list in HistoryReadProcessed Added error handling in aggregate processing code SamplingEngine * Optimized deletion of entries from sampling list FileType * Fixes missing initialization of member variables for factory constructor BaseEventType and BaseEventTypeData * Added and fixed LocalTime handling to Event classes - Added LocalTime setter and getter to UaEventData class. - Fixed LocalTime setter and adds getter to BaseEventType class. - Added documentation for event fields. VariableType classes * Adds missing creation of variable supertypes ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ UaServer * Added logic to make sure responses are sent before closing a channel - Fixes race condition with client disconnects and active stack thread pool. This was a known issue in the SDK 1.4.0 release. The use of stack thread pool was not released in V1.4.0. This issue is now fixed and the stack thread pool can be used with V1.4.1. - Added lock of session send response in close secure channel event. - Moved removal of session from map to a later time in CloseSession handling. * Removed PolicyId match check for Anonymous user token A null token must be treated as Anonymous and a PolicyId cannot fail for Anonymous * Fixed ServerUris filter handling in FindServers The ServerUris filter was not applied to additional servers from configuration * Enhanced error handling for HistoryRead TimestampsToReturn The parameter TimestampsToReturn must be ignored for ReadEventDetails * Prevent discovery registration call with own server Added check for ApplicationUri when starting the registration process UaSession * Added check for duplicate subscription in late queue Added check whether the subscription is already in the late queue of the session to ensure that there is no situation where a subscription is added twice. UaSubscription * Fixes issue with SetMonitoringMode and invalid operations SetMonitoringMode calls with invalid operations lead to handle mismatches in special cases. Such handle mismatches induce pure virtual function calls when monitored items are deleted but still referenced from sampling items in the IOManager. This issue is fixed and the invalid operations are now handled correctly. * Added missing registered node handling for Browse and EventMonitoring Adds registered node handling for Browse Service and CreateMonitoredItems for Events * Forced specification requirement to use a sampling interval of 0 for event monitored items OPC UA specification requires clients to request a sampling interval of 0 for event monitored items. Added code to force this sampling interval in the server if the client does not set 0. UaMonitoredItemData * Fixes setting of QueueSize in ModifyMonitoredItems UaTransactionManager * Fixed status code for history aggregate list size mismatch Fixed the status code for the case that the number of aggregate types does not equal the number of nodes to read. The status code has been changed from BadHistoryOperationInvalid to the more specific status BadAggregateListMismatch. * Added missing reset of ContinuationPoint pointer in HistoryRead loop The pointer containing the ContinuationPoint for the call to the HistoryManager was not reset for the next operation. It was therefore used again if the next operation did not contain a ContinuationPoint. * Added stop of browse operations if maximum number of continuation points is reached * Fixed InputArgumentDiagnosticInfo handling for method calls - Added stringTable to UaCallContext to allow users to set the strings for diagnostic information set for InputArgumentDiagnosticInfo - Added processing in finishCall() handling * Fixed DiagnosticInfo handling for HistoryUpdate - Added stringTable to UaHistoryUpdateContext to allow users to set the strings for diagnostic information provided for operation level DiagnosticInfo - Added processing in finishHistoryUpdate() handling ******************************************************************************** ******************************************************************************** ** ** ** Version 1.4.0.258 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Major changes and enhancements ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Compliance with OPC UA 1.02 Update to OPC UA 1.02 specification changes. Compliance testing with latest compliance test tool for OPC UA 1.02. * Full support for HistoricalAccess functionality (Client + Server) Important historical data access features are available in the SDK since several versions but was never released since the specification was not released yet. After the Historical Access and Aggregates specification are now released, this is the version of the SDK that has full support for all Historical Access and Aggregates features released for client and server side SDK. * Full structured data type support (Client + Server) OPC UA provides support for user defined structured data types. These structures can be known at compile time. In this case the structures are available in code and serialization functions are registered with the stacks. Other structures are unknown at compile time. This requires handling of XML based type descriptions in OPC UA client and server applications. Both options are now supported by the client and server side SDK. The known structures and the handling code can be generated with the UaModeler. The unknown structures can be handled with helper classes provided by the SDK. * Added OPC UA 1.02 features - Added support for loading address space with new XML format (Server) XML files based on the UANodeSet schema can be loaded with new server SDK class NodeManagerUaNodeXmlParser - Added FileType support (Server) OPC UA 1.02 added a FileType object type definition for access to files. The server side SDK provides a corresponding class to represent files in the server. - Added new protocol binding HTTPS with UA Binary Encoding (Stack) - Adds support for OPC UA defined units (UaBase - UaEUInformation) * Classes like UaString, UaMutex or UaThread can now be used before stack is initialized (see UaBase features) * Trace access through OPC UA - Trace configuration can be done through OPC UA interface - Trace events for trace levels INFO, WARNING and ERROR are fired as events - Event history for these events can be access with HistoryRead for events ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation, Examples and Utilities ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- Server examples/utilities ========================================= To make sure that the utilities 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. Following changes are necessary in the OPC UA server application * Remove the files serverconfigxml.cpp and serverconfigxml.h from application project The class ServerConfigXml is now part of the CoreModule. * Update files opcserver.cpp and opcserver.h with new files from examples/utilities The main functionality was moved to the class UaServerApplication contained in the CoreModule. Only the loading of the UaModule is still done in the utility class * The callback OpcServerCallback was changed to UaServerApplicationCallback See CoreModule for more details. OPC UA specification and software changes ========================================= The OPC UA C++ SDK version 1.4.0 supports OPC UA 1.02. This specification update clarified a lot of ambiguities, added new features but fixed also a few issues that lead to minor interoperability changes. Therefore it is not possible to be compliant with with OPC UA 1.01 if the C++ SDK version 1.4 is used. To achieve OPC UA certification you must use OPC UA compliance test tools for OPC UA 1.02. With OPC UA 1.02 the OPC Foundation developed also a new ANSI C based Local Discovery Server (LDS). The behaviour for unregister was changed in this implementation based on a clarification in OPC UA 1.02. The certificate store used by the LDS was also changed from Windows certificate store to a file based certificate store. Therefore it is strongly recommended that you update the LDS to the new version if you install the LDS with your product. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- UaExtensionObject - see 'Full structured data type support' feature for more details Moved classes from server CoreModule to UaBase * HashTable * ReferenceCounter * UserDataBase ------------------------ Features ------------------------ Stack type array wrapper classes * Removed the template class UaStackTypeArray used for handling arrays of OPC UA stack defined data types and the classes based on the template like UaQualifiedNameArray or UaBrowseDescriptions * Added auto generated classes to replace the classes based on the template class - New classes eliminate issues with the template class on different target platforms - Keeps name and interface of old classes - Adds new functionality to all classes - Copy constructor - operator = - operator == - operator != - toVariant() with different overloads - toDataValue() with different overloads - set method with different overloads * Added auto generated classes for all OPC UA defined data types Platform layer and use before initialization * In previous versions it was not possible to use any of the platform specific classes like UaMutex, UaThread or UaString before the UA stack platform layer was initialized. Therefore it was not possible to use them as static members * The new UA stack used for the SDK was change to provide a statically linked platform layer and the function pointers used before got removed * Platform dependent classes like UaMutex, UaThread or UaString can now be used before the stack is initialized Full structured data type support * UaExtensionObject - Removed all data type specific constructors and conversion functions - Generated classes have now the conversion from and to ExtensionObject - User defined data type wrapper classes can be generated with UaModeler - Added getter and setter for UaGenericValue used as wrapper for types unknown at compile time * Added classes for handling of data types unknown at compile time - UaGenericValue as wrapper class for values of data types unknown at compile time - UaDataTypeDictionary defines an interface to a data type dictionary with structure and enumeration data type definitions - UaStructureDefinition and UaStructureField used to describe a structured data type unknown at compile time - UaEnumDefinition used to describe an enumeration data type unknown at compile time - UaAbstractDecoder and UaAbstractEncoder as generic encoder and decoder classes - UaBinaryDecoder and UaBinaryEncoder as binary encoder and decoder classes - UaBsdReader for reading OPC UA binary schema Added loading XML UANodeset files * UaBase::BaseNode and UaBase::Reference Added classes to represent OPC UA nodes and references in memory * UaBase::UaNodesetXmlParser XML parser class used to read UANodeset XML files and to create the model in memory based on UaBase::BaseNode and UaBase::Reference classes * UaBase::BaseNodeFactory Factory class for instantiation of user defined classes derived from UaBase::BaseNode This is typically used to create user data based on application specific extensions in the UANodeset XML file * Prepared new KerberosTicket user token Kerberos will be added as stand alone token to OPC UA Part 4. The support of the new token type is already prepared to avoid changes in the SDK layer when it is supported by the OPC UA stack UaEUInformation * Added EngineeringUnit enumeration for OPC UA defined units * Added constructor and setter that initializes the UaEUInformation with unit information like unit ID, display name and description from OPC UA defined unit list Added classes for file and stream handling * UaIODevice * UaFile * UaDataStream Added class UaFlags to handle bit-mask values UaTrace * UaTrace::setTraceHook() - Added trace hook for all trace messages passing the configured trace level * UaTrace::setErrorTraceHook() - Added trace hook for all error, warning and info trace messages * Adds local time trace output option * Adds setter for product version for output in trace * Adds UaTrace::isInitialized() to check if trace class is already initialized UaVariant * Allowed conversion of variant to array even if the array is empty * Added UaVariant::setDataValueArray * Added missing data types to constructors of UaVariant - SByte - Int64 - UInt64 - DateTime - Guid * Added support for matrix values in getIndexRange() and applyIndexRange() * Added method toDataValueArray() * Added options for dataType() to support different kind of extension objects - Added dataType() overload with argument NamespaceTable - Added method encodingTypeId() - Added method encoding() UaString * Added toLocal8Bit() UaEventFilter * Added UaEventFilter::copyFilter() used to copy the event filter to an OpcUa_EventFilter structure * Adds copy constructor and = operator = for EventFilter and related classes UaContentFilter, UaContentFilterElement, UaSimpleAttributeOperand UaDateTime * Added UaDateTime::copyTo() UaByteString * Added UaByteString::append() * Add checks for negative length for constructors from OpcUa_ByteString UaByteArray * Added constructor taking a UaByteString UaStatusCode * Added COM HDA status code mapping to OPC UA status codes * Added static UaStatusCode::toString() * Added new status codes to status code string map UaUniString * Added method endsWith() * Added toLocal8Bit() UaNumericRange * Added method isValid() UaDir * Added recursiveFileCount() UaPkiProvider * Added splitCertificateChain() * Added setCertificateValidationCallback() Provides option to overwrite optional certificate check errors HashTable * Add method count() to get the number of elements currently inserted in the hash table * Add method tableSize() to get the size the table was initialized with * Added HashIterator to iterate through the entries of the hash table UserDataBase * Enhanced UserDataBase class with type information and specialized derived class Added toVariant() and toDataValue() to all built in data type wrapper classes * UaStatusCode, UaByteString, UaDateTime, UaExpandedNodeId, UaGuid, UaLocalizedText UaNodeId, UaQualifiedName, UaString ------------------------ Bug Fixes ------------------------ UaNodeId * UaNodeId::toXmlString - Update format arguments for sprintf for GUID NodeIds UaVariant * Fixed conversion of negative double value to float * Fixed toExpandedNodeIdArray() and toStatusCodeArray() * Fixed dimension when converting Windows VARIANT safearrays to UaVariant In Windows VARIANT safearrays the least significant dimension is dim[0]. In ANSI C and UA the most significant dimension is dim[0] * Fixed conversion of on an empty ByteString to a windows variant * Returns BadOutOfRange for conversion of negative value to UInt * Fixed length check for array values in UaVariant::toString() * Fixed UaVariant::dataType() for ExtensionObject * Fixed compare for extension objects scalar and matrix UaStatusCode * Changed mapping of OPC_E_BADRIGHTS in UaStatusCode::setComDaError() from OpcUa_BadNotWritable to more generic OpcUa_BadUserAccessDenied. - OPC COM OPC_E_BADRIGHTS is used for read and write. - OPC UA has two codes for Read and Write - Depending on the context the code can be change to a more specific one Replace all occurrences of strncat/strncpy with strlcpy/strlcat Fixed case sensitive compare in NodeId and QualifiedName * Moves defines for case sensitive compare to platform layer * Created independent defines for NodeId and QualifiedName * Changed UaLocalizedText to be always case sensitive like UaString compare * Make default settings consistent to case sensitive Changed format string constants to fit C99 inttypes.h definitions UaUniString * Fixed length check in UaUniString::mid() UaPkiProviderOpenSSL * Added constructor that takes additional parameters IssuersRevocationListLocation and IssuersCertificatesLocation Issuer certificates are CA certificates necessary for the verification of the full trust chain of CA certificates in the trust list The additional directories are required by the new stack to do a full trust chain check UaDiagnosticInfos * Added string table for use cases where service global string table is not available ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module XmlParser ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ Updated XML parser to produce formatted outputs UaXmlDocument * UaXmlDocument::create() - Added method to generate new XML file * UaXmlDocument::setNamespace() - Added method to add namespace * UaXmlDocument::dumpXmlFile() - Get the XML document as ByteString * Added methods for error handling getLastXmlErrorString() and getLastXmlErrorLine() ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- UaPkiCertificateInfo * Changed string member DNS to string array member DNSNames to be able to get and set a list of DNS entries for a certificate * Changed string member IP to string array member IPAddresses to be able to get and set a list of IP address entries for a certificate UaPkiCertificate * Removed validate function to avoid duplicated implementations after fixing certificate validation in the OPC UA stack ------------------------ Features ------------------------ UaPkiCertificate * New method UaPkiCertificate::fromPEMFile() * Extension handling - Added enumeration Extension - New methods hasExtension() extensionValue() and getExtensionByNID() * Added UaPkiCertificate::subjectNameHash() * Added UaPkiCertificate::toPEMFile() Stores the certificate into PEM encoded file. This is used for certificate management. * Added UaPkiCertificate::UaPkiCertificate(X509*) constructor * Added operator== * Added isSelfSigned() UaPkiRsaKeyPair * Added method UaPkiRsaKeyPair::checkKeyPair() Checks if a public key matches a private key ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Client Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- UaSession * Added missing UaDiagnosticInfos parameters to historical access methods ------------------------ Features ------------------------ UaSession * Added loading if data type dictionaries from server either automatically at connect or manually. Data type dictionaries are necessary to process unknown structure data types. See UaBase library for new classes added for full structured data type support based on the dictionaries New methods for data type dictionary handling - definitionType() - enumDefinition() - loadDataTypeDictionaries() - clearDataTypeDictionaries() * Completed HistoricalAccess functionality with - Updates to methods - Additional member HistoryReadAtTimeContext::useSimpleBounds added. The class is used in UaSession::historyReadAtTime() - Additional member UpdateDataDetail::m_isStructureUpdate added. The class is used in UaSession::historyUpdateData() - New methods - historyReadEvent() - historyUpdateEvents() - historyDeleteEvents() - Added asynchronous history methods - beginHistoryReadRawModified() - beginHistoryReadProcessed() - beginHistoryReadAtTime() - beginHistoryReadEvent() - beginHistoryUpdateData() - beginHistoryDeleteRawModified() - beginHistoryDeleteAtTime() - beginHistoryUpdateEvents() - beginHistoryDeleteEvents() * Added cancel() method to be able to call the Cancel service - Changed SDK to use automatically generated RequestIds above 1000000 if not provided by application. Applications must choose numbers below 1000000 * Added getter and update function for NamespaceArray property from server - getNamespaceTable() - updateNamespaceTable() * Added property setters and getters for settings initially passed into connect() - connectTimeout() - setConnectTimeout() - maxOperationsPerServiceCall() - setMaxOperationsPerServiceCall() - watchdogTime() - setWatchdogTime() - watchdogTimeout() - setWatchdogTimeout() - revisedSecureChannelLifetime() - revisedSessionTimeout() * Added trace outputs about miss behaving servers * Added use of ServerCertificate from CreateSession If the server certificate is not provided by the client application and not longer provided in the EndpointDescription returned in CreateSession for 1.02 and later, the only place we can get it is from the CreateSession response ServerCertificate parameter. * Attach string table to diagnosticInfos in async method callbacks * Enhanced traces and error handling for OPC UA client certification * Implemented split of write call if max operations is exceeded UaSubscription * Added trace outputs about miss behaving servers * Added asynchronous handling of subscription deletion if transactions active When transactions are still active, the deletion of the subscription is processed in a worker thread * Added getter for clientSubscriptionHandle() * Attach string table to diagnosticInfos in async method callbacks * Added optional parameter waitTimeForTransactionCompletion to deleteSubscription() Is used to control the wait time for outstanding subscription transactions like deleteMonitoredItems or modifyMonitoredItems Added transaction count for UaSession and UaSubscription * Transaction count is used to block deletion of Session and Subscription of C++ object as long as OPC UA calls are active * This ensures outstanding service calls can be completed even if the application started to delete the Session or Subscription and did not take care about outstanding calls * Enhanced traces and error handling for OPC UA client certification SessionConnectInfo * The OPC UA server may restrict the message size and array sizes. The new parameter SessionConnectInfo::nMaxOperationsPerServiceCall provides a way to reduce the number of operations like nodes to read in a Read call to a number that works. The caller of the API does not need to care about the limitations. The SDK will send several Service calls if number of operations provided by the caller exceeds the maximum number the server accepts. * Made time-out used for Publish calls configurable through SessionConnectInfo::nPublishTimeout * The mode for type dictionary loading can be configured with SessionConnectInfo::typeDictionaryMode ClientSecurityInfo * Added handling of additional settings IssuersRevocationListLocation and IssuersCertificatesLocation Issuer certificates are CA certificates necessary for the verification of the full trust chain of CA certificates in the trust list. The additional directories are required by the new stack to do a full trust chain check SessionSecurityInfo * Added splitCertificateChain() * Added CertificateValidationCallback for verifyServerCertificate() ServiceSettings * Added member ServiceSettings::requestHandle The request handle is sent to the server in the RequestHeader and is used to cancel service invocations. If the request handle is not set (initial value is 0), a unique number is set by the SDK. UaSessionCallback * Added new optional callback sslCertificateValidationFailed() to overwrite SSL certificate errors from the application layer * Added new optional callback connectError() Provides detailed information about error scenarios during connection establishment and reconnect. Allows overwriting of client side errors like security checks. ------------------------ Bug Fixes ------------------------ UaSession * Fixes no delay check loop at connection error ServerStatusCheck was executed without delay in a loop in the case of a connection error with AutomaticReconnect set to FALSE * Resolved dead lock in UaSession::connect when stack calls OpcUa_Channel_Event_Disconnected and the mutex of the Session is locked * Added missing CloseSession after failing activate * Fixed potential null pointer access in UaSession::deleteSubscription() * Make sure the ordering of incoming publish responses is also the order of callback processing Added ordering of callbacks Added traces * Added missing check of serverNonce length in CreateSession and ActivateSession Error can be overwritten with new callback UaSessionCallback::connectError() * Added missing CloseSession if ActivateSession or security checks fail during reconnect * Reset subscription and publish count if new session is created on reconnect ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Server Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- A renaming of enumeration values was necessary in the IOManager interface to fix naming conflicts on VxWorks. Affected enumerations are * variablehandle.h VariableHandle::ServiceType HistoryVariableHandle::ServiceType * iomanager.h IOManager::TransactionType HistoryManager interface (was not released before) * beginHistoryTransaction() - added parameter totalItemCountHint * beginReadEvents() - added parameter pReadValueId * beginReadRawModified() - added parameter pReadValueId * beginReadProcessed() - added parameter pReadValueId * beginReadAtTime() - added parameters useSimpleBounds and pReadValueId * beginUpdateData() - added parameter isStructureUpdate * beginUpdateEvents() - changed data type of parameter eventData from UaEventFieldLists to UaHistoryEventFieldLists * Updated enumeration strings of TransactionType to match other enumeration changes HistoryManagerBase interface (was not released before) * readRaw() - added parameter pReadValueId * readModified() - added parameter pReadValueId * readProcessed() - added parameter pReadValueId * readAtTime() - added parameters useSimpleBounds and pReadValueId * readEvents() - added parameter pReadValueId * updateData() - added parameter isStructureUpdate * updateEvents() - Changed data type of parameter eventData from UaEventFieldLists to UaHistoryEventFieldLists - Removed unused parameter timestampsToReturn from ReadEvents The parameter OpcUa_TimestampsToReturn timestampsToReturn is useless for event history Moved classes from sample code utilities to CoreModule * ServerConfigXml was moved to the core module to be maintained together with the SDK. The compiler switch SUPPORT_XML_PARSER can be used to turn off the XML parser dependency * A major part of the utility class OpcServer was moved to a new class UaServerApplication in the CoreModule. This ensures also that this functionality is maintained with the SDK * The OpcServer callback interface was changed from OpcServerCallback to UaServerApplicationCallback ServerConfig If you are using ServerConfigXML and the XML configuration file, the changes are covered by the ServerConfigXml implementation class. Make sure you update OpcServer with the new utility class and to use only the ServerConfigXml that is now part of the CoreModule (see also the section above about classes moved from utilities to CoreModule). If you want to use one of the new configuration options, make sure you add them to your XML configuration file. See ServerConfig.xml changes for more details. * getUserIdentityTokenConfig() - added parameters bEnableCertificate and bEnableIssuedToken to allow activation of the two additional user token types * getWindowsDiscoveryRegistrationSecuritySetup() - changed parameter sDiscoveryServerCertificateFile to sDiscoveryServerTrustListLocation to be able to configure the file location of the new LDS. The old setting is not longer needed * getSessionSettings() - added parameter iMaxSessionsPerClient * getSubscriptionMaxCountSettings() - added parameters iMaxSubscriptionsPerSession and iMaxMonitoredItemPerSessionCount * Fixed typo in MaxRetransmitionQueueSize Changed MaxRetransmitionQueueSize to MaxRetransmissionQueueSize * Renamed parameter ApplicationUri to ProductUri * Renamed parameter ApplicationName to ProductName * getEndpointConfiguration() - added nRejectedCertificatesCount for the maximum number of rejected certificates in the directory Non breaking changes, just additional optional configuration options: * getMaxBrowseResults() * getConfiguredNamespaces() * addConfiguredNamespace() * removeConfiguredNamespace() * Added security configuration options for endpoints - Makes new clientNonce and client ApplicationUri checks configurable - Added option to disable optional certificate check errors ServerConfig.xml configuration file * Changed DiscoveryRegistration / DiscoveryServerCertificateFile to DiscoveryServerTrustListLocation Added the following configuration parameters * MaxSessionsPerClient * MaxBrowseResults * MaxSubscriptionsPerSession * MaxMonitoredItemPerSessionCount * UaEndpoint / AutomaticallyTrustAllClientCertificates * UserIdentityTokens / EnableCertificate * UserIdentityTokens / EnableIssuedToken * UaEndpoint / CertificateStore / OpenSSLStore Added two optional parameters - IssuersCertificatesLocation - IssuersRevocationListLocation They are required if CA certificates are in the trust list and other CA certificates are required for the verification of the full trust chain ServerConfigSettings renamed to ServerConfigIni * Tested, fixed and enhanced the class for loading the server configuration from an INI file instead of a XML file. This allows to remove the dependency to a XML parser on new platforms * Configuration through INI file can now be used as option * See documentation and ServerConfig.ini example in the bin directory for the updated and fixed entries. Documentation can be found in Server SDK Introduction > Server Configuration > INI Configuration File * Changed complete Endpoint configuration in ServerConfigSettings and INI file to be able to configure more than one endpoint * Synchronized XML and INI configuration All configuration parameters synchronized between XML and INI UaMethod node interface * Added missing session context to UaMethod::userExecutable() EventManager * Added parameter to EventManager::beginEventTransaction (transactionType) Added parameter transactionType to allow EventManager implementations to detect type of transaction in finishEventTransaction. * Added parameter to EventManager::beginEventTransaction (totalItemCountHint) Added parameter totalItemCountHint to allow EventManager implementations to allocate a list with the right size in beginEventTransaction to process them in finishEventTransaction. UaReferenceLists * Fixed typo in UaReferenceLists::deleteAllChildren() Moved classes from server CoreModule to UaBase * HashTable * ReferenceCounter * UserDataBase ------------------------ Features ------------------------ HistoryManager * Updated interface to comply with OPC UA 1.02 Part 11 and to be able to implement all features defined in OPC UA Part 11 - Historical Access and Part 13 - Aggregates * See Breaking Change section for all updates HistoryManagerBase * Updated interface to comply with OPC UA 1.02 Part 11 and to be able to implement all features defined in OPC UA Part 11 - Historical Access and Part 13 - Aggregates * See Breaking Change section for all updates * Added default implementations for ReadProcessed and ReadAtTime. They use ReadRaw History functionality * Added aggregate calculation engine with AggregateXXX classes * Updated HistoryServerCapabilitiesType to comply with OPC UA 1.02 Part 11 release * Added AggregateFunctions defined in OPC UA 1.02 Part 13 to HistoryServerCapabilitiesType * Tested and completed history functionality - see also Breaking Change section for HistoryManager interface * Added support of HistoryRead Events for Trace outputs Loading address space from UANodeSet XML files * New class UaNodeSetXmlParserUaNode is the main class for loading XML UaNodeSet files * NodeManagerNodeSetXml is a base class for a NodeManager that gets its nodes created from the XML file * NodeManagerNodeSetXmlCreator is a factory class that allows generation of NodeManager classes derived from NodeManagerNodeSetXml * Uses new classes from UaBase library - UaBase::BaseNode and UaBase::Reference - UaBase::UaNodesetXmlParser - UaBase::BaseNodeFactory NodeManagerBase / NodeManagerUaNode * Made maximum number of browse results configurable through compiler switch DEFAULT_MAX_BROWSE_RESULTS and configuration option MaxBrowseResults * Added handling of data type dictionaries for structured data types * Extended MethodManager handling in NodeManagerUaNode::getMethodHandle() Added two NodeManager global MethodManagers, - one as default if object does not implement MethodManager - and one used if object is not represented by UaNode like for Conditions not present in address space * Trace access through OPC UA - Trace configuration can be done through OPC UA interface - Trace events for trace levels INFO, WARNING and ERROR are fired as events - Event history for these events can be access with HistoryRead for events Added information model classes * FileType for handling of the new file handling functionality * MultiStateValueDiscreteType Updated information model files and added specific documentation * Added new constructor to all classes in namespace OpcUa - Takes information about attributes and children through a network of nodes base on the UaBase::BaseNode and UaBase::Reference classes - Solves the issue of creating children with specific NodeIds - Used by UANodeSet XML file loading to instantiate the right classes for OPC UA object and variable types * Updated condition and alarm classes * Changed destructor of ConditionData classes to protected We changed the condition event data classes to reference counted (see bug fixes) Therefore all destructor need to be protected. * Added SystemOffNormalAlarmType * Updated AuditEvents - Update type classes with new generated code - Added documentation for event fields and event types - Added ServerId handling to ServerConfig and audit event generation - Added ClientAuditEntryId handling and other client information to ServiceContext class - Completes history audit events * Changed destructor of UaNodes to protected UaNodes are reference counted and calling delete must be disallowed * Added NamingRuleType data type * Added SubscriptionDiagnosticsType handling * Enhanced notifier tree to allow more than one parent ServerManager - Enhanced internal client functionality * Added method for session creation - ServerManager::createInternalSession() * Added browse overload that takes a Session object - ServerManager::browse() Added optional XML parser support directly to CoreModule * Moved ServerConfigXml from example utilities to CoreModule (initial version from SOC_SERVER branch) * Added compiler switch SUPPORT_XML_Parser to version_coremodule.h * All XML parser depending classes will be disabled if SUPPORT_XML_Parser is switched off * Moved default configuration defines to version_coremodule.h * XML parser is also needed for structured data type support Session * Added getters and setters to Session object to provide more information about client - SecureChannel -> SecurityPolicy - SecureChannel -> MessageSecurityMode - Endpoint configuration used by client - Client ApplicationDescription - Client network address * Added session callback to get informed about session status changes * Added purge of never activated sessions if maximum number of session is exceeded BaseObjectType * Added user data pointer handling (also to BaseMethod) * Added getter for NodeManagerConfig and shared Mutex * Handling of setMethodManager() for all attribute classes BaseObjectType::setMethodManager() worked only for ObjectAttributesInstanceDeclaration. This is now working for all attribute handling classes. BaseVariableType * Moved user data handling from BaseDataVariableType to BaseVariableType * Limited write to variables with data types Number, UInteger and Integer to the allowed data types MethodHandle * Added HandleImplementation enumeration to MethodHandle - Same enumeration like for HistoryVariableHandle - Added class MethodHandleNodeId UaEndpoint * Added getter for opened status UaEndpoint::isOpened() * Added security configuration options - Makes new clientNonce and client ApplicationUri checks configurable - Added option to disable optional certificate check errors UaServerApplication * New main application class * Allows overwriting ServerConfigData::getBuildDate() in OpcServer class through UaServerApplication This makes sure the build date is the server application build date and not the SDK build date ------------------------ Bug Fixes ------------------------ IOManagerUaNode * beginRead() - Fixed IndexRange error if applied to non array value Replaced OpcUa_BadIndexRangeInvalid with OpcUa_BadIndexRangeNoData if value is not an array. OpcUa_BadIndexRangeInvalid is only used for invalid syntax * Implemented MaxAge handling for variables of type CacheIsUpdatedOnRequest With the change for maxAge handling a server timestamp change did not longer trigger a data change. But for indexRange the value was updated in memory because the UaVariant was attached to the original value. Therefore setting the new data value to the already changed data value did not trigger a data change * Added early check of AccessLevel and WriteMask in Write * Fixed Write IndexRange error handling Change is based on latest specification clarification that Write IndexRange is optional and BadWriteNotSupported is the right status code. writeValues() does not support IndexRange * Fixed executeRead with index range IOManagerUaNodeJob::executeRead updates cache value after calculating index range. That causes a wrong cache value. Now update cache value before calculating index range. * Fix crash when having duplicate items for modify or stop monitoring * Use MinSamplingInterval in IOManagerUaNode as parameter for minimal sampling interval calculation NodeManagerRoot * Fixed re-adding node manager with same name space * Replaced browse code in NodeManagerRoot to browse NS0 with call to default implementation in NodeManagerUaNode The implementation in NodeManagerRoot did not contain all the error handling implemented in NodeManagerUaNode::browse. NodeManagerRoot requires special handling to multiplex browse to the different NodeManagers. But browsing of nodes in namespace 0 can be handled by the base class NodeManagerUaNode the NodeManagerRoot is derived from. * Added detection for duplicated EventManagers NodeManagerUaNode * Fixed crash in browse of cross NodeManager - Locking did not work in case of cross NodeManager browsing. The wrong NodeManager was locked when browsing another NodeManager through a cross NodeManager reference - Locking was released for HasTypeDefinition and HasModelingRule handling. Handles these references now after stored references requiring locking. ServerManager - internal client * Fixed issue with ServerManager::browse and ContinuationPoint ServerManager::browse() failed in second call if a continuation point was returned in first call. * Added missing feature to internal event monitored item handling - Added Refresh handling - Added invalidate handling for EventManagers Session * Added creation of session name if not provided by client Added missing add of name space to map if index is reused UaReferenceLists * Added missing type definition for modelling rule objects in browse * Fixed cross NodeManager browsing with continuation point UaVariable - setValue() in implementation classes * Fixed UserAccessLevel handling for write operations * Implemented writing of ByteString for Byte[] variable EventFilterElement - fixed event filter operator InList * The check for number of operands for the InList operator was wrong and returned an error if InList was used with right settings. * Removed restriction to Literal/SimpleAttribute of comparison event filters * Forced conversion to (U)Int64 for bitwise operators ConditionType * Added handling for missing SourceTimestamp event fields SourceTimestamp missing on Comment, LastSeverity and Quality * Fixed deadlock if write and refresh on condition Adds reference counting for UaEventData used for condition objects Releases lock of EventManagerBase during Refresh by using reference counting of event data NonExclusiveLimitAlarmType * Fixes NoneExclusiveLimitAlarmType event field delivery * Adds missing two state variables for sub states of active state handling in getFieldData ExclusiveLimitAlarmType * Enhanced handling and examples for LimitState::CurrentState - Added handling of LimitState/CurrentState and LimitState/CurrentState/Id to ExclusiveLimitAlarmTypeData class - Enhanced MassAlarm example to set ExclusiveLimitAlarmType::setExclusiveState() to deliver LimitState/CurrentState - Added state Disabled to OpcUa::ExclusiveLimitStateMachineType to allow reset of LimitState properties if ActiveState is False. AcknowledgeableConditionType * Added checks to avoid duplicated optional event field registration * Added missing optional condition event fields in EventData classes - AcknowledgeableCondition has optional event field handling for AckedState/TransitionTime - AlarmCondition has optional event field handling for ActiveState/EffectiveDisplayName and ActiveState/TransitionTime - These fields are now also handled in the corresponding EventData classes used for Branches and conditions without representation in the address space BaseEventType * Added overwrite for setSourceNode() and setSourceName() in BaseEventType Event field data is handled different in condition types. This was missing for SourceNode and SourceName since they are passed in to the constructor of the ConditionType classes. Added specialized setters for the condition classes. ServerConfigData * Replaced invalid DateTime to UInt64 cast with helper function of UaDateTime SessionManager * Added check if SecureChannel is still assigned to a Session if channel is deleted When a SecureChannel was deleted, the secure channel was invalidated for the assigned Sessions without checking if the SecureChannel was still assigned to the Session. Added a check of the currently assigned secure channel ID before invalidating the secure channel of the session. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ UaEndpoint configuration - added option to accept all client certificates This option can be activated if certificates are used only for message security but not for application authentication. If set to true, all client certificates will be accepted automatically and they are not stored. It is strongly recommended to use this option only together with user authentication. See also new ServerConfig.xml option UaEndpoint / AutomaticallyTrustAllClientCertificates UaServer * Updated automatic discovery certificate exchange to handle new LDS server * Enhances UaServer_EndpointCallback - Adds handling for new event type eOpcUa_Endpoint_Event_TransportConnectionClosed - Closes SecureChannel if the number of secure channels exceeds two times the maximum number of TCP/IP connections - Changed audit event handling for secure channel renew to send only an audit event if renew fails. Based on specification clarification that not every renew fires an audit event * Added limit for number of files in rejected directory * Store certificate chain in sub folder of rejected directory UaSubscription * Adds reset of LifeTimeCounter in all Subscription services Change based on clarification in Part 4 V1.02 Any Service call that uses the SubscriptionId or the processing of a Publish response resets the lifetime counter of this Subscription * Enhances delivery of data and events in case of more notifications - Enhanced delivery of event monitored item queue exceeding max notifications - Changed processing order of monitored items in case of more notifications Continue with next, not processed monitored item instead of starting over from beginning Makes sure all monitored items are delivered even if queues overflow and delivery to client is not fast enough * Implemented method GetMonitoredItems on Server New method from OPC UA 1.02 to get a list of monitored items in the subscription * Changed to GetTickCount() for initializing subscriptionIDs Reduces possibility of reuse of subscription IDs after server restart to avoid logical errors in the client applications UaMonitoredItem * Updates overflow handling for discard newest to OPC UA 1.02 changes Newest value will now put into queue with overflow flag set and last value in queue gets deleted instead * Updated overflow handling at queue resize for ModifyMonitoredItems based on OPC UA Part 4 clarification * Optimized RingBuffer class - Reduced members to UInt16 - Added count member to avoid calculation of current count - Removed not longer used method pushSafe UaTransactionManager * Added asynchronous handling of call in a worker thread if a list of method calls is provided by the client * Enhanced ReleaseContinuationPoint for history read The release continuation point is now handled earlier in HistoryRead. It is now done before VariableHandles are requested to avoid any call to another module. Connection of session with secure channel * The session was already disconnected from secure channel if the session times out but it was not disconnected from the old secure channel if ActivateSession assigned a new secure channel * Moved existing code to disconnect channel to one function disconnectSessionFromSecureChannel() * Disconnects session from secure channel if ActivateSession is using a new secure channel * Clean up getter for secure channel id Enhanced handling of secure channel lifetime * Close secure channel in SessionManager::secureChannelTransportClosed if no session is attached. * Close secure channel with transport error - Secure channel is now closed if transport error is set and no session is assigned any more. - Added error check for transport closed to some OpcUa_Endpoint_EndSendResponse * Implemented purge of secure channels ------------------------ Bug Fixes ------------------------ UaServer * Added check if client application URI matches certificate URI * Changed time-out for RegisterServer calls from infinite to 10s * Fixed client nonce check in CreateSession for minimum length of 32 bit * Added missing check for empty certificate in ActivateSession user token handling * Fixed ordering of discovery URLs in FindServers * Fixed FindServers for additional servers from ServerConfig * Fixed de-serializing of password length on big endian systems * Added missing check of policyId in ActivateSession * Fixed endpoint assignment to session in ActivateSession UaSubscription * Fixed parallel execution of Publish for one Subscription * Fixed moreNotification handling for a special compliance test case * Changes LifeTimeCounter to count with full number The internal LifeTimeCounter was calculated with RevisedLifeTimeCounter and MaxKeepAliveCounter and incremented if MaxKeepAlive was exceeded. This caused problems when LifeTimeCounter was reset independent of Publish. Changed LifeTimeCounter to count with full RevisedLifeTimeCounter every time the KeepAliveCounter is incremented. * Fixed that if maximum notifications was reached but no more notifications to deliver, MoreNotifications was set to true. * Moved DataEncoding check from UaSubscription to IOManagerUaNode It is the responsibility of the IOManager implementer to decide if a data encoding is supported or invalid. Removed the check from SDK class UaSubscription. Like for Read, the check for the tool-kit layer is now done in IOManagerUaNode. * Fixed passing of data encoding to data monitored item creation * Added sending of initial values after transfer subscription UaSession * Added check for priority when fetching queued late subscriptions * Added limitation of max publish request queue based on MaxRetransmissionQueueSize UaTransactionManager * Enhances ReleaseContinuationPoint for history read The release continuation point is now handled earlier in HistoryRead. It is now done before VariableHandles are requested to avoid any call to another module. * Added missing handling of handle NodeIds in Call service ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added support for transport profile HTTPS Binary * Added support for certificate chains * Added influence certificate validation result in Endpoint event callback (new event type) * API Change: added SSL certificate validation hook functionality to Channel event callback * API Change: Endpoint and Channel API (creation and event callback) * API Change: new default (OpenSSL) PKI file store layout and configuration * Change: protocol handlers switched to non-blocking write on sockets * Update: types and services to current Specification level ------------------------ Bug Fixes ------------------------ * Fixes crash in certificate validation if a chain of certificates is provided by the client. This affects all platform layers with OpenSSL support. * Fixes crash in server side stack if a client send an Abort message ******************************************************************************** ******************************************************************************** ** ** ** Version 1.3.3.206 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ UaVariant * Fixed conversion of negative double value to float * Fixed toExpandedNodeIdArray() and toStatusCodeArray() Trace * Added missing locking of trace function used by stack trace ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Client Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ UaSession * Added missing mutex unlock in transferSubscription * Fixes no delay check loop at connection error ServerStatusCheck was executed without delay in a loop in the case of a connection error with AutomaticReconnect set to FALSE * Resolved dead lock in UaSession::connect when stack calls OpcUa_Channel_Event_Disconnected and the mutex of the Session is locked CMakeLists.txt * Fixes VxWorks related compiler settings ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Server Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ NodeManagerRoot * Fixed re-adding node manager with same name space EventFilterElement - fixed event filter operator InList The check for number of operands for the InList operator was wrong and returned an error if InList was used with right settings. ServerManager - internal client * Fixed issue with ServerManager::browse and ContinuationPoint ServerManager::browse() failed in second call if a continuation point was returned in first call. ServerConfigSettings * Fixes several issues with loading server configuration from INI file ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ UaTransactionManager * Added asynchronous handling of call in a worker thread if a list of method calls is provided by the client ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * Fix release of invalid heap address during certificate validation. By passing a buffer containing additional data behind the encoded certificate, free() will be called with an potentially invalid address. This allows to remotely crash a server. There is risk of remote code injection. * Fix crash in secure listener upon receive of Abort message type. ******************************************************************************** ******************************************************************************** ** ** ** Version 1.3.2.200 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Added SIGPIPE and SIGTERM handler to examples utilities/shutdown.cpp and documentation Server Tutorial -> GettingStarted -> Lesson 1 * Added sample code for creation of DataChangeFiler in client example client_cpp_sdk/client_cpp_sdk.cpp -> subscribe() ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- * UaStatus - Bug fix for DiagnosticInfo handling - Fixed typo in UaStatus::setDiagnosticInfo methods - Added UaStatus::setDiagnosticInfo overload to set a complete UaDiagnosticInfo - Changed member m_symbolicId (QualifiedName) to two string members m_symbolicId and m_namespaceUri to match OPC UA Part 4 definition - Changed UaStatus::setDiagnosticInfo methods to reflect change of SymbolicId - Added method to extract UaDiagnosticInfo from raw OpcUa_DiagnosticInfo and string table * Macro UA_DISABLE_COPY - UA_DISABLE_COPY macro contained a semicolon at the end All places that use it add another semicolon so an empty statement is created. Removed the semicolon from the macro. This change creates compiler errors if a user of the macro did not add another semicolon ------------------------ Features ------------------------ * UaUniStringList Added method UaUniStringList::join() ------------------------ Bug Fixes ------------------------ * UaDir - Fixed methods UaDir::canonicalPath and UaDir::homePath() for windows in UaFileEngine::canonicalPath and UaFileEngine::isRelativePath - Fixed error handling in UaFileEngine::canonicalPath for Linux, QNX and VxWorks - Fix method UaDir::rmPath() Only delete folders, no files * UaSettings - Fixed error handling in UaSettings::createIniPath() * UaTrace / server trace - Fixed issue with traced data containing format specifiers like %s Added and used method in UaTrace class to pass the content string directly to the trace output function * UaVariant - Fixed conversion of string to Int64 - String length check was wrong - Added missing error return if string is too long to all number conversion functions * UaNodeId - Fixed UaNodeId::toXmlString() for GUID NodeIds with namespace 0 * UaThreadPool Added initialization of thread pool array in the case of minThreads = 0 * UaSimpleAttributeOperand Fix getting deep copy of empty UaSimplaeAttributeOperand Initialize out parameter in UaSimpleAttributeOperand::getSimpleAttributeOperand * Fixed crash of sprintf with null string on certain non Windows platforms Base library classes are using OpcUa_StringA_snprintf to create string representations of the data content - Changed UaNodeId::toFullString() and UaNodeId::toXmlString() to print content without the null string - Replace OpcUa_StringA_snprintf in UaQualifiedName::toFullString() with UaString::arg() ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * UaPkiProvider - Added getter for trust list location - getCertificateTrustListLocation() ------------------------ Bug Fixes ------------------------ * UaPkiCertificate - Fix openssl certificate generation problem The public key must be set before the certificate extenstions are generated, so that subjectKeyIdentifier hash and authorityKeyIdentifier can be computed. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Known issues ------------------------ * UaSession - The creation of sessions is not thread safe. You must synchronize the session creation if the first session can be created at the same time from different threads. This issue will be fixed in the next major release. It is not possible to provide a fix in this bug fix release since it requires a breaking change in the UaStack ------------------------ Bug Fixes ------------------------ * Client trace - Fixed issue with traced data containing format specifiers like %s Used new method in UaTrace class to pass the content string directly to the trace output function * UaSession - Fixed error handling for status read if server returns an error like BadSessionInvalid - Added handling of DiagnosticInfo for service result level * UaSubscription - Added handling of DiagnosticInfo for service result level ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * ServerManager::startServerShutDown() - Added overload method to start server shutdown with a shutdown reason that is a list of localized text with different languages - Added setter for ServiceLevel on ServerManager that allows to set complete or partial ServiceLevel * UaObjectServer - Added setter and getter for ServiceLevel to UaObjectServer * OpcUa::BaseVariableType - Added UaVariable implementation class that is able to manage multiple locale as LocalizedText value * UaEndpoint - Added getter for PKI provider * NodeManagerRoot - Implemented decrement of SecondsTillShutdown variable after shutdown was started ------------------------ Bug Fixes ------------------------ * IOManagerUaNode - Implemented MaxAge handling for variables of type CacheIsUpdatedOnRequest - Fixed ModifyMonitoredItems for cache variables in IOManagerUaNode Since V 1.3.1 it was not possible to change the sampling interval of a monitored item with ModifyMonitoredItems. A change for dead band handling was setting always the current sampling interval as requested. This problem is fixed with 1.3.2 - UA CTT Fix: Added reset of not requested timestamps in readValue handling on IOManagerUaNode * NodeManagerRoot - Replaced browse code in NodeManagerRoot to browse NS0 with call to default implementation in NodeManagerUaNode. The implementation in NodeManagerRoot did not contain all the error handling implemented in NodeManagerUaNode::browse. NodeManagerRoot requires special handling to multiplex browse to the different NodeManagers. But browsing of nodes in namespace 0 can be handled by the base class NodeManagerUaNode the NodeManagerRoot is derived from. * UaVariable - UaVariable::getAttributeValue() Changed setting of ServerTimestamp for UaVariable::getAttributeValue() to be set at end of function. ServerTimestamp is not longer update in UaVariable::value * UaVariableCache - Added handling for StructureChanged and SemanticsChanged flags in CacheVariableConnector Forwarding data value with these flags set directly to monitored item * UaReferenceLists - Fixed translateBrowsePathToNodeId(). Only search for HasTypeDefinition and HasModellingRule references if the currentPostion of the relativePath did not change - Fixed crash in BrowseNext on deleted references Fixed bug in BrowseNext if the continuation point contains references deleted between continuation point creation and BrowseNext. Enhanced continuation point handling to created deep copies of references since only nodes are reference counted but references are not. * UaEndpoint - Fixes handling of m_isDiscoveryUrl in copy constructor * SessionManager - Added check if SecureChannel is still assigned to a Session if channel is deleted When a SecureChannel was deleted, the secure channel was invalidated for the assigned Sessions without checking if the SecureChannel was still assigned to the Session. Added a check of the currently assigned secure channel ID before invalidating the secure channel of the session. * ConditionType classes - Added missing optional condition event fields in EventData classes - AcknowledgeableCondition has optional event field handling for AckedState/TransitionTime - AlarmCondition has optional event field handling for ActiveState/EffectiveDisplayName and ActiveState/TransitionTime - These fields are now also handled in the corresponding EventData classes used for Branches and conditions without representation in the address space - Added checks to avoid duplicated optional event field registration - Enhanced handling and examples for LimitState::CurrentState - Enhanced MassAlarm example to set ExclusiveLimitAlarmType::setExclusiveState() to deliver LimitState/CurrentState - Added state Disabled to OpcUa::ExclusiveLimitStateMachineType to allow reset of LimitState properties if ActiveState is False. - Added handling of LimitState/CurrentState and LimitState/CurrentState/Id to ExclusiveLimitAlarmTypeData class - Added overwrite for setSourceNode() and setSourceName() in BaseEventType Event field data is handled different in condition types. This was missing for SourceNode and SourceName since they are passed in to the constructor of the ConditionType classes. Added specialized setters for the condition classes. * ServerConfigData - ServerConfigData::getBuildDate() - Replaced invalid DateTime to UInt64 cast with helper function of UaDateTime ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * UaServer - Added missing check for empty certificate in ActivateSession user token handling * UaSubscription - Added missing UaMutex::unlock() in UaSubscrion::close() in the case where a monitored item was already deleted by a second thread at the same time. * UaMonitoredItemData - UaMonitoredItemData::dataChange Fixed check for option DataChangeTrigger_StatusValueTimestamp to verify source timestamp instead of server timestamp. Skipped call to dead band check if absolute dead band is 0. - Added handling for StructureChanged and SemanticsChanged flags in monitored item in case of queue overflow Added check if discarded value has these flags set and move flags to next value in the queue - Fixed assignment of overflow flag for DiscardOldest = true in dataChange() The overflow flag is now assigned to the oldest value in the queue. It was assigned to the newest value before. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaStack ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * Fixed that OpcUa_TcpListener_ConnectionManager_GetConnectionBySocket returned always OpcUa_BadNotFound; Some result checks at calls are also changed. * Windows platform layer - OpcUa_P_Mutex_CreateImp checks malloc result after using the pointer - Fixed memory leak if connect fails (WinCE). The address storage was not freed in OpcUa_P_SocketManager_CreateClient if connect() failed synchronously. This never happened on a PC yet (connect would fail async there) and was first seen on Windows CE. - Added server side connection TCP keep alive mechanism to detect connection interuptions without writing to the socket. Client sockets in servers now use the TCP keep alive feature. Current configuration detects dropped clients after about 35 to 45 seconds. If not sure about the consequences, deactivate the feature by changing OPCUA_P_ACCEPTED_SOCKET_KEEPALIVE. - Increased number of timers to support full number (60) of configured clients plus server endpoints - Fixed that returned string of OpcUa_P_DateTime_GetStringFromDateTime was not zero terminated in some cases * Linux platform layer - Fixed problem where endianess was incorrectly set to little endian - Fixed file type check in function certificate_filter() ******************************************************************************** ******************************************************************************** ** ** ** Version 1.3.1.193 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------ Features ------------------------ * Compliance Testing server - Passed compliance test (V1.1) with more test cases and latest specification * Added support for user defined reference types in server SDK - Added support in C++ server SDK - Added support in UaModeler * Added support for user defined enumeration types in server SDK - Added support to UaModeler * Added network redundancy support in client SDK Implemented as list of alternative EndpointUrls in SessionConnectInfo used for connect tries at secure channel if the main URL fails * Added Query service set handling to server and client SDK * Enhanced Condition Branch handling * Added handling of user tokens Certificate and IssuedToken to server and client SDK ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Added Alarm&Conditions example to client sample code "Client Cpp Sample" ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- * UaSettings and INI file handling - UaSettings does now require call to beginGroup() even if only one group is defined - INI file must contain at least one group ------------------------ Features ------------------------ * UaAbstractFileEngine - Added file open/read/write/close methods to file engine * UaDataValue - Added method UaDataValue::checkDeadbandExceeded() for deadband checks * UaExtensionObject - Added model change event support Added ModelChangeStructureDataType complex type handling * UaQualifiedName - Implemented UaQualifiedName::operator< for map handling * UaVariant - Added conversion from string to string array to UaVariant::changeType() - Added support of array syntax like {10|255|3|} for a string value in the conversion function UaVariant::toByteString() - Added conversion from UInt64 to Double in UaVariant::toDouble() - Added conversion from VT_CY array in UaVariant::operator=(const VARIANT ©) - Added conversion from XmlElement to Windows Variant BSTR in UaVariant::operator VARIANT() const * UaUserIdentityToken - Added user tokens Certificate and IssuedToken handling * UaXmlDocument - Added access to name space through UaXmlDocument::getNamespace() ------------------------ Bug Fixes ------------------------ * UaByteString - Added optimization and additional error checks to UaByteString::base64decode() * UaDateTime - Returning now 0 in toTime_t() if time is before beginning of time_t * UaDataValue - Fixed timestamp check in UaDataValue::compare() - Removed code for old version of UaDataValue class The internal data handling was changed in a previous version to shared data with a copy on write policy to avoid copying the data several times since the DataValue is used and passed on very often and it was necessary to reduce copy operations to a minimum. The old code was still available with a special compiler switch to allow switching between implementations. Since the code is stable and used for several versions, the old code was removed to avoid confusion. * UaFileEngine - Fixed UaFileEngine::link() * UaNetworkBrowser - Fixed browsing network if not all results fit into allocated memory * UaSettings - Major bug fixing and enhancement of UaSettings - Fixed limitation of reading max file size of 4096 byte - Added sync method to save file - Added change flag to save file only if changed - Adding default group [general] if no group is set for setValue() - Fixed handling of multiple sections - Removed duplicated handling of values through section objects and a flat list of strings - Implemented access to key in sub group if group is part of the key * UaSimpleAttributeOperand - Added missing getter for browsePath array size to UaSimpleAttributeOperand UaSimpleAttributeOperand::browsePath() was providing access to the raw array. UaSimpleAttributeOperand::noOfBrowsePath() was missing to get the size of the array * UaStatusCode - Fixed UA status code conversion to COM HRESULT and quality in UaStatusCode::getComDaStatus() * UaVariant - Now returning deep copies of XmlElement and ByteString in UaVariant::operator[] to be consistent with other structure types - Bug fix in operator=(const VARIANT ©) If conversion fails for array or matrix the internal variant was in an inconsistent state that could lead to memory corruptions - Added check for size <= 0 to not allocate array/matrix value in UaVariant::cloneTo() - Fix memory leak in UaVariant::applyIndexRange() ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * UaPkiCertificate * UaPkiRevocationList * UaPkiRsaKeyPair - Added PKI methods for opening/writing files with UTF8 encoded filenames This provides a solution for handling certificates in directories with non ASCI characters in the path ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added network redundancy support Implemented as list of alternative EndpointUrls in SessionConnectInfo used for connect tries at secure channel if the main URL fails Configuration through new parameter SessionConnectInfo::alternativeEndpointUrls * Added handling for Certificate user token * Added Query service set handling to UaSession ------------------------ Bug Fixes ------------------------ * Fixed duplicated sending of connectionError callback * Fixed policyId selection in user/password token if token does not contain security policy * Fixed missing sequence number detection in the case of roll over of the sequence number * Increased the default setting of SubscriptionSettings::lifetimeCount to match the default timeout setting for the subscription ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Implemented handling of user defined reference types - Added enhancements to SDK to be able to handle user defined reference types - Added code generation to UaModeler * Added Query service set handling to server SDK - The current implementation allows to implement query by overwriting the UaTransactionManager. The next major release will integrate the Query functionality on the SDK interface level - Sample code can be found here http://www.unified-automation.com/forum -> C++ based OPC UA SDK -> Topic: How to implement Query Service to Server? * Added handling of user tokens Certificate and IssuedToken - IssuedToken is only prepared, not fully implemented - Certificate can be activated with a compiler switch for GetEndpoints TEMPORARY_CONFIG_SWITCH__ENABBLE_CERTIFICATE_USER_TOKEN - The temporary define will be replaced with a configuration option in ServerConfig for the next major release. The interface cannot be changed for a service release * Added model change event support - Added ModelChangeEventType(s) handling for BaseModelChangeEventType and GeneralModelChangeEventType through new event type data classes * ConditionTypeData - Added initialization of BranchId and Severity in ConditionTypeData::initialize() * IOManagerUaNode - Made support of writing timestamp and status configurable - IOManagerUaNode::setTimestampWriteSupport() Method used to enable or disable support for writing timestamp - IOManagerUaNode::setStatusWriteSupport() Method used to enable or disable support for writing status - Implemented reconnect of Variables to MonitoredItems after delete and recreate of variable - Both tokens are passed on in ActivateSession to logonSessionUser() * Made default values for max continuation point configurable from outside via compiler switches - The default value is now provided in version_coremodule.h - The defines DEFAULT_MAX_BROWSE_CP and DEFAULT_MAX_HISTORY_READ_CP can be overwritten from the build scripts * Provide max settings for subscription and monitored items counts (total and per subscription) - Added additional method ServerConfig::getSubscriptionMaxCountSettings() to provide configuration for the max settings - Added checks for max counts at subscription and monitored item creation ------------------------ Bug Fixes ------------------------ * Updated generated variable type files - Bug fix: Replaced sprintf creating potential buffer overflow with UaString::arg - Added same variable schema for children like in object - Using static members containing the instance declaration - Using instance declaration nodes for creation of children - Replaced property only handling with generic variable child handling - Updated generated files for Variable to fix setting of optional property values * Updated generated condition classes - Update to latest model file with additional mandatory components - Added branch creation function for AlarmTypeData classes * Fixed raise condition when sending events for ConditionType events - The ConditionTypeData objects can be accessed from two different threads if a client issues a ConditionRefresh and the server is updating the event data to send a new status to the client - Added locking capabilities to protect the event data during update and refresh handling !!!!!!!! Server implementations must call lockEventData() and unlockEventData() before and after updating the condition object state. !!!!!!!! * UaVariable implementation classes - Added checks to allow changes of timestamps in UaVariable::setValue() - Added missing handling for Matrix value in CacheVariableConnector::sample() and setChanged() when checking for locale in a LocalizedText value - Added handling of deadband for array types - Fixed shared node detection in UaReferenceLists::deleteAllChilren() - Fixed UaGenericXXX::setAttributeValue for description - Added NULL pointer check in UaReferenceLists::browseReferences * IOManagerUaNode - Skipped call to variableCacheMonitoringChanged in beginStopMonitoring if Variable is no longer available - Fixed raise condition in sampling engine handling when resizing the lists - Added check for write only variable at Read and DataChange The access level was not checked for Read and DataChange in the IOManagerUaNode generic code. There are now additional checks for the AccessLevel and UserAccessLevel attributes. The Read or DataChange will now return the status BadNotReadable (AccessLevel has no CurrentRead) or BadUserAccessDenied (AccessLevel has CurrentRead and UserAccessLevel has no CurrentRead) - Added new SamplingItem class to handle index range and percent deadband - Added call to IOManagerUaNode::afterGetAttributeValue() and beforeSetAttributeValue() in the case of handling of read and write through readValues and writeValues * Server Object - Added functionality to update the complex value for the ServerStatus - Added missing capability and diagnostic nodes - Added Server | ServerDiagnostics | SubscriptionDiagnosticsArray - Added Server | ServerCapabilities | SoftwareCertificates - Added data type Structure | SoftwareCertificate - Fixed data types for variables below Server | ServerDiagnostics - Completet ServerStatusType and BuildInfoType VariableType * UaReferenceLists::translateBrowsePathToNodeId() - Pass on error from translate call to other NodeManager - The error was overwritten by Bad_NoMatch before * Session - Fixed the following two continuation point related issues - If less than 10 continuation points are configured the array is accessed out of range - If more than 10 continuation points are configured only 10 will be used ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added configuration option to hide an EndpointUrl from the list of DiscoveryUrls - UaEndpoint::setIsDiscoveryUrl - UaEndpoint::isDiscoveryUrl() - used in UaServer::FindServers() ------------------------ Bug Fixes ------------------------ * Server shutdown - added transaction completion check for subscriptions - Added handling of wait for transaction completion into subscription transaction handling - Added list of closed subscriptions where transactions are still active to the SubscriptionManager - Calling wait for transaction completion earlier - Added trace outputs for starting and stopping transactions in subscriptions - Fixed raise condition with closing Subscriptions and waiting for transaction completion A subscription that was closed but has still active transactions must be managed in a special list in the SubscriptionManager. The subscription was not added in all situations to this list since there was an unlock between setting the subscription state to CLOSED and starting the transaction for removing the active monitored items from the subscription. In addition the SubscriptionManager did execute the check for active transactions before closing the subscription * UaTransactionManager - Moved code to wait for transaction completion to a separate function to be able to call it from outside - Added server timestamp handling for Read operation level errors returned from IOManager::beginRead * UaSubscriptionManager - Fixed memory leak in method beginCreateMonitoredItems() if subscriptionId is invalid * UaSubscription - Access to Session member in Subscription was not locked Added code to work with a reference counted copy of the Session pointer instead - Fixed access to MonitoredItem object pointers outside Subscription lock - Added missing null pointer check for monitored item object in close subscription - Fixed memory leak for the case that notifications were not attached to publish response * UaSession - Fix memory leak in sendSubscriptionStatusChangeNotification() * UaServer::secureChannelCreated() - Using now new UTF8 PKI method for storing rejected certificates - Fixes storing if path contains non-ASCI characters ******************************************************************************** ******************************************************************************** ** ** ** Version 1.3.0.183 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- All modules: ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- * Delivery structure of the third-party components The delivery structure of the third-party components was changed to be able to have several different versions in parallel e.g. Win32, Win64 and WinCE or different compiler versions like Visual Studio 2008 and 2010. * All third-part components are now delivered and used as DLL version instead of a static library in the examples. This includes OpenSSL, LibXML and the UA stack Most SDK users delivered already the DLL versions with their final product but we want to force all users to do this in the future to be able to update security related components like OpenSSL without the need for updating the whole product. !!! Add define _UA_STACK_USE_DLL !!!!!!!!!!!!!! You need to change your project settings if you have not already used the DLL versions before. The define _UA_STACK_USE_DLL must be added to the pre-processor definitions to avoid linker errors. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ------------------------ Features ------------------------ * Compliance Testing * Added support for additional server profiles - A & C Previous Instances Server Facet - Auditing Server Facet - Client Redundancy Facet (TransferSubscription) - Redundancy Visible Server Facet * Added support for additional client profiles - Redundancy Switch Client Facet (TransferSubscription) * Made client and server SDK and examples compileable for no security - Allows excluding OpenSSL dependency - Requires changes of UA stack compiler settings in opcua_platformdefs.h to NO - #define OPCUA_SUPPORT_SECURITYPOLICY_BASIC128RSA15 OPCUA_CONFIG_NO - #define OPCUA_SUPPORT_SECURITYPOLICY_BASIC256 OPCUA_CONFIG_NO - #define OPCUA_SUPPORT_PKI OPCUA_CONFIG_NO ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Reworked client getting started tutorial * Added server getting started lesson 7 as Historical Access example ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * UaNodeid - Added method setNamespaceIndex() * UaNetworkBrowser - Platform independent network browser to find network nodes in the local network - This feature can be used to provide a network browser to find OPC UA servers in the network * Event Filter handling for clients - New classes - UaEventFilter - UaContentFilter - UaFilterOperand / UaElementOperand / UaLiteralOperand / UaSimpleAttributeOperand - UaContentFilterElement - Helper classes for creating the event filter for event monitored items * UaVariant - Added UaVariant constructors for the data types NodeId, LocalizedText and QualifiedName - New method applyIndexRange() New method needed for writing with indexRange - Added index range handling for matrix including matrix with multiple dimensions - Implemented Matrix support for Windows VARIANT conversions - Added conversions between ByteString and ByteArray - changeType does now allow conversion between ByteString and ByteArray - toByteString does now allow conversion from ByteArray - toByteArray does now allow conversion from ByteString - New method getArrayElementsFromString() - New conversion from string to any numeric arraytype * UaUniString - Added two new overloads for method replace - Added new method trimmed() * UaNumericRange - Added handling for matrix including matrix with multiple dimensions - Added operator= * UaExtensionObject - Implemented redundancy diagnostic objects handling Added handling for RedundantServerDataType ------------------------ Bug Fixes ------------------------ * UaVariant - getIndexRange() - Fixed null pointer access for special case length = 1 for ByteString array (code was removed) - Removed special handling for length = 1 -> This case returns also an array not scalar - operator VARIANT() Fixed operator VARIANT() for empty ByteString - UaTypeToVartype() Fixed conversion of OPC UA type ByteString to COM vt type - compare() Fixed UaVariant::compare() for matrix values - toBool() Enhanced number of types (integer and floating point types) convertable to bool - Error handling in getIndexRange() and applyIndexRange() Only return IndexRangeInvalid if index range has wrong syntax or is logically wrong i.e. firstIndex >= secondIndex - Fixed UaVariant::toExpandedNodeId to return the full contained ExpandedNodeId and not only the NodeId part. * UaString - Fixed UaString::like() * UaStatusCode - Fixed missing last digit in UaStatusCode::toString() where unknown code is printed as hex code - Changed InfoBit handling in UaStatusCode::setComDaQuality - DataValue flag is only set if additional information is provided and not always for DataValues - Therefore the bit needs only be set if the limit bits are set in the quality. - Masking out diagnostic bits of statuscode in toString(). * UaThreadPool::addJob Fixed performance issue when extending the thread pool size * Removed "using std::map;" etc. from all files to avoid problems with special compilers Changed all use of map and list to std::map and std::list. * Fixed memory leak when using file engine The abstract file engine creates a static object for the singleton implementation. This object is now deleted when shutting down the UA system * UaNodeId - isNUll() NodeId is also null if string is empty and if guid has only 0 elements * UaFileEngine - Fixed UaFileEngine::entryList() for Linux, removing check for '.' in path * UaUniStringList - operator= deleted memory twice if new size was smaller old size ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * UaPkiCertificate - Fixed memoryleak in UaPkiCertificate::info() * UaPkiPublicKey - Fixed memoryleak in UaPkiPublicKey by calling EVP_PKEY_free after X509_PUBKEY_get. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- * History service changes after Part 11 (HA) and UA stack updates - Change of PerformInsertReplaceType to PerformUpdateType - Change of UpdateDataDetails.UpdateValue.DataValues to UpdateDataDetails.UpdateValues ------------------------ Features ------------------------ * Added support for additional client profile Redundancy Switch Client Facet Added transferSubscription handling to UaSession * Added automatic reconnect if initial connect fails Added SessionConnectInfo::bRetryInitialConnect parameter to configure connect handling in the case the initial connect fails * Added sessionName parameter to SessionConnectInfo This allows to set a unique session name for debug purposes to identify the session in the server * Reduced the number of threads per client connection by making the thread pool a shared object used by all client connections ------------------------ Bug Fixes ------------------------ * deleteSubscription handling if subscription does not longer exist in server Setting subscription invalid if new session was created was missing. This caused an error return in deleteSubscription since the call was forwarded to the server The SDK does now know that the subscription is already invalid and does only clean up resources in the client SDK. * UaSession::connect Fixed initialization of clientnonce if no security is used * Fixed memoryleak if ClientSecurityInfo::loadClientCertificateOpenSSL() fails * Fixed detach of result data for asynchronous Call handling The asynchronous handling of single calls detaches the result data and deletes the result array. The array pointer was not set to NULL which caused a crash in the clear of the response structure in the stack * Added handling for special case that security policy is not defined for username token Added fall back to SecurityPolicy in the EndpointDescription if it is not provided with the username token description in the EndpointDescription. OPC UA Part 4, section 7.35 requires: If this SecurityPolicy is omitted then the Client uses the SecurityPolicy in the EndpointDescription This case was not handled * Removed printf outputs to console - Replaced printf with trace outputs if useful - Removed developer debug outputs ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- --------------------------------------- !!! Breaking Change HistoryManager !!!! --------------------------------------- * HistoryVariableHandleUaNode was changed to handle UaNode pointer as private member including reference counting * Breaking Change: HistoryManager changes after Part 11 (HA) and UA stack updates - Change of PerformInsertReplaceType to PerformUpdateType - Change of UpdateDataDetails.UpdateValue.DataValues to UpdateDataDetails.UpdateValues --------------------------------------- !!! Breaking Change EventManager !!!! --------------------------------------- * Added parameter for EventFilter result handling in callback functions This affects only users implementing the EventManager interface directly In this case an compiler error will indicate the change. This change is hidden if the EventManagerUaNode is used Affected methods are - finishStartMonitoring - finishModifyMonitoring Added parameter OpcUa_EventFilterResult* pEventFilterResult ------------------------ Features ------------------------ * NodeManagerBase - Enhanced NodeManagerBase to support HistoryManager Added handling for history access to the NodeManagerBase by - providing a method to assign a HistoryManager to the NodeManagerBase - implementing NodeManager::getHistoryVariableHandle() * IOManagerUaNode - New event afterGetAttributeValue() Adds overwrite capability for attribute read. It can be used to apply user access checks - New event beforeMonitorAttributeValue() Added capability to reject creation of monitored item in the IOMangerUaNode based on user rights - Implemented percent deadband handling for analog items and enhanced related error checks - Reduced ThreadPool per IOManagerUaNode to one shared ThreadPool for all IOManagerUaNode instances - UaVariable_Value_CacheIsUpdatedOnRequest feature UaVariable ValueHandling can be defined to: - Update cache only if variable is monitored (signalled through IOManagerUaNode::variableCacheMonitoringChanged) - Read and Write are handled through IOManagerUaNode readValues and writeValues - Added capability to get informed about subscribe / unsubscribe of cached variables - Event through IOManagerUaNode::variableCacheMonitoringChanged() * EventManagerUaNode - Splitted EventManagerUaNode into two classes - EventManagerUaNode derived from EventManagerBase - EventManagerBase has no relation to UaNode classes and implements only the base functionality needed for an EventManager - EventManagerUaNode adds all UaNode releated handling. This is mainly functionality for the Condition objects * EventManagerBase - Added Condition Branch handling - Added capability to send RefreshRequiredEvents - Added EventManagerBase::unregisterEventField and EventManagerBase::unregisterEventType - Added EventManagerBase::unregisterEventNotifier to be able to remove event notifiers from an EventManager - Added EventCallback::invalidateEventManager() to allow an EventManager to be removed from the server without shutting down the whole server and without keeping the interface instance in memory - Added capability to shut down the EventManager and to disconnect from MonitoredItems - Uses new event receive callback interface method of EventManager - Enhanced locking - Added shutdown status to be checked in all methods - Implemented EventFilter result handling - Enhanced error handling for EventFilter - Added capability to overwrite check whether the passed NodeId is a root notifier for the EventManager * Alarm and Condition object classes - Added Condition Branch handling - Implemented handling for important optional condition event fields - AlarmCondition.ActiveState.EffectiveDisplayName - AlarmCondition.ActiveState.TransitionTime - AcknowledgeableConditionType.AckedState.TransitionTime - Added shelved state machine handling * Added feature to register an EventManager during runtime Added capability to register EventManagers after server startUp to create active event monitored items in the new EventManager - Registration through ServerManager::registerDynamicEventManager() - Implemented register functionality in SubscriptionManager - All Subscriptions get informed about new EventManager - The EventManager is added to all Event MonitoredItems - All active event MonitoredItems are registered with the EventManager * Class Statistic - class instance counts are provided as UA Variables and trace output This allows analyzing the number of reference counted C++ class instances independent of there OPC UA status. An examples are session objects that may be already closed but if not all references from users are released, the actual objects in memory may be much higher than the used objects. The numbers can be read through OPC UA or in the trace outputs. * OpcUa::BaseVariableType and all derived classes - Enhanced data type check in OpcUa::BaseVariableType to handle Enum value writes in all situations - Added builtIn data type member to OpcUa::BaseVariableType - Enhanced data type check in OpcUa::BaseVariableType to check builtIn type instead of data type nodeId since writes are always done with the builtIn type. * NodeManagerRoot / ServerManager Added internal (simplified) browse calls - Internal browse calls are available through NodeManagerRoot or ServerManager - Two browse calls, one for forward browsing and one full browse hiding the functionality necessary for client browse call handling - Added method to get a list of super types for a type node * Implemented server profile "Redundancy Visible Server Facet" Added configuration options for non-transparent redundancy * Added first version of server profile "Auditing Server Facet" - Added creation of audit events - Added configuration parameter isAuditActivated to the ServerConfig interface - Added Audit Event Types - Added History Audit Event Types - Added Support define - can be included / excluded Configuration through SUPPORT_Auditing_Server_Facet in version_coremodule.h - Activated Event handling in NodeManagerNS1 * Changed NodeManagerNS1 to use NodeManagerBase as base class instead of NodeManagerUaNode and IOManagerUaNode * Integrated Historical configuration and capability objects - Added HA configuration objects - Added HA capability objects and provided access through Server object - Used them in the demo server * Added MultiStateDiscreteItemType classes * Added handling of Session object node in the address space ------------------------ Bug Fixes ------------------------ * Fixed default error handling for HistoryRead in UaTransactionManager::beginHistoryRead Added default error if the HistoryManager returns NULL but does not set an error code * Variables with enumration data types Changed data type of variables with enumeration values from Int32 to enumeration data type * Added EnumString properties to enumeration data types * Fixed handling of ConditionRefresh if more than one EventManager is available - The RefreshStartEvent and RefreshEndEvent was sent for every EventManager for every MonitoredItem. This forced several of these events if more than one EventManager is active. - The handling was changed to send only one RefreshStartEvent and RefreshEndEvent per MonitoredItem. * Minor compliance fixes - Default browse does now return BadViewIdUnknown if a view is specified - Added handling of abstract reference types in checkReferenceTypeMatch() - Return operation level error in browse() if ReferenceTypeId is not a valid ReferenceType - Return service level error if an invalid view is specified - UaSubscription::beginCreateMonitoredItems() returns error if filter other than datachangefilter is set for non event items - In method beginStartMonitoring() use SamplingItemDeviceIndexRange if indexRange is specified - In IOManagerUaNode execute_Xxx() methods - apply index range - Clean up list of indexRange in destructor of IOTransactionContext - In UaServer::FindServers apply filter for list of returned servers - Only return requested timestamps - Set overflow bit in status code if queue has been emptied and a new value arrives - Added missing IndexRange handling for SamplingInterval 0 - Return BadBrowseDirectionInvalid if invalid browse direction is set - Added check in ActivateSession if the session is valid for activation or if it is already marked for deletion - Changed result to BadSessionNotActivated for service calls before ActivateSession - Fixed GetEndpoints handling * Fixed null pointer access in BrowseContext::setUserData if m_pView is null * Fixed endless loop in UaReferenceLists::getTargetNodeByBrowseName ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * UaServer - ActivateSession Added default localeId handling to use first configured supported localeId if client does not pass a locale - Added setting of SecurityLevel in GetEndpoints to allow a client to detect the most secure Endpoint - Implemented filtering of results in GetEndpoints based on EndpointUrl parameter If the passed EndpointUrl matches one of the configured EndpointUrls, only the Endpoints with this URL are returned in GetEndpoints. - Added capability to configure additional servers to return in FindServers This configuration option allows to run the server on port 4840 but to return also additional servers for a fixed configuration e.g. two servers from the same vendor on one network node. - Expanded list of DiscoveryUrls to list of Endpoint URLs in FindServers and server registration This change ensures that a server is reachable even if not all URLs are working for a client - Added feature to hide endpoints in GetEndpoints - Added isVisible flag to UaEndpoint - Added handling in GetEndpoints - Used flag in redundancy module to make internal endpoint invisible - Activated security for internal communication - Implemented trigger handling and SetTriggering * Implemented Server Profile "Client Redundancy Facet" Implemented TransferSubscription * Multi session support for one secure channel Changed secure channel handling to allow several Sessions per SecureChannel. This is normally not used by clients but allowed by the specification and verified by the compliance test tool. * Implemented sending History responses in worker thread if requested by HistoryManager * Optimized the publish code for sending the notifications / added length limitation handling - Change detection was changed to two counters for data and events which are incremented already when the data is put into the monitored item queue - Data and events are filled directly into the preallocated arrays. Preallocation happens based on the counters - Only additional data e.g. from linked monitored items is handled through additional lists like before - Added handling of maxNotificationPerPublish requested from client. Added additional limitation check based on serializer settings ------------------------ Bug Fixes ------------------------ * Fixed handling of MonitoringMode Disabled for event monitored items in Create / Modify The MonitoringMode was ignored in Create- and ModifyMonitoredItems. This caused a crash in the server if MonitoringMode Disabled was used and the monitored item was not longer existing since the EventManagers get not informed about the deletion of disabled monitored items. * Fixed crash in ModifyMonitoredItems for Event MonitoredItems with ContentFilter * Server is now sending StatusChangeNotification is subscription expires * Fixed multiple discovery server registrations - The registration with multiple discovery servers did not work since the connect information was cached for the first one and then used for the other to. - This was changed to use a context for each discovery server to register with. * UaServer - Return operation level error in browse() if ReferenceTypeId is not a valid ReferenceType - Return service level error if an invalid view is specified ******************************************************************************** ******************************************************************************** ** ** ** Version 1.2.1.148 ** ** ** ******************************************************************************** ******************************************************************************** ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- All modules: ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added support for managing the application certificates in the Windows certificate store. The store location (LocalMachine or CurrentUser) and the store name (My or individual application name) must be specified in the respective configuration file. - LocalMachine: certificate can only be created when application has admin privileges (expected for server applications). When using "My" as store name the global Personal store will be used and the application will trust all applications having certificats in this folder. However using "SomeApplicationName" will grant higher level of flexibility, because you can grant each application's certificate separately. - CurrentUser: certificate can be created having user privileges only (expected for client applications). When using "My" as store name the user specific Personal store will be used and the application will trust all applications having certificats in this folder. However using "SomeOtherApplicationName" will grant higher level of flexibility, because you can grant each application's certificate separately. - Note: it is not allowed to create identical store name "MyApplicationName" twice, once for LocalMachine and once for CurrentUser. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Enhanced example for event generation * Added example for migrating COM OPC DA servers to OPC UA * Added example for PLCopen (IEC 61131-3) information model * Enhanced documentation for user authentication ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * UaVariant - Added DataValue handling to UaVariant. Added toDataValue and setDataValue to UaVariant ------------------------ Bug Fixes ------------------------ * UaVariant - Added erro return if UaVariant::changeType() from string to bytestring fails - Fixed type conversion of negative Float or Double to signed integer values For rounding purpose 0.5 was added to the Float or Double for conversion to integer values. This was wrong for negative Float or Double values. Added check for negative Float or Double values and subtracted 0.5 instead of adding. * UaNodeId - Added missing addRef() in UaNodeId::attach() * UaString - Changed UaString to use a const in parameter for all overloaded operators * Added a check to avoid that the cleanup is not called for the platform layer if the init was never called * Changed ReferenceCounter::addReference() and releaseReference() to return the actual ref count instead of the result of the atomic increment / decrement. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------- !!! Breaking Change !!!! ------------------------- * fromWindowsStore() is now using thumbprint instead of subject name Changed Windows certificate handling to use certificate thumbprint instead of name for loading ------------------------ Features ------------------------ * Added deleteFromWindowsStore() ------------------------ Bug Fixes ------------------------ * Fixes memleak when storing key pair as PEM file ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Added server certificate validation before connecting ------------------------ Bug Fixes ------------------------ * Added checks to avoid calls to the stack if the channel is not connected * Fixed freeing memory for history read functions * Added mutex unlock in UaSessionPrivate::disconnectChannel to make sure all code paths unlock the mutex before the channel is deleted ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- --------------------------------------- !!! Breaking Change HistoryManager !!!! --------------------------------------- * Added missing read modified functionality at HistoryManagerBase - Interface not release yet - Change is based on a specification change - Changed interface of HistoryManagerBase to provide two specialized functions readRaw and readModified instead of one readRawModified. - This change was necessary to support the specification change for read modified and to avoid unused parameters for the normal read raw case. ------------------------ Features ------------------------ * Enhanced handling of setAttributeValue in UaVariable implementations * Optimized adding of references to the reference list. To save memory the reference handling was changed in a previous version to use a simple linked list instead of a STL list. New references where added at the end but the last entry was not stored before. This was changed to store also the last entry to optimized adding of references to the list. * Optimized adding of inverse references to the reference list. To save memory the reference handling was changed in a previous version to use a simple linked list instead of a STL list. New references where added at the end which required a linear search of the end. This was changed to add the new inverse entry of the beginning of the list. This changed the order but only for inverse references. For forward references the end pointer is now stored instead. * Changed methods of conditions to shared methods using the instance declarations also for all instances - Optimizes memory consumption (reduction of 25%) - Fixes wrong browse name name space - Methods are shared anyhow * Added Refresh related event types Added RefreshRequiredEventType, RefreshStartEventType and RefreshEndEventType * Changed BaseObjectType to use same attribute handling like BaseVariableType - Added support for modeling rule - Optimized memory usage with different optimized attribute data classes ------------------------ Bug Fixes ------------------------ * UaTransactionManager - Added a break condition for the loop waiting for transaction completion during shutDown * Fixed wrong EventManagerUaNode method called in ConditionType::Disable * Added missing startUpIO call in NodeManagerBase * Fixed TwoStateVariable::Id property to provide right browse name * Fixed passing TimestampToReturn parameter to IOManager in ModifyMonitoredItems * Removed type node creation of variable types already created by generated classes * Fixed static memory leaks for node creation * Changed discovery server registration to not longer call register with IsOnlie=false at shutdown. Deactivated the "unregister" function with RegisterServer call with IsOnline = OpcUa_False This flag is now used by the discovery server to force a static registration * Allowed Null reference type ID in TranslateBrowsePathsToNodeId after clarification in UA spec * Changed initial value of Severity from 0 to 500 to avoid invalid severity - All samples did not initialize the severity to a valid value. This caused problems in clients checking the severity 1-1000. - Instead of changing all samples the initial value in the class BaseEventType was changed to 500 * Fixed endless loop if element operand points to its own element Fixed crash because of stack overflow * Added missing & operator to initial value UaVariant passed to UaVariable constructors ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Bug Fixes ------------------------ * Fixed memory leak in ActivateSession with security * Fixed resend queue issue with KeepAlive messages - The empty keep alive messages with the same sequence numbers got queued in the retransmission queue for the subscription. This filled also the list of AvailableSequenceNumbers in the Publish. - Both issues are fixed by not longer storing KeepAlive messages in the retransmission queue. * Fixed access to uninitialized array in UaSubscription::finishModifyMonitoring for event monitored items ******************************************************************************** ******************************************************************************** ** ** ** Version 1.2.0.131 ** ** ** ******************************************************************************** ******************************************************************************** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! See 'Breaking Change' section for each module for changes that may effect your current implementation. Not all changes are detected by the compiler. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- All modules: ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * Prepared all modules to be compiled as DLL * Prepared all modules for 64 bit support * Added the capability to overwrite internal server SDK classes like SessionManager, TransactionManager, ServerManager and SubscriptionManager This is normally not necessary but allows power users to replace some SDK parts with specialized code * Added modelling tool including a code generator (beta) for creation of implementation classes for user specific Object and Variable types * Added version information that can be read during runtime to the UA stack and the CoreModule. The access functions can be found in version_coremodule.h * Added defines for SDK features used as compiler switches for the features. They can be used to reduce code size if a feature is not needed. Switches can be found in version_coremodule.h ------------------------ Bug Fixes ------------------------ * Fixed issues with changing system time ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Documentation and Examples ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- * Added general OPC UA introduction sections to the documentation * Added detailed Server Getting Started Tutorial * Added detailed Client Getting Started Tutorial * Added reading of client configuration from INI file for client example ------------------------ Utilities ------------------------ * OpcServer Added class for encapsulating the OPC server modules in one object handling all start up and shut down code through a simple API Used in all examples and getting started tutorials * ServerConfigXml - Added creation of PKI directories if they do not exist - Added creation of revocation list file (*.crl) - Provides example for the creation of application certificate ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaBase ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ !!! Breaking Change !!!! ------------------------ * UaDataValue::detach() Method signature changed since the internal data handling of the class was changed. See features for more details. The caller must now check if he gets the data pointer. If not there are more than one reference to the data and the caller must copy the data instead of detaching. ------------------------ Features ------------------------ * UaString - Added arg() methods to have an optimized printf like functionality to construct strings - Added number() to set a number as string - Added Like operator handling * UaVariant - Added constructors for Float, Int16 and Boolean - Added array to array conversion - Added conversion from Windows Variant VT_CY to UaVariant - Implemented conversion from String to LocalizedText - Added toFullString() - Added index range support with applyIndexRange() - Added Matrix support * UaDataValue Changed class to reference counted internal data storage to avoid data copying Implements the copy on change schema * UaDateTime - Added extractor for FILETIME - Added conversion functions for OpcUa_Int64 * UaPlatformLayer Added reference counter for init / cleanup to make sure calls from multiple modules forces only on init / cleanup call to the stack * UaExtensionObject - Added cloneTo functionality for not encoded extension object - Added OpcUa_Annotation support * UaMutex Added reference counted version UaMutexRefCounted to be able to share a mutex across different objects * UaStatusCode Added toString() to provide symbolic name for status codes * UaLocalizedText - Added compareLocale() to be able to check the locale part of the localized text - Added setText() - Added setLocale() * UaByteString - Added operator > - Added operator < * Added UaContentFilter class * Added UaAnnotation class * Added UaNumericRange class ------------------------ Bug Fixes ------------------------ * UaDateTime::msec() Fixed calculation of for large 64 bit values * UaVariant - Added check to toByteString() for valid characters at conversion from string - Fixed toString() function for XML element - Added check for null value in changeType() * UaThread - Removed running flag from class and changed to use the flag of the underlying C code to avoid raise conditions - Added code to check if the thread was already started before and to delete and to create a new thread if it was already started before to work around limitations in the stack * UaNodeId - Fixed toString() method for GUID NodeIds - Fixed toFullString() method for GUID NodeIds - Fixed toXmlString() for GUID NodeIds - Enhanced isNull check for UaNodeId * UaString - Added missing OpcUa_String_Initialize to UaStringPrivate::UaStringPrivate(const OpcUa_ByteString *other) * UaStatusCode Fixed the InfoType::DataValue and Limit bit handling * UaByteArray Fixed fromHex(): conversion of letters a-f/A-F was not correct ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaPki ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ !!! Breaking Change !!!! ------------------------ * Linking of crypt32.lib (Windows only) Adding access to Windows certificate store requires linking of crypt32.lib ------------------------ Features ------------------------ * UaPkiRevocationList Added new class for generation of a revocation list file (*.crl) * UaPkiCertificate (Windows only) Added access to Windows certificate store to import and export certificates ------------------------ Bug Fixes ------------------------ * UaPkiCertificate Fixed memory leak in serialNumber() ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaClient ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ !!! Breaking Change !!!! ------------------------ * SessionSecurityInfo and ClientSecurityInfo - Removed unused parameter from initializePkiProviderOpenSSL - Changed UserIdentityToken handling to force the user to set the token type * Applied changes in UA Stack for Historical Access based on specification update ------------------------ Features ------------------------ * SessionConnectInfo - Added flag to disable automatic reconnect - Added nWatchdogTimeout parameter with default value 5000 (ms) This timeout is used for Read calls to the server status * ClientSecurityInfo Added initialization with NO_PKI provider * UaSession - Added browse and browseNext functions for a list of starting nodes - Added asynchronous versions of node management services - Added getter to access the server status from the UaSession - Added multi call to allow to call a list of methods in one round trip from the client - Added function UaSession::changeUser to allow to change the user on a session - Implemented asynchronous methods for CreateMonitoredItems, ModifyMonitoredItems, DeleteMonitoredItems and SetMonitoringMode ------------------------ Bug Fixes ------------------------ * User and password user identity token - Implemented missing password encryption if requested by the server - Added automatic selection of strongest support algorithm - Fixed encoding of password length with correct endianess * UaSession - Added missing timeout setting for internally used UA service calls - Added reset of passed in subscription pointer in deleteSubscription to indicate to the caller that the subscription was deleted - Fixed clean up of subscriptions if a client does not call deleteSubscription - Added fall back for user identity token handling if no security policy is provided - Added handling of password encryption if URL does not match the endpoints returned by the server or the client did not provide the server certificate - Added checks for Subscription validity before calling subscription callbacks - Fixed decrementing of outstanding publishCount if count is already 0 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module CoreModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ !!! Breaking Change !!!! ------------------------ Before Technical Preview 1.2: ------------------------------- * Session Split class to code that is common and needed in CoreModule and to code that is only needed in UaModule to allow DLL build. This requires to create UaSession instead of Session in your implementation of ServerConfig::createSession. If you use ServerConfigXml you need to update the file from examples/utilities. If you miss this change in your code your server will crash at the first connect of a UA client * HistoryManager (not relese yet) - Interface change for HistoryManager::beginHistoryTransaction to add handling of TimestampsToReturn * UaNode Changed interface of UaNode to use on all methods returning a LocalizedText a Session object as parameter to the function instead of a localId string. UA Clients can specify a list of LocaleIds for a session and it is necessary to be able to access the whole list from the session object. * UaEventData Changed registration and access to Event Fields from hard coded index to dynamically created indexes. This affects all classes derived from UaEventData representing event fields. This change was necessary to allow the return of event fields based on the BrowseName of the event field independent of the event type like required in the OPC UA specification After Technical Preview 1.2: ------------------------------- * EventManager - Change EventManager interface for beginStartMonitoring and beginModifyMonitoring to add missing parameters * MethodHandleUaNode - Moved MethodHandleUaNode implementation to new files methodhandleuanode.cpp / h - Replace public members variables of class with set and get functions to ensure that the reference counters of the UaNodes pointers in the class is handled in the right way * HistoryManagerCallback (not released yet) Added callback function finishHistoryReadModifiedData based on OPC UA HA spec and UA stack change that defined an extended OpcUa_HistoryModifiedData for HistoryRead for modified data. * UaVariable Made value parameter passed to setValue a const parameter since it is only [in] ------------------------ Features ------------------------ * Added support for Alarms & Conditions - Enhanced event handling - Implemented event filtering - Added classes representing the different condition types defined by OPC UA * Added namespace OpcUa containing classes for OPC UA defined Object and Variable types * Added HistoryManagerBase as simplified base class for HistoryManager implementations * ServerManager Added methods for internal read, write, call, data monitoring and event monitoring * ServerConfigData Moved data class for ServerConfig interface implementations from sample code to the CoreModule * ServerConfigSettings Moved implementation for ServerConfig interface based on INI file from sample code to the CoreModule * NodeManagerUaNode - Added methods getNodeManagerUaNode and getNode to NodeManager and NodeManagerUaNode to be able to get a UaNode pointer if the node is managed by the SDK - Added feature to delete a tree of child nodes together with the parent node in deleteUaNode - Added callback interface and functionality to restrict browse results The new interface BrowseUaNodeCallback allows product implementers to hock into the browsing of UaNodes to reject the browsing of a node or to restrict the browse results of a node for example based on the user rights of the user logged into the session. * UaNode - Added writing of any attribute if allowed by the node. - Added events for attribute write handling to the IOManagerUaNode - Added setUserData() to be able to store user specific information (e.g. device address) in a node. - Added modellingRuleId() for modeling rule short cut on nodes - Implemented special shortcut handling of modelling rule in UaReferenceLists::browseReferences * IOManagerUaNode - Added beforeSetAttributeValue() to be able to do a user access validation before write - Added afterSetAttributeValue() to be able to get informed about a value change after write - Addes support for IndexRange handling in Read and data monitoring - Added device monitoring through readVAlues() for a configurable list of different sampling intervals * EventManagerUaNode Added and enhanced class for full event handling support. This class and its helper classes provide all functionality necessar for the event handling including the - implementation of the EventManager for monitored item handling - event sending and filtering - registration of event fields and event types * UaReferenceLists - Added getTargetNodeByBrowseName for simple lookup based on browse name - Added direct access to reference lists * SamplingEngine Made the list of sampling intervals used configurable. The NodeManagerUaNode uses ServerConfig::getAvailableSamplingRates for configuration * Completed types for Server object * NodeManagerBase Added new base node manager class integrating NodeManagerUaNode, IOManagerUaNode and EventManagerUaNode into one class providing Data Access and optional Event support in one NodeManager class ------------------------ Bug Fixes ------------------------ * Session - Fixed error in history continuation point handling. Changed Browse continuation point handling to same algorithm and added checks to make sure the max size is limited to UInt16 values - Enhanced handling of Publish requests in the queue - Clear queue when SecureChannel is closed or a new one is assigned to the session with ActivateSession - Discard Publish requests if they are already timed out * SessionManager - Fixed raise condition when client is closing a session and SessionManager::closeAllUaSessions is called in parallel due to server shutdown - Fixed raise condition when client is closing a session and SessionManager::shutDown is called in parallel due to server shutdown - Fixed deadlock for multiple parallel ActivateSession calls accessing the see - Changed initial SessionId from 1 to getTickCount Get random starting point for session id to avoid that a client with several instances can hijack the session of another instance by accident after restarting the server. * UaVariable -> derived classes Fixed writing of values to a variable with data type BaseDataType to allow any data type for write * NodeManagerUaNode - Fixed deadlock in browse calls in the case of multiple parallel browse calls across several node managers - Fixed potential deadlock in translateBrowsePathToNodeId similar to browse * IOManagerUaNode - Added attribute range check to return right status code for compliance test - Compliance test case passed max Double value but the value was casted internally to Int32. The value was not checked for <0. Added a check to set values<0 to Int32_Max - Added monitoring of attributes other than value. Provides the current value but there is no sampling of attributes implemented - Added check to reject absolute dead band for monitoring of none value attributes - Added checks for invalid attribute, data type and deadband combination for Create- and ModifyMonitoredItems * NodeManagerRoot Enhanced locking of node manager list * HashTable - The ChainEntry class did delete the next chain entry directly and did not use releaseReference - Changed OpcUa_String_StrLen to OpcUa_String_StrSize when calculating data length in ChainEntry::find ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModule ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Features ------------------------ * UaSession - new class - Added this class to seperate UA specific session information from common session information needed in the CoreModule. This was needed for mudule DLL build - Integrated assignment of endpoint information to session during activation of a session. Users of the SDK can now get information about the endpoint used by the client. * UaServer - Added Exchange of discovery server certificate to server store and server certificate to discovery server windows store to enable (optional) automatic security configuration for local discovery server. This feature is configured through ServerConfig::getWindowsDiscoveryRegistrationSecuritySetup() - Added creation of configured RejectedCertificatesDirectory to store rejected certificates * UaSubscriptionManager - Changed beginPublish() to execute the publish for a subscription in late state also through a worker thread from the thread pool to avoid a blocking of the incoming thread for this case - run() - added check for stop flag in worker thread to speed up shut down * UaSubscription - Implemented use of worker thread for sending service responses ------------------------ Bug Fixes ------------------------ * UaTransactionManager - Added register nodes handling for history calls - Added waiting for transaction completion at shut down - Fixed read and write with registered node and other attributes than value - Enhanced error returned for null NodeIds in Read and Write * Added implementation of Republish Implemented Republish and the retransmit queue for notification messages and all related handling * UaSubscription - Deleted remove access to transaction handle manager in UaSubscription::close since transaction objects get always deleted in the finish calls and not where they are started. - Added waiting for transaction completion in UaSubscription destructor since transactions are accessing the Subscription object - Fixed potential raise conditions for access to handle manager for monitored items - Fixed Session reference counter problem if client connection was not interrupted and BeginSendResponse failed for Publish - Fixed RevisedQueueSize in CreateMonitoredItems - Fixed subscription memory leak if SetMonitoringMode does not start a transaction to a IOManager - Fix for constructing Publish response if change flag is set but corresponding monitored items are already deleted. Sending uninitialized Publish response crashed server - Added check of MonitoringMode in UaSubscription::beginDeleteMonitoredItems IOManager::beginStopMonitoring should not be called if MonitoringMode is Disabled since the monitored item is not registered with the IOManager in this case - The Publish handling did not check the monitoring mode. Additional check was added to send data changes only if the monitoring mode is Reporting - Fix for UA Compliance issue if SetMonitoringMode is called with the current setting - Bug fix for sending Publish error response in the case of a started UaSubscription::publish() The publish request is dequeued and passed to UaSubscription::publish(). If an error happens in this function an response must be sent. This was not done in the case where the subscription is invalid. * UaMonitoredItem - Added handling of OpcUa_DataChangeTrigger_StatusValueTimestamp - Added initialization of m_lastDataValue with OpcUa_BadWaitingForInitialData to make sure any initial value, even if it is equal to an initialized UaDataValue gets delivered. * UaSession - Fixed creation of fault response for canceling publish request - Fixed deadlock when a Publish request gets canceled in a session because of a timeout and another thread is using the session to send a response * UaServer - Fixed decryption and extraction of password - Fixed transport profile URI to be identical with specification - Fixed serverSignature.Length assignment in createSession - Added checks for certificate and client nonce if security is active - Changed default localId to "" instead of "en" if no localId is specified by the client - Fix UA Compliance - added check for invalid TimestampsToReturn in CreateMonitoredItems and ModifyMonitoredItems * UaSubscriptionManager - Added security check for calls to subscription checking session The code did not check if the subscription is assigned to the session that is used to make a call to the subscription ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Module UaModels ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------ Added this module ------------------------ * Support for OPC DI (Devices) information model The OPC DI information model was released by the OPC Foundation in November 2009. This SDK version provides full support for this model. * Support for OPC UA IEC 61131-3 information model The OPC UA IEC 61131-3 information model was released by the OPC Foundation in March 2010 as joined specification with PLCopen. This SDK version provides full support for this model. ******************************************************************************** ******************************************************************************** ** ** ** Version 1.0.0.5555 ** ** ** ******************************************************************************** ******************************************************************************** Initial release