UA Server SDK C++ Bundle  1.3.3.206
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
ServerConfig Class Referenceabstract

Server Configuration Interface definition. More...

#include <serverconfig.h>

Inherited by ServerConfigData.

Public Member Functions

 ServerConfig ()
 construction. More...
 
virtual ~ServerConfig ()
 destruction
 
virtual UaStatus loadConfiguration ()=0
 Load the configuration from the config file. More...
 
virtual UaStatus startUp (ServerManager *pServerManager)=0
 Start up OPC ServerConfig. More...
 
virtual UaStatus shutDown ()=0
 Shut down OPC ServerConfig. More...
 
virtual UaStatus saveConfiguration ()=0
 Save the configuration to the config file. More...
 
virtual UaStatus getEndpointConfiguration (UaString &sRejectedCertificateDirectory, UaEndpointArray &uaEndpointArray)=0
 Get Endpoint Configuration. More...
 
virtual UaStatus getUserIdentityTokenConfig (OpcUa_Boolean &bEnableAnonymous, OpcUa_Boolean &bEnableUserPw)=0
 Get the enabled settings for the different user identity tokens supported by the server. More...
 
virtual UaStatus getDiscoveryRegistrationConfig (OpcUa_UInt32 &nRegistrationInterval, UaStringArray &discoveryUrlArray)=0
 Get settings for registration with discovery servers. More...
 
virtual UaStatus getWindowsDiscoveryRegistrationSecuritySetup (OpcUa_Boolean &bAutomaticCertificateExchange, UaString &sDiscoveryServerCertificateFile, UaString &sDiscoveryServerStoreName, UaString &sDiscoveryServerCertificateName)
 Get settings for exchanging certificates with local discovery server on a windows computer for registration with local windows discovery server. More...
 
virtual UaStatus getSerializerConfiguration (OpcUa_Int32 &iMaxAlloc, OpcUa_Int32 &iMaxStringLength, OpcUa_Int32 &iMaxByteStringLength, OpcUa_Int32 &iMaxArrayLength, OpcUa_Int32 &iMaxMessageSize) const =0
 Get Serializer Configuration. More...
 
virtual UaStatus getStackThreadPoolSettings (OpcUa_Boolean &bEnabled, OpcUa_Int32 &iMinThreads, OpcUa_Int32 &iMaxThreads, OpcUa_Int32 &iMaxJobs, OpcUa_Boolean &bBlockOnAdd, OpcUa_UInt32 &nTimeout) const =0
 Returns the settings for the thread pool used in the OPC UA Stack. More...
 
virtual UaStatus getStackTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel) const =0
 Get UA Stack trace settings. More...
 
virtual UaStatus getServerTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel, OpcUa_UInt32 &uMaxTraceEntries, OpcUa_UInt32 &uMaxBackupFiles, UaString &sTraceFile) const =0
 Get UA Server SDK trace settings. More...
 
virtual OpcUa_Int32 getMaxRequestAge () const =0
 Returns the maximum age of a request the server allows. More...
 
virtual UaStatus getSessionSettings (OpcUa_Int32 &iMaxSessionCount, OpcUa_Int32 &iMinSessionTimeout, OpcUa_Int32 &iMaxSessionTimeout) const =0
 Get the setting parameters for session creation. More...
 
virtual UaStatus getServerSettings (OpcUa_Double &minSupportedSampleRate, UaStringArray &localeIdArray, UaStringArray &serverProfileArray, UaByteStringArray &softwareCertificateArray) const =0
 Get the general setting parameters for the server. More...
 
virtual OpcUa_Int32 getMaxBrowseContinuationPoints () const =0
 Returns the maximum number of Browse Continuation Points managed by the server. More...
 
virtual OpcUa_Int32 getMaxHistoryContinuationPoints () const =0
 Returns the maximum number of History Continuation Points managed by the server. More...
 
virtual UaStatus getSubscriptionSettings (OpcUa_UInt32 &iMinPublishingInterval, OpcUa_UInt32 &iMaxPublishingInterval, OpcUa_UInt32 &iMinKeepAliveInterval, OpcUa_UInt32 &iMinSubscriptionLifetime, OpcUa_UInt32 &iMaxSubscriptionLifetime, OpcUa_UInt32 &iMaxRetransmitionQueueSize, OpcUa_UInt32 &iMaxNotificationsPerPublish) const =0
 Get the setting parameters for a subscription. More...
 
virtual UaStatus getMonitoredItemSettings (OpcUa_UInt32 &iMaxDataQueueSize, OpcUa_UInt32 &iMaxEventQueueSize) const =0
 Get the setting parameters for a MonitoreItem. More...
 
virtual UaStatus getSubscriptionMaxCountSettings (OpcUa_UInt32 &iMaxSubscriptionCount, OpcUa_UInt32 &iMaxMonitoredItemCount, OpcUa_UInt32 &iMaxMonitoredItemPerSubscriptionCount) const
 Get the max object count parameters for Subscriptions. More...
 
virtual UaStatus getAvailableSamplingRates (UaUInt32Array &availableSamplingRates) const =0
 Returns the sampling rates provided by the OPC server. More...
 
virtual OpcUa_StatusCode getBuildInfo (UaString &ProductUri, UaString &ManufacturerName, UaString &ProductName, UaString &sSoftwareVersion, UaString &sBuildNumber, OpcUa_DateTime &BuildDate) const =0
 Returns the build information for the OPC server. More...
 
virtual OpcUa_StatusCode getServerInstanceInfo (UaString &ServerUri, UaLocalizedTextArray &ServerName) const =0
 Returns the server instance information for the OPC server. More...
 
virtual UaStatus getThreadPoolSettings (OpcUa_UInt32 &minSizeTransactionManager, OpcUa_UInt32 &maxSizeTransactionManager, OpcUa_UInt32 &minSizeSubscriptionManager, OpcUa_UInt32 &maxSizeSubscriptionManager) const =0
 Returns the settings for the thread pools used in the OPC server. More...
 
virtual SessioncreateSession (OpcUa_Int32 sessionID, const UaNodeId &authenticationToken)=0
 Creates a session object for the OPC server. More...
 
virtual UaStatus logonSessionUser (Session *pSession, UaUserIdentityToken *pUserIdentityToken)=0
 Validates the user identity token and sets the user for a session. More...
 
virtual OpcUa_Boolean isAuditActivated ()
 Flag indicating if audit events are activated. More...
 
virtual UaStatus getRedundancySettings (OpcUa_RedundancySupport &redundancySupport, UaStringArray &serverUriArray)
 Provides the redundancy settings for the server. More...
 
virtual UaStatus getAdditionalServerEntries (UaApplicationDescriptions &serverDescriptions)
 Provides capability to configure additional servers to be returned in FindServers. More...
 

Detailed Description

Server Configuration Interface definition.

This class is responsible for the start up and shut down of the Server. Also all necessary configuration options can be configured with this class. Services like discovery and getEndpointConfiguration are defined here. This Interface configures the Server and all needed parts of it.

Constructor & Destructor Documentation

ServerConfig::ServerConfig ( )
inline

construction.

Member Function Documentation

virtual Session* ServerConfig::createSession ( OpcUa_Int32  sessionID,
const UaNodeId authenticationToken 
)
pure virtual

Creates a session object for the OPC server.

This could be an instance of the default Session class provided by the SDK or a derived class that contains application specific functionality and vendor specific data related to the underlying system.

Returns
Session object
Parameters
[out]sessionIDSession Id created by the server application.
[out]authenticationTokenSecret session Id created by the server application.

Implemented in ServerConfigBasicXml, and ServerConfigBasicIni.

UaStatus ServerConfig::getAdditionalServerEntries ( UaApplicationDescriptions &  serverDescriptions)
virtual

Provides capability to configure additional servers to be returned in FindServers.

Every server must implement FindServers and must return its own application description. This can also be used to run the server on the default port 4840 if only one server is installed on the system. This configuration option allows to run this server on port 4840 but to return also additional servers for a fixed configuration e.g. two servers from the same vendor on one network node.

Returns
Error code
Parameters
[out]serverDescriptionsList of application descriptions containing the information for the additional servers to return.

Reimplemented in ServerConfigData.

virtual UaStatus ServerConfig::getAvailableSamplingRates ( UaUInt32Array &  availableSamplingRates) const
pure virtual

Returns the sampling rates provided by the OPC server.

Returns
Error code.
Parameters
[out]availableSamplingRatesArray of sampling rates provided by the OPC server.

Implemented in ServerConfigData.

virtual OpcUa_StatusCode ServerConfig::getBuildInfo ( UaString ProductUri,
UaString ManufacturerName,
UaString ProductName,
UaString sSoftwareVersion,
UaString sBuildNumber,
OpcUa_DateTime &  BuildDate 
) const
pure virtual

Returns the build information for the OPC server.

Returns
the build information for the OPC server.
Parameters
[out]ProductUriReturns the URI that identifies the software containing the OPC server.
[out]ManufacturerNameReturns the name of the software manufacturer.
[out]ProductNameReturns the name of the software containing the OPC server.
[out]sSoftwareVersionReturns the software version.
[out]sBuildNumberReturns the build number.
[out]BuildDateReturns the date and time of the build.

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getDiscoveryRegistrationConfig ( OpcUa_UInt32 &  nRegistrationInterval,
UaStringArray &  discoveryUrlArray 
)
pure virtual

Get settings for registration with discovery servers.

Returns
OPC UA result code.
Parameters
[out]nRegistrationIntervalInterval in milliseconds used to register with the discovery servers.
[out]discoveryUrlArrayUaString array of discovery server URLs to register with.

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getEndpointConfiguration ( UaString sRejectedCertificateDirectory,
UaEndpointArray uaEndpointArray 
)
pure virtual

Get Endpoint Configuration.

This method provides the settings necessary for the SDK to open the endpoints for OPC UA communication in the UA stack and to implement the GetEndpoints service in the UA Module.

Returns
Error code.
Parameters
[out]sRejectedCertificateDirectoryThe directory to store rejected client certificates.
[out]uaEndpointArrayUaEndpoint array of configured endpoints for the server.

Implemented in ServerConfigData.

virtual OpcUa_Int32 ServerConfig::getMaxBrowseContinuationPoints ( ) const
pure virtual

Returns the maximum number of Browse Continuation Points managed by the server.

Returns
Maximum number of Browse Continuation Points managed by the server.

Implemented in ServerConfigData.

virtual OpcUa_Int32 ServerConfig::getMaxHistoryContinuationPoints ( ) const
pure virtual

Returns the maximum number of History Continuation Points managed by the server.

Returns
Maximum number of History Continuation Points managed by the server.

Implemented in ServerConfigData.

virtual OpcUa_Int32 ServerConfig::getMaxRequestAge ( ) const
pure virtual

Returns the maximum age of a request the server allows.

Returns
Maximum age of a request the server allows.

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getMonitoredItemSettings ( OpcUa_UInt32 &  iMaxDataQueueSize,
OpcUa_UInt32 &  iMaxEventQueueSize 
) const
pure virtual

Get the setting parameters for a MonitoreItem.

Returns
Error code.
Parameters
[out]iMaxDataQueueSizeMaximum queue size for a data monitored item
[out]iMaxEventQueueSizeMaximum queue size for an event monitored item

Implemented in ServerConfigData.

UaStatus ServerConfig::getRedundancySettings ( OpcUa_RedundancySupport &  redundancySupport,
UaStringArray &  serverUriArray 
)
virtual

Provides the redundancy settings for the server.

There are three main options available, None, NonTransparent (with cold, warm and hot) and Transparent redundancy. This configuration covers the options None and NonTransparent. The option Transparent requires an additional SDK module. This redundancy module is also providing the required settings and creates the corresponding diagnostic and capability object.

Returns
Error code
Parameters
[out]redundancySupportRedundancy support options
  • OpcUa_RedundancySupport_None (serverUriArray is ignored)
  • OpcUa_RedundancySupport_Cold
  • OpcUa_RedundancySupport_Warm
  • OpcUa_RedundancySupport_Hot
  • OpcUa_RedundancySupport_Transparent (other settings are handled by redundancy module)
[out]serverUriArrayList of server URIs for the servers in the NonTransparent redundant set

Reimplemented in ServerConfigData.

virtual UaStatus ServerConfig::getSerializerConfiguration ( OpcUa_Int32 &  iMaxAlloc,
OpcUa_Int32 &  iMaxStringLength,
OpcUa_Int32 &  iMaxByteStringLength,
OpcUa_Int32 &  iMaxArrayLength,
OpcUa_Int32 &  iMaxMessageSize 
) const
pure virtual

Get Serializer Configuration.

These are the Security constraints for the serializer. Set these values carefully.

Returns
Error code.
Parameters
[out]iMaxAllocThe largest size for a memory block the serializer can do when deserializing a message
[out]iMaxStringLengthThe largest string accepted by the serializer
[out]iMaxByteStringLengthThe largest byte string accepted by the serializer
[out]iMaxArrayLengthMaximum number of elements in an array accepted by the serializer
[out]iMaxMessageSizeThe maximum number of bytes per message in total

Implemented in ServerConfigData.

virtual OpcUa_StatusCode ServerConfig::getServerInstanceInfo ( UaString ServerUri,
UaLocalizedTextArray &  ServerName 
) const
pure virtual

Returns the server instance information for the OPC server.

Returns
the server instance information for the OPC server.
Parameters
[out]ServerUriReturns the URI that identifies the software instance containing the OPC server.
[out]ServerNameReturns the name of the software instance containing the OPC server.

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getServerSettings ( OpcUa_Double &  minSupportedSampleRate,
UaStringArray &  localeIdArray,
UaStringArray &  serverProfileArray,
UaByteStringArray &  softwareCertificateArray 
) const
pure virtual

Get the general setting parameters for the server.

Returns
Error code.
Parameters
[out]minSupportedSampleRateMinimum supported sample rate by the server provided as capability information to the client
[out]localeIdArrayArray of LocaleIds that are known to be supported by the server.
[out]serverProfileArrayArray of conformance profile URIs indicating the features supported by the server.
[out]softwareCertificateArrayArray of software certificates containing all certificates supported by the server.

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getServerTraceSettings ( OpcUa_Boolean &  bTraceEnabled,
OpcUa_UInt32 &  uTraceLevel,
OpcUa_UInt32 &  uMaxTraceEntries,
OpcUa_UInt32 &  uMaxBackupFiles,
UaString sTraceFile 
) const
pure virtual

Get UA Server SDK trace settings.

Returns
Error code.
Parameters
[out]bTraceEnabledGlobally enable/disable trace output from the SDK
[out]uTraceLevelConfigure the level of messages traced
[out]uMaxTraceEntriesMaximum number of trace entries in one trace file
[out]uMaxBackupFilesMaximum number of backup files
[out]sTraceFileName and path of the trace file

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getSessionSettings ( OpcUa_Int32 &  iMaxSessionCount,
OpcUa_Int32 &  iMinSessionTimeout,
OpcUa_Int32 &  iMaxSessionTimeout 
) const
pure virtual

Get the setting parameters for session creation.

Returns
Error code.
Parameters
[out]iMaxSessionCountMaximum number of sessions the server allows to create
[out]iMinSessionTimeoutMinimum timeout in ms for a sessions the server allows to set
[out]iMaxSessionTimeoutMaximum timeout in ms for a sessions the server allows to set

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getStackThreadPoolSettings ( OpcUa_Boolean &  bEnabled,
OpcUa_Int32 &  iMinThreads,
OpcUa_Int32 &  iMaxThreads,
OpcUa_Int32 &  iMaxJobs,
OpcUa_Boolean &  bBlockOnAdd,
OpcUa_UInt32 &  nTimeout 
) const
pure virtual

Returns the settings for the thread pool used in the OPC UA Stack.

Returns
Error code.
Parameters
[out]bEnabledControls wether the secure listener uses a thread pool to dispatch received requests
[out]iMinThreadsThe minimum number of threads in the thread pool
[out]iMaxThreadsThe maximum number of threads in the thread pool
[out]iMaxJobsThe length of the queue with jobs waiting for a free thread
[out]bBlockOnAddIf MaxJobs is reached the add operation can block or return an error
[out]nTimeoutIf the add operation blocks on a full job queue, this value sets the max waiting time

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getStackTraceSettings ( OpcUa_Boolean &  bTraceEnabled,
OpcUa_UInt32 &  uTraceLevel 
) const
pure virtual

Get UA Stack trace settings.

Parameters
bTraceEnabled
uTraceLevel
Returns
Error code.
Parameters
[out]bTraceEnabledGlobally enable/disable trace output from the stack (exclude platformlayer)
[out]uTraceLevelConfigure the level of messages traced
  • OPCUA_TRACE_OUTPUT_LEVEL_NONE
  • OPCUA_TRACE_OUTPUT_LEVEL_ERROR
  • OPCUA_TRACE_OUTPUT_LEVEL_WARNING
  • OPCUA_TRACE_OUTPUT_LEVEL_SYSTEM
  • OPCUA_TRACE_OUTPUT_LEVEL_INFO
  • OPCUA_TRACE_OUTPUT_LEVEL_DEBUG
  • OPCUA_TRACE_OUTPUT_LEVEL_CONTENT
  • OPCUA_TRACE_OUTPUT_LEVEL_ALL

Implemented in ServerConfigData.

UaStatus ServerConfig::getSubscriptionMaxCountSettings ( OpcUa_UInt32 &  iMaxSubscriptionCount,
OpcUa_UInt32 &  iMaxMonitoredItemCount,
OpcUa_UInt32 &  iMaxMonitoredItemPerSubscriptionCount 
) const
virtual

Get the max object count parameters for Subscriptions.

Returns
Error code.
Parameters
[out]iMaxSubscriptionCountMaximum number of subscriptions the server allows to create. Default value 0 is unlimited
[out]iMaxMonitoredItemCountMaximum number of monitored items the server allows to create. Default value 0 is unlimited
[out]iMaxMonitoredItemPerSubscriptionCountMaximum number of monitored items per subscriptions the server allows to create. Default value 0 is unlimited

Reimplemented in ServerConfigData.

virtual UaStatus ServerConfig::getSubscriptionSettings ( OpcUa_UInt32 &  iMinPublishingInterval,
OpcUa_UInt32 &  iMaxPublishingInterval,
OpcUa_UInt32 &  iMinKeepAliveInterval,
OpcUa_UInt32 &  iMinSubscriptionLifetime,
OpcUa_UInt32 &  iMaxSubscriptionLifetime,
OpcUa_UInt32 &  iMaxRetransmitionQueueSize,
OpcUa_UInt32 &  iMaxNotificationsPerPublish 
) const
pure virtual

Get the setting parameters for a subscription.

Returns
Error code.
Parameters
[out]iMinPublishingIntervalMinimum publishing interval in milliseconds the server allows
[out]iMaxPublishingIntervalMaximum publishing interval in milliseconds the server allows
[out]iMinKeepAliveIntervalMinimum KeepAlive interval in milliseconds the server allows
[out]iMinSubscriptionLifetimeMinimum Subscription lifetime in milliseconds the server allows
[out]iMaxSubscriptionLifetimeMaximum Subscription lifetime in milliseconds the server allows
[out]iMaxRetransmitionQueueSizeMaximum number of messages in the republish queue the server allows per Subscription
[out]iMaxNotificationsPerPublishMaximum number of notifications per Publish the server allows

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getThreadPoolSettings ( OpcUa_UInt32 &  minSizeTransactionManager,
OpcUa_UInt32 &  maxSizeTransactionManager,
OpcUa_UInt32 &  minSizeSubscriptionManager,
OpcUa_UInt32 &  maxSizeSubscriptionManager 
) const
pure virtual

Returns the settings for the thread pools used in the OPC server.

Returns
Error code.
Parameters
[out]minSizeTransactionManagerReturns the number of threads that are created when the thread pool for the UaTransactionManager is created.
[out]maxSizeTransactionManagerReturns the maximum number of threads allowed for the thread pool in the UaTransactionManager.
[out]minSizeSubscriptionManagerReturns the number of threads that are created when the thread pool for the UaSubscriptionManager is created.
[out]maxSizeSubscriptionManagerReturns the maximum number of threads allowed for the thread pool in the UaSubscriptionManager.

Implemented in ServerConfigData.

virtual UaStatus ServerConfig::getUserIdentityTokenConfig ( OpcUa_Boolean &  bEnableAnonymous,
OpcUa_Boolean &  bEnableUserPw 
)
pure virtual

Get the enabled settings for the different user identity tokens supported by the server.

Activating other user identity tokens than anonymous requires a user management and the implementation of ServerConfig::logonSessionUser.

Returns
Error code.
Parameters
[out]bEnableAnonymousIndicates if Anonymous login is allowed.
[out]bEnableUserPwIndicates if login with user and password is activated.

Implemented in ServerConfigData.

UaStatus ServerConfig::getWindowsDiscoveryRegistrationSecuritySetup ( OpcUa_Boolean &  bAutomaticCertificateExchange,
UaString sDiscoveryServerCertificateFile,
UaString sDiscoveryServerStoreName,
UaString sDiscoveryServerCertificateName 
)
virtual

Get settings for exchanging certificates with local discovery server on a windows computer for registration with local windows discovery server.

Returns
OPC UA result code.
Parameters
[out]bAutomaticCertificateExchangeFlag indicating if the certificates should be exchanged
[out]sDiscoveryServerCertificateFileFile name and path of the discovery server certificate to be stored in the sever trust list. This parameter is ignored if the store of the first endpoint is the Windows certificate store.
[out]sDiscoveryServerStoreNameStore name used for the local discovery server in the windows certificate store
[out]sDiscoveryServerCertificateNameCertificate name of the local discovery server in the windows certificate store

Reimplemented in ServerConfigData.

OpcUa_Boolean ServerConfig::isAuditActivated ( )
virtual

Flag indicating if audit events are activated.

Returns
True if audit events are active and False if not.

Reimplemented in ServerConfigData.

virtual UaStatus ServerConfig::loadConfiguration ( )
pure virtual

Load the configuration from the config file.

This is the first method called after the creation of ServerConfig. This method must load all configuration options and must create all NodeManagers before the method startUp is called. The configuration can be loaded from a file, a data base or any other source to overwrite default settings defined in the constructor of the implementation class.

Returns
Error code.

Implemented in ServerConfigSettings, and ServerConfigXml.

virtual UaStatus ServerConfig::logonSessionUser ( Session pSession,
UaUserIdentityToken pUserIdentityToken 
)
pure virtual

Validates the user identity token and sets the user for a session.

Parameters
pSession
pUserIdentityToken
Returns
Error code
Parameters
[out]pSessionInterface pointer of the Session
[out]pUserIdentityTokenUser identity token contained in an ExtensionObject used to handle different types of user identity tokens like user/password or an X509 certificate. It provides the credentials of the user associated with the Client application. The implementation of this method must use these credentials to determine whether the Client should be allowed to activate a Session and what resources the Client has access to during this Session.If the method is not able to validate the user or if the user has no right to access the server, the method must return the status code OpcUa_BadUserAccessDenied.

Implemented in ServerConfigBasicXml, and ServerConfigBasicIni.

virtual UaStatus ServerConfig::saveConfiguration ( )
pure virtual

Save the configuration to the config file.

Returns
Error code.

Implemented in ServerConfigSettings, and ServerConfigXml.

virtual UaStatus ServerConfig::shutDown ( )
pure virtual

Shut down OPC ServerConfig.

Returns
Error code

Implemented in ServerConfigBasicXml, and ServerConfigBasicIni.

virtual UaStatus ServerConfig::startUp ( ServerManager pServerManager)
pure virtual

Start up OPC ServerConfig.

Returns
Error code
Parameters
[in]pServerManagerInterface to the central ServerManager object. This interface pointer should be stored in the NodeManager instance to have access to core module objects like the root NodeManager or the ServerConfig.

Implemented in ServerConfigBasicXml, and ServerConfigBasicIni.


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