#include <serverconfig.h>
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 | 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 =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 UaStatus | getServerTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel, OpcUa_UInt32 &uMaxTraceEntries, OpcUa_UInt32 &uMaxBackupFiles, UaString &sTraceFile) 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 Session * | createSession (OpcUa_Int32 sessionID, const UaNodeId &authenticationToken)=0 |
virtual UaStatus | logonSessionUser (Session *pSession, UaUserIdentityToken *pUserIdentityToken)=0 |
virtual OpcUa_Boolean | isAuditActivated () |
virtual UaStatus | getRedundancySettings (OpcUa_RedundancySupport &redundancySupport, UaStringArray &serverUriArray) |
virtual UaStatus | getAdditionalServerEntries (UaApplicationDescriptions &serverDescriptions) |
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.
ServerConfig::ServerConfig | ( | ) | [inline] |
construction.
virtual ServerConfig::~ServerConfig | ( | ) | [inline, virtual] |
destruction
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.
[out] | sessionID | Session Id created by the server application. |
[out] | authenticationToken | Secret session Id created by the server application. |
Implemented in ServerConfigBasicIni, and ServerConfigBasicXml.
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.
[out] | serverDescriptions | List 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.
[out] | availableSamplingRates | Array 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.
[out] | ProductUri | Returns the URI that identifies the software containing the OPC server. |
[out] | ManufacturerName | Returns the name of the software manufacturer. |
[out] | ProductName | Returns the name of the software containing the OPC server. |
[out] | sSoftwareVersion | Returns the software version. |
[out] | sBuildNumber | Returns the build number. |
[out] | BuildDate | Returns 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.
[out] | nRegistrationInterval | Interval in milliseconds used to register with the discovery servers. |
[out] | discoveryUrlArray | UaString 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.
[out] | sRejectedCertificateDirectory | The directory to store rejected client certificates. |
[out] | uaEndpointArray | UaEndpoint 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.
Implemented in ServerConfigData.
virtual OpcUa_Int32 ServerConfig::getMaxHistoryContinuationPoints | ( | ) | const [pure virtual] |
Returns the 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.
Implemented in ServerConfigData.
virtual UaStatus ServerConfig::getMonitoredItemSettings | ( | OpcUa_UInt32 & | iMaxDataQueueSize, |
OpcUa_UInt32 & | iMaxEventQueueSize | ||
) | const [pure virtual] |
Get the setting parameters for a MonitoreItem.
[out] | iMaxDataQueueSize | Maximum queue size for a data monitored item |
[out] | iMaxEventQueueSize | Maximum 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 capabilit object.
[out] | redundancySupport | Redundancy support options
|
[out] | serverUriArray | List 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.
[out] | iMaxAlloc | The largest size for a memory block the serializer can do when deserializing a message |
[out] | iMaxStringLength | The largest string accepted by the serializer |
[out] | iMaxByteStringLength | The largest byte string accepted by the serializer |
[out] | iMaxArrayLength | Maximum number of elements in an array accepted by the serializer |
[out] | iMaxMessageSize | The 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.
[out] | ServerUri | Returns the URI that identifies the software instance containing the OPC server. |
[out] | ServerName | Returns 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.
[out] | minSupportedSampleRate | Minimum supported sample rate by the server provided as capability information to the client |
[out] | localeIdArray | Array of LocaleIds that are known to be supported by the server. |
[out] | serverProfileArray | Array of conformance profile URIs indicating the features supported by the server. |
[out] | softwareCertificateArray | Array 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.
[out] | bTraceEnabled | Globally enable/disable trace output from the SDK |
[out] | uTraceLevel | Configure the level of messages traced |
[out] | uMaxTraceEntries | Maximum number of trace entries in one trace file |
[out] | uMaxBackupFiles | Maximum number of backup files |
[out] | sTraceFile | Name 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.
[out] | iMaxSessionCount | Maximum number of sessions the server allows to create |
[out] | iMinSessionTimeout | Minimum timeout in ms for a sessions the server allows to set |
[out] | iMaxSessionTimeout | Maximum 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.
[out] | bEnabled | Controls wether the secure listener uses a thread pool to dispatch received requests |
[out] | iMinThreads | The minimum number of threads in the thread pool |
[out] | iMaxThreads | The maximum number of threads in the thread pool |
[out] | iMaxJobs | The length of the queue with jobs waiting for a free thread |
[out] | bBlockOnAdd | If MaxJobs is reached the add operation can block or return an error |
[out] | nTimeout | If 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.
bTraceEnabled | |
uTraceLevel |
[out] | bTraceEnabled | Globally enable/disable trace output from the stack (exclude platformlayer) |
[out] | uTraceLevel | Configure the level of messages traced
|
Implemented 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.
[out] | iMinPublishingInterval | Minimum publishing interval in milliseconds the server allows |
[out] | iMaxPublishingInterval | Maximum publishing interval in milliseconds the server allows |
[out] | iMinKeepAliveInterval | Minimum KeepAlive interval in milliseconds the server allows |
[out] | iMinSubscriptionLifetime | Minimum Subscription lifetime in milliseconds the server allows |
[out] | iMaxSubscriptionLifetime | Maximum Subscription lifetime in milliseconds the server allows |
[out] | iMaxRetransmitionQueueSize | Maximum number of messages in the republish queue the server allows per Subscription |
[out] | iMaxNotificationsPerPublish | Maximum 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.
[out] | minSizeTransactionManager | Returns the number of threads that are created when the thread pool for the UaTransactionManager is created. |
[out] | maxSizeTransactionManager | Returns the maximum number of threads allowed for the thread pool in the UaTransactionManager. |
[out] | minSizeSubscriptionManager | Returns the number of threads that are created when the thread pool for the UaSubscriptionManager is created. |
[out] | maxSizeSubscriptionManager | Returns 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 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.
[out] | bEnableAnonymous | Indicates if Anonymous login is allowed. |
[out] | bEnableUserPw | Indicates 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.
[out] | bAutomaticCertificateExchange | Flag indicating if the certificates should be exchanged |
[out] | sDiscoveryServerCertificateFile | File 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 Winodws certificate store. |
[out] | sDiscoveryServerStoreName | Store name used for the local discovery server in the windows certificate store |
[out] | sDiscoveryServerCertificateName | Certificate 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.
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.
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.
pSession | |
pUserIdentityToken |
[out] | pSession | Interface pointer of the Session |
[out] | 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. |
Implemented in ServerConfigBasicIni, and ServerConfigBasicXml.
virtual UaStatus ServerConfig::saveConfiguration | ( | ) | [pure virtual] |
Save the configuration to the config file.
Implemented in ServerConfigSettings, and ServerConfigXml.
virtual UaStatus ServerConfig::shutDown | ( | ) | [pure virtual] |
Shut down OPC ServerConfig.
Implemented in ServerConfigBasicIni, and ServerConfigBasicXml.
virtual UaStatus ServerConfig::startUp | ( | ServerManager * | pServerManager ) | [pure virtual] |
Start up OPC ServerConfig.
[in] | 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. |
Implemented in ServerConfigBasicIni, and ServerConfigBasicXml.