C# Class Opc.Ua.Server.DiagnosticsNodeManager

A node manager the diagnostic information exposed by the server.
Inheritance: CustomNodeManager2
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
AddAggregateFunction ( NodeId aggregateId, string aggregateName, bool isHistorical ) : void

Adds an aggregate function to the server capabilities object.

AttachNode ( ILocalNode node ) : void
CreateAddressSpace ( IDictionary externalReferences ) : void

Does any initialization required before the address space can be used.

The externalReferences is an out parameter that allows the node manager to link to nodes in other node managers. For example, the 'Objects' node is managed by the CoreNodeManager and should have a reference to the root folder node(s) exposed by this node manager.

CreateMethod ( NodeId parentId, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, MethodAttributes attributes ) : NodeId
CreateObject ( NodeId parentId, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, ObjectAttributes attributes, ExpandedNodeId typeDefinitionId ) : NodeId
CreateObjectType ( NodeId parentId, NodeId nodeId, QualifiedName browseName, ObjectTypeAttributes attributes ) : NodeId
CreateServerDiagnostics ( ServerSystemContext systemContext, ServerDiagnosticsSummaryDataType diagnostics, NodeValueSimpleEventHandler updateCallback ) : void

Creates the diagnostics node for the server.

CreateSessionDiagnostics ( ServerSystemContext systemContext, SessionDiagnosticsDataType diagnostics, NodeValueSimpleEventHandler updateCallback, SessionSecurityDiagnosticsDataType securityDiagnostics, NodeValueSimpleEventHandler updateSecurityCallback ) : NodeId

Creates the diagnostics node for a subscription.

CreateSubscriptionDiagnostics ( ServerSystemContext systemContext, SubscriptionDiagnosticsDataType diagnostics, NodeValueSimpleEventHandler updateCallback ) : NodeId

Creates the diagnostics node for a subscription.

CreateUniqueNodeId ( ) : NodeId
CreateVariable ( NodeId parentId, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, VariableAttributes attributes, ExpandedNodeId typeDefinitionId ) : NodeId
CreateVariableType ( NodeId parentId, NodeId nodeId, QualifiedName browseName, VariableTypeAttributes attributes ) : NodeId
DeleteNode ( NodeId nodeId, bool deleteChildren, bool silent ) : void
DeleteSessionDiagnostics ( ServerSystemContext systemContext, NodeId nodeId ) : void

Delete the diagnostics node for a session.

DeleteSubscriptionDiagnostics ( ServerSystemContext systemContext, NodeId nodeId ) : void

Delete the diagnostics node for a subscription.

DiagnosticsNodeManager ( IServerInternal server, ApplicationConfiguration configuration ) : System

Initializes the node manager.

FindTargetId ( NodeId sourceId, NodeId referenceTypeId, bool isInverse, QualifiedName browseName ) : NodeId
GetDefaultHistoryCapabilities ( ) : HistoryServerCapabilitiesState

Gets the default history capabilities object.

GetLocalNode ( NodeId nodeId ) : ILocalNode
GetNamespaceIndex ( string namespaceUri ) : ushort

Returns an index for the NamespaceURI (Adds it to the server namespace table if it does not already exist).

Returns the server's default index (1) if the namespaceUri is empty or null.

GetTargetNode ( NodeId sourceId, NodeId referenceTypeId, bool isInverse, bool includeSubtypes, QualifiedName browseName ) : ILocalNode
New ( ISystemContext context, NodeState node ) : NodeId

Creates the NodeId for the specified node.

OnGetMonitoredItems ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult

Called when a client locks the server.

OnLockServer ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult

Called when a client locks the server.

OnUnlockServer ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult

Called when a client locks the server.

ReferenceSharedNode ( ILocalNode source, NodeId referenceTypeId, bool isInverse, QualifiedName browseName ) : ILocalNode
ReplaceNode ( ILocalNode existingNode, ILocalNode newNode ) : void
SetDiagnosticsEnabled ( ServerSystemContext context, bool enabled ) : void

Sets the flag controlling whether diagnostics is enabled for the server.

UnreferenceSharedNode ( ILocalNode source, NodeId referenceTypeId, bool isInverse, QualifiedName browseName ) : ILocalNode

Protected Methods

Method Description
AddBehaviourToPredefinedNode ( ISystemContext context, NodeState predefinedNode ) : NodeState

Replaces the generic node with a node specific to the model.

Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

LoadPredefinedNodes ( ISystemContext context ) : NodeStateCollection

Loads a node set from a file or resource and addes them to the set of predefined nodes.

OnMonitoredItemCreated ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem ) : void

Called after creating a MonitoredItem.

OnMonitoredItemDeleted ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem ) : void

Called after deleting a MonitoredItem.

OnMonitoringModeChanged ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem, MonitoringMode previousMode, MonitoringMode monitoringMode ) : void

Called after changing the MonitoringMode for a MonitoredItem.

ValidateViewDescription ( ServerSystemContext context, ViewDescription view ) : void

Validates the view description passed to a browse request (throws on error).

Private Methods

Method Description
CreateSampledItem ( double samplingInterval, MonitoredItem monitoredItem ) : void

Creates a new sampled item.

DeleteSampledItem ( MonitoredItem monitoredItem ) : void

Deletes a sampled item.

DoSample ( object state ) : void

Polls each monitored item which requires sample.

DoScan ( object alwaysUpdateArrays ) : void

Reports notifications for any monitored diagnostic nodes.

GetTargetNode ( ILocalNode source, NodeId referenceTypeId, bool isInverse, bool includeSubtypes, QualifiedName browseName ) : ILocalNode
IsDiagnosticsNode ( NodeState node ) : bool

Returns true of the node is a diagnostics node.

IsDiagnosticsStructureNode ( NodeState node ) : bool

Returns true of the node is a diagnostics node.

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

Does a scan before the diagnostics are read.

OnConditionRefresh ( ISystemContext context, MethodState method, NodeId objectId, uint subscriptionId ) : ServiceResult

Handles a request to refresh conditions for a subscription.

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

Does a scan before the diagnostics are read.

UpdateServerDiagnosticsSummary ( ) : bool

Updates the server diagnostics summary structure.

UpdateSessionDiagnostics ( SessionDiagnosticsData diagnostics, SessionDiagnosticsDataType sessionArray, int index ) : bool

Updates the session diagnostics summary structure.

UpdateSessionSecurityDiagnostics ( SessionDiagnosticsData diagnostics, SessionSecurityDiagnosticsDataType sessionArray, int index ) : bool

Updates the session diagnostics summary structure.

UpdateSubscriptionDiagnostics ( SubscriptionDiagnosticsData diagnostics, SubscriptionDiagnosticsDataType subscriptionArray, int index ) : bool

Updates the subscription diagnostics summary structure.

Method Details

AddAggregateFunction() public method

Adds an aggregate function to the server capabilities object.
public AddAggregateFunction ( NodeId aggregateId, string aggregateName, bool isHistorical ) : void
aggregateId NodeId
aggregateName string
isHistorical bool
return void

AddBehaviourToPredefinedNode() protected method

Replaces the generic node with a node specific to the model.
protected AddBehaviourToPredefinedNode ( ISystemContext context, NodeState predefinedNode ) : NodeState
context ISystemContext
predefinedNode NodeState
return NodeState

AttachNode() public method

public AttachNode ( ILocalNode node ) : void
node ILocalNode
return void

CreateAddressSpace() public method

Does any initialization required before the address space can be used.
The externalReferences is an out parameter that allows the node manager to link to nodes in other node managers. For example, the 'Objects' node is managed by the CoreNodeManager and should have a reference to the root folder node(s) exposed by this node manager.
public CreateAddressSpace ( IDictionary externalReferences ) : void
externalReferences IDictionary
return void

CreateMethod() public method

public CreateMethod ( NodeId parentId, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, MethodAttributes attributes ) : NodeId
parentId NodeId
referenceTypeId NodeId
nodeId NodeId
browseName QualifiedName
attributes MethodAttributes
return NodeId

CreateObject() public method

public CreateObject ( NodeId parentId, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, ObjectAttributes attributes, ExpandedNodeId typeDefinitionId ) : NodeId
parentId NodeId
referenceTypeId NodeId
nodeId NodeId
browseName QualifiedName
attributes ObjectAttributes
typeDefinitionId ExpandedNodeId
return NodeId

CreateObjectType() public method

public CreateObjectType ( NodeId parentId, NodeId nodeId, QualifiedName browseName, ObjectTypeAttributes attributes ) : NodeId
parentId NodeId
nodeId NodeId
browseName QualifiedName
attributes ObjectTypeAttributes
return NodeId

CreateServerDiagnostics() public method

Creates the diagnostics node for the server.
public CreateServerDiagnostics ( ServerSystemContext systemContext, ServerDiagnosticsSummaryDataType diagnostics, NodeValueSimpleEventHandler updateCallback ) : void
systemContext ServerSystemContext
diagnostics ServerDiagnosticsSummaryDataType
updateCallback NodeValueSimpleEventHandler
return void

CreateSessionDiagnostics() public method

Creates the diagnostics node for a subscription.
public CreateSessionDiagnostics ( ServerSystemContext systemContext, SessionDiagnosticsDataType diagnostics, NodeValueSimpleEventHandler updateCallback, SessionSecurityDiagnosticsDataType securityDiagnostics, NodeValueSimpleEventHandler updateSecurityCallback ) : NodeId
systemContext ServerSystemContext
diagnostics SessionDiagnosticsDataType
updateCallback NodeValueSimpleEventHandler
securityDiagnostics SessionSecurityDiagnosticsDataType
updateSecurityCallback NodeValueSimpleEventHandler
return NodeId

CreateSubscriptionDiagnostics() public method

Creates the diagnostics node for a subscription.
public CreateSubscriptionDiagnostics ( ServerSystemContext systemContext, SubscriptionDiagnosticsDataType diagnostics, NodeValueSimpleEventHandler updateCallback ) : NodeId
systemContext ServerSystemContext
diagnostics SubscriptionDiagnosticsDataType
updateCallback NodeValueSimpleEventHandler
return NodeId

CreateUniqueNodeId() public method

public CreateUniqueNodeId ( ) : NodeId
return NodeId

CreateVariable() public method

public CreateVariable ( NodeId parentId, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, VariableAttributes attributes, ExpandedNodeId typeDefinitionId ) : NodeId
parentId NodeId
referenceTypeId NodeId
nodeId NodeId
browseName QualifiedName
attributes VariableAttributes
typeDefinitionId ExpandedNodeId
return NodeId

CreateVariableType() public method

public CreateVariableType ( NodeId parentId, NodeId nodeId, QualifiedName browseName, VariableTypeAttributes attributes ) : NodeId
parentId NodeId
nodeId NodeId
browseName QualifiedName
attributes VariableTypeAttributes
return NodeId

DeleteNode() public method

public DeleteNode ( NodeId nodeId, bool deleteChildren, bool silent ) : void
nodeId NodeId
deleteChildren bool
silent bool
return void

DeleteSessionDiagnostics() public method

Delete the diagnostics node for a session.
public DeleteSessionDiagnostics ( ServerSystemContext systemContext, NodeId nodeId ) : void
systemContext ServerSystemContext
nodeId NodeId
return void

DeleteSubscriptionDiagnostics() public method

Delete the diagnostics node for a subscription.
public DeleteSubscriptionDiagnostics ( ServerSystemContext systemContext, NodeId nodeId ) : void
systemContext ServerSystemContext
nodeId NodeId
return void

DiagnosticsNodeManager() public method

Initializes the node manager.
public DiagnosticsNodeManager ( IServerInternal server, ApplicationConfiguration configuration ) : System
server IServerInternal
configuration ApplicationConfiguration
return System

Dispose() protected method

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
return void

FindTargetId() public method

public FindTargetId ( NodeId sourceId, NodeId referenceTypeId, bool isInverse, QualifiedName browseName ) : NodeId
sourceId NodeId
referenceTypeId NodeId
isInverse bool
browseName QualifiedName
return NodeId

GetDefaultHistoryCapabilities() public method

Gets the default history capabilities object.
public GetDefaultHistoryCapabilities ( ) : HistoryServerCapabilitiesState
return HistoryServerCapabilitiesState

GetLocalNode() public method

public GetLocalNode ( NodeId nodeId ) : ILocalNode
nodeId NodeId
return ILocalNode

GetNamespaceIndex() public method

Returns an index for the NamespaceURI (Adds it to the server namespace table if it does not already exist).
Returns the server's default index (1) if the namespaceUri is empty or null.
public GetNamespaceIndex ( string namespaceUri ) : ushort
namespaceUri string
return ushort

GetTargetNode() public method

public GetTargetNode ( NodeId sourceId, NodeId referenceTypeId, bool isInverse, bool includeSubtypes, QualifiedName browseName ) : ILocalNode
sourceId NodeId
referenceTypeId NodeId
isInverse bool
includeSubtypes bool
browseName QualifiedName
return ILocalNode

LoadPredefinedNodes() protected method

Loads a node set from a file or resource and addes them to the set of predefined nodes.
protected LoadPredefinedNodes ( ISystemContext context ) : NodeStateCollection
context ISystemContext
return NodeStateCollection

New() public method

Creates the NodeId for the specified node.
public New ( ISystemContext context, NodeState node ) : NodeId
context ISystemContext The context.
node NodeState The node.
return NodeId

OnGetMonitoredItems() public method

Called when a client locks the server.
public OnGetMonitoredItems ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
return ServiceResult

OnLockServer() public method

Called when a client locks the server.
public OnLockServer ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
return ServiceResult

OnMonitoredItemCreated() protected method

Called after creating a MonitoredItem.
protected OnMonitoredItemCreated ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem ) : void
context ServerSystemContext The context.
handle NodeHandle The handle for the node.
monitoredItem MonitoredItem The monitored item.
return void

OnMonitoredItemDeleted() protected method

Called after deleting a MonitoredItem.
protected OnMonitoredItemDeleted ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem ) : void
context ServerSystemContext The context.
handle NodeHandle The handle for the node.
monitoredItem MonitoredItem The monitored item.
return void

OnMonitoringModeChanged() protected method

Called after changing the MonitoringMode for a MonitoredItem.
protected OnMonitoringModeChanged ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem, MonitoringMode previousMode, MonitoringMode monitoringMode ) : void
context ServerSystemContext The context.
handle NodeHandle The handle for the node.
monitoredItem MonitoredItem The monitored item.
previousMode MonitoringMode The previous monitoring mode.
monitoringMode MonitoringMode The current monitoring mode.
return void

OnUnlockServer() public method

Called when a client locks the server.
public OnUnlockServer ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
return ServiceResult

ReferenceSharedNode() public method

public ReferenceSharedNode ( ILocalNode source, NodeId referenceTypeId, bool isInverse, QualifiedName browseName ) : ILocalNode
source ILocalNode
referenceTypeId NodeId
isInverse bool
browseName QualifiedName
return ILocalNode

ReplaceNode() public method

public ReplaceNode ( ILocalNode existingNode, ILocalNode newNode ) : void
existingNode ILocalNode
newNode ILocalNode
return void

SetDiagnosticsEnabled() public method

Sets the flag controlling whether diagnostics is enabled for the server.
public SetDiagnosticsEnabled ( ServerSystemContext context, bool enabled ) : void
context ServerSystemContext
enabled bool
return void

UnreferenceSharedNode() public method

public UnreferenceSharedNode ( ILocalNode source, NodeId referenceTypeId, bool isInverse, QualifiedName browseName ) : ILocalNode
source ILocalNode
referenceTypeId NodeId
isInverse bool
browseName QualifiedName
return ILocalNode

ValidateViewDescription() protected method

Validates the view description passed to a browse request (throws on error).
protected ValidateViewDescription ( ServerSystemContext context, ViewDescription view ) : void
context ServerSystemContext
view ViewDescription
return void