C# Class Opc.Ua.Server.MasterNodeManager

Inheritance: IDisposable
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
AddReferences ( NodeId sourceId, IList references ) : void

Adds the references to the target.

Browse ( OperationContext context, ViewDescription view, uint maxReferencesPerNode, BrowseDescriptionCollection nodesToBrowse, BrowseResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Returns the set of references that meet the filter criteria.

BrowseNext ( OperationContext context, bool releaseContinuationPoints, ByteStringCollection continuationPoints, BrowseResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Continues a browse operation that was previously halted.

Call ( OperationContext context, CallMethodRequestCollection methodsToCall, CallMethodResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Calls a method defined on a object.

ConditionRefresh ( OperationContext context, IList monitoredItems ) : void

Handles condition refresh request.

CreateExternalReference ( IDictionary externalReferences, NodeId sourceId, NodeId referenceTypeId, bool isInverse, NodeId targetId ) : void

Adds a reference to the table of external references.

This is a convenience function used by custom NodeManagers.

CreateMonitoredItems ( OperationContext context, uint subscriptionId, double publishingInterval, TimestampsToReturn timestampsToReturn, IList itemsToCreate, IList errors, IList filterResults, IList monitoredItems ) : void

Creates a set of monitored items.

DeleteMonitoredItems ( OperationContext context, uint subscriptionId, IList itemsToDelete, IList errors ) : void

Deletes a set of monitored items.

DeleteReferences ( NodeId targetId, IList references ) : void

Deletes the references to the target.

Dispose ( ) : void

Frees any unmanaged resources.

GetManagerHandle ( NodeId nodeId, INodeManager &nodeManager ) : object

Returns node handle and its node manager.

HistoryRead ( OperationContext context, ExtensionObject historyReadDetails, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, HistoryReadValueIdCollection nodesToRead, HistoryReadResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Reads the history of a set of items.

HistoryUpdate ( OperationContext context, ExtensionObjectCollection historyUpdateDetails, HistoryUpdateResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Updates the history for a set of nodes.

MasterNodeManager ( IServerInternal server, ApplicationConfiguration configuration, string dynamicNamespaceUri ) : System

Initializes the object with default values.

ModifyMonitoredItems ( OperationContext context, TimestampsToReturn timestampsToReturn, IList monitoredItems, IList itemsToModify, IList errors, IList filterResults ) : void

Modifies a set of monitored items.

Read ( OperationContext context, double maxAge, TimestampsToReturn timestampsToReturn, ReadValueIdCollection nodesToRead, DataValueCollection &values, DiagnosticInfoCollection &diagnosticInfos ) : void

Reads a set of nodes

RegisterNamespaceManager ( string namespaceUri, INodeManager nodeManager ) : void

Registers the node manager as the node manager for Nodes in the specified namespace.

Multiple NodeManagers may register interest in a Namespace. The order in which this method is called determines the precedence if multiple NodeManagers exist. This method adds the namespaceUri to the Server's Namespace table if it does not already exist. This method is thread safe and can be called at anytime. This method does not have to be called for any namespaces that were in the NodeManager's NamespaceUri property when the MasterNodeManager was created.

RegisterNodes ( OperationContext context, NodeIdCollection nodesToRegister, NodeIdCollection &registeredNodeIds ) : void

Registers a set of node ids.

RemoveReferences ( List referencesToRemove ) : void

Deletes the specified references.

SessionClosing ( OperationContext context, NodeId sessionId, bool deleteSubscriptions ) : void

Signals that a session is closing.

SetMonitoringMode ( OperationContext context, MonitoringMode monitoringMode, IList itemsToModify, IList errors ) : void

Changes the monitoring mode for a set of items.

Shutdown ( ) : void

Shuts down the node managers a

Startup ( ) : void

Creates the node managers and start them

TranslateBrowsePathsToNodeIds ( OperationContext context, BrowsePathCollection browsePaths, BrowsePathResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Translates a start node id plus a relative paths into a node id.

UnregisterNodes ( OperationContext context, NodeIdCollection nodesToUnregister ) : void

Unregisters a set of node ids.

Write ( OperationContext context, WriteValueCollection nodesToWrite, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Writes a set of values.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

FetchReferences ( OperationContext context, bool assignContinuationPoint, ContinuationPoint &cp, ReferenceDescriptionCollection &references ) : ServiceResult

Loops until browse is complete for max results reached.

TranslateBrowsePath ( OperationContext context, BrowsePath browsePath, BrowsePathResult result ) : ServiceResult

Translates a browse path.

ValidateCallRequestItem ( CallMethodRequest item ) : ServiceResult

Validates a call request item parameter

ValidateMonitoredItemCreateRequest ( MonitoredItemCreateRequest item ) : ServiceResult

Validates a monitored item create request parameter.

ValidateMonitoredItemModifyRequest ( MonitoredItemModifyRequest item ) : ServiceResult

Validates a monitored item modify request parameter.

ValidateMonitoringAttributes ( MonitoringParameters attributes ) : ServiceResult

Validates a monitoring attributes parameter.

ValidateMonitoringFilter ( ExtensionObject filter ) : ServiceResult

Validates a monitoring filter.

Private Methods

Method Description
Browse ( OperationContext context, ViewDescription view, uint maxReferencesPerNode, bool assignContinuationPoint, BrowseDescription nodeToBrowse, BrowseResult result ) : ServiceResult

Returns the set of references that meet the filter criteria.

CreateMonitoredItemsForEvents ( OperationContext context, uint subscriptionId, double publishingInterval, TimestampsToReturn timestampsToReturn, IList itemsToCreate, IList errors, IList filterResults, IList monitoredItems, long &globalIdCounter ) : void

Create monitored items for event subscriptions.

DeleteMonitoredItemsForEvents ( OperationContext context, uint subscriptionId, IList monitoredItems, IList processedItems, IList errors ) : void

Delete monitored items for event subscriptions.

ModifyMonitoredItemsForEvents ( OperationContext context, TimestampsToReturn timestampsToReturn, IList monitoredItems, IList itemsToModify, IList errors, IList filterResults ) : void

Modify monitored items for event subscriptions.

RegisterNodeManager ( INodeManager nodeManager, List registeredManagers, Dictionary namespaceManagers ) : void

Registers the node manager with the master node manager.

SetMonitoringModeForEvents ( OperationContext context, MonitoringMode monitoringMode, IList monitoredItems, IList processedItems, IList errors ) : void

Delete monitored items for event subscriptions.

TranslateBrowsePath ( OperationContext context, INodeManager nodeManager, object sourceHandle, RelativePath relativePath, BrowsePathTargetCollection targets, int index ) : void

Recursively processes the elements in the RelativePath starting at the specified index.

UpdateDiagnostics ( OperationContext context, bool diagnosticsExist, DiagnosticInfoCollection &diagnosticInfos ) : void

Updates the diagnostics return parameter.

UpdateReferenceDescription ( OperationContext context, NodeId targetId, NodeClass nodeClassMask, BrowseResultMask resultMask, ReferenceDescription description ) : bool

Updates the reference description with the node attributes.

Method Details

AddReferences() public method

Adds the references to the target.
public AddReferences ( NodeId sourceId, IList references ) : void
sourceId NodeId
references IList
return void

Browse() public method

Returns the set of references that meet the filter criteria.
public Browse ( OperationContext context, ViewDescription view, uint maxReferencesPerNode, BrowseDescriptionCollection nodesToBrowse, BrowseResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
view ViewDescription
maxReferencesPerNode uint
nodesToBrowse BrowseDescriptionCollection
results BrowseResultCollection
diagnosticInfos DiagnosticInfoCollection
return void

BrowseNext() public method

Continues a browse operation that was previously halted.
public BrowseNext ( OperationContext context, bool releaseContinuationPoints, ByteStringCollection continuationPoints, BrowseResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
releaseContinuationPoints bool
continuationPoints ByteStringCollection
results BrowseResultCollection
diagnosticInfos DiagnosticInfoCollection
return void

Call() public method

Calls a method defined on a object.
public Call ( OperationContext context, CallMethodRequestCollection methodsToCall, CallMethodResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
methodsToCall CallMethodRequestCollection
results CallMethodResultCollection
diagnosticInfos DiagnosticInfoCollection
return void

ConditionRefresh() public method

Handles condition refresh request.
public ConditionRefresh ( OperationContext context, IList monitoredItems ) : void
context OperationContext
monitoredItems IList
return void

CreateExternalReference() public static method

Adds a reference to the table of external references.
This is a convenience function used by custom NodeManagers.
public static CreateExternalReference ( IDictionary externalReferences, NodeId sourceId, NodeId referenceTypeId, bool isInverse, NodeId targetId ) : void
externalReferences IDictionary
sourceId NodeId
referenceTypeId NodeId
isInverse bool
targetId NodeId
return void

CreateMonitoredItems() public method

Creates a set of monitored items.
public CreateMonitoredItems ( OperationContext context, uint subscriptionId, double publishingInterval, TimestampsToReturn timestampsToReturn, IList itemsToCreate, IList errors, IList filterResults, IList monitoredItems ) : void
context OperationContext
subscriptionId uint
publishingInterval double
timestampsToReturn TimestampsToReturn
itemsToCreate IList
errors IList
filterResults IList
monitoredItems IList
return void

DeleteMonitoredItems() public method

Deletes a set of monitored items.
public DeleteMonitoredItems ( OperationContext context, uint subscriptionId, IList itemsToDelete, IList errors ) : void
context OperationContext
subscriptionId uint
itemsToDelete IList
errors IList
return void

DeleteReferences() public method

Deletes the references to the target.
public DeleteReferences ( NodeId targetId, IList references ) : void
targetId NodeId
references IList
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
return void

FetchReferences() protected method

Loops until browse is complete for max results reached.
protected FetchReferences ( OperationContext context, bool assignContinuationPoint, ContinuationPoint &cp, ReferenceDescriptionCollection &references ) : ServiceResult
context OperationContext
assignContinuationPoint bool
cp ContinuationPoint
references ReferenceDescriptionCollection
return ServiceResult

GetManagerHandle() public method

Returns node handle and its node manager.
public GetManagerHandle ( NodeId nodeId, INodeManager &nodeManager ) : object
nodeId NodeId
nodeManager INodeManager
return object

HistoryRead() public method

Reads the history of a set of items.
public HistoryRead ( OperationContext context, ExtensionObject historyReadDetails, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, HistoryReadValueIdCollection nodesToRead, HistoryReadResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
historyReadDetails ExtensionObject
timestampsToReturn TimestampsToReturn
releaseContinuationPoints bool
nodesToRead HistoryReadValueIdCollection
results HistoryReadResultCollection
diagnosticInfos DiagnosticInfoCollection
return void

HistoryUpdate() public method

Updates the history for a set of nodes.
public HistoryUpdate ( OperationContext context, ExtensionObjectCollection historyUpdateDetails, HistoryUpdateResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
historyUpdateDetails ExtensionObjectCollection
results HistoryUpdateResultCollection
diagnosticInfos DiagnosticInfoCollection
return void

MasterNodeManager() public method

Initializes the object with default values.
public MasterNodeManager ( IServerInternal server, ApplicationConfiguration configuration, string dynamicNamespaceUri ) : System
server IServerInternal
configuration ApplicationConfiguration
dynamicNamespaceUri string
return System

ModifyMonitoredItems() public method

Modifies a set of monitored items.
public ModifyMonitoredItems ( OperationContext context, TimestampsToReturn timestampsToReturn, IList monitoredItems, IList itemsToModify, IList errors, IList filterResults ) : void
context OperationContext
timestampsToReturn TimestampsToReturn
monitoredItems IList
itemsToModify IList
errors IList
filterResults IList
return void

Read() public method

Reads a set of nodes
public Read ( OperationContext context, double maxAge, TimestampsToReturn timestampsToReturn, ReadValueIdCollection nodesToRead, DataValueCollection &values, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
maxAge double
timestampsToReturn TimestampsToReturn
nodesToRead ReadValueIdCollection
values DataValueCollection
diagnosticInfos DiagnosticInfoCollection
return void

RegisterNamespaceManager() public method

Registers the node manager as the node manager for Nodes in the specified namespace.
Multiple NodeManagers may register interest in a Namespace. The order in which this method is called determines the precedence if multiple NodeManagers exist. This method adds the namespaceUri to the Server's Namespace table if it does not already exist. This method is thread safe and can be called at anytime. This method does not have to be called for any namespaces that were in the NodeManager's NamespaceUri property when the MasterNodeManager was created.
Throw if the namespaceUri or the nodeManager are null.
public RegisterNamespaceManager ( string namespaceUri, INodeManager nodeManager ) : void
namespaceUri string The URI of the namespace.
nodeManager INodeManager The NodeManager which owns node in the namespacee.
return void

RegisterNodes() public method

Registers a set of node ids.
public RegisterNodes ( OperationContext context, NodeIdCollection nodesToRegister, NodeIdCollection &registeredNodeIds ) : void
context OperationContext
nodesToRegister NodeIdCollection
registeredNodeIds NodeIdCollection
return void

RemoveReferences() public method

Deletes the specified references.
public RemoveReferences ( List referencesToRemove ) : void
referencesToRemove List
return void

SessionClosing() public method

Signals that a session is closing.
public SessionClosing ( OperationContext context, NodeId sessionId, bool deleteSubscriptions ) : void
context OperationContext
sessionId NodeId
deleteSubscriptions bool
return void

SetMonitoringMode() public method

Changes the monitoring mode for a set of items.
public SetMonitoringMode ( OperationContext context, MonitoringMode monitoringMode, IList itemsToModify, IList errors ) : void
context OperationContext
monitoringMode MonitoringMode
itemsToModify IList
errors IList
return void

Shutdown() public method

Shuts down the node managers a
public Shutdown ( ) : void
return void

Startup() public method

Creates the node managers and start them
public Startup ( ) : void
return void

TranslateBrowsePath() protected method

Translates a browse path.
protected TranslateBrowsePath ( OperationContext context, BrowsePath browsePath, BrowsePathResult result ) : ServiceResult
context OperationContext
browsePath BrowsePath
result BrowsePathResult
return ServiceResult

TranslateBrowsePathsToNodeIds() public method

Translates a start node id plus a relative paths into a node id.
public TranslateBrowsePathsToNodeIds ( OperationContext context, BrowsePathCollection browsePaths, BrowsePathResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
browsePaths BrowsePathCollection
results BrowsePathResultCollection
diagnosticInfos DiagnosticInfoCollection
return void

UnregisterNodes() public method

Unregisters a set of node ids.
public UnregisterNodes ( OperationContext context, NodeIdCollection nodesToUnregister ) : void
context OperationContext
nodesToUnregister NodeIdCollection
return void

ValidateCallRequestItem() protected static method

Validates a call request item parameter
protected static ValidateCallRequestItem ( CallMethodRequest item ) : ServiceResult
item CallMethodRequest
return ServiceResult

ValidateMonitoredItemCreateRequest() protected static method

Validates a monitored item create request parameter.
protected static ValidateMonitoredItemCreateRequest ( MonitoredItemCreateRequest item ) : ServiceResult
item MonitoredItemCreateRequest
return ServiceResult

ValidateMonitoredItemModifyRequest() protected static method

Validates a monitored item modify request parameter.
protected static ValidateMonitoredItemModifyRequest ( MonitoredItemModifyRequest item ) : ServiceResult
item MonitoredItemModifyRequest
return ServiceResult

ValidateMonitoringAttributes() protected static method

Validates a monitoring attributes parameter.
protected static ValidateMonitoringAttributes ( MonitoringParameters attributes ) : ServiceResult
attributes MonitoringParameters
return ServiceResult

ValidateMonitoringFilter() protected static method

Validates a monitoring filter.
protected static ValidateMonitoringFilter ( ExtensionObject filter ) : ServiceResult
filter ExtensionObject
return ServiceResult

Write() public method

Writes a set of values.
public Write ( OperationContext context, WriteValueCollection nodesToWrite, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
nodesToWrite WriteValueCollection
results StatusCodeCollection
diagnosticInfos DiagnosticInfoCollection
return void