#include <serverconfigdata.h>

Inheritance diagram for ServerConfigData:
Collaboration diagram for ServerConfigData:

List of all members.

Public Member Functions

 ServerConfigData (const UaString &sApplicationPath)
virtual ~ServerConfigData ()
void clear ()
virtual UaStatus getEndpointConfiguration (UaString &sRejectedCertificateDirectory, UaEndpointArray &uaEndpointArray)
virtual UaStatus getUserIdentityTokenConfig (OpcUa_Boolean &bEnableAnonymous, OpcUa_Boolean &bEnableUserPw)
virtual UaStatus getDiscoveryRegistrationConfig (OpcUa_UInt32 &nRegistrationInterval, UaStringArray &discoveryUrlArray)
virtual UaStatus getWindowsDiscoveryRegistrationSecuritySetup (OpcUa_Boolean &bAutomaticCertificateExchange, UaString &sDiscoveryServerCertificateFile, UaString &sDiscoveryServerStoreName, UaString &sDiscoveryServerCertificateName)
virtual UaStatus getSerializerConfiguration (OpcUa_Int32 &iMaxAlloc, OpcUa_Int32 &iMaxStringLength, OpcUa_Int32 &iMaxByteStringLength, OpcUa_Int32 &iMaxArrayLength, OpcUa_Int32 &iMaxMessageSize) const
virtual UaStatus getStackThreadPoolSettings (OpcUa_Boolean &bEnabled, OpcUa_Int32 &iMinThreads, OpcUa_Int32 &iMaxThreads, OpcUa_Int32 &iMaxJobs, OpcUa_Boolean &bBlockOnAdd, OpcUa_UInt32 &nTimeout) const
virtual UaStatus getStackTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel) const
virtual UaStatus getServerTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel, OpcUa_UInt32 &uMaxTraceEntries, OpcUa_UInt32 &uMaxBackupFiles, UaString &sTraceFile) const
virtual OpcUa_Int32 getMaxRequestAge () const
virtual UaStatus getSessionSettings (OpcUa_Int32 &iMaxSessionCount, OpcUa_Int32 &iMinSessionTimeout, OpcUa_Int32 &iMaxSessionTimeout) const
virtual UaStatus getServerSettings (OpcUa_Double &minSupportedSampleRate, UaStringArray &localeIdArray, UaStringArray &serverProfileArray, UaByteStringArray &softwareCertificateArray) const
virtual OpcUa_Int32 getMaxBrowseContinuationPoints () const
virtual OpcUa_Int32 getMaxHistoryContinuationPoints () const
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
virtual UaStatus getMonitoredItemSettings (OpcUa_UInt32 &iMaxDataQueueSize, OpcUa_UInt32 &iMaxEventQueueSize) const
virtual UaStatus getAvailableSamplingRates (UaUInt32Array &availableSamplingRates) const
virtual OpcUa_StatusCode getBuildInfo (UaString &ApplicationUri, UaString &ManufacturerName, UaString &ApplicationName, UaString &sSoftwareVersion, UaString &sBuildNumber, OpcUa_DateTime &BuildDate) const
virtual OpcUa_StatusCode getServerInstanceInfo (UaString &ServerUri, UaLocalizedTextArray &ServerName) const
virtual UaStatus getThreadPoolSettings (OpcUa_UInt32 &minSizeTransactionManager, OpcUa_UInt32 &maxSizeTransactionManager, OpcUa_UInt32 &minSizeSubscriptionManager, OpcUa_UInt32 &maxSizeSubscriptionManager) const
virtual OpcUa_Boolean isAuditActivated ()
virtual UaStatus getRedundancySettings (OpcUa_RedundancySupport &redundancySupport, UaStringArray &serverUriArray)
virtual UaStatus getAdditionalServerEntries (UaApplicationDescriptions &serverDescriptions)

Static Public Member Functions

static void replaceNodeName (UaString &sString, const UaString &sNodeName)
static void replaceServerName (UaString &sString, const UaString &sServerName)
static void replaceApplicationPath (UaString &sString, const UaString &sApplicationPath)

Protected Member Functions

OpcUa_DateTime getBuildDate () const

Protected Attributes

OpcUa_Int32 m_maxRequestAge
OpcUa_Int32 m_maxSessionCount
OpcUa_Int32 m_minSessionTimeout
OpcUa_Int32 m_maxSessionTimeout
OpcUa_Int32 m_maxBrowseContinuationPoints
OpcUa_Int32 m_maxHistoryContinuationPoints
OpcUa_UInt32 m_minPublishingInterval
OpcUa_UInt32 m_maxPublishingInterval
OpcUa_UInt32 m_minKeepAliveInterval
OpcUa_UInt32 m_minSubscriptionLifetime
OpcUa_UInt32 m_maxSubscriptionLifetime
OpcUa_UInt32 m_maxRetransmitionQueueSize
OpcUa_UInt32 m_maxNotificationsPerPublish
UaUInt32Array m_availableSamplingRates
UaString m_sApplicationUri
UaString m_sServerUri
OpcUa_Boolean m_bStackThreadPoolEnabled
OpcUa_UInt32 m_minSizeTransactionManager
UaString m_sRejectedCertificateDirectory
UaEndpointArray m_uaEndpointArray
OpcUa_UInt32 m_nRegistrationInterval
OpcUa_Int32 m_iMaxAlloc
OpcUa_Boolean m_bTraceEnabled
OpcUa_Boolean m_bSdkTraceEnabled

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.
ServerConfigData::~ServerConfigData (  ) [virtual]

destruction


Member Function Documentation

void ServerConfigData::clear (  )

Clears all members and intializes them with default values.

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.

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 capabilit 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 wether 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::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 differnt 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.

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.

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.

Member Data Documentation

UaUInt32Array ServerConfigData::m_availableSamplingRates [protected]

Array of sampling rates provided by the OPC server

OpcUa_Boolean ServerConfigData::m_bSdkTraceEnabled [protected]

UA Server SDK trace settings.

UA Stack Thread pool 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.

Maximum number of Browse Continuation Points managed by the server

Maximum number of History Continuation Points managed by the server

Maximum number of notifications per Publish the server allows

Maximum publishing interval in milliseconds the server allows

OpcUa_Int32 ServerConfigData::m_maxRequestAge [protected]

Maximum age of a request the server allows

Maximum number of messages in the republish queue the server allows per Subscription

OpcUa_Int32 ServerConfigData::m_maxSessionCount [protected]

Maximum number of sessions the server allows to create

OpcUa_Int32 ServerConfigData::m_maxSessionTimeout [protected]

Maximum timeout in ms for a sessions the server allows to set

Maximum Subscription lifetime in milliseconds the server allows

OpcUa_UInt32 ServerConfigData::m_minKeepAliveInterval [protected]

Minimum KeepAlive interval in milliseconds the server allows

Minimum publishing interval in milliseconds the server allows

OpcUa_Int32 ServerConfigData::m_minSessionTimeout [protected]

Minimum timeout in ms for a sessions the server allows to set

SDK Thread pool settings

Minimum Subscription lifetime in milliseconds the server allows

Discovery server registration settings.

BuildInfo structure

Directory to store rejected certificates in

Server Description

UaEndpointArray ServerConfigData::m_uaEndpointArray [protected]

Array of UA endpoint descriptions


The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/serverconfigdata.h
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/serverconfigdata.cpp