UA Server SDK C++ Bundle  1.3.2.200
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
ServerConfigData Class Reference

ServerConfigData Derived from ServerConfig. More...

#include <serverconfigdata.h>

Inherits ServerConfig.

Inherited by ServerConfigSettings, and ServerConfigXml.

Public Member Functions

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

Static Public Member Functions

static void replaceNodeName (UaString &sString, const UaString &sNodeName)
 Replace placeholder [NodeName] with real node name.
static void replaceServerName (UaString &sString, const UaString &sServerName)
 Replace placeholder [ServerName] with real server name.
static void replaceApplicationPath (UaString &sString, const UaString &sApplicationPath)
 Replace placeholder [ApplicationPath] with real application path.

Protected Member Functions

OpcUa_DateTime getBuildDate () const
 Get the build date from the static compiled in string.

Protected Attributes

OpcUa_Int32 m_maxRequestAge
 Maximum age of a request the server allows.
OpcUa_Int32 m_maxSessionCount
 Maximum number of sessions the server allows to create.
OpcUa_Int32 m_minSessionTimeout
 Minimum timeout in ms for a sessions the server allows to set.
OpcUa_Int32 m_maxSessionTimeout
 Maximum timeout in ms for a sessions the server allows to set.
OpcUa_Int32 m_maxBrowseContinuationPoints
 Maximum number of Browse Continuation Points managed by the server.
OpcUa_Int32 m_maxHistoryContinuationPoints
 Maximum number of History Continuation Points managed by the server.
OpcUa_UInt32 m_minPublishingInterval
 Minimum publishing interval in milliseconds the server allows.
OpcUa_UInt32 m_maxPublishingInterval
 Maximum publishing interval in milliseconds the server allows.
OpcUa_UInt32 m_minKeepAliveInterval
 Minimum KeepAlive interval in milliseconds the server allows.
OpcUa_UInt32 m_minSubscriptionLifetime
 Minimum Subscription lifetime in milliseconds the server allows.
OpcUa_UInt32 m_maxSubscriptionLifetime
 Maximum Subscription lifetime in milliseconds the server allows.
OpcUa_UInt32 m_maxRetransmitionQueueSize
 Maximum number of messages in the republish queue the server allows per Subscription.
OpcUa_UInt32 m_maxNotificationsPerPublish
 Maximum number of notifications per Publish the server allows.
UaUInt32Array m_availableSamplingRates
 Array of sampling rates provided by the OPC server.
UaString m_sApplicationUri
 BuildInfo structure.
UaString m_sServerUri
 Server Description.
OpcUa_Boolean m_bStackThreadPoolEnabled
 UA Stack Thread pool settings.
OpcUa_UInt32 m_minSizeTransactionManager
 SDK Thread pool settings.
UaString m_sRejectedCertificateDirectory
 Directory to store rejected certificates in.
UaEndpointArray m_uaEndpointArray
 Array of UA endpoint descriptions.
OpcUa_UInt32 m_nRegistrationInterval
 Discovery server registration settings.
OpcUa_Int32 m_iMaxAlloc
 These are the Security constraints for the serializer.
OpcUa_Boolean m_bTraceEnabled
 UA Stack trace settings.
OpcUa_Boolean m_bSdkTraceEnabled
 UA Server SDK trace settings.

Detailed Description

ServerConfigData Derived from ServerConfig.

It is not possible to make plane copies of this class.

Constructor & Destructor Documentation

ServerConfigData::ServerConfigData ( const UaString sApplicationPath)

construction

Parameters
sApplicationPaththe path to the application.

Member Function Documentation

UaStatus ServerConfigData::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.

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

Reimplemented from ServerConfig.

UaStatus ServerConfigData::getAvailableSamplingRates ( UaUInt32Array &  availableSamplingRates) const
virtual

Returns the sampling rates provided by the OPC server.

Parameters
availableSamplingRatesDescription
Returns
Error code.

Implements ServerConfig.

OpcUa_DateTime ServerConfigData::getBuildDate ( ) const
protected

Get the build date from the static compiled in string.

Returns
the build date from the static compiled in string.
OpcUa_StatusCode ServerConfigData::getBuildInfo ( UaString ApplicationUri,
UaString ManufacturerName,
UaString ApplicationName,
UaString sSoftwareVersion,
UaString sBuildNumber,
OpcUa_DateTime &  BuildDate 
) const
virtual

Returns the BuildInfo for the server.

Parameters
ApplicationUrithe URI of the actual application.
ManufacturerNamethe name of the manufacturer.
ApplicationNamethe name of this application.
sSoftwareVersionthe software version.
sBuildNumberthe build number.
BuildDatewhen was the server build?
Returns
the OPC UA Status code.

Implements ServerConfig.

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

Get settings for registration with discovery service.

Parameters
nRegistrationIntervalInterval in milliseconds used to register with the discovery servers.
discoveryUrlArrayArray of discovery server URLs to register with.
Returns
Error code.

Implements ServerConfig.

UaStatus ServerConfigData::getEndpointConfiguration ( UaString sRejectedCertificateDirectory,
UaEndpointArray uaEndpointArray 
)
virtual

Get Endpoint Configuration.

Parameters
sRejectedCertificateDirectoryThe directory to store rejected client certificates.
uaEndpointArrayArray of configured endpoints for the server.
Returns
Error code.

Implements ServerConfig.

OpcUa_Int32 ServerConfigData::getMaxBrowseContinuationPoints ( ) const
virtual

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

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

Implements ServerConfig.

OpcUa_Int32 ServerConfigData::getMaxHistoryContinuationPoints ( ) const
virtual

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

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

Implements ServerConfig.

OpcUa_Int32 ServerConfigData::getMaxRequestAge ( ) const
virtual

Returns the maximum age of a request the server allows.

Returns
the maximum age of a request the server allows.

Implements ServerConfig.

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

Get the setting parameters for a MonitoreItem.

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

Implements ServerConfig.

UaStatus ServerConfigData::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.

Parameters
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)
serverUriArrayList of server URIs for the servers in the NonTransparent redundant set
Returns
Error code

Reimplemented from ServerConfig.

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

Get Serializer Configuration.

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

Implements ServerConfig.

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

Returns the server instance information for the OPC server.

Parameters
ServerUrithe actual server URI.
ServerNamethe server name.
Returns
the OPC UA Status code.

Implements ServerConfig.

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

Get the general setting parameters for the server.

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

Implements ServerConfig.

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

Get UA Server SDK trace settings.

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

Implements ServerConfig.

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

Get the setting parameters for session creation.

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

Implements ServerConfig.

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

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

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

Implements ServerConfig.

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

Get UA Stack trace settings.

Parameters
bTraceEnabledGlobally enable/disable trace output from the stack (exclude platformlayer)
uTraceLevelConfigure the level of messages traced
Returns
Error code.

Implements ServerConfig.

UaStatus ServerConfigData::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 from ServerConfig.

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

Get the setting parameters for a subscription.

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

Implements ServerConfig.

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

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

Parameters
minSizeTransactionManagerReturns the number of threads that are created when the
maxSizeTransactionManagerReturns the maximum number of threads allowed for the
minSizeSubscriptionManagerReturns the number of threads that are created when the
maxSizeSubscriptionManagerReturns the maximum number of threads allowed.
Returns
Error code.

Implements ServerConfig.

UaStatus ServerConfigData::getUserIdentityTokenConfig ( OpcUa_Boolean &  bEnableAnonymous,
OpcUa_Boolean &  bEnableUserPw 
)
virtual

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

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

Implements ServerConfig.

UaStatus ServerConfigData::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
[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 from ServerConfig.

OpcUa_Boolean ServerConfigData::isAuditActivated ( )
virtual

Flag indicating if audit events are activated.

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

Reimplemented from ServerConfig.

void ServerConfigData::replaceApplicationPath ( UaString sString,
const UaString sApplicationPath 
)
static

Replace placeholder [ApplicationPath] with real application path.

In the configuration files only forward slashes are used to be portable. This code converts this to backslashes on Windows.

Parameters
sStringa string used for the name.
sApplicationPaththe path to the application.
void ServerConfigData::replaceNodeName ( UaString sString,
const UaString sNodeName 
)
static

Replace placeholder [NodeName] with real node name.

Parameters
sStringa string used for the name.
sNodeNamethe node name.
void ServerConfigData::replaceServerName ( UaString sString,
const UaString sServerName 
)
static

Replace placeholder [ServerName] with real server name.

Replace placeholder [ServerName] with real node name.

Parameters
sStringa string used for the name.
sServerNamethe server name.

Field Documentation

OpcUa_Boolean ServerConfigData::m_bSdkTraceEnabled
protected

UA Server SDK trace settings.

OpcUa_Boolean ServerConfigData::m_bTraceEnabled
protected

UA Stack trace settings.

OpcUa_Int32 ServerConfigData::m_iMaxAlloc
protected

These are the Security constraints for the serializer.

Set this values carefully.

OpcUa_UInt32 ServerConfigData::m_nRegistrationInterval
protected

Discovery server registration settings.


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