UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaClientSdk::SessionConnectInfo Class Reference

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

#include <uaclientsdk.h>

Public Member Functions

 SessionConnectInfo ()
 Creates a SessionConnectInfo object with default settings. More...
 
 ~SessionConnectInfo ()
 Destructor.
 

Public Attributes

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 time-out for the application session in milliseconds. More...
 
UaString sLocaleId
 The locale ID uses for the session. More...
 
UaStringArray arAdditionalLocaleIds
 Additional locale IDs to be used for the session. More...
 
OpcUa_UInt32 nSecureChannelLifetime
 The lifetime of the SecureChannel in milliseconds before it gets renewed. More...
 
OpcUa_UInt32 nConnectTimeout
 The time-out for the connect call in milliseconds. More...
 
OpcUa_UInt32 nPublishTimeout
 The time-out for publish calls in milliseconds. More...
 
OpcUa_UInt32 nWatchdogTime
 The time between watchdog checks in milliseconds. More...
 
OpcUa_Boolean bAutomaticReconnect
 A flag indicating if the client SDK should try to reconnect in the case of a connection error. More...
 
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. More...
 
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 time-out for watchdog calls in milliseconds. More...
 
OpcUa_UInt32 nMaxOperationsPerServiceCall
 The maximum number of operations used in a Service call. More...
 
UaClient::ReadTypeDictionaries typeDictionaryMode
 The mode for updating the data type dictionaries from the server Possible options are. More...
 

Detailed Description

The SessionConnectInfo class contains the session settings for connect.

Constructor & Destructor Documentation

UaClientSdk::SessionConnectInfo::SessionConnectInfo ( )
inline

Creates a SessionConnectInfo object with default settings.

Member Data Documentation

UaStringArray UaClientSdk::SessionConnectInfo::alternativeEndpointUrls

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

This configuration option allows to specify 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 a server with the same ServerUri and Server certificate. Specifying URLs of different servers with different certificates will cause a connection error when using a security policy other than NONE.

SessionConnectInfo sessionConnectInfo;
SessionSecurityInfo sessionSecurityInfo;
UaString sFirstUrl("opc.tcp://192.168.0.55:48010");
UaString sSecondUrl("opc.tcp://192.168.10.55:48010");
// 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.

Possible values are:

  • OpcUa_ApplicationType_Client
  • OpcUa_ApplicationType_ClientAndServer
UaStringArray UaClientSdk::SessionConnectInfo::arAdditionalLocaleIds

Additional locale IDs to be used for the session.

See sLocaleId for examples.

OpcUa_Boolean UaClientSdk::SessionConnectInfo::bAutomaticReconnect

A flag indicating if the client SDK should try to reconnect in the case of a connection error.

The default value is OpcUa_True.

OpcUa_Boolean UaClientSdk::SessionConnectInfo::bRetryInitialConnect

A flag indicating if the client SDK should continue to try a connect establishment in the background if the initial connect fails.

The default value is OpcUa_False.

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 connection. 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::nConnectTimeout

The time-out for the connect call in milliseconds.

The default value for the connect time-out is 5000 milliseconds.

OpcUa_UInt32 UaClientSdk::SessionConnectInfo::nMaxOperationsPerServiceCall

The maximum number of operations used in a Service call.

The OPC UA server may restrict the message size and array sizes. This parameter provides a way to reduce the number of operations, like nodes to read in a Read call, to a number that works. The caller of the API does not need to care about the limitations. The SDK will send several Service calls if the number of operations provided by the caller exceeds the maximum number the server accepts. The value 0 indicates no limitation.

The default value is 0.

OpcUa_UInt32 UaClientSdk::SessionConnectInfo::nPublishTimeout

The time-out for publish calls in milliseconds.

The default value for the publish time-out is 60 seconds (60000ms).

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 the renew process that exchanges new key pairs after 75% of the lifetime. The default lifetime is one hour.

OpcUa_Double UaClientSdk::SessionConnectInfo::nSessionTimeout

The time-out 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 time out if the network connection is broken for longer than the defined session time-out. A long time-out ensures that the established application session can be reused after the longer network interruption. Default value is 20 minutes. This time-out has no effect for the individual time-out for a service call (can be defined per call). This time-out 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::nWatchdogTime

The time between watchdog checks in milliseconds.

The default value for the watchdog time is 5000 milliseconds.

OpcUa_UInt32 UaClientSdk::SessionConnectInfo::nWatchdogTimeout

The time-out for watchdog calls in milliseconds.

After one unsuccessful call

The time-out will be two times this value for the next call.

The default value for the watchdog time is 5000 milliseconds.

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.

UaClient::ReadTypeDictionaries UaClientSdk::SessionConnectInfo::typeDictionaryMode

The mode for updating the data type dictionaries from the server Possible options are.

FirstUse
The data type dictionary is read when used the first time by the client application
Manual
Read of dictionaries from server is only triggered through UaSession::loadDataTypeDictionaries()
Connect
Initial read of dictionaries from server is done at connect
Reconnect
Initial read of dictionaries from server is done at connect and they are updated at reconnect

The default value is FirstUse. For this functionality, SUPPORT_XML_PARSER needs to be enabled. If SUPPORT_XML_PARSER is disabled, only the known type dictionary of namespace 0 will be loaded.


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