C++ UA Server SDK
1.5.2.336
|
ServerConfigXml Derived from ServerConfig. More...
#include <serverconfigxml.h>
Inherits ServerConfigData.
Inherited by ServerConfigBasicXml.
Public Member Functions | |
ServerConfigXml (const UaString &sXmlFileName, const UaString &sApplicationPath, const UaString &sConfigPath, const UaString &sTracePath) | |
Creates an instance of the ServerConfigXml class reading the configuration settings from a XML file. More... | |
virtual | ~ServerConfigXml () |
destruction More... | |
UaStatus | loadConfiguration () |
Load the configuration from the config file and generate node managers. More... | |
UaStatus | addConfiguredNamespace (OpcUa_UInt16 namespaceIndex, const UaString &namespaceUri, OpcUa_Boolean allowRenameUri, const UaString &uniqueId) |
Adds a namespaces configuration entry for preconfigured namespaces. More... | |
UaStatus | removeConfiguredNamespace (OpcUa_UInt16 namespaceIndex) |
Removes a namespaces configuration entry for preconfigured namespaces. More... | |
UaStatus | setTagFileConfiguration (const UaString &defaultTagFileName, const UaString &tagFileLocation, const UaString &tagFileEnding, const UaString &defaultFileUpdatePolicy) |
Set information about tagfile name, path und file ending used in the NodeManagerTagFile. More... | |
UaStatus | addComDaPropertyMapping (const UaString &propertyName, const UaString &propertyNameSpaceUri, OpcUa_UInt32 propertyId) |
Adds an entry to the mapping list of OPC UA property names to COM Data Access property Ids. More... | |
UaStatus | addComAeEventCategoryMapping (ComAeEventType eventType, const UaUInt32Array &categoryIDs, const UaStringArray &categoryNames, const UaNodeIdArray &eventTypeIds, const UaStringArray &namespaceUris) |
Adds a mapping list of OPC UA event type NodeIds to COM Alarms and Events category IDs. More... | |
UaStatus | addComAeAttributeMapping (OpcUa_UInt32 attributeID, const UaString &attributeName, OpcUa_BuiltInType dataType, OpcUa_Boolean isArray, const UaStringArray &eventFieldPathNames, const UaStringArray &eventFieldPathNamespaceUris) |
Adds an entry to the mapping list of OPC UA event fields to COM Alarms and Events attribute IDs. More... | |
UaStatus | saveConfiguration () |
Save the configuration to the config file. More... | |
Public Member Functions inherited from ServerConfigData | |
ServerConfigData (const UaString &sApplicationPath, const UaString &sConfigPath, const UaString &sTracePath) | |
Creates an instance of the ServerConfigData class reading the configuration settings from an INI file. More... | |
virtual | ~ServerConfigData () |
Destroys the ServerConfigData object. | |
void | clear () |
Clears all members and intializes them with default values. | |
virtual UaStatus | getEndpointConfiguration (UaString &sRejectedCertificateDirectory, OpcUa_UInt32 &nRejectedCertificatesCount, UaEndpointArray &uaEndpointArray) |
Get Endpoint Configuration. More... | |
virtual void | endpointOpened (OpcUa_UInt32 index) |
Set state of successfully opened endpoint. | |
virtual UaStatus | getCertificateStoreConfigurations (CertificateStoreConfigurationPArray &certificateStores) |
Get the configurations for server certificates and trust lists. More... | |
virtual UaStatus | getUserIdentityTokenConfig (OpcUa_Boolean &bEnableAnonymous, OpcUa_Boolean &bEnableUserPw, OpcUa_Boolean &bEnableCertificate, OpcUa_Boolean &bEnableKerberosTicket) |
Gets the enabled settings for the different user identity tokens supported by the server. More... | |
virtual UaStatus | getUserIdentityTokenSecurityPolicy (UaString &sSecurityPolicyUri) |
Get the security policy to use when encrypting or signing the UserIdentityToken when it is passed to the server. More... | |
virtual UaStatus | getDefaultUserCertificateStore (CertificateStoreConfiguration **ppCertificateStore, UaString &sRejectedCertificateDirectory, OpcUa_UInt32 &nRejectedCertificatesCount, OpcUa_Boolean &bCertificateTokenConfigured) |
Get the configurations for the trust list and rejected folder for user certificates. More... | |
virtual UaStatus | getIdsForDefaultRoles (OpcUa_UInt16 &nRootUserId, OpcUa_UInt16 &nSecurityAdminGroupId, OpcUa_UInt16 &nConfigAdminGroupId) |
Get Ids for roles defined in the SDK. More... | |
virtual UaStatus | getDiscoveryRegistrationConfig (OpcUa_UInt32 &nRegistrationInterval, UaStringArray &discoveryUrlArray) |
Get settings for registration with discovery service. More... | |
virtual UaStatus | getWindowsDiscoveryRegistrationSecuritySetup (OpcUa_Boolean &bAutomaticCertificateExchange, UaString &sDiscoveryServerTrustListLocation, 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 |
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 |
Returns the settings for the thread pool used in the OPC UA Stack. More... | |
virtual UaStatus | getStackTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel) const |
Get UA Stack trace settings. More... | |
virtual UaStatus | getServerTraceSettings (OpcUa_Boolean &bTraceEnabled, OpcUa_UInt32 &uTraceLevel, OpcUa_UInt32 &uMaxTraceEntries, OpcUa_UInt32 &uMaxBackupFiles, UaString &sTraceFile, OpcUa_Boolean &bDisableFlush) const |
Get UA Server SDK trace settings. More... | |
virtual UaStatus | getTraceEventSettings (OpcUa_UInt32 &uTraceEventLevel) const |
Get UA Server SDK trace event settings. More... | |
virtual OpcUa_Int32 | getMaxRequestAge () const |
Returns the maximum age of a request the server allows. More... | |
virtual UaStatus | getSessionSettings (OpcUa_Int32 &iMaxSessionCount, OpcUa_Int32 &iMaxSessionsPerClient, OpcUa_Int32 &iMinSessionTimeout, OpcUa_Int32 &iMaxSessionTimeout) const |
Get the setting parameters for session creation. More... | |
virtual UaStatus | getServerSettings (OpcUa_Double &minSupportedSampleRate, UaStringArray &localeIdArray, UaStringArray &serverProfileArray, UaByteStringArray &softwareCertificateArray) const |
Get the general setting parameters for the server. More... | |
virtual OpcUa_Int32 | getMaxBrowseContinuationPoints () const |
Returns the maximum number of Browse Continuation Points managed by the server. More... | |
virtual OpcUa_Int32 | getMaxBrowseResults () const |
Returns the maximum number of Browse results for one browse operation. More... | |
virtual OpcUa_Int32 | getMaxNodesToBrowse () const |
Returns the maximum number of nodes to browse the server will accept. More... | |
virtual UaStatus | getMaxNodesPerHistoryService (OpcUa_UInt32 &iMaxNodesPerHistoryReadData, OpcUa_UInt32 &iMaxNodesPerHistoryReadEvents, OpcUa_UInt32 &iMaxNodesPerHistoryUpdateData, OpcUa_UInt32 &iMaxNodesPerHistoryUpdateEvents) const |
Get the operation limit setting parameters for historical access. More... | |
virtual OpcUa_Int32 | getMaxHistoryContinuationPoints () const |
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 &iMaxRetransmissionQueueSize, OpcUa_UInt32 &iMaxNotificationsPerPublish) const |
Get the setting parameters for a subscription. More... | |
virtual UaStatus | getMonitoredItemSettings (OpcUa_UInt32 &iMaxDataQueueSize, OpcUa_UInt32 &iMaxEventQueueSize) const |
Get the setting parameters for a MonitoreItem. More... | |
virtual UaStatus | getSubscriptionMaxCountSettings (OpcUa_UInt32 &iMaxSubscriptionCount, OpcUa_UInt32 &iMaxSubscriptionsPerSession, OpcUa_UInt32 &iMaxMonitoredItemCount, OpcUa_UInt32 &iMaxMonitoredItemPerSubscriptionCount, OpcUa_UInt32 &iMaxMonitoredItemPerSessionCount) const |
Get the max object count parameters for Subscriptions. More... | |
virtual UaStatus | getAvailableSamplingRates (UaUInt32Array &availableSamplingRates) const |
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 |
Returns the BuildInfo for the server. More... | |
virtual OpcUa_StatusCode | getServerInstanceInfo (UaString &ServerUri, UaLocalizedTextArray &ServerName) const |
Returns the server instance information for the OPC server. More... | |
virtual UaString | getServerId () const |
Returns the ServerId used for audit events. More... | |
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. 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... | |
virtual UaStatus | getConfiguredNamespaces (UaUInt16Array &namespaceIndexArray, UaStringArray &namespaceUriArray, UaBoolArray &allowRenameUriArray, UaStringArray &uniqueIdArray, UaStringArray &comAliasArray) |
Provides configuration option for namespaces other than index 0 and 1 (OPC UA and local server). More... | |
virtual UaStatus | getTagFileConfiguration (UaString &defaultTagFileName, UaString &tagFileLocation, UaString &tagFileEnding, UaString &defaultFileUpdatePolicy) |
Provides information about tagfile name, path und file ending used in the NodeManagerTagFile. More... | |
virtual UaStatus | getHttpFileAccess (OpcUa_Boolean &active, UaString &filePath) |
Provides settings for HTTP file access capability. More... | |
virtual UaStatus | getComDaPropertyMapping (UaStringArray &propertyNames, UaStringArray &propertyNameSpaces, UaUInt32Array &propertyIds) |
Provides a mapping list of OPC UA property names to COM Data Access property Ids. More... | |
virtual UaStatus | getComDaNamespaceInformation (UaString &defaultNamespace, UaUShort &namespaceDelimiter, OpcUa_Boolean &useComAlias) |
Provides additional namespace related information for COM DA Server module. More... | |
virtual ComDaTimestampSource | getComDaTimestampSource () |
Provides the source of timestamp used for COM Data Access items. More... | |
virtual ComDaTimestampSource | getComHdaTimestampSource () |
Provides the source of timestamp used for COM Historical Data Access items. More... | |
virtual OpcUa_Boolean | getBrowseNextLevelForVariables () |
When browsing for COM DA items this option causes the server to internally browse one additional level to see if there are any children. | |
virtual UaStatus | getComAeNamespaceInformation (UaString &defaultNamespace) |
Provides additional namespace related information for COM A&E Server module. More... | |
virtual UaStatus | getComAeEventCategoryMapping (ComAeEventType eventType, UaUInt32Array &categoryIDs, UaStringArray &categoryNames, UaNodeIdArray &eventTypeIds, UaStringArray &, UaBoolArray &) |
Provides a mapping list of OPC UA event type NodeIds to COM Alarms and Events category IDs. More... | |
virtual UaStatus | getComAeAttributeMapping (ComAeAttributeMappingArray &comAeAttributeMappingArray) |
Get the mapping list of OPC UA event fields to COM Alarms and Events attribute IDs. More... | |
void | lockConfigFile () |
Lock snchronization object for configuratin changes. | |
void | unlockConfigFile () |
Unlock snchronization object for configuratin changes. | |
OpcUa_UInt32 | addCertificateStoreConfiguration (CertificateStoreConfiguration *pCertificateStoreConfiguration) |
Adds a new server trust list configuration. More... | |
Public Member Functions inherited from ServerConfig | |
ServerConfig () | |
construction. More... | |
virtual | ~ServerConfig () |
destruction | |
virtual UaStatus | startUp (ServerManager *pServerManager)=0 |
Start up OPC ServerConfig. More... | |
virtual UaStatus | shutDown ()=0 |
Shut down OPC ServerConfig. More... | |
virtual Session * | createSession (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... | |
Additional Inherited Members | |
Public Types inherited from ServerConfig | |
enum | ComDaTimestampSource { INTERNAL, SOURCE_TIMESTAMP, SERVER_TIMESTAMP } |
ComDaTimestampSource enumeration. More... | |
enum | ComAeEventType { SIMPLE_EVENT, TRACKING_EVENT, CONDITION_EVENT } |
ComAeEventType enumeration. More... | |
Static Public Member Functions inherited from ServerConfigData | |
static int | replaceString (UaString &sString, const UaString &sSearch, const UaString &sReplace) |
Replaces all occurrences of the search string sSearch in sString with sReplace . More... | |
static void | replaceNodeName (UaString &sString, const UaString &sNodeName) |
Replace placeholder [NodeName] with real node name. More... | |
static void | replaceServerName (UaString &sString, const UaString &sServerName) |
Replace placeholder [ServerName] with real node name. More... | |
static void | replaceApplicationPath (UaString &sString, const UaString &sApplicationPath) |
Replace placeholder [ApplicationPath] with real application path. More... | |
static void | replaceConfigPath (UaString &sString, const UaString &sConfigPath) |
Replace placeholder [ConfigPath] with real configuration files path. More... | |
static void | replaceTracePath (UaString &sString, const UaString &sTracePath) |
Replace placeholder [TracePath] with real trace file path. More... | |
Protected Member Functions inherited from ServerConfigData | |
virtual OpcUa_DateTime | getBuildDate () const |
Get the build date from the static compiled in string. More... | |
ServerConfigXml Derived from ServerConfig.
It is not possible to make shallow copies of this class.
ServerConfigXml::ServerConfigXml | ( | const UaString & | sXmlFileName, |
const UaString & | sApplicationPath, | ||
const UaString & | sConfigPath, | ||
const UaString & | sTracePath | ||
) |
Creates an instance of the ServerConfigXml class reading the configuration settings from a XML file.
sXmlFileName | the file name of the XML file. |
sApplicationPath | the path to the application. |
sConfigPath | the path to the configuration file directory. |
sTracePath | the path to the log files directory. |
|
virtual |
destruction
Destroys the ServerConfigXml object.
|
virtual |
Adds an entry to the mapping list of OPC UA event fields to COM Alarms and Events attribute IDs.
The event type hirarchy and its event fields are managed by the SDK or custom NodeManager implementations is created based on the OPC UA model. In OPC UA, event fields are identified by a path of QualifiedNames starting from the EventType. These QualifiedNames are defined by standardization bodies like the OPC Foundation for the standard OPC UA event types or by vendors or users. for the standard OPC UA event types or by vendors or users. In classic OPC Alarms & Events, attribute IDs are DWORDS. This method adds an entrie to the mapping table of OPC UA event fields to classic OPC Alarms & Events attribute IDs. This mapping table is only needed for servers providing a classic OPC Alarms & Events interface in addition to the OPC UA interface.
[in] | attributeID | Attribute ID |
[in] | attributeName | Attribute Name |
[in] | dataType | Data type of the attribute |
[in] | isArray | Array flag for the data type of the attribute |
[in] | eventFieldPathNames | List of event field path names |
[in] | eventFieldPathNamespaceUris | List of event field path namespace URIs |
Reimplemented from ServerConfigData.
|
virtual |
Adds a mapping list of OPC UA event type NodeIds to COM Alarms and Events category IDs.
The event type hirarchy managed by the SDK or custom NodeManager implementations is created based on the OPC UA model. In OPC UA, event types are identified by NodeIds. These NodeIds are defined by standardization bodies like the OPC Foundation for the standard OPC UA event types or by vendors or users. In classic OPC Alarms & Events, event category IDs are DWORDS. This method provides the mapping table of OPC UA event type NodeIds to classic OPC Alarms & Events category IDs. This mapping table is only needed for servers providing a classic OPC Alarms & Events interface in addition to the OPC UA interface. The default implementation does not store the list
[in] | eventType | Event type for the categories to add |
[in] | categoryIDs | List of OPC A&E category names |
[in] | categoryNames | List of OPC A&E category names |
[in] | eventTypeIds | List of OPC UA event type NodeIds |
[in] | namespaceUris | List of namespace URIs for the event type id. The string is empty for namespace 0 |
Reimplemented from ServerConfigData.
|
virtual |
Adds an entry to the mapping list of OPC UA property names to COM Data Access property Ids.
The address space managed by the SDK or custom NodeManager implementations is created based on the OPC UA model. In OPC UA, properties are identified by qualified names. These names are defined by standardization bodies like the OPC Foundation for the standard OPC UA properties or by vendors or users. In classig OPC Data Access, properties are defined by integer IDs defined by the OPC Foundation or by vendors. This method adds an entry to the mapping table of OPC UA porperty names to classic OPC Data Access property IDs. This mapping table is only needed for servers providing a classic OPC Data Access interface in addition to the OPC UA interface. The entry is stored in the XML file and added to the internal list.
[in] | propertyName | OPC UA Property name |
[in] | propertyNameSpaceUri | OPC UA Property name space URI |
[in] | propertyId | Classic OPC Data Access Property Id |
Reimplemented from ServerConfigData.
|
virtual |
Adds a namespaces configuration entry for preconfigured namespaces.
The entry is stored in the XML file and added to the internal list.
[in] | namespaceIndex | Index for the namespace in the namespace table |
[in] | namespaceUri | Namespace URI in the namespace table |
[in] | allowRenameUri | Flag indicating if module responsible for the namespace supports a change of the namespace URI in the configuration |
[in] | uniqueId | Unique ID required to identify the namespace if the module allows to change the namespace URI in the configuration |
Reimplemented from ServerConfigData.
|
virtual |
Load the configuration from the config file and generate node managers.
First method called after creation of ServerConfig. Must create all NodeManagers before method startUp is called.
Implements ServerConfig.
|
virtual |
Removes a namespaces configuration entry for preconfigured namespaces.
[in] | namespaceIndex | Index for the namespace in the namespace table |
Reimplemented from ServerConfigData.
|
virtual |
|
virtual |
Set information about tagfile name, path und file ending used in the NodeManagerTagFile.
Reimplemented from ServerConfigData.