UA Server SDK C++ Bundle  1.3.3.206
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
UaClientSdk::SessionConnectInfo Class Reference

The SessionConnectInfo class contains the session settings for connect. More...

#include <uaclientsdk.h>

Public Member Functions

 SessionConnectInfo ()
 Constructor.
 
 ~SessionConnectInfo ()
 Destructor.
 

Data Fields

UaString sApplicationUri
 The Client Application Uri.
 
UaString sApplicationName
 The Client Application Name.
 
UaString sProductUri
 The Client Product Uri.
 
UaString sSessionName
 The Session Name. More...
 
OpcUa_ApplicationType applicationType
 The Client Application Type. More...
 
OpcUa_UInt32 clientConnectionId
 The client defined connection Id. More...
 
OpcUa_Double nSessionTimeout
 The timeout for the application session in milliseconds. More...
 
UaString sLocaleId
 The locale ID uses for the session. More...
 
OpcUa_UInt32 nSecureChannelLifetime
 The lifetime of the SecureChannel in milliseconds before it gets renewed. More...
 
OpcUa_UInt32 nConnectTimeout
 The timeout for the connect call in milliseconds.
 
OpcUa_UInt32 nWatchdogTime
 The time between watchdog checks in milliseconds.
 
OpcUa_Boolean bAutomaticReconnect
 A flag indicating if the client SDK should try to reconnect in the case of a connection error.
 
OpcUa_Boolean bRetryInitialConnect
 A flag indicating if the client SDK should continue to try a connect establishment in the background if the initial connect fails.
 
UaStringArray alternativeEndpointUrls
 A list of alternative Endpoint URLs to connect to for network redundancy. More...
 
UaString sServerUri
 The Server Uri of the server to connect through a gateway server. More...
 
UaEndpointDescriptions endpointDescriptions
 The endpoint descriptions returned from the server during session creation. More...
 
OpcUa_UInt32 nWatchdogTimeout
 The timeout for watchdog calls in milliseconds. More...
 

Detailed Description

The SessionConnectInfo class contains the session settings for connect.

Field Documentation

UaStringArray UaClientSdk::SessionConnectInfo::alternativeEndpointUrls

A list of alternative Endpoint URLs to connect to for network redundancy.

This configuration option allows to specifiy endpoints for the same server connected to with the URL parameter passed to UaSession::connect(). It can be used for redundant networks used to connect to the a server with the same ServerUri and Server certificate. Specifying URLs of different servers with different certificates will cause an connection error when using a security policy other than None.

SessionConnectInfo sessionConnectInfo;
SessionSecurityInfo sessionSecurityInfo;
UaString sFirstUrl("opc.tcp://192.168.0.55:4841");
UaString sSecondUrl("opc.tcp://192.168.10.55:4842");
// Do other initialization
// Set URL of the alternative endpoint
sessionConnectInfo.alternativeEndpointUrls.create(1);
sSecondUrl.copyTo(&sessionConnectInfo.alternativeEndpointUrls[0]);
status = pUaSession->connect(
sFirstUrl, // URL of the regular Endpoint
sessionConnectInfo, // General settings for connection
sessionSecurityInfo, // Security settings
pCallback); // Callback interface
OpcUa_ApplicationType UaClientSdk::SessionConnectInfo::applicationType

The Client Application Type.

OpcUa_ApplicationType_Client OpcUa_ApplicationType_ClientAndServer

OpcUa_UInt32 UaClientSdk::SessionConnectInfo::clientConnectionId

The client defined connection Id.

The connection Id is returned in all session callbacks to distinguish between callbacks for different connections if the same callback interface is used for more than one connections. Can be 0 if not needed.

UaEndpointDescriptions UaClientSdk::SessionConnectInfo::endpointDescriptions

The endpoint descriptions returned from the server during session creation.

The list must be verified with the list returned during discovery at the first connect to make sure the discovery server provided the right list and the client was able to choose the most secure setting.

OpcUa_UInt32 UaClientSdk::SessionConnectInfo::nSecureChannelLifetime

The lifetime of the SecureChannel in milliseconds before it gets renewed.

This is the time the key pair exchanged during secure channel establishment are valid. The stack starts after 75% of the lifetime the renew process that exchanges new key pairs. The default lifetime is one hour.

OpcUa_Double UaClientSdk::SessionConnectInfo::nSessionTimeout

The timeout for the application session in milliseconds.

The client library ensures that the session does not time out as long as the client application does not call disconnect. The session can timeout if the network connection is broken for longer than the defined session timeout. A long timeout ensures that the established application session can be reused after the longer network interruption. Default value is 20 minutes. This timeout has no affect for the individual timeout for a service call (can be defined per call). This timeout is only used to ensure that the server is able to release resources if a client is disconnected for a long time.

OpcUa_UInt32 UaClientSdk::SessionConnectInfo::nWatchdogTimeout

The timeout for watchdog calls in milliseconds.

After one unsuccessful call

the timeout will be two times this value for the next call.

UaString UaClientSdk::SessionConnectInfo::sLocaleId

The locale ID uses for the session.

Examples are

  • "en" for English
  • "en-US" for English (US)
  • "de" for German
  • "de-DE" for German (Germany)
  • "de-AT" for German (Austria)
UaString UaClientSdk::SessionConnectInfo::sServerUri

The Server Uri of the server to connect through a gateway server.

This value is only specified if the EndpointDescription has a gatewayServerUri. This value is the applicationUri from the EndpointDescription which is the applicationUri for the underlying Server.

UaString UaClientSdk::SessionConnectInfo::sSessionName

The Session Name.

This name should be unique for the instance of the client.


The documentation for this class was generated from the following file: