.NET Based OPC UA Client/Server SDK  3.1.0.500
UnifiedAutomation.UaServer.ServerManager Class Reference

An implementation of a server. More...

Inherits UnifiedAutomation.UaBase.SessionServerBase, UnifiedAutomation.UaServer.IServerMethods, UnifiedAutomation.UaServer.IServerConfigurationMethods, and UnifiedAutomation.UaServer.Model.ITraceObjectMethods.

Classes

class  CreateEventMonitoredItemEventArgs
 Used as EventArgs in ServerManager.EventMonitoringStarted More...
 
class  DeleteEventMonitoredItemEventArgs
 Used as EventArgs in ServerManager.EventMonitoringStopped More...
 
class  ModifyEventMonitoredItemEventArgs
 Used as EventArgs in ServerManager.EventMonitoringModified More...
 
class  NewMonitoredItemEventArgs
 Is passed as argument to EventMonitoringStarted. More...
 
class  SetEventMonitoringModeEventArgs
 Used as EventArgs in ServerManager.EventMonitoringModeSet More...
 

Public Member Functions

virtual StatusCode Configure (RequestContext context, Model.TraceObjectModel model, string traceFilePath, uint maxEntriesPerLog, byte maxLogFileBackups, bool fastTrace)
 Called to change the trace configuration for the server. More...
 
virtual StatusCode SetTraceLevel (RequestContext context, Model.TraceObjectModel model, bool masterTraceEnabled, Model.TraceLevel defaultTraceLevel)
 Called to enable or disable tracing for the server. More...
 
virtual void Stop (uint secondsTillShutdown, LocalizedText shutdownReason, bool restart)
 Stops the server. More...
 
override void Start (ApplicationInstanceBase application)
 Starts the server (called from a dedicated host process). More...
 
override void Stop ()
 Stops the server and releases all resources. More...
 
void SetGetHistoryEventHandleOverride (GetHistoryEventHandleEventHandler handler)
 Sets a delegate used to override the GetHistoryEventHandle method for the CoreNodeManager. More...
 
DataMonitoringResult ValidateDataMonitoringRequest (RequestContext context, NodeAttributeHandle nodeHandle, ReadValueId itemToMonitor, MonitoringParameters parameters, NodeMetadata metadata)
 Validates the data monitoring request. More...
 
override ResponseHeader FindServers (RequestHeader requestHeader, string endpointUrl, StringCollection localeIds, StringCollection serverUris, out ApplicationDescriptionCollection servers)
 Invokes the FindServers service. More...
 
override ResponseHeader GetEndpoints (RequestHeader requestHeader, string endpointUrl, StringCollection localeIds, StringCollection profileUris, out EndpointDescriptionCollection endpoints)
 Invokes the GetEndpoints service. More...
 
void SessionExpired (Session session, uint error=StatusCodes.BadTimeout)
 Cleans up an expired session. More...
 
void EndPublish (RequestContext context, IEndpointIncomingRequest incoming, StatusCode error, object callbackData, bool doNotBlockThread)
 Ends the publish. More...
 
virtual void StartEventMonitoring (EventMonitoringResult result, uint monitoredItemId, MonitoredItemCreateRequest settings)
 Is called by the CoreNodeManager if a EventMonitoredItem is created for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringStarted. More...
 
virtual void ModifyEventMonitoring (EventMonitoringResult result, MonitoredItemOperationHandle itemHandle, MonitoredItemModifyRequest settings)
 Is called by the CoreNodeManager if a EventMonitoredItem is modified for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringModified. More...
 
virtual void SetEventMonitoringMode (StatusCode result, MonitoredItemOperationHandle itemHandle)
 Is called by the CoreNodeManager if a EventMonitoredItem changes its monitoring mode for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringModeSet. More...
 
virtual void StopEventMonitoring (StatusCode result, MonitoredItemOperationHandle itemHandle)
 Is called by the CoreNodeManager if a EventMonitoredItem is deleted for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringStopped. More...
 
virtual void BeginQueryFirst (IEndpointIncomingRequest incoming)
 Invokes the QueryFirst service. More...
 
virtual void BeginQueryNext (IEndpointIncomingRequest incoming)
 Invokes the QueryNext service. More...
 
void ReportEvent (GenericEvent e)
 Reports the event to the Server notifier. More...
 
void ReportEvent (NodeId notifierId, GenericEvent e)
 Reports the event. More...
 
StatusCode GetMonitoredItems (RequestContext context, ServerModel model, uint subscriptionId, out uint[] serverHandles, out uint[] clientHandles)
 Returns the server/client handles for the subscription. More...
 
StatusCode RequestServerStateChange (RequestContext context, ServerModel model, ServerState state, DateTime estimatedReturnTime, uint secondsTillShutdown, LocalizedText reason, bool restart)
 Requests that the server change state. More...
 
StatusCode ResendData (RequestContext context, ServerModel model, uint subscriptionId)
 Requests that all cached values be resent for the specified subscription. More...
 
StatusCode SetSubscriptionDurable (RequestContext context, ServerModel model, uint subscriptionId, uint lifetimeInHours, out uint revisedLifetimeInHours)
 Requests that the subscription be made durable which means all queued values are saved to persistent storage. More...
 
virtual StatusCode ApplyChanges (RequestContext context, ServerConfigurationModel model)
 Applies any changes to the security settings. More...
 
virtual StatusCode UpdateCertificate (RequestContext context, ServerConfigurationModel model, NodeId certificateGroupId, NodeId certificateTypeId, byte[] certificate, byte[][] issuerCertificates, string privateKeyFormat, byte[] privateKey, out bool applyChangesRequired)
 Updates the the application certificate. More...
 
virtual StatusCode CreateSigningRequest (RequestContext context, ServerConfigurationModel model, NodeId certificateGroupId, NodeId certificateTypeId, string subjectName, bool regeneratePrivateKey, byte[] nonce, out byte[] certificateRequest)
 Creates a certificate signing request. More...
 
virtual StatusCode GetRejectedList (RequestContext context, ServerConfigurationModel model, out byte[][] certificates)
 Gets the list of rejected certificates. More...
 
virtual void OnTrustListAddCertificate (object sender, CertificateAddedEventArgs e)
 Called when a certificate is added to a trust list. More...
 
virtual void OnTrustListRemoveCertificate (object sender, RemoveCertificateEventArgs e)
 Called when a certificate is removed from a trust list. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaBase.SessionServerBase
virtual ResponseHeader FindServersOnNetwork (RequestHeader requestHeader, uint startingRecordId, uint maxRecordsToReturn, StringCollection serverCapabilityFilter, out DateTime lastCounterResetTime, out ServerOnNetworkCollection servers)
 Invokes the FindServersOnNetwork service. More...
 
virtual ResponseHeader Browse (RequestHeader requestHeader, ViewDescription view, uint requestedMaxReferencesPerNode, BrowseDescriptionCollection nodesToBrowse, out BrowseResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the Browse service. More...
 
virtual ResponseHeader BrowseNext (RequestHeader requestHeader, bool releaseContinuationPoints, ByteStringCollection continuationPoints, out BrowseResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the BrowseNext service. More...
 
virtual ResponseHeader TranslateBrowsePathsToNodeIds (RequestHeader requestHeader, BrowsePathCollection browsePaths, out BrowsePathResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the TranslateBrowsePathsToNodeIds service. More...
 
virtual ResponseHeader QueryFirst (RequestHeader requestHeader, ViewDescription view, NodeTypeDescriptionCollection nodeTypes, ContentFilter filter, uint maxDataSetsToReturn, uint maxReferencesToReturn, out QueryDataSetCollection queryDataSets, out byte[] continuationPoint, out ParsingResultCollection parsingResults, out DiagnosticInfoCollection diagnosticInfos, out ContentFilterResult filterResult)
 Invokes the QueryFirst service. More...
 
virtual ResponseHeader QueryNext (RequestHeader requestHeader, bool releaseContinuationPoint, byte[] continuationPoint, out QueryDataSetCollection queryDataSets, out byte[] revisedContinuationPoint)
 Invokes the QueryNext service. More...
 
virtual ResponseHeader Read (RequestHeader requestHeader, double maxAge, TimestampsToReturn timestampsToReturn, ReadValueIdCollection nodesToRead, out DataValueCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the Read service. More...
 
virtual ResponseHeader HistoryRead (RequestHeader requestHeader, ExtensionObject historyReadDetails, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, HistoryReadValueIdCollection nodesToRead, out HistoryReadResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the HistoryRead service. More...
 
virtual ResponseHeader Write (RequestHeader requestHeader, WriteValueCollection nodesToWrite, out StatusCodeCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the Write service. More...
 
virtual ResponseHeader HistoryUpdate (RequestHeader requestHeader, ExtensionObjectCollection historyUpdateDetails, out HistoryUpdateResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the HistoryUpdate service. More...
 
virtual ResponseHeader Call (RequestHeader requestHeader, CallMethodRequestCollection methodsToCall, out CallMethodResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the Call service. More...
 
virtual ResponseHeader CreateMonitoredItems (RequestHeader requestHeader, uint subscriptionId, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, out MonitoredItemCreateResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the CreateMonitoredItems service. More...
 
virtual ResponseHeader ModifyMonitoredItems (RequestHeader requestHeader, uint subscriptionId, TimestampsToReturn timestampsToReturn, MonitoredItemModifyRequestCollection itemsToModify, out MonitoredItemModifyResultCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the ModifyMonitoredItems service. More...
 
virtual ResponseHeader SetMonitoringMode (RequestHeader requestHeader, uint subscriptionId, MonitoringMode monitoringMode, UInt32Collection monitoredItemIds, out StatusCodeCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the SetMonitoringMode service. More...
 
virtual ResponseHeader DeleteMonitoredItems (RequestHeader requestHeader, uint subscriptionId, UInt32Collection monitoredItemIds, out StatusCodeCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the DeleteMonitoredItems service. More...
 
virtual ResponseHeader Publish (RequestHeader requestHeader, SubscriptionAcknowledgementCollection subscriptionAcknowledgements, out uint subscriptionId, out UInt32Collection availableSequenceNumbers, out bool moreNotifications, out NotificationMessage notificationMessage, out StatusCodeCollection results, out DiagnosticInfoCollection diagnosticInfos)
 Invokes the Publish service. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaBase.ServerBase
 ServerBase ()
 Initializes object with default values. More...
 
void Dispose ()
 Frees any unmanaged resources. More...
 
void ScheduleIncomingRequest (IEndpointIncomingRequest request)
 Schedules an incoming request. More...
 
ApplicationLicense GetProductLicense ()
 Gets the application license. More...
 
void RunInThreadPool (ThreadPoolEventHandler callback, object request)
 Runs an operation the in server thread pool. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.Model.ITraceObjectMethods
StatusCode SetTraceLevel (RequestContext context, TraceObjectModel model, bool masterTraceEnabled, TraceLevel defaultTraceLevel)
 Sets the trace level for the server. More...
 
StatusCode Configure (RequestContext context, TraceObjectModel model, string traceFilePath, uint maxEntriesPerLog, byte maxLogFileBackups, bool fastTrace)
 Updates the trace configuration. More...
 

Public Attributes

EventHandler
< CreateEventMonitoredItemEventArgs
EventMonitoringStarted
 Fires when an EventMonitoredItem for an notifier is created that is managed by the CoreNodeManager. More...
 
EventHandler
< ModifyEventMonitoredItemEventArgs
EventMonitoringModified
 Fires when an EventMonitoredItem for an notifier is modified that is managed by the CoreNodeManager. More...
 
EventHandler
< SetEventMonitoringModeEventArgs
EventMonitoringModeSet
 Fires when an EventMonitoredItem for an notifier changes its monitoring mode that is managed by the CoreNodeManager. More...
 
EventHandler
< DeleteEventMonitoredItemEventArgs
EventMonitoringStopped
 Fires when an EventMonitoredItem for an notifier is deleted that is managed by the CoreNodeManager. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 An overrideable version of the Dispose. More...
 
override void OnServerStarting (ApplicationInstanceBase application)
 Called before the server starts. More...
 
virtual void RegisterAggregate (NodeId aggregateId, QualifiedName aggregateName, AggregatorFactory factory)
 Registers the aggregate (saves the factory and creates the objects in the addrres space). More...
 
virtual void OnRegisterAggregates ()
 Called to register any aggregates during server initialization. More...
 
override void OnServerStopping ()
 Called before the server stops. More...
 
override void DispatchRequest (IEndpointIncomingRequest request)
 Processes the request. More...
 
void OnDispatchRequest (object data, StatusCode statusCode)
 Callback for processesing the request. More...
 
virtual StatusCode GetQueryHandle (RequestContext context, ViewHandle viewHandle, out QueryHandle handle)
 Creates a query handle for use in query operation. More...
 
IScopeMapper CreateScopeMapper ()
 Creates the ScopeMapper that is used when importing NodeSet XML files containing NodeAccessInfo defined by UnifiedAutomation XML schema. More...
 
virtual ITranslationManager CreateTranslationManager (ApplicationInstanceBase application)
 Creates the TranslationManager that is used. The default implementation creates an instance of ResourceManager. More...
 
virtual ICertificateValidator InitializeUserCertificateValidator ()
 Creates a CertificateValidator based on the configuration. More...
 
virtual void OnRootNodeManagerStarted (RootNodeManager nodeManager)
 Called when the root node manager starts. More...
 
virtual void OnSessionManagerStarted (SessionManager sessionManager)
 Called when the session manager starts. More...
 
virtual void OnSubscriptionManagerStarted (SubscriptionManager subscriptionManager)
 Called when the subscription manager starts. More...
 
virtual RequestContext ValidateRequest (RequestHeader requestHeader, IEndpointIncomingRequest incoming, ServiceType requestType)
 Verifies that the request header is valid. More...
 
virtual StatusCode TranslateException (DiagnosticsMasks diagnosticsMasks, IList< string > preferredLocales, Exception e)
 Translates an exception. More...
 
virtual void OnAsyncRequestComplete (RequestContext context, IEndpointIncomingRequest incoming, bool doNotBlockThread)
 Called when an aysnchrnous request completes. More...
 
virtual void OnAsyncRequestError (RequestContext context, IEndpointIncomingRequest incoming, bool doNotBlockThread, Exception e)
 Called when an asynchronous request has an error during processing. More...
 
virtual ResponseHeader OnRequestComplete (RequestContext context)
 Called when the request completes. More...
 
virtual ResponseHeader OnRequestError (RequestContext context, Exception e)
 Called when an asynchronous request encounters an error. More...
 
virtual StatusCode ChangeServerState (ServerState state, DateTime estimatedReturnTime)
 Called when the state of the Server has been changed as a result of a client action. More...
 
virtual void OnTrustListWrite (object sender, WriteTrustListEventArgs e)
 Handles a request to update the application trust lists. More...
 
virtual void OnTrustListRead (object sender, ReadTrustListEventArgs e)
 Handles a request to read the application trust lists. More...
 
virtual bool HasAdminAccess (RequestContext context)
 Determines whether the request context has administrator access. More...
 
- Protected Member Functions inherited from UnifiedAutomation.UaBase.ServerBase
void InitializeRequestQueue (ApplicationInstanceBase configuration)
 Initializes the request queue. More...
 
virtual void ProcessRequest (IEndpointIncomingRequest request)
 Processes the request. More...
 
ITransportListener CreateListener (ApplicationInstanceBase application)
 Creates the UA TCP listener. More...
 
virtual void OnOutgoingReverseConnectionClosed (object sender, OutgoingReverseConnectionUpdateEventArgs e)
 
virtual void OnOutgoingReverseConnectionOpened (object sender, OutgoingReverseConnectionUpdateEventArgs e)
 
virtual void ValidateRequest (RequestHeader requestHeader)
 Verifies that the request header is valid. More...
 
virtual ResponseHeader CreateResponse (RequestHeader requestHeader, uint statusCode)
 Creates the response header. More...
 
virtual void OnUpdateConfiguration (ApplicationInstanceBase configuration)
 Called when the server configuration is changed on disk. More...
 
virtual List< StatusCodeInitializeServices (ApplicationInstanceBase application)
 Creates the endpoints and creates the hosts. More...
 
virtual void StartApplication (ApplicationInstanceBase configuration)
 Starts the server application. More...
 
string NormalizeHostname (string hostname)
 Checks for IP address or well known hostnames that map to the computer. More...
 
ApplicationDescription GetApplicationDescription (Uri clientUrl, ApplicationDescription description, LocalizedText applicationName)
 Gets the application description. More...
 
EndpointDescriptionCollection GetEndpointDescriptions (Uri clientUrl, ApplicationDescription application)
 Gets the endpoint descriptions. More...
 

Properties

NamespaceTable NamespaceUris [get]
 Gets the namespace uris. More...
 
TypeManager TypeManager [get]
 Gets the type manager. More...
 
FilterManager FilterManager [get]
 Gets the filter manager. More...
 
IScopeMapper ScopeMapper [get]
 Gets the ScopeMapper used for importing nodes with a NodeAccessInfo; More...
 
ICertificateValidator UserCertificateValidator [get]
 Gets the CertificateValidator for Certificates passed in X509IdentityTokens. More...
 
AggregateManager AggregateManager [get]
 Gets the aggregate manager. More...
 
SubscriptionManager SubscriptionManager [get]
 Gets the subscription manager. More...
 
bool IsRunning [get]
 Gets a value indicating whether this instance is running. More...
 
bool IsRestartInProgress [get]
 Gets a value indicating whether a restart is in progress. More...
 
bool IsAuditEnabled [get]
 Gets a value indicating whether auditing is enabled More...
 
RequestContext DefaultRequestContext [get]
 Gets the server context. More...
 
object DiagnosticsLock [get]
 A lock which must be acquired before accessing the diagnostics. More...
 
ServerDiagnosticsModel ServerDiagnostics [get]
 The diagnostics associated with the server. More...
 
ServerSettings Settings [get]
 The configuration settings for the server. More...
 
Dictionary< NodeId,
CertificateGroupModel
CertificateGroups [get]
 The certificate groups supported by the server. More...
 
System.Reflection.Assembly OpcUaNodeSetAssembly [get, set]
 Gets or sets the assembly which has the Opc.Ua.NodeSet2 file as an embedded resource. More...
 
SessionManager SessionManager [get]
 Gets the session manager. More...
 
ITranslationManager TranslationManager [get]
 Gets the translation manager. More...
 
ResourceManager ResourceManager [get]
 Gets the resource manager. More...
 
RootNodeManager RootNodeManager [get]
 Gets the root node manager. More...
 
BaseNodeManager CoreNodeManager [get]
 Gets the core node manager. More...
 
uint NextUniqueId [get]
 Gets the next unique id. More...
 
ServerInternalClient InternalClient [get]
 Gets the internal client object. More...
 
- Properties inherited from UnifiedAutomation.UaBase.ServerBase
ApplicationInstanceBase Application [get]
 Gets the application. More...
 
MessageContext MessageContext [get]
 The message context to use with the service. More...
 
ApplicationThreadPool ThreadPool [get]
 Gets the thread pool used by the server. More...
 
StatusCode ServerError [get]
 An error condition that describes why the server if not running (null if no error exists). More...
 
ISecurityProvider SecurityProvider [get]
 Gets the security provider. More...
 
IEnumerable< ITransportListenerTransportListeners [get]
 Gets the list of transport listeners used by the server instance. More...
 
- Properties inherited from UnifiedAutomation.UaBase.IServerBase
ApplicationInstanceBase Application [get]
 Gets the application. More...
 
MessageContext MessageContext [get]
 The message context to use with the service. More...
 
StatusCode ServerError [get]
 An error condition that describes why the server if not running (null if no error exists). More...
 

Events

EventHandler ServerStopped
 Occurs when the server is stopped. More...
 
EventHandler ServerStarted
 Occurs when the server is started. More...
 
UntrustedUserCertificateEventHandler UntrustedUserCertificate
 Occurs when an untrusted user certificate is encountered or when a user certificate has other validation errors More...
 

Additional Inherited Members

- Protected Attributes inherited from UnifiedAutomation.UaBase.ServerBase
MessageContext m_messageContext
 The message context.
 
ApplicationInstanceBase m_application
 The application instance More...
 
List< ITransportListenerm_listeners
 The transport listeners managed by the ServerBase More...
 
ApplicationLicense m_license
 The found sdk license. More...
 

Detailed Description

An implementation of a server.

Member Function Documentation

virtual StatusCode UnifiedAutomation.UaServer.ServerManager.ApplyChanges ( RequestContext  context,
ServerConfigurationModel  model 
)
inlinevirtual

Applies any changes to the security settings.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
Returns
StatusCode.Good if the call succeeds; otherwise an error.

Implements UnifiedAutomation.UaServer.IServerConfigurationMethods.

virtual void UnifiedAutomation.UaServer.ServerManager.BeginQueryFirst ( IEndpointIncomingRequest  incoming)
inlinevirtual

Invokes the QueryFirst service.

virtual void UnifiedAutomation.UaServer.ServerManager.BeginQueryNext ( IEndpointIncomingRequest  incoming)
inlinevirtual

Invokes the QueryNext service.

virtual StatusCode UnifiedAutomation.UaServer.ServerManager.ChangeServerState ( ServerState  state,
DateTime  estimatedReturnTime 
)
inlineprotectedvirtual

Called when the state of the Server has been changed as a result of a client action.

Parameters
stateThe new state.
estimatedReturnTimeWhen the Server should return to the Running state.
Returns
Good if successful; An error otherwise.

This method can be overridden to allow for custom application logic that applies the state change. The default behavoir simply updates the appropriate variables in the Server address space.

virtual StatusCode UnifiedAutomation.UaServer.ServerManager.Configure ( RequestContext  context,
Model.TraceObjectModel  model,
string  traceFilePath,
uint  maxEntriesPerLog,
byte  maxLogFileBackups,
bool  fastTrace 
)
inlinevirtual

Called to change the trace configuration for the server.

IScopeMapper UnifiedAutomation.UaServer.ServerManager.CreateScopeMapper ( )
inlineprotected

Creates the ScopeMapper that is used when importing NodeSet XML files containing NodeAccessInfo defined by UnifiedAutomation XML schema.

Returns
virtual StatusCode UnifiedAutomation.UaServer.ServerManager.CreateSigningRequest ( RequestContext  context,
ServerConfigurationModel  model,
NodeId  certificateGroupId,
NodeId  certificateTypeId,
string  subjectName,
bool  regeneratePrivateKey,
byte[]  nonce,
out byte[]  certificateRequest 
)
inlinevirtual

Creates a certificate signing request.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
certificateGroupIdThe certificate group which owns the certificate being updated.
certificateTypeIdType of the certificate within the group.
subjectNameThe subject name to put in the certficate..
regeneratePrivateKeyif set to true a new private key should be generated first.
nonceThe nonce that can be used when generating a private key.
certificateRequestThe certificate request.
Returns
StatusCode.Good if the call succeeds; otherwise an error.

Implements UnifiedAutomation.UaServer.IServerConfigurationMethods.

virtual ITranslationManager UnifiedAutomation.UaServer.ServerManager.CreateTranslationManager ( ApplicationInstanceBase  application)
inlineprotectedvirtual

Creates the TranslationManager that is used. The default implementation creates an instance of ResourceManager.

See also
TranslationManager, ResourceManager
Parameters
applicationThe application that manages the ServerManager.
override void UnifiedAutomation.UaServer.ServerManager.DispatchRequest ( IEndpointIncomingRequest  request)
inlineprotectedvirtual

Processes the request.

Parameters
requestThe request.

Reimplemented from UnifiedAutomation.UaBase.ServerBase.

override void UnifiedAutomation.UaServer.ServerManager.Dispose ( bool  disposing)
inlineprotectedvirtual

An overrideable version of the Dispose.

Parameters
disposing

Reimplemented from UnifiedAutomation.UaBase.ServerBase.

void UnifiedAutomation.UaServer.ServerManager.EndPublish ( RequestContext  context,
IEndpointIncomingRequest  incoming,
StatusCode  error,
object  callbackData,
bool  doNotBlockThread 
)
inline

Ends the publish.

Parameters
contextThe request context.
incomingThe incoming.
errorThe error.
callbackDataThe callback data.
doNotBlockThreadif set to true then the current thread should not be blocked.
override ResponseHeader UnifiedAutomation.UaServer.ServerManager.FindServers ( RequestHeader  requestHeader,
string  endpointUrl,
StringCollection  localeIds,
StringCollection  serverUris,
out ApplicationDescriptionCollection  servers 
)
inlinevirtual

Invokes the FindServers service.

Parameters
requestHeaderThe common request parameters. The authenticationToken is always omitted. The authenticationToken shall be ignored if it is provided.
endpointUrlThe network address that the Client used to access the Discovery Endpoint. The Server uses this information for diagnostics and to determine what URLs to return in the response. The Server should return a suitable default URL if it does not recognize the HostName in the URL.
localeIdsList of locales to use. The server should return the ServerName using one of locales specified. If the server supports more than one of the requested locales then the server shall use the locale that appears first in this list. If the server does not support any of the requested locales it chooses an appropriate default locale. The server chooses an appropriate default locale if this list is empty.
serverUrisList of servers to return. All known servers are returned if the list is empty.
serversList of Servers that meet criteria specified in the request. This list is empty if no servers meet the criteria.
Returns
Returns a description for the ResponseHeader DataType, the return type is
See also
ResponseHeader

Reimplemented from UnifiedAutomation.UaBase.SessionServerBase.

override ResponseHeader UnifiedAutomation.UaServer.ServerManager.GetEndpoints ( RequestHeader  requestHeader,
string  endpointUrl,
StringCollection  localeIds,
StringCollection  profileUris,
out EndpointDescriptionCollection  endpoints 
)
inlinevirtual

Invokes the GetEndpoints service.

Parameters
requestHeaderThe common request parameters. The authenticationToken is always omitted. The authenticationToken shall be ignored if it is provided.
endpointUrlThe network address that the Client used to access the Discovery Endpoint. The Server uses this information for diagnostics and to determine what URLs to return in the response. The Server should return a suitable default URL, if it does not recognize the HostName in the URL.
localeIdsList of locales to use. Specifies the locale to use when returning human readable strings.
profileUrisList of Transport Profile that the returned Endpoints shall support. All Endpoints are returned if the list is empty.
endpointsThe endpoints.List of Endpoints that meet criteria specified in the request. This list is empty if no Endpoints meet the criteria.
Returns
Returns a description for the ResponseHeader DataType

Reimplemented from UnifiedAutomation.UaBase.SessionServerBase.

StatusCode UnifiedAutomation.UaServer.ServerManager.GetMonitoredItems ( RequestContext  context,
ServerModel  model,
uint  subscriptionId,
out uint[]  serverHandles,
out uint[]  clientHandles 
)
inline

Returns the server/client handles for the subscription.

Parameters
contextTHe context used to invoke the method.
modelThe object which the method is being called on.
subscriptionIdThe identifier for the subscription.
serverHandlesThe server handles for all items in the subscription.
clientHandlesThe associated client handle for each entry in the server handle array.
Returns
Good if success; an error code otherwise.

Implements UnifiedAutomation.UaServer.IServerMethods.

virtual StatusCode UnifiedAutomation.UaServer.ServerManager.GetQueryHandle ( RequestContext  context,
ViewHandle  viewHandle,
out QueryHandle  handle 
)
inlineprotectedvirtual

Creates a query handle for use in query operation.

Parameters
contextThe request context.
viewHandleThe view being queried.
handleThe handle for the query.
Returns
The query handle.
virtual StatusCode UnifiedAutomation.UaServer.ServerManager.GetRejectedList ( RequestContext  context,
ServerConfigurationModel  model,
out byte  certificates[][] 
)
inlinevirtual

Gets the list of rejected certificates.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
certificatesThe list of rejected certificates.
Returns
StatusCode.Good if the call succeeds; otherwise an error.

Implements UnifiedAutomation.UaServer.IServerConfigurationMethods.

virtual bool UnifiedAutomation.UaServer.ServerManager.HasAdminAccess ( RequestContext  context)
inlineprotectedvirtual

Determines whether the request context has administrator access.

Parameters
contextThe request context.
Returns
TRUE if the context has adminitrator access; FALSE otherwise.
virtual ICertificateValidator UnifiedAutomation.UaServer.ServerManager.InitializeUserCertificateValidator ( )
inlineprotectedvirtual

Creates a CertificateValidator based on the configuration.

The CertificateValidator is created if UserCertificates are enabled and the UserTrustedCertificateStore and UserIssuerCertificateStore are configured.

Returns
The Certificate Valiator that is used to validate certificates passed in UserIdentityTokens.
virtual void UnifiedAutomation.UaServer.ServerManager.ModifyEventMonitoring ( EventMonitoringResult  result,
MonitoredItemOperationHandle  itemHandle,
MonitoredItemModifyRequest  settings 
)
inlinevirtual

Is called by the CoreNodeManager if a EventMonitoredItem is modified for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringModified.

virtual void UnifiedAutomation.UaServer.ServerManager.OnAsyncRequestComplete ( RequestContext  context,
IEndpointIncomingRequest  incoming,
bool  doNotBlockThread 
)
inlineprotectedvirtual

Called when an aysnchrnous request completes.

Parameters
contextThe request context.
incomingThe incoming.
doNotBlockThreadif set to true then the current thread should not be blocked.
virtual void UnifiedAutomation.UaServer.ServerManager.OnAsyncRequestError ( RequestContext  context,
IEndpointIncomingRequest  incoming,
bool  doNotBlockThread,
Exception  e 
)
inlineprotectedvirtual

Called when an asynchronous request has an error during processing.

Parameters
contextThe request context.
incomingThe incoming.
doNotBlockThreadif set to true then the current thread should not be blocked.
eThe exeception.
void UnifiedAutomation.UaServer.ServerManager.OnDispatchRequest ( object  data,
StatusCode  statusCode 
)
inlineprotected

Callback for processesing the request.

Parameters
dataThe request.
statusCodeThe error.
virtual void UnifiedAutomation.UaServer.ServerManager.OnRegisterAggregates ( )
inlineprotectedvirtual

Called to register any aggregates during server initialization.

virtual ResponseHeader UnifiedAutomation.UaServer.ServerManager.OnRequestComplete ( RequestContext  context)
inlineprotectedvirtual

Called when the request completes.

Parameters
contextThe request context.
Returns
The header to return to the client.
virtual ResponseHeader UnifiedAutomation.UaServer.ServerManager.OnRequestError ( RequestContext  context,
Exception  e 
)
inlineprotectedvirtual

Called when an asynchronous request encounters an error.

Parameters
contextThe request context.
eThe exception.
Returns
The header to return to the client.
virtual void UnifiedAutomation.UaServer.ServerManager.OnRootNodeManagerStarted ( RootNodeManager  nodeManager)
inlineprotectedvirtual

Called when the root node manager starts.

Parameters
nodeManagerThe node manager.
override void UnifiedAutomation.UaServer.ServerManager.OnServerStarting ( ApplicationInstanceBase  application)
inlineprotectedvirtual

Called before the server starts.

Parameters
applicationThe application.

Reimplemented from UnifiedAutomation.UaBase.ServerBase.

override void UnifiedAutomation.UaServer.ServerManager.OnServerStopping ( )
inlineprotectedvirtual

Called before the server stops.

Reimplemented from UnifiedAutomation.UaBase.ServerBase.

virtual void UnifiedAutomation.UaServer.ServerManager.OnSessionManagerStarted ( SessionManager  sessionManager)
inlineprotectedvirtual

Called when the session manager starts.

Parameters
sessionManagerThe session manager.
virtual void UnifiedAutomation.UaServer.ServerManager.OnSubscriptionManagerStarted ( SubscriptionManager  subscriptionManager)
inlineprotectedvirtual

Called when the subscription manager starts.

Parameters
subscriptionManagerThe subscription manager.
virtual void UnifiedAutomation.UaServer.ServerManager.OnTrustListAddCertificate ( object  sender,
CertificateAddedEventArgs  e 
)
inlinevirtual

Called when a certificate is added to a trust list.

Parameters
senderThe sender.
eThe RemoveCertificateEventArgs instance containing the event data.
virtual void UnifiedAutomation.UaServer.ServerManager.OnTrustListRead ( object  sender,
ReadTrustListEventArgs  e 
)
inlineprotectedvirtual

Handles a request to read the application trust lists.

Parameters
senderThe sender.
eThe ReadTrustListEventArgs instance containing the event data.
virtual void UnifiedAutomation.UaServer.ServerManager.OnTrustListRemoveCertificate ( object  sender,
RemoveCertificateEventArgs  e 
)
inlinevirtual

Called when a certificate is removed from a trust list.

Parameters
senderThe sender.
eThe RemoveCertificateEventArgs instance containing the event data.
virtual void UnifiedAutomation.UaServer.ServerManager.OnTrustListWrite ( object  sender,
WriteTrustListEventArgs  e 
)
inlineprotectedvirtual

Handles a request to update the application trust lists.

Parameters
senderThe source of the event.
eThe WriteTrustListEventArgs instance containing the event data.
virtual void UnifiedAutomation.UaServer.ServerManager.RegisterAggregate ( NodeId  aggregateId,
QualifiedName  aggregateName,
AggregatorFactory  factory 
)
inlineprotectedvirtual

Registers the aggregate (saves the factory and creates the objects in the addrres space).

Parameters
aggregateIdThe aggregate id.
aggregateNameName of the aggregate.
factoryThe factory.
void UnifiedAutomation.UaServer.ServerManager.ReportEvent ( GenericEvent  e)
inline

Reports the event to the Server notifier.

Parameters
eThe event to report.
void UnifiedAutomation.UaServer.ServerManager.ReportEvent ( NodeId  notifierId,
GenericEvent  e 
)
inline

Reports the event.

Parameters
notifierIdThe notifier which is the target for the event.
eThe event to report.
StatusCode UnifiedAutomation.UaServer.ServerManager.RequestServerStateChange ( RequestContext  context,
ServerModel  model,
ServerState  state,
DateTime  estimatedReturnTime,
uint  secondsTillShutdown,
LocalizedText  reason,
bool  restart 
)
inline

Requests that the server change state.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
stateThe target state for the server.
estimatedReturnTimeThe estimated time for when clients can connect to the server after the state change.
secondsTillShutdownThe number of seconds until shutdown.
reasonThe reason for the state change.
restartWhether the server should restart after the shutdown.
Returns
The result of the operation.

Implements UnifiedAutomation.UaServer.IServerMethods.

StatusCode UnifiedAutomation.UaServer.ServerManager.ResendData ( RequestContext  context,
ServerModel  model,
uint  subscriptionId 
)
inline

Requests that all cached values be resent for the specified subscription.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
subscriptionIdThe identifier for the subscription.
Returns
The result of the operation.

Implements UnifiedAutomation.UaServer.IServerMethods.

void UnifiedAutomation.UaServer.ServerManager.SessionExpired ( Session  session,
uint  error = StatusCodes.BadTimeout 
)
inline

Cleans up an expired session.

Parameters
sessionThe session.
errorThe error for that caused the close.
virtual void UnifiedAutomation.UaServer.ServerManager.SetEventMonitoringMode ( StatusCode  result,
MonitoredItemOperationHandle  itemHandle 
)
inlinevirtual

Is called by the CoreNodeManager if a EventMonitoredItem changes its monitoring mode for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringModeSet.

void UnifiedAutomation.UaServer.ServerManager.SetGetHistoryEventHandleOverride ( GetHistoryEventHandleEventHandler  handler)
inline

Sets a delegate used to override the GetHistoryEventHandle method for the CoreNodeManager.

Parameters
handlerThe handler.
StatusCode UnifiedAutomation.UaServer.ServerManager.SetSubscriptionDurable ( RequestContext  context,
ServerModel  model,
uint  subscriptionId,
uint  lifetimeInHours,
out uint  revisedLifetimeInHours 
)
inline

Requests that the subscription be made durable which means all queued values are saved to persistent storage.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
subscriptionIdThe identifier for the subscription.
lifetimeInHoursThe lifetime in hours for data saved by the subscription.
revisedLifetimeInHoursThe revised lifetime in hours for data saved by the subscription.
Returns
The result of the operation.

Implements UnifiedAutomation.UaServer.IServerMethods.

virtual StatusCode UnifiedAutomation.UaServer.ServerManager.SetTraceLevel ( RequestContext  context,
Model.TraceObjectModel  model,
bool  masterTraceEnabled,
Model.TraceLevel  defaultTraceLevel 
)
inlinevirtual

Called to enable or disable tracing for the server.

override void UnifiedAutomation.UaServer.ServerManager.Start ( ApplicationInstanceBase  application)
inlinevirtual

Starts the server (called from a dedicated host process).

Parameters
applicationThe application.

Reimplemented from UnifiedAutomation.UaBase.ServerBase.

virtual void UnifiedAutomation.UaServer.ServerManager.StartEventMonitoring ( EventMonitoringResult  result,
uint  monitoredItemId,
MonitoredItemCreateRequest  settings 
)
inlinevirtual

Is called by the CoreNodeManager if a EventMonitoredItem is created for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringStarted.

virtual void UnifiedAutomation.UaServer.ServerManager.Stop ( uint  secondsTillShutdown,
LocalizedText  shutdownReason,
bool  restart 
)
inlinevirtual

Stops the server.

Parameters
secondsTillShutdownThe seconds till shutdown.
shutdownReasonThe shutdown reason.
restartif set to true [restart].
override void UnifiedAutomation.UaServer.ServerManager.Stop ( )
inlinevirtual

Stops the server and releases all resources.

Reimplemented from UnifiedAutomation.UaBase.ServerBase.

virtual void UnifiedAutomation.UaServer.ServerManager.StopEventMonitoring ( StatusCode  result,
MonitoredItemOperationHandle  itemHandle 
)
inlinevirtual

Is called by the CoreNodeManager if a EventMonitoredItem is deleted for an object in namespace 0. Can be called by custom NodeManagers if there are NodeManagers that are based on the custom NodeManager. Calls EventMonitoringStopped.

virtual StatusCode UnifiedAutomation.UaServer.ServerManager.TranslateException ( DiagnosticsMasks  diagnosticsMasks,
IList< string >  preferredLocales,
Exception  e 
)
inlineprotectedvirtual

Translates an exception.

Parameters
diagnosticsMasksThe fields to return.
preferredLocalesThe preferred locales.
eThe exception.
Returns
The translated exception as a status code.
virtual StatusCode UnifiedAutomation.UaServer.ServerManager.UpdateCertificate ( RequestContext  context,
ServerConfigurationModel  model,
NodeId  certificateGroupId,
NodeId  certificateTypeId,
byte[]  certificate,
byte  issuerCertificates[][],
string  privateKeyFormat,
byte[]  privateKey,
out bool  applyChangesRequired 
)
inlinevirtual

Updates the the application certificate.

Parameters
contextThe context for the request.
modelThe object which owns the method being called.
certificateGroupIdThe certificate group that is being updated.
certificateTypeIdType of the certificate allowed by the certificate group that is being updated.
certificateThe certificate.
issuerCertificatesThe issuer certificates need to validate the certificate.
privateKeyFormatThe private key format.
privateKeyThe private key (optional).
applyChangesRequiredif set to true a restart is required.
Returns
StatusCode.Good if the call succeeds; otherwise an error.

Implements UnifiedAutomation.UaServer.IServerConfigurationMethods.

DataMonitoringResult UnifiedAutomation.UaServer.ServerManager.ValidateDataMonitoringRequest ( RequestContext  context,
NodeAttributeHandle  nodeHandle,
ReadValueId  itemToMonitor,
MonitoringParameters  parameters,
NodeMetadata  metadata 
)
inline

Validates the data monitoring request.

Parameters
contextThe request context.
nodeHandleThe node handle.
itemToMonitorThe item to monitor.
parametersThe parameters.
metadataThe metadata.
Returns
virtual RequestContext UnifiedAutomation.UaServer.ServerManager.ValidateRequest ( RequestHeader  requestHeader,
IEndpointIncomingRequest  incoming,
ServiceType  requestType 
)
inlineprotectedvirtual

Verifies that the request header is valid.

Parameters
requestHeaderThe request header.
incomingThe incoming request for async operations that can be cancelled.
requestTypeType of the request.
Returns
A context that is passed into methods used to process the request.

Member Data Documentation

EventHandler<SetEventMonitoringModeEventArgs> UnifiedAutomation.UaServer.ServerManager.EventMonitoringModeSet

Fires when an EventMonitoredItem for an notifier changes its monitoring mode that is managed by the CoreNodeManager.

EventHandler<ModifyEventMonitoredItemEventArgs> UnifiedAutomation.UaServer.ServerManager.EventMonitoringModified

Fires when an EventMonitoredItem for an notifier is modified that is managed by the CoreNodeManager.

EventHandler<CreateEventMonitoredItemEventArgs> UnifiedAutomation.UaServer.ServerManager.EventMonitoringStarted

Fires when an EventMonitoredItem for an notifier is created that is managed by the CoreNodeManager.

EventHandler<DeleteEventMonitoredItemEventArgs> UnifiedAutomation.UaServer.ServerManager.EventMonitoringStopped

Fires when an EventMonitoredItem for an notifier is deleted that is managed by the CoreNodeManager.

Property Documentation

AggregateManager UnifiedAutomation.UaServer.ServerManager.AggregateManager
get

Gets the aggregate manager.

Dictionary<NodeId, CertificateGroupModel> UnifiedAutomation.UaServer.ServerManager.CertificateGroups
get

The certificate groups supported by the server.

BaseNodeManager UnifiedAutomation.UaServer.ServerManager.CoreNodeManager
get

Gets the core node manager.

RequestContext UnifiedAutomation.UaServer.ServerManager.DefaultRequestContext
get

Gets the server context.

object UnifiedAutomation.UaServer.ServerManager.DiagnosticsLock
get

A lock which must be acquired before accessing the diagnostics.

FilterManager UnifiedAutomation.UaServer.ServerManager.FilterManager
get

Gets the filter manager.

ServerInternalClient UnifiedAutomation.UaServer.ServerManager.InternalClient
get

Gets the internal client object.

bool UnifiedAutomation.UaServer.ServerManager.IsAuditEnabled
get

Gets a value indicating whether auditing is enabled

bool UnifiedAutomation.UaServer.ServerManager.IsRestartInProgress
get

Gets a value indicating whether a restart is in progress.

true if this instance is restartings; otherwise, false.

bool UnifiedAutomation.UaServer.ServerManager.IsRunning
get

Gets a value indicating whether this instance is running.

true if this instance is running; otherwise, false.

NamespaceTable UnifiedAutomation.UaServer.ServerManager.NamespaceUris
get

Gets the namespace uris.

uint UnifiedAutomation.UaServer.ServerManager.NextUniqueId
get

Gets the next unique id.

System.Reflection.Assembly UnifiedAutomation.UaServer.ServerManager.OpcUaNodeSetAssembly
getset

Gets or sets the assembly which has the Opc.Ua.NodeSet2 file as an embedded resource.

If this property is set, the Opc.Ua.NodeSet2 file from the assembly is used for the address space. This property should only be set for prototyping which requires an updated version of the namespace "http://opcfoundation.org/UA/".

ResourceManager UnifiedAutomation.UaServer.ServerManager.ResourceManager
get

Gets the resource manager.

Returns the TranslationManager as ResourceManager. Can be null if a custom implementation of ITranslationManager is created.

See also
TranslationManager
RootNodeManager UnifiedAutomation.UaServer.ServerManager.RootNodeManager
get

Gets the root node manager.

IScopeMapper UnifiedAutomation.UaServer.ServerManager.ScopeMapper
get

Gets the ScopeMapper used for importing nodes with a NodeAccessInfo;

ServerDiagnosticsModel UnifiedAutomation.UaServer.ServerManager.ServerDiagnostics
get

The diagnostics associated with the server.

SessionManager UnifiedAutomation.UaServer.ServerManager.SessionManager
get

Gets the session manager.

ServerSettings UnifiedAutomation.UaServer.ServerManager.Settings
get

The configuration settings for the server.

SubscriptionManager UnifiedAutomation.UaServer.ServerManager.SubscriptionManager
get

Gets the subscription manager.

ITranslationManager UnifiedAutomation.UaServer.ServerManager.TranslationManager
get

Gets the translation manager.

TypeManager UnifiedAutomation.UaServer.ServerManager.TypeManager
get

Gets the type manager.

ICertificateValidator UnifiedAutomation.UaServer.ServerManager.UserCertificateValidator
get

Gets the CertificateValidator for Certificates passed in X509IdentityTokens.

This CertificateValidator is created if all required information is configured in the UserIdentitySettings:

  • EnableCertificate must be true
  • UserTrustedCertificateStore must be set
  • UserIssuerCertificateStore must be set
  • UserRejectedCertificateStore should be set

Event Documentation

EventHandler UnifiedAutomation.UaServer.ServerManager.ServerStarted

Occurs when the server is started.

EventHandler UnifiedAutomation.UaServer.ServerManager.ServerStopped

Occurs when the server is stopped.

UntrustedUserCertificateEventHandler UnifiedAutomation.UaServer.ServerManager.UntrustedUserCertificate

Occurs when an untrusted user certificate is encountered or when a user certificate has other validation errors

This event can be raised from a background thread and Invoke may need to be called if being handled by a UI. This event has return parameters so BeginInvoke cannot be used. Displaying a modal dialog in the callback will not work if the UI thread is blocked on a another operation. This problem can be avoided by using asynchronous method calls when available.


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