C++ Based OPC UA Client/Server SDK
1.5.5.355
|
The UaSession class manges a UA Client side application session. More...
#include <uasession.h>
Inherits UaDataTypeDictionary, and UaClientSdk::CertificateValidationCallback.
Public Member Functions | |
UaSession () | |
Creates a new UaSession client object. | |
UaSession (UaSession *pSession) | |
Creates a UaSession client object with a reference the connection from the other UaSession. More... | |
virtual | ~UaSession () |
Destroys the UaSession object. | |
UaStatus | connect (const UaString &sURL, SessionConnectInfo &sessionConnectInfo, SessionSecurityInfo &sessionSecurityInfo, UaSessionCallback *pSessionCallback) |
Establish a connection to the OPC UA server. More... | |
UaStatus | disconnect (ServiceSettings &serviceSettings, OpcUa_Boolean bDeleteSubscriptions) |
Disconnect client application from OPC UA server. More... | |
UaStatus | changeUser (ServiceSettings &serviceSettings, UaUserIdentityToken *pUserIdentityToken) |
Change user for the connection to the OPC UA server. More... | |
UaStatus | browse (ServiceSettings &serviceSettings, const UaNodeId &nodeToBrowse, const BrowseContext &browseContext, UaByteString &continuationPoint, UaReferenceDescriptions &referenceDescriptions) |
Browse OPC UA server Address Space with a single starting Node. More... | |
UaStatus | browseNext (ServiceSettings &serviceSettings, OpcUa_Boolean releaseContinuationPoint, UaByteString &continuationPoint, UaReferenceDescriptions &referenceDescriptions) |
Continue a previous Browse request. More... | |
UaStatus | browseList (ServiceSettings &serviceSettings, const OpcUa_ViewDescription &viewDescription, OpcUa_UInt32 maxReferencesToReturn, const UaBrowseDescriptions &browseDescription, UaBrowseResults &browseResults, UaDiagnosticInfos &diagnosticInfos) |
Browse OPC UA server Address Space with a list of starting Nodes. More... | |
UaStatus | browseListNext (ServiceSettings &serviceSettings, OpcUa_Boolean releaseContinuationPoint, const UaByteStringArray &continuationPoints, UaBrowseResults &browseResults, UaDiagnosticInfos &diagnosticInfos) |
Continue a previous browseList request. More... | |
UaStatus | translateBrowsePathsToNodeIds (ServiceSettings &serviceSettings, const UaBrowsePaths &browsePaths, UaBrowsePathResults &browsePathResults, UaDiagnosticInfos &diagnosticInfos) |
Translate a browse path to a NodeId. More... | |
UaStatus | registerNodes (ServiceSettings &serviceSettings, const UaNodeIdArray &nodesToRegister, UaNodeIdArray ®isteredNodesIds) |
Register nodes to create shortcuts in the server. More... | |
UaStatus | unregisterNodes (ServiceSettings &serviceSettings, const UaNodeIdArray ®isteredNodesIds) |
Unregister nodes to delete shortcuts in the server. More... | |
UaStatus | read (ServiceSettings &serviceSettings, OpcUa_Double maxAge, OpcUa_TimestampsToReturn timeStamps, const UaReadValueIds &nodesToRead, UaDataValues &values, UaDiagnosticInfos &diagnosticInfos) |
Reads Attribute values synchronously from an OPC UA server. More... | |
UaStatus | beginRead (ServiceSettings &serviceSettings, OpcUa_Double maxAge, OpcUa_TimestampsToReturn timeStamps, const UaReadValueIds &nodesToRead, OpcUa_UInt32 transactionId) |
Reads attribute values asynchronously from an OPC UA server. More... | |
UaStatus | write (ServiceSettings &serviceSettings, const UaWriteValues &nodesToWrite, UaStatusCodeArray &results, UaDiagnosticInfos &diagnosticInfos) |
Writes variable values synchronously to an OPC UA server. More... | |
UaStatus | beginWrite (ServiceSettings &serviceSettings, const UaWriteValues &nodesToWrite, OpcUa_UInt32 transactionId) |
Writes variable values asynchronously to an OPC UA server. More... | |
UaStatus | createSubscription (ServiceSettings &serviceSettings, UaSubscriptionCallback *pUaSubscriptionCallback, OpcUa_UInt32 clientSubscriptionHandle, SubscriptionSettings &subscriptionSettings, OpcUa_Boolean publishingEnabled, UaSubscription **ppUaSubscription) |
Creates a subscription. More... | |
UaStatus | deleteSubscription (ServiceSettings &serviceSettings, UaSubscription **ppUaSubscription, OpcUa_UInt32 waitTimeForTransactionCompletion=100) |
Deletes a subscription. More... | |
UaStatus | transferSubscription (ServiceSettings &serviceSettings, UaSubscriptionCallback *pUaSubscriptionCallback, OpcUa_UInt32 clientSubscriptionHandle, OpcUa_UInt32 subscriptionId, SubscriptionSettings &subscriptionSettings, OpcUa_Boolean publishingEnabled, OpcUa_Boolean sendInitialValues, UaSubscription **ppUaSubscription, UaUInt32Array &availableSequenceNumbers) |
Transfers a subscription from another client to this session. More... | |
UaStatus | call (ServiceSettings &serviceSettings, const CallIn &callRequest, CallOut &results) |
Calls a method of an Object on the OPC UA server. More... | |
UaStatus | beginCall (ServiceSettings &serviceSettings, const CallIn &callRequest, OpcUa_UInt32 transactionId) |
Calls a method of an Object on the OPC UA server. More... | |
UaStatus | callList (ServiceSettings &serviceSettings, const UaCallMethodRequests &callMethodRequests, UaCallMethodResults &callMethodResults, UaDiagnosticInfos &diagnosticInfos) |
Calls a list of methods of Objects on the OPC UA server. More... | |
UaStatus | historyReadRawModified (ServiceSettings &serviceSettings, const HistoryReadRawModifiedContext &historyReadRawModifiedContext, const UaHistoryReadValueIds &nodesToRead, HistoryReadDataResults &results, UaDiagnosticInfos &diagnosticInfos) |
Reads the history of variable values synchronously from an OPC UA server. More... | |
UaStatus | historyReadProcessed (ServiceSettings &serviceSettings, const HistoryReadProcessedContext &historyReadProcessedContext, const UaHistoryReadValueIds &nodesToRead, HistoryReadDataResults &results, UaDiagnosticInfos &diagnosticInfos) |
Reads the processed history of variable values synchronously from the OPC UA server based on a passed aggregate. More... | |
UaStatus | historyReadAtTime (ServiceSettings &serviceSettings, const HistoryReadAtTimeContext &historyReadAtTimeContext, const UaHistoryReadValueIds &nodesToRead, HistoryReadDataResults &results, UaDiagnosticInfos &diagnosticInfos) |
Reads the history of item values synchronously from an OPC UA server for the given timestamps. More... | |
UaStatus | historyReadEvent (ServiceSettings &serviceSettings, const HistoryReadEventContext &historyReadEventContext, const UaHistoryReadValueIds &nodesToRead, HistoryReadEventResults &results, UaDiagnosticInfos &diagnosticInfos) |
Reads the event history for a list of event notifier objects synchronously from an OPC UA server. More... | |
UaStatus | historyUpdateData (ServiceSettings &serviceSettings, const UpdateDataDetails &updateDataDetails, UaHistoryUpdateResults &results, UaDiagnosticInfos &diagnosticInfos) |
Updates the history of variable values synchronously on an OPC UA server. More... | |
UaStatus | historyDeleteRawModified (ServiceSettings &serviceSettings, const DeleteRawModifiedDetails &deleteDetails, UaHistoryUpdateResults &results, UaDiagnosticInfos &diagnosticInfos) |
Deletes the history of item values synchronously on an OPC UA server. More... | |
UaStatus | historyDeleteAtTime (ServiceSettings &serviceSettings, const DeleteAtTimeDetails &deleteDetails, UaHistoryUpdateResults &results, UaDiagnosticInfos &diagnosticInfos) |
Deletes the history of item values synchronously on an OPC UA server for the given timestamps. More... | |
UaStatus | historyUpdateEvents (ServiceSettings &serviceSettings, const UpdateEventDetails &updateEventDetails, UaHistoryUpdateResults &results, UaDiagnosticInfos &diagnosticInfos) |
Updates the history of events synchronously on an OPC UA server. More... | |
UaStatus | historyDeleteEvents (ServiceSettings &serviceSettings, const DeleteEventDetails &deleteDetails, UaHistoryUpdateResults &results, UaDiagnosticInfos &diagnosticInfos) |
Deletes the history of events synchronously on an OPC UA server for the given EventIds. More... | |
UaStatus | beginHistoryReadRawModified (ServiceSettings &serviceSettings, const HistoryReadRawModifiedContext &historyReadRawModifiedContext, const UaHistoryReadValueIds &nodesToRead, OpcUa_UInt32 transactionId) |
Reads the history of item values asynchronously from an OPC UA server. More... | |
UaStatus | beginHistoryReadProcessed (ServiceSettings &serviceSettings, const HistoryReadProcessedContext &historyReadProcessedContext, const UaHistoryReadValueIds &nodesToRead, OpcUa_UInt32 transactionId) |
Reads the processed history of item values asynchronously from the OPC UA server based on a passed aggregate. More... | |
UaStatus | beginHistoryReadAtTime (ServiceSettings &serviceSettings, const HistoryReadAtTimeContext &historyReadAtTimeContext, const UaHistoryReadValueIds &nodesToRead, OpcUa_UInt32 transactionId) |
Reads the history of item values asynchronously from an OPC UA server for the given timestamps. More... | |
UaStatus | beginHistoryReadEvent (ServiceSettings &serviceSettings, const HistoryReadEventContext &historyReadEventContext, const UaHistoryReadValueIds &nodesToRead, OpcUa_UInt32 transactionId) |
Reads the history of events from an event notifier object asynchronously from an OPC UA server. More... | |
UaStatus | beginHistoryUpdateData (ServiceSettings &serviceSettings, const UpdateDataDetails &updateDataDetails, OpcUa_UInt32 transactionId) |
Updates the history of item values asynchronously on an OPC UA server. More... | |
UaStatus | beginHistoryDeleteRawModified (ServiceSettings &serviceSettings, const DeleteRawModifiedDetails &deleteDetails, OpcUa_UInt32 transactionId) |
Deletes the history of item values asynchronously on an OPC UA server. More... | |
UaStatus | beginHistoryDeleteAtTime (ServiceSettings &serviceSettings, const DeleteAtTimeDetails &deleteDetails, OpcUa_UInt32 transactionId) |
Deletes the history of item values asynchronous on an OPC UA server for the given timestamps. More... | |
UaStatus | beginHistoryUpdateEvents (ServiceSettings &serviceSettings, const UpdateEventDetails &updateEventDetails, OpcUa_UInt32 transactionId) |
Updates the history of events asynchronously on an OPC UA server. More... | |
UaStatus | beginHistoryDeleteEvents (ServiceSettings &serviceSettings, const DeleteEventDetails &deleteDetails, OpcUa_UInt32 transactionId) |
Deletes the history of events asynchronously on an OPC UA server for the given event Ids. More... | |
UaStatus | addNodes (ServiceSettings &serviceSettings, const UaAddNodesItems &nodesToAdd, UaAddNodesResults &results, UaDiagnosticInfos &diagnosticInfos) |
Adds a list of nodes to the OPC UA server address space. More... | |
UaStatus | addReferences (ServiceSettings &serviceSettings, const UaAddReferencesItems &referencesToAdd, UaStatusCodeArray &results, UaDiagnosticInfos &diagnosticInfos) |
Adds a list of references to the OPC UA server address space. More... | |
UaStatus | deleteNodes (ServiceSettings &serviceSettings, const UaDeleteNodesItems &nodesToDelete, UaStatusCodeArray &results, UaDiagnosticInfos &diagnosticInfos) |
Removes a list of nodes from the OPC UA server address space. More... | |
UaStatus | deleteReferences (ServiceSettings &serviceSettings, const UaDeleteReferencesItems &referencesToDelete, UaStatusCodeArray &results, UaDiagnosticInfos &diagnosticInfos) |
Removes a list of references from the OPC UA server address space. More... | |
UaStatus | beginAddNodes (ServiceSettings &serviceSettings, const UaAddNodesItems &nodesToAdd, OpcUa_UInt32 transactionId) |
Adds a list of nodes asynchronously to the OPC UA server address space. More... | |
UaStatus | beginAddReferences (ServiceSettings &serviceSettings, const UaAddReferencesItems &referencesToAdd, OpcUa_UInt32 transactionId) |
Adds a list of references asynchronously to the OPC UA server address space. More... | |
UaStatus | beginDeleteNodes (ServiceSettings &serviceSettings, const UaDeleteNodesItems &nodesToDelete, OpcUa_UInt32 transactionId) |
Removes a list of nodes asynchronously from the OPC UA server address space. More... | |
UaStatus | beginDeleteReferences (ServiceSettings &serviceSettings, const UaDeleteReferencesItems &referencesToDelete, OpcUa_UInt32 transactionId) |
Removes a list of references asynchronously from the OPC UA server address space. More... | |
UaStatus | queryFirst (ServiceSettings &serviceSettings, const OpcUa_ViewDescription &view, const UaNodeTypeDescriptions &nodeTypes, const UaContentFilter &filter, OpcUa_UInt32 maxDataSetsToReturn, OpcUa_UInt32 maxReferencesToReturn, UaByteString &continuationPoint, UaQueryDataSets &queryDataSets, UaDiagnosticInfos &diagnosticInfos, UaParsingResults &parsingResults) |
Query the OPC UA server address space. More... | |
UaStatus | queryNext (ServiceSettings &serviceSettings, OpcUa_Boolean releaseContinuationPoint, UaByteString &continuationPoint, UaQueryDataSets &queryDataSets) |
Continues a previous query request. More... | |
UaStatus | cancel (ServiceSettings &serviceSettings, OpcUa_UInt32 requestHandle, OpcUa_UInt32 &cancelCount) |
Cancel outstanding service requests in the OPC UA server. More... | |
OpcUa_Boolean | isConnected () const |
Flag that indicates if the UaSession is connected. More... | |
UaClient::ServerStatus | serverStatus () const |
Provides the actual connection status to the OPC UA server. More... | |
OpcUa_ServerState | serverState () const |
Provides the current server state of the OPC UA server. More... | |
UaString | currentlyUsedEndpointUrl () const |
Provides the currently used URL for the connection to the OPC UA server. More... | |
UaNodeId | sessionId () const |
Provides the sessionId for this connection to the UA server. More... | |
UaByteString | serverCertificate () const |
Provides the certificate of the UA server. More... | |
UaStatus | getMethodArguments (ServiceSettings &serviceSettings, const UaNodeId &methodId, UaArguments &inputArguments, UaArguments &outputArguments) |
Get a description for the input arguments and output arguments of a method. More... | |
OpcUa_UInt32 | connectTimeout () const |
Gets the connect timeout used for connecting to the OPC UA server. | |
void | setConnectTimeout (OpcUa_UInt32 connectTimeout) |
Sets the connect timeout used for connecting to the OPC UA server. | |
OpcUa_UInt32 | maxOperationsPerServiceCall () const |
Gets the maximum number of operations used for every OPC UA service call. More... | |
void | setMaxOperationsPerServiceCall (OpcUa_UInt32 maxOperationsPerServiceCall) |
Sets the maximum number of operations used for every OPC UA service call. | |
OpcUa_UInt32 | maxNodesPerBrowse () const |
Gets the maximum number of nodes to use in a browse service call. More... | |
OpcUa_UInt32 | maxNodesPerHistoryReadData () const |
Gets the maximum number of nodes to use in a history read service call. More... | |
OpcUa_UInt32 | maxNodesPerHistoryReadEvents () const |
Gets the maximum number of nodes to use in a history read events service call. More... | |
OpcUa_UInt32 | maxNodesPerHistoryUpdateData () const |
Gets the maximum number of nodes to use in a history update service call. More... | |
OpcUa_UInt32 | maxNodesPerHistoryUpdateEvents () const |
Gets the maximum number of nodes to use in a history update events service call. More... | |
OpcUa_UInt32 | maxNodesPerMethodCall () const |
Gets the maximum number of nodes to use in a call service. More... | |
OpcUa_UInt32 | maxNodesPerNodeManagement () const |
Gets the maximum number of nodes to use in a service call of the node management service set. More... | |
OpcUa_UInt32 | maxNodesPerRead () const |
Gets the maximum number of nodes to use in a read service call. More... | |
OpcUa_UInt32 | maxNodesPerRegisterNodes () const |
Gets the maximum number of nodes to use in a registerNodes or unregisterNodes service call. More... | |
OpcUa_UInt32 | maxNodesPerTranslateBrowsePathsToNodeIds () const |
Gets the maximum number of nodes to use in a TranslateBrowsePathsToNodeIds service call. More... | |
OpcUa_UInt32 | maxNodesPerWrite () const |
Gets the maximum number of nodes to use in a write service call. More... | |
OpcUa_UInt32 | watchdogTime () const |
Gets the watchdog time used for connection check and reconnect after connection errors. | |
void | setWatchdogTime (OpcUa_UInt32 watchdogTime) |
Sets the watchdog time used for connection check and reconnect after connection errors. | |
OpcUa_UInt32 | watchdogTimeout () const |
Gets the watchdog service call timeout used for watchdog read calls. | |
void | setWatchdogTimeout (OpcUa_UInt32 watchdogTimeout) |
Sets the watchdog service call timeout used for watchdog read calls. | |
OpcUa_UInt32 | revisedSecureChannelLifetime () const |
Gets the secure channel lifetime returned by the server as revised setting. | |
OpcUa_Double | revisedSessionTimeout () const |
Gets the session timeout returned by the server as revised setting. | |
UaStringArray | getNamespaceTable () const |
Gets the server NamespaceArray property value. More... | |
void | updateNamespaceTable () |
Updates the NamespaceArray from the server property value. | |
virtual UaDataTypeDictionary::DefinitionType | definitionType (const UaNodeId &dataTypeId) |
Gets the type (enumeration or structure) of data type for the passed data type NodeId. | |
virtual UaEnumDefinition | enumDefinition (const UaNodeId &dataTypeId) |
Gets the enumeration data type description for the passed data type NodeId. | |
virtual UaStructureDefinition | structureDefinition (const UaNodeId &dataTypeId) |
Gets the structured data type description for the passed data type NodeId. | |
virtual UaOptionSetDefinition | optionSetDefinition (const UaNodeId &dataTypeId) |
Gets the OptionSet data type description for the passed data type NodeId. | |
void | loadDataTypeDictionaries () |
Reads the binary DataTypeDictionaries, parses their content and browses the address space to find the corresponding DataTypeIds and Encoding Ids. More... | |
void | clearDataTypeDictionaries () |
Clears the DataType dictionaries. More... | |
OpcUa_UInt32 | maxArrayLength () const |
Returns the maximum array length that can be used for the communication with the server. More... | |
OpcUa_UInt16 | maxBrowseContinuationPoints () const |
Returns the maximum number of browse ContinuationPoints that are available. More... | |
OpcUa_UInt32 | maxByteStringLength () const |
Returns the maximum ByteString length that can be used for the communication with the server. More... | |
OpcUa_UInt16 | maxHistoryContinuationPoints () const |
Returns the maximum number of ContinuationPoints that are available for history operations. More... | |
OpcUa_UInt16 | maxQueryContinuationPoints () const |
Returns the maximum number of ContinuationPoints that are available for the query service. More... | |
OpcUa_UInt32 | maxStringLength () const |
Returns the maximum String length that can be used for the communication with the server. More... | |
OpcUa_Double | minSupportedSampleRate () const |
Returns the fastest sample rate the server supports, including 0. More... | |
Public Member Functions inherited from UaDataTypeDictionary | |
DefinitionType | definitionType (const UaVariant &vValue) |
Returns the UaDataTypeDictionary::DefinitionType of a variant. More... | |
DefinitionType | definitionType (const UaExtensionObject &vValue) |
Returns the UaDataTypeDictionary::DefinitionType of an ExtensionObject. More... | |
UaStructureDefinition | structureDefinition (const UaVariant &vValue) |
Returns the UaStructureDefinition of a variant. More... | |
UaStructureDefinition | structureDefinition (const UaExtensionObject &vValue) |
Returns the UaStructureDefinition of an ExtensionObject. More... | |
Static Public Member Functions | |
static char * | getHostFromUrl (const OpcUa_String *pURL, bool expandIPv6) |
Extract and return the IP address or hostname from an URL. More... | |
Protected Member Functions | |
virtual bool | verificationError (SessionSecurityInfo *pInfo, OpcUa_Void *pvVerifyContext, const UaByteString &certificateChain, OpcUa_StatusCode uVerificationResult, OpcUa_UInt32 uDepth) |
Callback method to inform about errors during certificate validation. More... | |
Additional Inherited Members | |
Public Types inherited from UaDataTypeDictionary | |
enum | DefinitionType |
Enumeration that indicates whether a UaEnumDefinition or a UaStructureDefinition is available. | |
The UaSession class manges a UA Client side application session.
This is the main class for connecting with any OPC UA Server. The class manages the connection to an OPC Unified Architecture server and the application session established with the server. The class provides all non Subscription related UA Services as synchronous and asynchronous methods.
The connect call establishes and maintains a Session with a Server. After a successful connect, the connection is monitored by the SDK. Connection status changes are reported through the callback UaSessionCallback::connectionStatusChanged.
A UaSession object is thread-safe.
UaSession::UaSession | ( | UaSession * | pOther | ) |
UaStatus UaSession::addNodes | ( | ServiceSettings & | serviceSettings, |
const UaAddNodesItems & | nodesToAdd, | ||
UaAddNodesResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Adds a list of nodes to the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToAdd | List of nodes to add to the server. |
[out] | results | List of the add node results. |
[out] | diagnosticInfos | List of the add node diagnostic information. |
UaStatus UaSession::addReferences | ( | ServiceSettings & | serviceSettings, |
const UaAddReferencesItems & | referencesToAdd, | ||
UaStatusCodeArray & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Adds a list of references to the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | referencesToAdd | The list of references to add to the server. |
[out] | results | List of the add reference results. |
[out] | diagnosticInfos | List of the add reference diagnostic information. |
UaStatus UaSession::beginAddNodes | ( | ServiceSettings & | serviceSettings, |
const UaAddNodesItems & | nodesToAdd, | ||
OpcUa_UInt32 | transactionId | ||
) |
Adds a list of nodes asynchronously to the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToAdd | List of nodes to add to the server. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginAddReferences | ( | ServiceSettings & | serviceSettings, |
const UaAddReferencesItems & | referencesToAdd, | ||
OpcUa_UInt32 | transactionId | ||
) |
Adds a list of references asynchronously to the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | referencesToAdd | List of references to add to the server. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginCall | ( | ServiceSettings & | serviceSettings, |
const CallIn & | callRequest, | ||
OpcUa_UInt32 | transactionId | ||
) |
Calls a method of an Object on the OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | callRequest | Object and Method to call and input arguments. See CallIn for more details. |
[out] | transactionId | Output arguments and input argument results. See CallOut for more details. |
UaStatus UaSession::beginDeleteNodes | ( | ServiceSettings & | serviceSettings, |
const UaDeleteNodesItems & | nodesToDelete, | ||
OpcUa_UInt32 | transactionId | ||
) |
Removes a list of nodes asynchronously from the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToDelete | List of nodes to delete from the server address space. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginDeleteReferences | ( | ServiceSettings & | serviceSettings, |
const UaDeleteReferencesItems & | referencesToDelete, | ||
OpcUa_UInt32 | transactionId | ||
) |
Removes a list of references asynchronously from the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | referencesToDelete | List of references to delete from the server address space. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginHistoryDeleteAtTime | ( | ServiceSettings & | serviceSettings, |
const DeleteAtTimeDetails & | deleteDetails, | ||
OpcUa_UInt32 | transactionId | ||
) |
Deletes the history of item values asynchronous on an OPC UA server for the given timestamps.
See historyDeleteAtTime for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | deleteDetails | The list of nodes to delete data from at a given time. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginHistoryDeleteEvents | ( | ServiceSettings & | serviceSettings, |
const DeleteEventDetails & | deleteDetails, | ||
OpcUa_UInt32 | transactionId | ||
) |
Deletes the history of events asynchronously on an OPC UA server for the given event Ids.
See historyDeleteEvents for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | deleteDetails | The list of nodes to delete events from with the given EventIds. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginHistoryDeleteRawModified | ( | ServiceSettings & | serviceSettings, |
const DeleteRawModifiedDetails & | deleteDetails, | ||
OpcUa_UInt32 | transactionId | ||
) |
Deletes the history of item values asynchronously on an OPC UA server.
See historyDeleteRawModified for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | deleteDetails | The list of nodes to delete data from in a given time range. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginHistoryReadAtTime | ( | ServiceSettings & | serviceSettings, |
const HistoryReadAtTimeContext & | historyReadAtTimeContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
OpcUa_UInt32 | transactionId | ||
) |
Reads the history of item values asynchronously from an OPC UA server for the given timestamps.
See historyReadAtTime for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | historyReadAtTimeContext | Configuration parameters for the history read data at time. Configuration parameters include
See HistoryReadAtTimeContext for more details. |
[in] | nodesToRead | List of variable nodes to read data values at specified timestamps from. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction |
UaStatus UaSession::beginHistoryReadEvent | ( | ServiceSettings & | serviceSettings, |
const HistoryReadEventContext & | historyReadEventContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
OpcUa_UInt32 | transactionId | ||
) |
Reads the history of events from an event notifier object asynchronously from an OPC UA server.
See historyReadEvent for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | historyReadEventContext | Configuration parameters for the history read of events. Configuration parameters include
See HistoryReadEventContext for more details. |
[in] | nodesToRead | List of event notifier object nodes to read event history from |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction |
UaStatus UaSession::beginHistoryReadProcessed | ( | ServiceSettings & | serviceSettings, |
const HistoryReadProcessedContext & | historyReadProcessedContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
OpcUa_UInt32 | transactionId | ||
) |
Reads the processed history of item values asynchronously from the OPC UA server based on a passed aggregate.
See historyReadProcessed for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | historyReadProcessedContext | Configuration parameters for the history read processed data. Configuration parameters include
See HistoryReadProcessedContext for more details. |
[out] | nodesToRead | List of variable nodes to read processed data history from. Includes a continuation point to continue previous read requests. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction |
UaStatus UaSession::beginHistoryReadRawModified | ( | ServiceSettings & | serviceSettings, |
const HistoryReadRawModifiedContext & | historyReadRawModifiedContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
OpcUa_UInt32 | transactionId | ||
) |
Reads the history of item values asynchronously from an OPC UA server.
See historyReadRawModified for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | historyReadRawModifiedContext | Configuration parameters for the history read of raw or modified data. Configuration parameters include
See HistoryReadRawModifiedContext for more details. |
[in] | nodesToRead | List of variable nodes to read data history from. It includes a continuation point per node to continue previous read requests. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginHistoryUpdateData | ( | ServiceSettings & | serviceSettings, |
const UpdateDataDetails & | updateDataDetails, | ||
OpcUa_UInt32 | transactionId | ||
) |
Updates the history of item values asynchronously on an OPC UA server.
See historyUpdateData for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | updateDataDetails | The list of variable nodes to update including the data provided for the update. See UpdateDataDetail for more details. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction |
UaStatus UaSession::beginHistoryUpdateEvents | ( | ServiceSettings & | serviceSettings, |
const UpdateEventDetails & | updateEventDetails, | ||
OpcUa_UInt32 | transactionId | ||
) |
Updates the history of events asynchronously on an OPC UA server.
See historyUpdateEvents for more details.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | updateEventDetails | The list of nodes to update including the events provided for the update. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginRead | ( | ServiceSettings & | serviceSettings, |
OpcUa_Double | maxAge, | ||
OpcUa_TimestampsToReturn | timeStamps, | ||
const UaReadValueIds & | nodesToRead, | ||
OpcUa_UInt32 | transactionId | ||
) |
Reads attribute values asynchronously from an OPC UA server.
See read for more details. The values and operation level results are returned in readComplete.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | maxAge | Maximum age of the values to return. See read for more details. |
[in] | timeStamps | Type of timestamps to return. See read for more details. |
[in] | nodesToRead | List of Nodes and Attributes to read. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::beginWrite | ( | ServiceSettings & | serviceSettings, |
const UaWriteValues & | nodesToWrite, | ||
OpcUa_UInt32 | transactionId | ||
) |
Writes variable values asynchronously to an OPC UA server.
See write for more details. The operation level results are returned in writeComplete.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToWrite | List of Nodes, Attributes and the values to write. |
[in] | transactionId | Transaction ID for the asynchronous call used to assign the callback to the transaction. |
UaStatus UaSession::browse | ( | ServiceSettings & | serviceSettings, |
const UaNodeId & | nodeToBrowse, | ||
const BrowseContext & | browseContext, | ||
UaByteString & | continuationPoint, | ||
UaReferenceDescriptions & | referenceDescriptions | ||
) |
Browse OPC UA server Address Space with a single starting Node.
The Browse Service is used by a client to navigate through the address space by passing a starting Node and browse filters. The server returns the list of referenced nodes matching the filter criteria.
The Browse Service takes a list of starting Nodes and returns a list of connected Nodes for each starting Node. Nevertheless, most clients will only pass one starting Node for the main purpose of building a tree hierarchy. Since the OPC UA Address Space can be a full-meshed network and is not limited to a pure hierarchy, the capability to pass in a list of starting Nodes is mainly used to browse metadata like the Properties of a list of Variables. The client SDK provides different browse methods, one for a single starting Node and one for a list of starting Nodes.
This simplified browse method is used for a single starting Node.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodeToBrowse | NodeId of the starting Node. |
[in] | browseContext | Filter settings for the Browse call. See BrowseContext for more details. |
[out] | continuationPoint | A continuation point is returned when the server was not able to deliver all results in the Browse response. The limitation can be set by the client in the request or by the server during Browse processing. The continuation point can be passed to browseNext to get the remaining results. |
[out] | referenceDescriptions | List of references and target Node information for the Nodes passing the filter criteria set in the request. |
UaStatus UaSession::browseList | ( | ServiceSettings & | serviceSettings, |
const OpcUa_ViewDescription & | viewDescription, | ||
OpcUa_UInt32 | maxReferencesToReturn, | ||
const UaBrowseDescriptions & | browseDescription, | ||
UaBrowseResults & | browseResults, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Browse OPC UA server Address Space with a list of starting Nodes.
The Browse Service is used by a client to navigate through the Address Space by passing starting Nodes and browse filters. The server returns the list of referenced Nodes matching the filter criteria.
The Browse Service takes a list of starting Nodes and returns a list of connected Nodes for each starting Node. Nevertheless, most clients will only pass one starting Node for the main purpose of building a tree hierarchy. Since the OPC UA Address Space can be a full-meshed network and is not limited to a pure hierarchy, the capability to pass in a list of starting Nodes is mainly used to browse metadata like the Properties of a list of Variables. The client SDK provides different browse methods, one for a single starting Node and one for a list of starting Nodes.
This browse method is used for a a list of starting Nodes.
UaStatus UaSession::browseListNext | ( | ServiceSettings & | serviceSettings, |
OpcUa_Boolean | releaseContinuationPoint, | ||
const UaByteStringArray & | continuationPoints, | ||
UaBrowseResults & | browseResults, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Continue a previous browseList request.
This method is only used to continue a browse started with the browseList method if not all results could be returned by the browseList or a following browseListNext call. The number of Nodes to return can be limited by the client in the browse request or by the Server during processing the Browse Service call.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | releaseContinuationPoint | A flag that indicates whether the method is called only for releasing the memory associated with the continuation point in the server or the next set of results should be returned. Clients should always call this Service even if they do not want to continue browsing. In this case this flag is set to true. |
[in] | continuationPoints | Continuation points returned from a previous browseList or browseListNext call. Continuation points are returned in browseResult when the server was not able to deliver all results in the BrowseNext response. The limitation can be set by the client in the Browse or by the server during BrowseNext processing. The continuation point can be passed to browseNext to get the remaining results. |
[out] | browseResults | List of Browse results containing references and target Node information for the Nodes passing the filter criteria set in the first Browse call. |
[out] | diagnosticInfos | List of diagnostic information |
UaStatus UaSession::browseNext | ( | ServiceSettings & | serviceSettings, |
OpcUa_Boolean | releaseContinuationPoint, | ||
UaByteString & | continuationPoint, | ||
UaReferenceDescriptions & | referenceDescriptions | ||
) |
Continue a previous Browse request.
This method is only used to continue a Browse started with the browse method if not all results could be returned by the browse or a following browseNext call. The number of Nodes to return can be limited by the client in the Browse request or by the Server during processing the Browse Service call.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | releaseContinuationPoint | A flag that indicates whether the method is called only for releasing the memory associated with the continuation point in the server or the next set of results should be returned. Clients should always call this Service even if they do not want to continue browsing. In this case, this flag is set to true. |
[in,out] | continuationPoint | Continuation points returned from a previous browse or browseNext call. A continuation point is returned when the server was not able to deliver all results in the BrowseNext response. The limitation can be set by the client in the browse or by the server during BrowseNext processing. The continuation point can be passed to browseNext to get the remaining results. |
[out] | referenceDescriptions | List of references and target Node information for the Nodes passing the filter criteria set in the first browse call. |
UaStatus UaSession::call | ( | ServiceSettings & | serviceSettings, |
const CallIn & | callRequest, | ||
CallOut & | callResponse | ||
) |
Calls a method of an Object on the OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | callRequest | Object and Method to call and input arguments. See CallIn for more details. |
[out] | callResponse | Output arguments and input argument results. See CallOut for more details. |
UaStatus UaSession::callList | ( | ServiceSettings & | serviceSettings, |
const UaCallMethodRequests & | callMethodRequests, | ||
UaCallMethodResults & | callMethodResults, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Calls a list of methods of Objects on the OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | callMethodRequests | List of Objects and Methods to call including input arguments. |
[out] | callMethodResults | List of output arguments and input argument results for each requested method call. |
[out] | diagnosticInfos | List of diagnostic information |
UaStatus UaSession::cancel | ( | ServiceSettings & | serviceSettings, |
OpcUa_UInt32 | requestHandle, | ||
OpcUa_UInt32 & | cancelCount | ||
) |
Cancel outstanding service requests in the OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | requestHandle | Request handle used for the outstanding service requests to cancel. The request handle is either set by the caller in the ServiceSettings or is assigned by the SDK. If assigned by the SDK it can be read from the ServiceSettings in the case of asynchronous calls. |
[out] | cancelCount | Number of canceled service request in the server. |
UaStatus UaSession::changeUser | ( | ServiceSettings & | serviceSettings, |
UaUserIdentityToken * | pUserIdentityToken | ||
) |
Change user for the connection to the OPC UA server.
Calling this function changes the user of the session by calling ActivateSession with the new user identity.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | pUserIdentityToken | The passed object can be an instance of UaUserIdentityTokenAnonymous for the user type Anonymous and UaUserIdentityTokenUserPassword for the user type UserPassword. |
void UaSession::clearDataTypeDictionaries | ( | ) |
Clears the DataType dictionaries.
Call this method if a DataType dictionary has changed—e.g. the NodeVersion property of the dictionary node has changed—and you do not want to load the DataType dictionaries directly.
UaStatus UaSession::connect | ( | const UaString & | sURL, |
SessionConnectInfo & | sessionConnectInfo, | ||
SessionSecurityInfo & | sessionSecurityInfo, | ||
UaSessionCallback * | pSessionCallback | ||
) |
Establish a connection to the OPC UA server.
Calling this function successfully creates a secure channel to the server endpoint and it creates and activates an application session in the server application.
The SDK is managing the connection to the server by
The Security section of the client SDK introduction contains a detailed description on how the certificate store is set up, on how application instance certificates are created and how an secure connection to a server is initiated.
[in] | sURL | The URL identifying an OPC UA Server.
|
[in,out] | sessionConnectInfo | The client defined session connect settings. See SessionConnectInfo for more info. |
[in,out] | sessionSecurityInfo | The client defined session security settings. See SessionSecurityInfo for more info. |
[in] | pSessionCallback | Pointer to callback interface for session object. See UaSessionCallback for more details. |
UaStatus UaSession::createSubscription | ( | ServiceSettings & | serviceSettings, |
UaSubscriptionCallback * | pUaSubscriptionCallback, | ||
OpcUa_UInt32 | clientSubscriptionHandle, | ||
SubscriptionSettings & | subscriptionSettings, | ||
OpcUa_Boolean | publishingEnabled, | ||
UaSubscription ** | ppUaSubscription | ||
) |
Creates a subscription.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | pUaSubscriptionCallback | Callback interface for the subscription used to send data changes, events and subscription status changes to the client application. |
[in] | clientSubscriptionHandle | Client defined handle for the subscription. This handle is used to identify the subscription in the callback methods. It is only necessary for subscription identification if the callback object is used for more than one subscription. |
[in,out] | subscriptionSettings | Requested and revised subscription settings like publish interval and keep alive counter |
[in] | publishingEnabled | Flag indicating whether publishing is enabled or disabled. |
[out] | ppUaSubscription | Client side subscription created by the session object. This object must be passed to deleteSubscription to clean up resources even if the subscription is already deleted in the server. |
UaString UaSession::currentlyUsedEndpointUrl | ( | ) | const |
Provides the currently used URL for the connection to the OPC UA server.
This is normally the URL passed as parameter to UaSession::connect(). But it can also be one of the URLs from SessionConnectInfo::alternativeEndpointUrls if such alternative URLs are provided and the main endpoint is not available.
UaStatus UaSession::deleteNodes | ( | ServiceSettings & | serviceSettings, |
const UaDeleteNodesItems & | nodesToDelete, | ||
UaStatusCodeArray & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Removes a list of nodes from the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToDelete | The list of nodes to delete from the server. Each entry contains the NodeId and a flag if target references should be deleted. |
[out] | results | List of the delete node result status codes. |
[out] | diagnosticInfos | List of the delete node diagnostic information. |
UaStatus UaSession::deleteReferences | ( | ServiceSettings & | serviceSettings, |
const UaDeleteReferencesItems & | referencesToDelete, | ||
UaStatusCodeArray & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Removes a list of references from the OPC UA server address space.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | referencesToDelete | |
[out] | results | |
[out] | diagnosticInfos |
UaStatus UaSession::deleteSubscription | ( | ServiceSettings & | serviceSettings, |
UaSubscription ** | ppUaSubscription, | ||
OpcUa_UInt32 | waitTimeForTransactionCompletion = 100 |
||
) |
Deletes a subscription.
This method allows to delete a subscription from the session. It also clears the Client SDK subscription management and deletes the client side subscription object. This method should also be called if the subscription is already invalid on the server to clear the client side objects.
The deleteSubscription blocks for waitTimeForTransactionCompletion until all outstanding service calls for the UaSubscription object are finished and results are returned. This includes any asynchronous service calls and outstanding callbacks to the client application, including the ones for related UaSubscription objects.
If the method returns OpcUa_GoodCompletesAsynchronously, not all transactions are completed and callbacks for this UaSubscription may arrive until UaSession::disconnect. The deletion of the internal management of the UaSubscription is executed in a worker thread.
If all transactions are completed, no more callbacks will be sent for this UaSubscription object.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in,out] | ppUaSubscription | The subscription object pointer. The inner pointer to the subscription object will be set to NULL when deleted. |
[in] | waitTimeForTransactionCompletion | Wait time for transaction completion in milliseconds. A wait time of 0 is infinite. |
UaStatus UaSession::disconnect | ( | ServiceSettings & | serviceSettings, |
OpcUa_Boolean | bDeleteSubscriptions | ||
) |
Disconnect client application from OPC UA server.
Calling this function closes the session and the secure channel connection to the server. The subscriptions assigned to the session are also deleted if the flag bDeleteSubscriptions is set to OpcUa_True. If subscriptions should be transfered to other sessions, the flag bDeleteSubscriptions must be set to OpcUa_False. The client side subscription objects are deleted regardless of the bDeleteSubscriptions setting.
The disconnect is completed and the status is changed to disconnected even if the CloseSession service fails and the bad status is returned by this function.
After UaSession::disconnect is called, no more callbacks will be sent for this UaSession object and related UaSubscription objects. 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 including the ones for related UaSubscription objects.
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.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | bDeleteSubscriptions | Flag to indicate whether all subscriptions assigned to the session should be deleted. |
|
static |
Extract and return the IP address or hostname from an URL.
IPv6 allows to ommit leading zeroes and complete blocks of zeroes replaced by ::. When the expandIPv6 flag is set then all ommited zeroes are added to obtain a 39 character long string. The caller needs to free the return string.
UaStatus UaSession::getMethodArguments | ( | ServiceSettings & | serviceSettings, |
const UaNodeId & | methodId, | ||
UaArguments & | inputArguments, | ||
UaArguments & | outputArguments | ||
) |
Get a description for the input arguments and output arguments of a method.
The UaArguments contain the Name, DataType, ValueRank, ArrayDimensions and Description for each method argument. Returns Good if reading the InputArguments and OutputArguments succeeds. Otherwise return a specific error code.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | methodId | The NodeId of the Method to request the arguments for |
[out] | inputArguments | The list of InputArguments. |
[out] | outputArguments | The list of OutputArguments. |
UaStringArray UaSession::getNamespaceTable | ( | ) | const |
Gets the server NamespaceArray property value.
The NamespaceArray is read from the server at connect and reconnect. It can be updated on request with the method updateNamespaceTable().
UaStatus UaSession::historyDeleteAtTime | ( | ServiceSettings & | serviceSettings, |
const DeleteAtTimeDetails & | deleteDetails, | ||
UaHistoryUpdateResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Deletes the history of item values synchronously on an OPC UA server for the given timestamps.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | deleteDetails | The list of nodes to delete data from at a given time |
[out] | results | The list of update results |
[out] | diagnosticInfos | The list of diagnostic information for the update results |
UaStatus UaSession::historyDeleteEvents | ( | ServiceSettings & | serviceSettings, |
const DeleteEventDetails & | deleteDetails, | ||
UaHistoryUpdateResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Deletes the history of events synchronously on an OPC UA server for the given EventIds.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | deleteDetails | The list of nodes to delete events from with the given EventIds. |
[out] | results | The list of update results. |
[out] | diagnosticInfos | The list of diagnostic information for the update results. |
UaStatus UaSession::historyDeleteRawModified | ( | ServiceSettings & | serviceSettings, |
const DeleteRawModifiedDetails & | deleteDetails, | ||
UaHistoryUpdateResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Deletes the history of item values synchronously on an OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | deleteDetails | The list of nodes to delete data from in a given time range. |
[out] | results | The list of update results. |
[out] | diagnosticInfos | The list of diagnostic information for the update results. |
UaStatus UaSession::historyReadAtTime | ( | ServiceSettings & | serviceSettings, |
const HistoryReadAtTimeContext & | historyReadAtTimeContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
HistoryReadDataResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Reads the history of item values synchronously from an OPC UA server for the given timestamps.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | historyReadAtTimeContext | Configuration parameters for the history read data at time. Configuration parameters include
See HistoryReadAtTimeContext for more details. |
[in] | nodesToRead | List of variable nodes to read data values at specified timestamps from. |
[out] | results | Result data for the requested nodes and timestamps |
[out] | diagnosticInfos | List of diagnostic information |
UaStatus UaSession::historyReadEvent | ( | ServiceSettings & | serviceSettings, |
const HistoryReadEventContext & | historyReadEventContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
HistoryReadEventResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Reads the event history for a list of event notifier objects synchronously from an OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | historyReadEventContext | Configuration parameters for the history read of events. Configuration parameters include
See HistoryReadEventContext for more details. |
[in] | nodesToRead | List of event notifier object nodes to read event history from. |
[out] | results | The event history for each notifier. |
[out] | diagnosticInfos | List of diagnostic information. |
UaStatus UaSession::historyReadProcessed | ( | ServiceSettings & | serviceSettings, |
const HistoryReadProcessedContext & | historyReadProcessedContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
HistoryReadDataResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Reads the processed history of variable values synchronously from the OPC UA server based on a passed aggregate.
This method is used to read processed historical values of one or more nodes in an ordered sequence for the defined time domain. Continuation points are used to continue the read of the ordered sequence if not all data can be returned in one read or if the server was not able to finish the processing before the timeout expired. The returned number can be limited by the server and may be 0 if the server was not able to finish one calculation before the service timeout expired.
The processed values are calculated with the specified aggregate based on the raw data in the history database. The server must use start time, end time, and the resample interval to generate a sequence of time intervals and then calculate an aggregate for each interval.
Predefined aggregates are:
Define for aggregate function | Description |
---|---|
OpcUaId_AggregateFunction_Interpolative | This is used for retrieving the interpolated value at the beginning of each interval. |
OpcUaId_AggregateFunction_Average | Returns the average data over the resample interval. It adds up all values in the interval and divides the sum by the number of values. |
OpcUaId_AggregateFunction_TimeAverage | Returns the time weighted average data over the resample interval. A straight line is drawn between each raw value in the interval. The area under the line is divided by the length of the interval to yield the average. Interpolated values are used at the start and at the end of the interval. |
OpcUaId_AggregateFunction_TimeAverage2 | Retrieve the time weighted average data over the interval using Simple Bounding Values. |
OpcUaId_AggregateFunction_Total | Retrieve the total (time integral) of the data over the interval using Interpolated Bounding Values. |
OpcUaId_AggregateFunction_Total2 | Retrieve the total (time integral) of the data over the interval using Simple Bounding Values. |
OpcUaId_AggregateFunction_Minimum | Returns the minimum value in the resample interval. |
OpcUaId_AggregateFunction_Maximum | Returns the maximum value in the resample interval. |
OpcUaId_AggregateFunction_MinimumActualTime | Returns the minimum value in the resample interval and the timestamp of the minimum value. |
OpcUaId_AggregateFunction_MaximumActualTime | Returns the maximum value in the resample interval and the timestamp of the maximum value. |
OpcUaId_AggregateFunction_Range | Retrieve the difference between the minimum and maximum Value over the interval. |
OpcUaId_AggregateFunction_Range2 | Retrieve the difference between the Minimum2 and Maximum2 value over the interval. |
OpcUaId_AggregateFunction_AnnotationCount | Returns the number of annotations in the resample interval. Annotations are user entered comments in the history database. |
OpcUaId_AggregateFunction_Count | Returns the number of raw values with good status in the resample interval. |
OpcUaId_AggregateFunction_DurationInStateZero | Retrieve the time at which a Boolean or numeric was in a non-zero state using Simple Bounding Values. |
OpcUaId_AggregateFunction_DurationInStateNonZero | Retrieve the time at which a Boolean or numeric was in a non-zero state using Simple Bounding Values. |
OpcUaId_AggregateFunction_NumberOfTransitions | Retrieve the number of changes between zero and non-zero a Boolean or numeric value experienced in the interval. |
OpcUaId_AggregateFunction_Start | Returns the first value in the interval and the timestamp of the first value. |
OpcUaId_AggregateFunction_End | Returns the last value in the interval and the timestamp of the last value. |
OpcUaId_AggregateFunction_Delta | The difference between the first and the last good value in the interval. If the last value is less than the first value, the result will be negative. |
OpcUaId_AggregateFunction_DurationGood | The duration of the interval the value had good quality. The value of the aggregate is the time in milliseconds. |
OpcUaId_AggregateFunction_DurationBad | The duration of the interval the value had bad quality. The value of the aggregate is the time in milliseconds. |
OpcUaId_AggregateFunction_PercentGood | Percentage of the interval the value had good quality (0-100). PercentGood = DurationGood / ResampleInterval * 100. |
OpcUaId_AggregateFunction_PercentBad | Percentage of the interval the value had bad quality (0-100). PercentGood = DurationGood / ResampleInterval * 100. |
OpcUaId_AggregateFunction_WorstQuality | Retrieve the worst StatusCode of data in the interval. |
OpcUaId_AggregateFunction_WorstQuality2 | Retrieve the worst StatusCode of data in the interval including the Simple Bounding Values. |
OpcUaId_AggregateFunction_StandardDeviationSample | Retrieve the standard deviation for the interval for a sample of the population (n-1) including the Simple Bounding Values. |
OpcUaId_AggregateFunction_VarianceSample | Retrieve the variance for the interval for a sample of the population. |
OpcUaId_AggregateFunction_StandardDeviationPopulation | Retrieve the standard deviation for the interval for a complete population (n) including the Simple Bounding Values. |
OpcUaId_AggregateFunction_VariancePopulation | Retrieve the variance for the interval for the complete population. |
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details |
[in] | historyReadProcessedContext | Configuration parameters for the history read processed data. Configuration parameters include
See HistoryReadProcessedContext for more details. |
[out] | nodesToRead | List of variable nodes to read processed data history from. Includes a continuation point to continue previous read requests. |
[out] | 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. |
[out] | diagnosticInfos | List of diagnostic information. |
UaStatus UaSession::historyReadRawModified | ( | ServiceSettings & | serviceSettings, |
const HistoryReadRawModifiedContext & | historyReadRawModifiedContext, | ||
const UaHistoryReadValueIds & | nodesToRead, | ||
HistoryReadDataResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Reads the history of variable values synchronously from an OPC UA server.
This method is used to read raw or modified historical values of one or more nodes in an ordered sequence for the defined time domain. Continuation points are used to continue the read of the ordered sequence if not all data can be returned in one read. The returned number can be limited by the client or the server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details |
[in] | historyReadRawModifiedContext | Configuration parameters for the history read of raw or modified data. Configuration parameters include
See HistoryReadRawModifiedContext for more details. |
[in] | nodesToRead | List of variable nodes to read data history from. It includes a continuation point per node to continue previous read requests. |
[out] | 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. |
[out] | diagnosticInfos | List of diagnostic information. |
UaStatus UaSession::historyUpdateData | ( | ServiceSettings & | serviceSettings, |
const UpdateDataDetails & | updateDataDetails, | ||
UaHistoryUpdateResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Updates the history of variable values synchronously on an OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | updateDataDetails | The list of variable nodes to update including the data provided for the update. See UpdateDataDetail for more details. |
[out] | results | The list of update results. |
[out] | diagnosticInfos | The list of diagnostic information for the update results. |
UaStatus UaSession::historyUpdateEvents | ( | ServiceSettings & | serviceSettings, |
const UpdateEventDetails & | updateEventDetails, | ||
UaHistoryUpdateResults & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Updates the history of events synchronously on an OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | updateEventDetails | The list of nodes to update including the events provided for the update. |
[out] | results | The list of update results. |
[out] | diagnosticInfos | The list of diagnostic information for the update results. |
OpcUa_Boolean UaSession::isConnected | ( | ) | const |
Flag that indicates if the UaSession is connected.
This flag does not reflect the actual server status indicating the real connection status to the server. The flag is set to true after connect was successfully called and is set to false if disconnect is called. The connection status to the UA server can be different in connection error scenarios.
void UaSession::loadDataTypeDictionaries | ( | ) |
Reads the binary DataTypeDictionaries, parses their content and browses the address space to find the corresponding DataTypeIds and Encoding Ids.
Ignores DataTypes where DataTypeIds cannot be found. If SUPPORT_XML_PARSER is disabled, it will only load the known type dictionary of namespace 0.
OpcUa_UInt32 UaSession::maxArrayLength | ( | ) | const |
Returns the maximum array length that can be used for the communication with the server.
The MaxArrayLength Property indicates the maximum length of a one or multidimensional array supported by Variables of the Server. In a multidimensional array it indicates the overall length. For example, a three-dimensional array of 2x3x10 has the array length of 60. The Server might further restrict the length for individual Variables without notice to the client. Servers may use the Property MaxArrayLength defined in Part 3 on individual DataVariables to specify the size on individual values. The individual Property may have a larger or smaller value than MaxArrayLength.
OpcUa_UInt16 UaSession::maxBrowseContinuationPoints | ( | ) | const |
Returns the maximum number of browse ContinuationPoints that are available.
Typically the number of ContinuationPoints per session is a limited resource in the server. A server discards ContinuationPoints of older requests if they are needed to process a newer request.
OpcUa_UInt32 UaSession::maxByteStringLength | ( | ) | const |
Returns the maximum ByteString length that can be used for the communication with the server.
The MaxByteStringLength Property indicates the maximum number of Bytes in a ByteString supported by Variables or FileType Objects of the Server. The Server might further restrict the ByteString length for individual Variables or FileType Objects without notice to the Client. Servers may use the Property MaxByteStringLength on individual DataVariables to specify the length on individual values or on FileType Objects to specify the maximum size of read and write buffers. The individual Property may have larger or smaller values than MaxByteStringLength.
OpcUa_UInt16 UaSession::maxHistoryContinuationPoints | ( | ) | const |
Returns the maximum number of ContinuationPoints that are available for history operations.
Typically the number of ContinuationPoints per session is a limited resource in the server. A server discards ContinuationPoints of older requests if they are needed to process a newer request.
OpcUa_UInt32 UaSession::maxNodesPerBrowse | ( | ) | const |
Gets the maximum number of nodes to use in a browse service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerHistoryReadData | ( | ) | const |
Gets the maximum number of nodes to use in a history read service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerHistoryReadEvents | ( | ) | const |
Gets the maximum number of nodes to use in a history read events service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerHistoryUpdateData | ( | ) | const |
Gets the maximum number of nodes to use in a history update service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerHistoryUpdateEvents | ( | ) | const |
Gets the maximum number of nodes to use in a history update events service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerMethodCall | ( | ) | const |
Gets the maximum number of nodes to use in a call service.
This limit is a configuration parameter in the server. UaSession automatically reads this from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerNodeManagement | ( | ) | const |
Gets the maximum number of nodes to use in a service call of the node management service set.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerRead | ( | ) | const |
Gets the maximum number of nodes to use in a read service call.
This limit is a configuration parameter in the server. UaSession automatically reads this from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerRegisterNodes | ( | ) | const |
Gets the maximum number of nodes to use in a registerNodes or unregisterNodes service call.
This limit is a configuration parameter in the server. UaSession automatically reads this from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerTranslateBrowsePathsToNodeIds | ( | ) | const |
Gets the maximum number of nodes to use in a TranslateBrowsePathsToNodeIds service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxNodesPerWrite | ( | ) | const |
Gets the maximum number of nodes to use in a write service call.
This limit is a configuration parameter in the server. UaSession automatically reads it from the server on connect. If the maxOperationsPerServiceCall limit is smaller than this limit, the SDK uses maxOperationsPerServiceCall instead.
OpcUa_UInt32 UaSession::maxOperationsPerServiceCall | ( | ) | const |
Gets the maximum number of operations used for every OPC UA service call.
A service call that exceeds this limit is automatically split into multiple service calls. For instance, if the limit is set to 1000, calling UaSession::read() with 5000 nodes will cause the SDK to send five read requests, each with 1000 nodes, to the server.
OpcUa_UInt16 UaSession::maxQueryContinuationPoints | ( | ) | const |
Returns the maximum number of ContinuationPoints that are available for the query service.
Typically, the number of ContinuationPoints per session is a limited resource in the server. A server discards ContinuationPoints of older requests if they are needed to process a newer request.
OpcUa_UInt32 UaSession::maxStringLength | ( | ) | const |
Returns the maximum String length that can be used for the communication with the server.
The MaxStringLength Property indicates the maximum number of characters in Strings supported by Variables of the Server. The Server might further restrict the String length for individual Variables without notice to the client. Servers may use the Property MaxStringLength defined in Part 3 on individual DataVariables to specify the length on individual values. The individual Property may have larger or smaller values than MaxStringLength.
OpcUa_Double UaSession::minSupportedSampleRate | ( | ) | const |
Returns the fastest sample rate the server supports, including 0.
The sampling rate is set per MonitoredItem and defines the cyclic rate the server uses to sample data from the source.
UaStatus UaSession::queryFirst | ( | ServiceSettings & | serviceSettings, |
const OpcUa_ViewDescription & | view, | ||
const UaNodeTypeDescriptions & | nodeTypes, | ||
const UaContentFilter & | filter, | ||
OpcUa_UInt32 | maxDataSetsToReturn, | ||
OpcUa_UInt32 | maxReferencesToReturn, | ||
UaByteString & | continuationPoint, | ||
UaQueryDataSets & | queryDataSets, | ||
UaDiagnosticInfos & | diagnosticInfos, | ||
UaParsingResults & | parsingResults | ||
) |
Query the OPC UA server address space.
This Service is used to issue a Query request to the Server. The complexity of the Query can range from very simple to highly sophisticated. The Query can simply request data from instances of a TypeDefinitionNode or TypeDefinitionNode subject to restrictions specified by the filter. On the other hand, the Query can request data from instances of related Node types by specifying a RelativePath from an originating TypeDefinitionNode.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | view | View used for the query. Null view means the whole address space. |
[in] | nodeTypes | Selection of nodes or references based on the type definition for the starting node and a browse path to its component(s). |
[in] | filter | Resulting Nodes shall be limited to the Nodes matching the criteria defined by the filter. |
[in] | maxDataSetsToReturn | The number of QueryDataSets that the Client wants the Server to return in the response. |
[in] | maxReferencesToReturn | The number of References that the Client wants the Server to return in the response for each QueryDataSet |
[out] | continuationPoint | A continuation point is returned when the server was not able to deliver all results in the Query response. The limitation can be set by the client in the request or by the server during Query processing. The continuation point can be passed to queryNext to get the remaining results. |
[out] | queryDataSets | List of query data results. |
[out] | diagnosticInfos | List of diagnostic information. |
[out] | parsingResults | List of parsing results for QueryFirst. The size and order of the list matches the size and order of the nodeTypes request parameter. |
UaStatus UaSession::queryNext | ( | ServiceSettings & | serviceSettings, |
OpcUa_Boolean | releaseContinuationPoint, | ||
UaByteString & | continuationPoint, | ||
UaQueryDataSets & | queryDataSets | ||
) |
Continues a previous query request.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | releaseContinuationPoint | A flag that indicates whether the method is called only for releasing the memory associated with the continuation point in the server or the next set of results should be returned. Clients should always call this Service even if they do not want to continue querying. In this case this flag is set to true. |
[in,out] | continuationPoint | Continuation point returned from a previous queryFirst or queryNext call. A continuation point is returned when the server was not able to deliver all results in the query response. The limitation can be set by the client in the queryFirst or by the server during query processing. The continuation point can be passed to queryNext to get the remaining results. |
[out] | queryDataSets | List of query data results. |
UaStatus UaSession::read | ( | ServiceSettings & | serviceSettings, |
OpcUa_Double | maxAge, | ||
OpcUa_TimestampsToReturn | timeStamps, | ||
const UaReadValueIds & | nodesToRead, | ||
UaDataValues & | values, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Reads Attribute values synchronously from an OPC UA server.
The Read Service is used to read one or more Attributes of one or more Nodes. It also allows reading subsets or single elements of array values and to define a valid age of values to be returned to reduce the need for device reads. Like most other Services, the Read is optimized for bulk read operations and not for reading single Attribute values. Typically all Node Attributes are readable. For the Value Attribute, the Read rights are indicated by the AccessLevel and UserAccessLevel Attribute of the Variable.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | maxAge | The maximum age of the value to be read in milliseconds. This parameter allows clients to reduce the communication between server and data source by allowing the server to return a cached value that is not older than the defined time period. Setting a value of 0 forces the server to obtain the current value. This is similar to a device read in Classic OPC. |
[in] | timeStamps | OPC UA defines two timestamps, the source and the server timestamp. This parameter allows the client to define which timestamps the server should return with the value. The source timestamp is only available for Value Attributes. The source timestamp is used to reflect the timestamp that was applied to a Variable value by the data source. It should indicate the last change of the value or status code. The source timestamp must always be generated by the same physical clock. This timestamp type was added for OPC UA to cover the use case to get the timestamp of the last value change which differs from the server timestamp definition. The server timestamp is used to reflect the time that the server received a Variable value or knew it to be accurate if the changes are reported by exception and the connection to the data source is operating. This is the behavior expected by Classic OPC. Possible values are:
|
[in] | nodesToRead | List of Nodes and Attributes to read identified by an array of OpcUa_ReadValueId structures. The ReadValueId consist of
|
[out] | values | List of read results contained in an array of OpcUa_DataValue structures. The DataValue consist of
|
[out] | diagnosticInfos | List of diagnostic information. |
UaStatus UaSession::registerNodes | ( | ServiceSettings & | serviceSettings, |
const UaNodeIdArray & | nodesToRegister, | ||
UaNodeIdArray & | registeredNodesIds | ||
) |
Register nodes to create shortcuts in the server.
This method allows clients to optimize the cyclic access to Nodes for example for writing variable values or for calling methods. There are two levels of optimization.
The first level is to reduce the amount of data on the wire for the addressing information. Since NodeIds are used for addressing in Nodes and NodeIds can be very long, a more optimized addressing method is desirable for cyclic use of Nodes. Classic OPC provided the concept to create handles for items by adding them to a group. RegisterNodes provides a similar concept to create handles for Nodes by returning a numeric NodeId that can be used in all functions accessing information from the server. The transport of numeric NodeIds is very efficient in the OPC UA binary protocol.
The second level of optimization is possible inside the server. Since the client is telling the server that it wants to use the Node more frequently by registering the Node, the server is able to prepare everything that is possible to optimize the access to the Node.
The handles returned by the server are only valid during the lifetime of the Session that was used to register the Nodes. Clients must call unregisterNodes if the Node is no longer used to free the resources used in the server for the optimization. This method should not be used to optimize the cyclic read of data since OPC UA provides a much more optimized mechanism to subscribe for data changes.
Clients do not have to use the Service and servers can simply implement the Service only returning the same list of NodeIds that was passed in if there is no need to optimize the access.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToRegister | The list of Nodes to register. For each Node the NodeId of the Node is passed in. |
[out] | registeredNodesIds | List of NodeIds identifying the registered Node. This NodeId is typically an optimized numeric Node used as handle to the registered Node. This NodeId is only valid in the Session context it was created in. If the server does not know the NodeId or is not able to optimize the access to the Node, it simply returns the NodeId provided in the request. |
UaByteString UaSession::serverCertificate | ( | ) | const |
Provides the certificate of the UA server.
If the connection is a non-secure connection, this property might be empty.
OpcUa_ServerState UaSession::serverState | ( | ) | const |
Provides the current server state of the OPC UA server.
This enumeration value is read from the server through the status reads or is OpcUa_ServerState_Unknown if the server is not connected.
The enumeration has the following possible values:
UaClient::ServerStatus UaSession::serverStatus | ( | ) | const |
Provides the actual connection status to the OPC UA server.
The enumeration has the following possible values:
UaNodeId UaSession::sessionId | ( | ) | const |
Provides the sessionId for this connection to the UA server.
The sessionId is a nodeId in the server address space that is assigned by the server during connect and uniquely identifies the session on the server. In most cases you won't be interested in the sessionId and you can ignore this property.
UaStatus UaSession::transferSubscription | ( | ServiceSettings & | serviceSettings, |
UaSubscriptionCallback * | pUaSubscriptionCallback, | ||
OpcUa_UInt32 | clientSubscriptionHandle, | ||
OpcUa_UInt32 | subscriptionId, | ||
SubscriptionSettings & | subscriptionSettings, | ||
OpcUa_Boolean | publishingEnabled, | ||
OpcUa_Boolean | sendInitialValues, | ||
UaSubscription ** | ppUaSubscription, | ||
UaUInt32Array & | availableSequenceNumbers | ||
) |
Transfers a subscription from another client to this session.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | pUaSubscriptionCallback | Callback interface for the subscription used to send data changes, events, and subscription status changes to the client application. |
[in] | clientSubscriptionHandle | Client defined handle for the subscription. This handle is used to identify the subscription in the callback methods. |
[in] | subscriptionId | Subscription identifier of the subscription to transfer to this session. |
[in] | subscriptionSettings | Subscription settings reflecting the current setting on the server. This is used to initialize the client side subscription object. |
[in] | publishingEnabled | Publishing enabled settings reflecting the current setting on the server. This is used to initialize the client side subscription object. |
[in] | sendInitialValues | Flag indicating if the first Publish response after the TransferSubscriptions call should contain the current values of all Monitored Items in the Subscription where the Monitoring Mode is set to Reporting. |
[out] | ppUaSubscription | Client side subscription created by the session object. This object must be passed to deleteSubscription to clean up resources even if the subscription is already deleted on the server. |
[out] | availableSequenceNumbers | Available sequence numbers in the queue of sent and not confirmed publish responses. |
UaStatus UaSession::translateBrowsePathsToNodeIds | ( | ServiceSettings & | serviceSettings, |
const UaBrowsePaths & | browsePaths, | ||
UaBrowsePathResults & | browsePathResults, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Translate a browse path to a NodeId.
This Service is used to access components of an Object based on the knowledge about the ObjectType. Since the NodeId of a Node is needed to access information provided by the Node, like subscribing for Variable Value changes or to call a Method, it is necessary to know the NodeIds of components of Objects. Since OPC UA allows programming software components with built-in knowledge of ObjectTypes, UA needs to provide a mechanism to return the NodeIds for components of an Object instance based on the knowledge about the ObjectType. This mechanism is built on the requirement that the BrowseNames of components of the instance must be the same like BrowseNames of components of the type.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | browsePaths | The list of browse paths for which NodeIds are requested. |
[out] | browsePathResults | List of results for the passed starting Nodes and paths. |
[out] | diagnosticInfos | List of diagnostic information. |
UaStatus UaSession::unregisterNodes | ( | ServiceSettings & | serviceSettings, |
const UaNodeIdArray & | registeredNodesIds | ||
) |
Unregister nodes to delete shortcuts in the server.
Handles created with the Service RegisterNodes must be freed by the client using the method unregisterNodes to free the resources in the server if the registered nodes are no longer needed.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details |
[in] | registeredNodesIds | The list of Nodes to unregister. |
|
protectedvirtual |
Callback method to inform about errors during certificate validation.
Implements UaClientSdk::CertificateValidationCallback.
UaStatus UaSession::write | ( | ServiceSettings & | serviceSettings, |
const UaWriteValues & | nodesToWrite, | ||
UaStatusCodeArray & | results, | ||
UaDiagnosticInfos & | diagnosticInfos | ||
) |
Writes variable values synchronously to an OPC UA server.
[in,out] | serviceSettings | The general service settings like timeout. See ServiceSettings for more details. |
[in] | nodesToWrite | List of Nodes, Attributes and the values to write identified by an array of OpcUa_WriteValue structures The WriteValue consist of
|
[out] | results | List of write results |
[out] | diagnosticInfos | List of diagnostic information |