C++ Based OPC UA Client/Server SDK
1.5.4.349
|
UaSessionCallback defines the callback interface for the UaSession class. More...
#include <uaclientsdk.h>
Inherited by UaClientSdk::UaDiscoveryPrivate.
Public Member Functions | |
virtual void | connectionStatusChanged (OpcUa_UInt32 clientConnectionId, UaClient::ServerStatus serverStatus)=0 |
Send changed status. More... | |
virtual bool | connectError (OpcUa_UInt32 clientConnectionId, UaClient::ConnectServiceType serviceType, const UaStatus &error, bool clientSideError) |
Callback for reporting errors during connection establishment to the application. More... | |
virtual bool | sslCertificateValidationFailed (OpcUa_UInt32 clientConnectionId, const UaStatusCode &uaStatus, const UaByteString &bsSSLCertificate) |
Callback for verifying the server's SSL certificate. More... | |
virtual void | readComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaDataValues &values, const UaDiagnosticInfos &diagnosticInfos) |
Send read results. More... | |
virtual void | writeComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaStatusCodeArray &results, const UaDiagnosticInfos &diagnosticInfos) |
Send write results. More... | |
virtual void | callComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const CallOut &callResponse) |
Send call result. More... | |
virtual void | addNodesComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaAddNodesResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send addNodes result. More... | |
virtual void | addReferencesComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaStatusCodeArray &results, const UaDiagnosticInfos &diagnosticInfos) |
Send addReferences result. More... | |
virtual void | deleteNodesComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaStatusCodeArray &results, const UaDiagnosticInfos &diagnosticInfos) |
Send deleteNodes result. More... | |
virtual void | deleteReferencesComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaStatusCodeArray &results, const UaDiagnosticInfos &diagnosticInfos) |
Send deleteReferences result. More... | |
virtual void | historyReadRawModifiedComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const HistoryReadDataResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyReadRawModified result. More... | |
virtual void | historyReadProcessedComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const HistoryReadDataResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyReadProcessed result. More... | |
virtual void | historyReadAtTimeComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const HistoryReadDataResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyReadAtTime result. More... | |
virtual void | historyReadEventComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const HistoryReadEventResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyReadEvent result. More... | |
virtual void | historyUpdateDataComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaHistoryUpdateResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyUpdateData result. More... | |
virtual void | historyDeleteRawModifiedComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaHistoryUpdateResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyDeleteRawModified result. More... | |
virtual void | historyDeleteAtTimeComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaHistoryUpdateResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyDeleteAtTime result. More... | |
virtual void | historyUpdateEventsComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaHistoryUpdateResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyUpdateEvents result. More... | |
virtual void | historyDeleteEventsComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaHistoryUpdateResults &results, const UaDiagnosticInfos &diagnosticInfos) |
Send historyDeleteEvents result. More... | |
UaSessionCallback defines the callback interface for the UaSession class.
This callback interface needs to be implemented by the user of the UaSession class to receive connection status change callbacks from the Client SDK. The interface provides also the callback functions for the asynchronous service calls. Only the callbacks for used asynchronous calls need to be implemented by the user of the SDK.
Callbacks from the SDK APIs are coming from worker threads and not from the thread that was used to connect to the server. It is in the responsibility of the user of the client API to synchronize the data provided by the callbacks with a GUI main thread if this is necessary.
After UaSession::disconnect() is called, no more callbacks will be sent for this UaSession object. The disconnect blocks until all outstanding service calls are finished and results are returned. This includes any asynchronous service calls and outstanding callbacks to the client application.
It is not allowed to block the execution of callbacks when UaSession::disconnect() is called. This will lead to a deadlock of the client application.
|
virtual |
Send addNodes result.
This is the callback function for calls to UaSession::beginAddNodes.
[in] | transactionId | Client defined transaction id for the addNodes |
[in] | result | Overall addNodes service result |
[in] | results | List of add nodes operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send addReferences result.
This is the callback function for calls to UaSession::beginAddReferences.
[in] | transactionId | Client defined transaction id for the addReferences |
[in] | result | Overall addReferences service result |
[in] | results | List of add references operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send call result.
This is the callback function for calls to UaSession::beginCall.
[in] | transactionId | Client defined transaction id for the call |
[in] | result | Overall call result |
[in] | callResponse | Output arguments and input argument results. See CallOut for more details |
|
virtual |
Callback for reporting errors during connection establishment to the application.
The callback UaSessionCallback::connectionStatusChanged indicates the overall status of the connection but does not report detailed error information. The connectError callback can be used to get more information about the error scenario. This includes errors during reconnect attempts after a connection interruption.
Most of the errors are returned from the communication stack or the OPC UA server but some of the errors like server certificate validation errors are reported by the client SDK. If clientSideError is true, the error was created inside the Client SDK, these errors can be overridden by returning true. The default implementation always returns false.
[in] | clientConnectionId | Client defined handle of the affected session |
[in] | serviceType | The failing connect step |
[in] | error | Status code for the error situation |
[in] | clientSideError | Flag indicating if the bad status was created in the Client SDK |
|
pure virtual |
Send changed status.
This callback function is called by the SDK whenever the connection status changes. This is typically the case if UaSession::connect() or UaSession::disconnect() are called or if the connection monitoring detects a connection interruption or was able to re-establish the connection.
There is normally no action necessary by the application using the UaSession object other than not calling services if the status is not connected. The only case that may require special actions is the status NewSessionCreated. In these cases the SDK was not able to reuse the old session and created a new session during reconnect. This requires to redo register nodes for the new session or to read the namespace array.
[in] | clientConnectionId | Client defined handle of the affected session |
[in] | serverStatus | New connection status. See UaClient::ServerStatus for more details. |
|
virtual |
Send deleteNodes result.
This is the callback function for calls to UaSession::beginDeleteNodes.
[in] | transactionId | Client defined transaction id for the deleteNodes |
[in] | result | Overall deleteNodes service result |
[in] | results | List of delete nodes operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send deleteReferences result.
This is the callback function for calls to UaSession::beginDeleteReferences.
[in] | transactionId | Client defined transaction id for the deleteReferences |
[in] | result | Overall deleteReferences service result |
[in] | results | List of delete references operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyDeleteAtTime result.
This is the callback function for calls to UaSession::beginHistoryDeleteAtTime.
[in] | transactionId | Client defined transaction id for the historyDeleteAtTime |
[in] | result | Overall historyDeleteAtTime service result |
[in] | results | The list of delete operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyDeleteEvents result.
This is the callback function for calls to UaSession::beginHistoryDeleteEvents.
[in] | transactionId | Client defined transaction id for the historyDeleteEvents |
[in] | result | Overall historyDeleteEvents service result |
[in] | results | The list of delete operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyDeleteRawModified result.
This is the callback function for calls to UaSession::beginHistoryDeleteRawModified.
[in] | transactionId | Client defined transaction id for the historyDeleteRawModified |
[in] | result | Overall historyDeleteRawModified service result |
[in] | results | The list of delete operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyReadAtTime result.
This is the callback function for calls to UaSession::beginHistoryReadAtTime.
[in] | transactionId | Client defined transaction id for the historyReadAtTime |
[in] | result | Overall historyReadAtTime service result |
[in] | results | Result data for the requested nodes and timestamps |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyReadEvent result.
This is the callback function for calls to UaSession::beginHistoryReadEvent.
[in] | transactionId | Client defined transaction id for the historyReadEvent |
[in] | result | Overall historyReadEvent service result |
[in] | results | The event history for each notifier |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyReadProcessed result.
This is the callback function for calls to UaSession::beginHistoryReadProcessed.
[in] | transactionId | Client defined transaction id for the historyReadProcessed |
[in] | result | Overall historyReadProcessed service result |
[in] | results | Result data for the requested nodes, time domain and aggregates. A continuation point is included for a node if not all results could be returned or processed before the timeout expired. |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyReadRawModified result.
This is the callback function for calls to UaSession::beginHistoryReadRawModified.
[in] | transactionId | Client defined transaction id for the historyReadRawModified |
[in] | result | Overall historyReadRawModified service result |
[in] | results | Result data for the requested nodes and time interval. A continuation point is included for a node if not all results could be returned. |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyUpdateData result.
This is the callback function for calls to UaSession::beginHistoryUpdateData.
[in] | transactionId | Client defined transaction id for the historyUpdateData |
[in] | result | Overall historyUpdateData service result |
[in] | results | The list of update operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send historyUpdateEvents result.
This is the callback function for calls to UaSession::beginHistoryUpdateEvents.
[in] | transactionId | Client defined transaction id for the historyUpdateEvents |
[in] | result | Overall historyUpdateEvents service result |
[in] | results | The list of update operation results |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Send read results.
This is the callback function for calls to UaSession::beginRead.
[in] | transactionId | Client defined transaction id for the read |
[in] | result | Overall read service result |
[in] | values | List of read operation results contained in OpcUa_DataValue structures |
[in] | diagnosticInfos | List of diagnostic information |
|
virtual |
Callback for verifying the server's SSL certificate.
The application must return true if the certificate is trusted. The application must return false if the certificate is not trusted.
[in] | clientConnectionId | Client defined handle of the affected session |
[in] | uaStatus | Status code for the error situation |
[in] | bsSSLCertificate | The SSL certificate that failed verification |
|
virtual |
Send write results.
This is the callback function for calls to UaSession::beginWrite.
[in] | transactionId | Client defined transaction id for the write |
[in] | result | Overall write service result |
[in] | results | List of write operation results |
[in] | diagnosticInfos | List of diagnostic information |