ANSI C Based OPC UA Client/Server/PubSub SDK  1.9.1.442
UaClient_Session Struct Reference

The UaClient_Session structure manages a UA Client side application session. More...

#include <uaclient_session.h>

Data Structures

struct  UaClient_Session_UserToken
 The user token to use when connecting to a server. More...
 

Data Fields

OpcUa_EndpointDescription EndpointDescription
 The description of the endpoint to connect to. More...
 
OpcUa_Boolean DoServerCertificateVerify
 Indicates if the client SDK should verify the server certificate. More...
 
OpcUa_String SessionName
 The Session Name. More...
 
OpcUa_String ServerUri
 The Server URI. More...
 
OpcUa_Int32 NoOfLocaleIds
 The locale IDs to be used for the session. More...
 
OpcUa_String AuditEntryId
 An identifier that identifies the client's security audit log entry associated with requests issued by this session structure. More...
 
OpcUa_UInt32 SecureChannelLifetime
 The lifetime of the SecureChannel in milliseconds before it gets renewed. More...
 
OpcUa_UInt32 ConnectTimeout
 The timeout for the calls for SecureChannel and Session creation in milliseconds. More...
 
OpcUa_UInt32 DisconnectTimeout
 The timeout for the call for closing a Session in milliseconds. More...
 
OpcUa_UInt32 CallTimeout
 The timeout for service calls in milliseconds. More...
 
OpcUa_Double SessionTimeout
 The timeout for the application session in milliseconds. More...
 
OpcUa_UInt32 PublishTimeout
 The timeout for publish calls in milliseconds. More...
 
OpcUa_UInt32 PublishPipelineDepth
 Number of publishes to be sent to the server. More...
 
OpcUa_Boolean WatchdogEnabled
 Enable watchdog reads. More...
 
OpcUa_UInt32 WatchdogTime
 The time between watchdog checks in milliseconds. More...
 
OpcUa_UInt32 WatchdogTimeout
 The timeout for watchdog calls in milliseconds. More...
 
OpcUa_Boolean AutomaticReconnect
 A flag indicating if the client SDK should try to reconnect in the case of a connection error. More...
 
OpcUa_UInt32 ReconnectDelay
 The delay between reconnect attempts in milliseconds. More...
 
OpcUa_Boolean CreateSignatureWithChain
 For calculating the client signature, the client appends the server certificate to the server nonce. More...
 
OpcUa_Void * pUserData
 User defined data which can be set freely by the application. More...
 
OpcUa_Boolean DisableErrorCertificateTimeInvalid
 Flag used to disable the server certificate validation error BadCertificateTimeInvalid, default is false. More...
 
OpcUa_Boolean DisableErrorCertificateIssuerTimeInvalid
 Flag used to disable the server certificate validation error BadCertificateIssuerTimeInvalid, default is false. More...
 
OpcUa_Boolean DisableErrorCertificateRevocationUnknown
 Flag used to disable the server certificate validation error BadCertificateRevocationUnknown, default is false. More...
 
OpcUa_Boolean DisableErrorCertificateIssuerRevocationUnknown
 Flag used to disable the server certificate validation error BadCertificateIssuerRevocationUnknown, default is false. More...
 
OpcUa_Boolean DisableApplicationUriCheck
 Flag used to disable the ApplicationUri match check between server certificate and parameter in CreateSession. More...
 
OpcUa_Boolean DisableDomainCheck
 If set to true, the domain in the endpoint URL will not be compared to the certificate domains, default is false. More...
 
OpcUa_Boolean DisableCertificateUsageCheck
 If set to true, the certificate usage fields will not be checked, default is false. More...
 
OpcUa_String ClientCertificateLocation
 Optional: Path to the certificate file of the session. More...
 
OpcUa_String ClientPrivateKeyLocation
 Optional: Path to the private key file of the session. More...
 
OpcUa_UInt32 NoOfAdditionalCertificates
 Optional: Number of additional certificates. More...
 
OpcUa_StringpAdditionalCertificates
 Optional: Additional certificates that will be appended to the client certificate to form the certificate chain. More...
 
OpcUa_CertificateStoreConfiguration PkiConfig
 Optional: The PKI configuration of the session. More...
 
UaClient_ConnectionStatus ConnectionStatus
 The current connection status of this session. More...
 
OpcUa_NodeId SessionId
 The server assigned ID of the session. More...
 
OpcUa_List Subscriptions
 List of UaClient_Subscription assigned to this session.
 

Detailed Description

The UaClient_Session structure manages a UA Client side application session.

This is the main structure for connecting with any OPC UA Server. The structure manages the connection to an OPC Unified Architecture server and the application session established with the server.

The connect call establishes and maintains a Session with a Server. After a successful connect, the connection can be monitored by the SDK. Connection status changes are reported through the callback UaClient_Session_ConnectionStatusChanged_CB.

Field Documentation

OpcUa_String UaClient_Session::AuditEntryId

An identifier that identifies the client's security audit log entry associated with requests issued by this session structure.

OpcUa_Boolean UaClient_Session::AutomaticReconnect

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_UInt32 UaClient_Session::CallTimeout

The timeout for service calls in milliseconds.

The default setting is 10 seconds.

OpcUa_String UaClient_Session::ClientCertificateLocation

Optional: Path to the certificate file of the session.

If not set, the corresponding member of UaClient_Configuration is used. Can only be used in combination with ClientPrivateKeyLocation.

OpcUa_String UaClient_Session::ClientPrivateKeyLocation

Optional: Path to the private key file of the session.

If not set, the corresponding member of UaClient_Configuration is used. Can only be used in combination with ClientCertificateLocation.

UaClient_ConnectionStatus UaClient_Session::ConnectionStatus

The current connection status of this session.

OpcUa_UInt32 UaClient_Session::ConnectTimeout

The timeout for the calls for SecureChannel and Session creation in milliseconds.

The default value for the connect timeout is 5000 milliseconds.

OpcUa_Boolean UaClient_Session::CreateSignatureWithChain

For calculating the client signature, the client appends the server certificate to the server nonce.

If the server sends a certificate chain, the client should only use the leaf certificate to calculate the client signature. With this setting enabled, the client uses the complete certificate chain instead. This is not the recommended behaviour. Only set this flag to work around interoperability issues with misbehaving servers.

OpcUa_Boolean UaClient_Session::DisableApplicationUriCheck

Flag used to disable the ApplicationUri match check between server certificate and parameter in CreateSession.

The check is required for compliant OPC UA servers but older clients may provide a wrong ApplicationUri, default is false.

OpcUa_Boolean UaClient_Session::DisableCertificateUsageCheck

If set to true, the certificate usage fields will not be checked, default is false.

OpcUa_Boolean UaClient_Session::DisableDomainCheck

If set to true, the domain in the endpoint URL will not be compared to the certificate domains, default is false.

OpcUa_Boolean UaClient_Session::DisableErrorCertificateIssuerRevocationUnknown

Flag used to disable the server certificate validation error BadCertificateIssuerRevocationUnknown, default is false.

OpcUa_Boolean UaClient_Session::DisableErrorCertificateIssuerTimeInvalid

Flag used to disable the server certificate validation error BadCertificateIssuerTimeInvalid, default is false.

OpcUa_Boolean UaClient_Session::DisableErrorCertificateRevocationUnknown

Flag used to disable the server certificate validation error BadCertificateRevocationUnknown, default is false.

OpcUa_Boolean UaClient_Session::DisableErrorCertificateTimeInvalid

Flag used to disable the server certificate validation error BadCertificateTimeInvalid, default is false.

OpcUa_UInt32 UaClient_Session::DisconnectTimeout

The timeout for the call for closing a Session in milliseconds.

The default value for the disconnect timeout is 5000 milliseconds.

OpcUa_Boolean UaClient_Session::DoServerCertificateVerify

Indicates if the client SDK should verify the server certificate.

The default value is True to force the client SDK to verify the server certificate before establishing the connection.

OpcUa_EndpointDescription UaClient_Session::EndpointDescription

The description of the endpoint to connect to.

This can either be filled using known values or by using the UaClient_Discovery_BeginGetEndpoints function.

OpcUa_UInt32 UaClient_Session::NoOfAdditionalCertificates

Optional: Number of additional certificates.

Only evaluated if ClientCertificateLocation is set

OpcUa_Int32 UaClient_Session::NoOfLocaleIds

The locale IDs to be used 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)
OpcUa_String* UaClient_Session::pAdditionalCertificates

Optional: Additional certificates that will be appended to the client certificate to form the certificate chain.

Only evaluated if ClientCertificateLocation is set

OpcUa_CertificateStoreConfiguration UaClient_Session::PkiConfig

Optional: The PKI configuration of the session.

If not set, the corresponding member of UaClient_Configuration is used.

OpcUa_UInt32 UaClient_Session::PublishPipelineDepth

Number of publishes to be sent to the server.

The default value is 0 to let the server determine the number of publishes automatically. In this case, for 1-10 subscriptions the server will issue (NoOfSubscriptions + 1) publishes; for more than 10 subscriptions the server will issue NoOfSubscriptions publishes.

If set to something else than 0, the server will issue PublishPipelineDepth publishes, independent of the number of subscriptions.

OpcUa_UInt32 UaClient_Session::PublishTimeout

The timeout for publish calls in milliseconds.

The PublishTimeout is the timeout for Publish requests. It is often necessary to set a higher PublishTimeout because Clients need to make sure that Publish requests are used before they time out. As a rule of thumb the PublishTimeout should be twice as long as the longest MaxKeepAliveCount.

OpcUa_Void* UaClient_Session::pUserData

User defined data which can be set freely by the application.

OpcUa_UInt32 UaClient_Session::ReconnectDelay

The delay between reconnect attempts in milliseconds.

The default value for the reconnect delay is 5000 milliseconds.

OpcUa_UInt32 UaClient_Session::SecureChannelLifetime

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_String UaClient_Session::ServerUri

The Server URI.

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.

OpcUa_NodeId UaClient_Session::SessionId

The server assigned ID of the session.

OpcUa_String UaClient_Session::SessionName

The Session Name.

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

OpcUa_Double UaClient_Session::SessionTimeout

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 time out 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 effect for the individual timeout for a service call (which is set with CallTimeout). 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_Boolean UaClient_Session::WatchdogEnabled

Enable watchdog reads.

OpcUa_UInt32 UaClient_Session::WatchdogTime

The time between watchdog checks in milliseconds.

The default value for the watchdog time is 5000 milliseconds. The minimum value accepted by the SDK is 1000 milliseconds.

OpcUa_UInt32 UaClient_Session::WatchdogTimeout

The timeout for watchdog calls in milliseconds.

After one unsuccessful call, the timeout will be two times this value for the next call.

The default value for the watchdog time is 5000 milliseconds.


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