ServerConfig Class Reference
[Core Module Interfaces]

#include <serverconfig.h>

List of all members.


Public Member Functions

 ServerConfig ()
virtual ~ServerConfig ()
virtual UaStatus loadConfiguration ()=0
virtual UaStatus startUp (ServerManager *pServerManager)=0
virtual UaStatus shutDown ()=0
virtual UaStatus saveConfiguration ()=0
virtual UaStatus getEndpointConfiguration (UaString &sRejectedCertificateDirectory, UaEndpointArray &uaEndpointArray)=0
virtual UaStatus getUserIdentityTokenConfig (OpcUa_Boolean &bEnableAnonymous, OpcUa_Boolean &bEnableUserPw)=0
virtual UaStatus getDiscoveryRegistrationConfig (OpcUa_UInt32 &nRegistrationInterval, UaStringArray &discoveryUrlArray)=0
virtual UaStatus getSerializerConfiguration (OpcUa_Int32 &iMaxAlloc, OpcUa_Int32 &iMaxStringLength, OpcUa_Int32 &iMaxByteStringLength, OpcUa_Int32 &iMaxArrayLength, OpcUa_Int32 &iMaxMessageSize) const =0
virtual UaStatus getStackThreadPoolSettings (OpcUa_Boolean &bEnabled, OpcUa_Int32 &iMinThreads, OpcUa_Int32 &iMaxThreads, OpcUa_Int32 &iMaxJobs, OpcUa_Boolean &bBlockOnAdd, OpcUa_UInt32 &nTimeout) const =0
virtual UaStatus getStackTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel) const =0
virtual OpcUa_Int32 getMaxRequestAge () const =0
virtual UaStatus getSessionSettings (OpcUa_Int32 &iMaxSessionCount, OpcUa_Int32 &iMinSessionTimeout, OpcUa_Int32 &iMaxSessionTimeout) const =0
virtual UaStatus getServerSettings (OpcUa_Double &minSupportedSampleRate, UaStringArray &localeIdArray, UaStringArray &serverProfileArray, UaByteStringArray &softwareCertificateArray) const =0
virtual OpcUa_Int32 getMaxBrowseContinuationPoints () const =0
virtual OpcUa_Int32 getMaxHistoryContinuationPoints () const =0
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
virtual UaStatus getMonitoredItemSettings (OpcUa_UInt32 &iMaxDataQueueSize, OpcUa_UInt32 &iMaxEventQueueSize) const =0
virtual UaStatus getAvailableSamplingRates (UaUInt32Array &availableSamplingRates) const =0
virtual OpcUa_StatusCode getBuildInfo (UaString &ProductUri, UaString &ManufacturerName, UaString &ProductName, UaString &sSoftwareVersion, UaString &sBuildNumber, OpcUa_DateTime &BuildDate) const =0
virtual OpcUa_StatusCode getServerInstanceInfo (UaString &ServerUri, UaLocalizedTextArray &ServerName) const =0
virtual UaStatus getThreadPoolSettings (OpcUa_UInt32 &minSizeTransactionManager, OpcUa_UInt32 &maxSizeTransactionManager, OpcUa_UInt32 &minSizeSubscriptionManager, OpcUa_UInt32 &maxSizeSubscriptionManager) const =0
virtual SessioncreateSession (OpcUa_Int32 sessionID, const UaNodeId &authenticationToken)=0
virtual UaStatus logonSessionUser (Session *pSession, UaUserIdentityToken *pUserIdentityToken)=0

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.

virtual ServerConfig::~ServerConfig (  )  [inline, virtual]

destruction


Member Function Documentation

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.

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

Start up OPC ServerConfig.

Parameters:
pServerManager Interface 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
Returns:
Error code

virtual UaStatus ServerConfig::shutDown (  )  [pure virtual]

Shut down OPC ServerConfig.

Returns:
Error code

virtual UaStatus ServerConfig::saveConfiguration (  )  [pure virtual]

Save the configuration to the config file.

Returns:
Error code.

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.

Parameters:
sRejectedCertificateDirectory The directory to store rejected client certificates.
uaEndpointArray UaEndpoint array of configured endpoints for the server.
Returns:
Error code.

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

Get the enabled settings for the differnt user identity tokens supported by the server. Activating other user identity tokens than anonymous requires a user management and the implementation of ServerConfig::logonSessionUser.

Parameters:
bEnableAnonymous Indicates if Anonymous login is allowed.
bEnableUserPw Indicates if login with user and password is activated.
Returns:
Error code.

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

Get settings for registration with discovery servers.

Parameters:
nRegistrationInterval Interval in milliseconds used to register with the discovery servers.
discoveryUrlArray UaString array of discovery server URLs to register with.
Returns:
Error code.

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.

Parameters:
iMaxAlloc The largest size for a memory block the serializer can do when deserializing a message
iMaxStringLength The largest string accepted by the serializer
iMaxByteStringLength The largest byte string accepted by the serializer
iMaxArrayLength Maximum number of elements in an array accepted by the serializer
iMaxMessageSize The maximum number of bytes per message in total
Returns:
Error code.

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.

Parameters:
bEnabled Controls wether the secure listener uses a thread pool to dispatch received requests
iMinThreads The minimum number of threads in the thread pool
iMaxThreads The maximum number of threads in the thread pool
iMaxJobs The length of the queue with jobs waiting for a free thread
bBlockOnAdd If MaxJobs is reached the add operation can block or return an error
nTimeout If the add operation blocks on a full job queue, this value sets the max waiting time
Returns:
Error code.

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

Get UA Stack trace settings.

Parameters:
bTraceEnabled Globally enable/disable trace output from the stack (exclude platformlayer)
uTraceLevel Configure 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
Returns:
Error code.

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.

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

Get the setting parameters for session creation.

Parameters:
iMaxSessionCount Maximum number of sessions the server allows to create
iMinSessionTimeout Minimum timeout in ms for a sessions the server allows to set
iMaxSessionTimeout Maximum timeout in ms for a sessions the server allows to set
Returns:
Error code.

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

Get the general setting parameters for the server.

Parameters:
minSupportedSampleRate Minimum supported sample rate by the server provided as capability information to the client
localeIdArray Array of LocaleIds that are known to be supported by the server.
serverProfileArray Array of conformance profile URIs indicating the features supported by the server.
softwareCertificateArray Array of software certificates containing all certificates supported by the server.
Returns:
Error code.

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.

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.

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.

Parameters:
iMinPublishingInterval Minimum publishing interval in milliseconds the server allows
iMaxPublishingInterval Maximum publishing interval in milliseconds the server allows
iMinKeepAliveInterval Minimum KeepAlive interval in milliseconds the server allows
iMinSubscriptionLifetime Minimum Subscription lifetime in milliseconds the server allows
iMaxSubscriptionLifetime Maximum Subscription lifetime in milliseconds the server allows
iMaxRetransmitionQueueSize Maximum number of messages in the republish queue the server allows per Subscription
iMaxNotificationsPerPublish Maximum number of notifications per Publish the server allows
Returns:
Error code.

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

Get the setting parameters for a MonitoreItem.

Parameters:
iMaxPublishingInterval Maximum queue size for a data monitored item
iMaxSubscriptionLifetime Maximum queue size for an event monitored item
Returns:
Error code.

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

Returns the sampling rates provided by the OPC server.

Parameters:
availableSamplingRates Array of sampling rates provided by the OPC server.
Returns:
Error code.

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.

Parameters:
ProductUri Returns the URI that identifies the software containing the OPC server.
ManufacturerName Returns the name of the software manufacturer.
ProductName Returns the name of the software containing the OPC server.
sSoftwareVersion Returns the software version.
sBuildNumber Returns the build number.
BuildDate Returns the date and time of the build.
Returns:
the build information for the OPC server.

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

Returns the server instance information for the OPC server.

Parameters:
ServerUri Returns the URI that identifies the software instance containing the OPC server.
ServerName Returns the name of the software instance containing the OPC server.
Returns:
the server instance information for the OPC server.

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.

Parameters:
minSizeTransactionManager Returns the number of threads that are created when the thread pool for the UaTransactionManager is created.
maxSizeTransactionManager Returns the maximum number of threads allowed for the thread pool in the UaTransactionManager.
minSizeSubscriptionManager Returns the number of threads that are created when the thread pool for the UaSubscriptionManager is created.
maxSizeSubscriptionManager Returns the maximum number of threads allowed for the thread pool in the UaSubscriptionManager.
Returns:
Error code.

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.

Parameters:
sessionID Session Id created by the server application.
authenticationToken Secret session Id created by the server application.
Returns:
Session object

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

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

Parameters:
pSession Interface pointer of the Session
pUserIdentityToken User 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.
Returns:
Error code


The documentation for this class was generated from the following file:
  • src/uaserver/uaservercpp/coremodule/serverconfig.h