C# Class Opc.Ua.Server.ServerInternalData

A class that stores the globally accessible state of a server instance.
This is a readonly class that is initialized when the server starts up. It provides access to global objects and data that different parts of the server may require. It also defines some global methods. This object is constructed is three steps: - the configuration is provided. - the node managers et. al. are provided. - the session/subscription managers are provided. The server is not running until all three steps are complete. The references returned from this object do not change after all three states are complete. This ensures the object is thread safe even though it does not use a lock. Objects returned from this object can be assumed to be threadsafe unless otherwise stated.
Inheritance: IServerInternal, IDisposable
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Private Properties

Property Type Description
CreateServerObject void
OnReadDiagnosticsEnabledFlag ServiceResult
OnReadNamespaceArray ServiceResult
OnReadServerArray ServiceResult
OnReadServerStatus void
OnUpdateDiagnostics ServiceResult

Public Methods

Method Description
CloseSession ( OperationContext context, NodeId sessionId, bool deleteSubscriptions ) : void

Closes the specified session.

ConditionRefresh ( OperationContext context, uint subscriptionId ) : void

Refreshes the conditions for the specified subscription.

CreateServerObject ( EventManager eventManager, ResourceManager resourceManager, RequestManager requestManager ) : void

Sets the EventManager, the ResourceManager, the RequestManager and the AggregateManager.

DeleteSubscription ( uint subscriptionId ) : void

Deletes the specified subscription.

Dispose ( ) : void

Frees any unmanaged resources.

ReportEvent ( IFilterTarget e ) : void

Called by any component to report a global event.

ReportEvent ( ISystemContext context, IFilterTarget e ) : void

Called by any component to report a global event.

ServerInternalData ( ServerProperties serverDescription, ApplicationConfiguration configuration, ServiceMessageContext messageContext, CertificateValidator certificateValidator, X509Certificate2 instanceCertificate ) : System

Initializes the datastore with the server configuration.

SetNodeManager ( MasterNodeManager nodeManager ) : void

Stores the MasterNodeManager and the CoreNodeManager

SetSessionManager ( SessionManager sessionManager, SubscriptionManager subscriptionManager ) : void

Stores the SessionManager, the SubscriptionManager in the datastore.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

Private Methods

Method Description
CreateServerObject ( ) : void

Creates the ServerObject and attaches it to the NodeManager.

OnReadDiagnosticsEnabledFlag ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the server array.

OnReadNamespaceArray ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the namespace array.

OnReadServerArray ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the server array.

OnReadServerStatus ( ISystemContext context, BaseVariableValue variable, NodeState component ) : void

Updates the server status before a read.

OnUpdateDiagnostics ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the current diagnostics.

Method Details

CloseSession() public method

Closes the specified session.
public CloseSession ( OperationContext context, NodeId sessionId, bool deleteSubscriptions ) : void
context OperationContext The context.
sessionId NodeId The session identifier.
deleteSubscriptions bool if set to true subscriptions are to be deleted.
return void

ConditionRefresh() public method

Refreshes the conditions for the specified subscription.
public ConditionRefresh ( OperationContext context, uint subscriptionId ) : void
context OperationContext The context.
subscriptionId uint The subscription identifier.
return void

CreateServerObject() public method

Sets the EventManager, the ResourceManager, the RequestManager and the AggregateManager.
public CreateServerObject ( EventManager eventManager, ResourceManager resourceManager, RequestManager requestManager ) : void
eventManager EventManager The event manager.
resourceManager ResourceManager The resource manager.
requestManager RequestManager The request manager.
return void

DeleteSubscription() public method

Deletes the specified subscription.
public DeleteSubscription ( uint subscriptionId ) : void
subscriptionId uint The subscription identifier.
return void

Dispose() public method

Frees any unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

ReportEvent() public method

Called by any component to report a global event.
public ReportEvent ( IFilterTarget e ) : void
e IFilterTarget The event.
return void

ReportEvent() public method

Called by any component to report a global event.
public ReportEvent ( ISystemContext context, IFilterTarget e ) : void
context ISystemContext The context.
e IFilterTarget The event.
return void

ServerInternalData() public method

Initializes the datastore with the server configuration.
public ServerInternalData ( ServerProperties serverDescription, ApplicationConfiguration configuration, ServiceMessageContext messageContext, CertificateValidator certificateValidator, X509Certificate2 instanceCertificate ) : System
serverDescription ServerProperties The server description.
configuration ApplicationConfiguration The configuration.
messageContext ServiceMessageContext The message context.
certificateValidator CertificateValidator The certificate validator.
instanceCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 The instance certificate.
return System

SetNodeManager() public method

Stores the MasterNodeManager and the CoreNodeManager
public SetNodeManager ( MasterNodeManager nodeManager ) : void
nodeManager MasterNodeManager The node manager.
return void

SetSessionManager() public method

Stores the SessionManager, the SubscriptionManager in the datastore.
public SetSessionManager ( SessionManager sessionManager, SubscriptionManager subscriptionManager ) : void
sessionManager SessionManager The session manager.
subscriptionManager SubscriptionManager The subscription manager.
return void