C# Class Opc.Ua.Server.CustomNodeManager2

A sample implementation of the INodeManager interface.
This node manager is a base class used in multiple samples. It implements the INodeManager interface and allows sub-classes to override only the methods that they need. This example is not part of the SDK because most real implementations of a INodeManager will need to modify the behavoir of the base class.
Inheritance: INodeManager2, INodeIdFactory, IDisposable
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
AddReferences ( IDictionary references ) : void

This method is used to add bi-directional references to nodes from other node managers.

The additional references are optional, however, the NodeManager should support them.

Browse ( OperationContext context, ContinuationPoint &continuationPoint, IList references ) : void

Browses the references from a node managed by the node manager.

The continuation point is created for every browse operation and contains the browse parameters. The node manager can store its state information in the Data and Index properties.

Call ( OperationContext context, IList methodsToCall, IList results, IList errors ) : void

Calls a method on the specified nodes.

ConditionRefresh ( OperationContext context, IList monitoredItems ) : ServiceResult

Tells the node manager to refresh any conditions associated with the specified monitored items.

This method is called when the condition refresh method is called for a subscription. The node manager must create a refresh event for each condition monitored by the subscription.

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.

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

Creates a new set of monitored items for a set of variables.

This method only handles data change subscriptions. Event subscriptions are created by the SDK.

CreateNode ( ServerSystemContext context, Opc.Ua.NodeId parentId, Opc.Ua.NodeId referenceTypeId, Opc.Ua.QualifiedName browseName, BaseInstanceState instance ) : Opc.Ua.NodeId

Creates a new instance and assigns unique identifiers to all children.

DeleteAddressSpace ( ) : void

Frees any resources allocated for the address space.

DeleteMonitoredItems ( OperationContext context, IList monitoredItems, IList processedItems, IList errors ) : void

Deletes a set of monitored items.

DeleteNode ( ServerSystemContext context, Opc.Ua.NodeId nodeId ) : bool

Deletes a node and all of its children.

DeleteReference ( object sourceHandle, Opc.Ua.NodeId referenceTypeId, bool isInverse, Opc.Ua.ExpandedNodeId targetId, bool deleteBiDirectional ) : ServiceResult

This method is used to delete bi-directional references to nodes from other node managers.

Dispose ( ) : void

Frees any unmanaged resources.

Find ( Opc.Ua.NodeId nodeId ) : NodeState

Returns the state object for the specified node if it exists.

FindPredefinedNode ( Opc.Ua.NodeId nodeId, Type expectedType ) : NodeState

Finds the specified and checks if it is of the expected type.

GetManagerHandle ( Opc.Ua.NodeId nodeId ) : object

Returns a unique handle for the node.

This must efficiently determine whether the node belongs to the node manager. If it does belong to NodeManager it should return a handle that does not require the NodeId to be validated again when the handle is passed into other methods such as 'Read' or 'Write'.

GetNodeMetadata ( OperationContext context, object targetHandle, BrowseResultMask resultMask ) : NodeMetadata

Returns the basic metadata for the node. Returns null if the node does not exist.

This method validates any placeholder handle.

HistoryRead ( OperationContext context, HistoryReadDetails details, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, IList nodesToRead, IList results, IList errors ) : void

Reads the history for the specified nodes.

HistoryUpdate ( OperationContext context, Type detailsType, IList nodesToUpdate, IList results, IList errors ) : void

Updates the history for the specified nodes.

IsNodeInView ( OperationContext context, Opc.Ua.NodeId viewId, object nodeHandle ) : bool

Returns true if a node is in a view.

LoadPredefinedNodes ( ISystemContext context, Assembly assembly, string resourcePath, IDictionary externalReferences ) : void

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

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

Modifies the parameters for a set of monitored items.

New ( ISystemContext context, NodeState node ) : Opc.Ua.NodeId

Creates the NodeId for the specified node.

Read ( OperationContext context, double maxAge, IList nodesToRead, IList values, IList errors ) : void

Reads the value for the specified attribute.

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

Called when a session is closed.

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

Changes the monitoring mode for a set of monitored items.

SubscribeToAllEvents ( OperationContext context, uint subscriptionId, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult

Subscribes or unsubscribes to events produced by all event sources.

This method is called when a event subscription is created or deleted. The node manager must start/stop reporting events for all objects that it manages.

SubscribeToEvents ( OperationContext context, object sourceId, uint subscriptionId, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult

Subscribes or unsubscribes to events produced by the specified source.

This method is called when a event subscription is created or deletes. The node manager must start/stop reporting events for the specified object and all objects below it in the notifier hierarchy.

TranslateBrowsePath ( OperationContext context, object sourceHandle, RelativePathElement relativePath, IList targetIds, IList unresolvedTargetIds ) : void

Returns the target of the specified browse path fragment(s).

If reference exists but the node manager does not know the browse name it must return the NodeId as an unresolvedTargetIds. The caller will try to check the browse name.

Write ( OperationContext context, IList nodesToWrite, IList errors ) : void

Writes the value for the specified attributes.

Protected Methods

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

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

AddExternalReference ( Opc.Ua.NodeId sourceId, Opc.Ua.NodeId referenceTypeId, bool isInverse, Opc.Ua.NodeId targetId, IDictionary externalReferences ) : void

Adds an external reference to the dictionary.

AddNodeToComponentCache ( ISystemContext context, NodeHandle handle, NodeState node ) : NodeState

Adds a node to the component cache.

AddPredefinedNode ( ISystemContext context, NodeState node ) : void

Recursively indexes the node and its children.

AddReverseReferences ( IDictionary externalReferences ) : void

Ensures that all reverse references exist.

AddRootNotifier ( NodeState notifier ) : void

Adds a root notifier.

A root notifier is a notifier owned by the NodeManager that is not the target of a HasNotifier reference. These nodes need to be linked directly to the Server object.

AddTypesToTypeTree ( BaseTypeState type ) : void

Recursively adds the types to the type tree.

AddTypesToTypeTree ( Opc.Ua.NodeId typeId ) : void

Recursively adds the types to the type tree.

Call ( ISystemContext context, CallMethodRequest methodToCall, MethodState method, CallMethodResult result ) : ServiceResult

Calls a method on an object.

CreateMonitoredItem ( ServerSystemContext context, NodeHandle handle, uint subscriptionId, double publishingInterval, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequest itemToCreate, long &globalIdCounter, MonitoringFilterResult &filterResult, IMonitoredItem &monitoredItem ) : ServiceResult

Creates a new set of monitored items for a set of variables.

This method only handles data change subscriptions. Event subscriptions are created by the SDK.

CustomNodeManager2 ( IServerInternal server ) : System

Initializes the node manager.

CustomNodeManager2 ( IServerInternal server, ApplicationConfiguration configuration ) : System

Initializes the node manager.

DeleteMonitoredItem ( ServerSystemContext context, IMonitoredItem monitoredItem, NodeHandle handle ) : ServiceResult

Deletes a monitored item.

Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

FindNodeInCache ( ServerSystemContext context, NodeHandle handle, NodeState>.IDictionary cache ) : NodeState

Finds a node in the dynamic cache.

GetManagerHandle ( ServerSystemContext context, Opc.Ua.NodeId nodeId, NodeState>.IDictionary cache ) : NodeHandle

Returns a unique handle for the node.

GetReferenceDescription ( ServerSystemContext context, NodeState>.Dictionary cache, IReference reference, ContinuationPoint continuationPoint ) : ReferenceDescription

Returns the references for the node that meets the criteria specified.

HistoryDeleteAtTime ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Deletes the data history for one or more nodes.

HistoryDeleteEvents ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Deletes the event history for one or more nodes.

HistoryDeleteRawModified ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Deletes the data history for one or more nodes.

HistoryRead ( ServerSystemContext context, HistoryReadDetails details, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Validates the nodes and reads the values from the underlying source.

HistoryReadAtTime ( ServerSystemContext context, ReadAtTimeDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Reads history data at specified times.

HistoryReadEvents ( ServerSystemContext context, ReadEventDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Reads history events.

HistoryReadProcessed ( ServerSystemContext context, ReadProcessedDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Reads processed history data.

HistoryReadRawModified ( ServerSystemContext context, ReadRawModifiedDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Reads raw history data.

HistoryReleaseContinuationPoints ( ServerSystemContext context, IList nodesToRead, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Releases the continuation points.

HistoryUpdate ( ServerSystemContext context, Type detailsType, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Validates the nodes and updates the history.

HistoryUpdateData ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Updates the data history for one or more nodes.

HistoryUpdateEvents ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Updates the event history for one or more nodes.

HistoryUpdateStructureData ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void

Updates the structured data history for one or more nodes.

IsHandleInNamespace ( object managerHandle ) : NodeHandle

Returns the node if the handle refers to a node managed by this manager.

IsNodeIdInNamespace ( Opc.Ua.NodeId nodeId ) : bool

Returns true if the namespace for the node id is one of the namespaces managed by the node manager.

IsNodeInView ( ServerSystemContext context, ContinuationPoint continuationPoint, NodeState node ) : bool

Checks if the node is in the view.

IsNodeInView ( ServerSystemContext context, Opc.Ua.NodeId viewId, NodeState node ) : bool

Checks if the node is in the view.

IsReferenceInView ( ServerSystemContext context, ContinuationPoint continuationPoint, IReference reference ) : bool

Checks if the reference is in the view.

LoadPredefinedNodes ( ISystemContext context ) : NodeStateCollection

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

LoadPredefinedNodes ( ISystemContext context, IDictionary externalReferences ) : void

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

LookupNodeInComponentCache ( ISystemContext context, NodeHandle handle ) : NodeState

Looks up a component in cache.

ModifyMonitoredItem ( ServerSystemContext context, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, IMonitoredItem monitoredItem, MonitoredItemModifyRequest itemToModify, NodeHandle handle, MonitoringFilterResult &filterResult ) : ServiceResult

Modifies the parameters for a monitored item.

OnCreateMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void

Called when a batch of monitored items has been created.

OnDeleteMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void

Called when a batch of monitored items has been modified.

OnModifyMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void

Called when a batch of monitored items has been modified.

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.

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

Called after modifying a MonitoredItem.

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

Called after changing the MonitoringMode for a MonitoredItem.

OnNodeRemoved ( NodeState node ) : void

Called after a node has been deleted.

OnReportEvent ( ISystemContext context, NodeState node, IFilterTarget e ) : void

Reports an event for a root notifier.

OnSetMonitoringModeComplete ( ServerSystemContext context, IList monitoredItems ) : void

Called when a batch of monitored items has their monitoring mode changed.

OnSubscribeToEvents ( ServerSystemContext context, MonitoredNode2 monitoredNode, bool unsubscribe ) : void

Called after subscribing/unsubscribing to events.

Read ( ServerSystemContext context, IList nodesToRead, IList values, IList errors, List nodesToValidate, NodeState>.IDictionary cache ) : void

Validates the nodes and reads the values from the underlying source.

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

Reads the initial value for a monitored item.

RemoveNodeFromComponentCache ( ISystemContext context, NodeHandle handle ) : void

Removes a reference to a component in thecache.

RemovePredefinedNode ( ISystemContext context, NodeState node, List referencesToRemove ) : void

Recursively indexes the node and its children.

RemoveRootNotifier ( NodeState notifier ) : void

Removes a root notifier previously added with AddRootNotifier.

ReviseAggregateFilter ( ServerSystemContext context, NodeHandle handle, double samplingInterval, uint queueSize, ServerAggregateFilter filterToUse ) : Opc.Ua.StatusCode

Revises an aggregate filter (may require knowledge of the variable being used).

SetMonitoringMode ( ServerSystemContext context, IMonitoredItem monitoredItem, MonitoringMode monitoringMode, NodeHandle handle ) : ServiceResult

Changes the monitoring mode for an item.

SetNamespaceIndexes ( ushort namespaceIndexes ) : void

Sets the namespace indexes supported by the NodeManager.

SetNamespaces ( ) : void

Sets the namespaces supported by the NodeManager.

SubscribeToEvents ( ServerSystemContext context, NodeState source, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult

Subscribes to events.

ValidateMonitoringFilter ( ServerSystemContext context, NodeHandle handle, uint attributeId, double samplingInterval, uint queueSize, Opc.Ua.ExtensionObject filter, MonitoringFilter &filterToUse, Range &range, MonitoringFilterResult &result ) : Opc.Ua.StatusCode

Validates the monitoring filter specified by the client.

ValidateNode ( ServerSystemContext context, NodeHandle handle, NodeState>.IDictionary cache ) : NodeState

Verifies that the specified node exists.

ValidateViewDescription ( ServerSystemContext context, ViewDescription view ) : void

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

ValidationComplete ( ServerSystemContext context, NodeHandle handle, NodeState node, NodeState>.IDictionary cache ) : NodeState

Marks the handle as validated and saves the node in the dynamic cache.

Write ( ServerSystemContext context, IList nodesToWrite, IList errors, List nodesToValidate, NodeState>.IDictionary cache ) : void

Validates the nodes and writes the value to the underlying system.

Private Methods

Method Description
CheckIfSemanticsHaveChanged ( ServerSystemContext systemContext, PropertyState property, object newPropertyValue, object previousPropertyValue ) : void

Method Details

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

AddExternalReference() protected method

Adds an external reference to the dictionary.
protected AddExternalReference ( Opc.Ua.NodeId sourceId, Opc.Ua.NodeId referenceTypeId, bool isInverse, Opc.Ua.NodeId targetId, IDictionary externalReferences ) : void
sourceId Opc.Ua.NodeId
referenceTypeId Opc.Ua.NodeId
isInverse bool
targetId Opc.Ua.NodeId
externalReferences IDictionary
return void

AddNodeToComponentCache() protected method

Adds a node to the component cache.
protected AddNodeToComponentCache ( ISystemContext context, NodeHandle handle, NodeState node ) : NodeState
context ISystemContext
handle NodeHandle
node NodeState
return NodeState

AddPredefinedNode() protected method

Recursively indexes the node and its children.
protected AddPredefinedNode ( ISystemContext context, NodeState node ) : void
context ISystemContext
node NodeState
return void

AddReferences() public method

This method is used to add bi-directional references to nodes from other node managers.
The additional references are optional, however, the NodeManager should support them.
public AddReferences ( IDictionary references ) : void
references IDictionary
return void

AddReverseReferences() protected method

Ensures that all reverse references exist.
protected AddReverseReferences ( IDictionary externalReferences ) : void
externalReferences IDictionary A list of references to add to external targets.
return void

AddRootNotifier() protected method

Adds a root notifier.
A root notifier is a notifier owned by the NodeManager that is not the target of a HasNotifier reference. These nodes need to be linked directly to the Server object.
protected AddRootNotifier ( NodeState notifier ) : void
notifier NodeState The notifier.
return void

AddTypesToTypeTree() protected method

Recursively adds the types to the type tree.
protected AddTypesToTypeTree ( BaseTypeState type ) : void
type Opc.Ua.BaseTypeState
return void

AddTypesToTypeTree() protected method

Recursively adds the types to the type tree.
protected AddTypesToTypeTree ( Opc.Ua.NodeId typeId ) : void
typeId Opc.Ua.NodeId
return void

Browse() public method

Browses the references from a node managed by the node manager.
The continuation point is created for every browse operation and contains the browse parameters. The node manager can store its state information in the Data and Index properties.
public Browse ( OperationContext context, ContinuationPoint &continuationPoint, IList references ) : void
context OperationContext
continuationPoint ContinuationPoint
references IList
return void

Call() protected method

Calls a method on an object.
protected Call ( ISystemContext context, CallMethodRequest methodToCall, MethodState method, CallMethodResult result ) : ServiceResult
context ISystemContext
methodToCall Opc.Ua.CallMethodRequest
method Opc.Ua.MethodState
result CallMethodResult
return Opc.Ua.ServiceResult

Call() public method

Calls a method on the specified nodes.
public Call ( OperationContext context, IList methodsToCall, IList results, IList errors ) : void
context OperationContext
methodsToCall IList
results IList
errors IList
return void

ConditionRefresh() public method

Tells the node manager to refresh any conditions associated with the specified monitored items.
This method is called when the condition refresh method is called for a subscription. The node manager must create a refresh event for each condition monitored by the subscription.
public ConditionRefresh ( OperationContext context, IList monitoredItems ) : ServiceResult
context OperationContext
monitoredItems IList
return Opc.Ua.ServiceResult

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

CreateMonitoredItem() protected method

Creates a new set of monitored items for a set of variables.
This method only handles data change subscriptions. Event subscriptions are created by the SDK.
protected CreateMonitoredItem ( ServerSystemContext context, NodeHandle handle, uint subscriptionId, double publishingInterval, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequest itemToCreate, long &globalIdCounter, MonitoringFilterResult &filterResult, IMonitoredItem &monitoredItem ) : ServiceResult
context ServerSystemContext
handle NodeHandle
subscriptionId uint
publishingInterval double
diagnosticsMasks DiagnosticsMasks
timestampsToReturn TimestampsToReturn
itemToCreate Opc.Ua.MonitoredItemCreateRequest
globalIdCounter long
filterResult MonitoringFilterResult
monitoredItem IMonitoredItem
return Opc.Ua.ServiceResult

CreateMonitoredItems() public method

Creates a new set of monitored items for a set of variables.
This method only handles data change subscriptions. Event subscriptions are created by the SDK.
public CreateMonitoredItems ( OperationContext context, uint subscriptionId, double publishingInterval, TimestampsToReturn timestampsToReturn, IList itemsToCreate, IList errors, IList filterResults, IList monitoredItems, long &globalIdCounter ) : void
context OperationContext
subscriptionId uint
publishingInterval double
timestampsToReturn TimestampsToReturn
itemsToCreate IList
errors IList
filterResults IList
monitoredItems IList
globalIdCounter long
return void

CreateNode() public method

Creates a new instance and assigns unique identifiers to all children.
public CreateNode ( ServerSystemContext context, Opc.Ua.NodeId parentId, Opc.Ua.NodeId referenceTypeId, Opc.Ua.QualifiedName browseName, BaseInstanceState instance ) : Opc.Ua.NodeId
context ServerSystemContext The operation context.
parentId Opc.Ua.NodeId An optional parent identifier.
referenceTypeId Opc.Ua.NodeId The reference type from the parent.
browseName Opc.Ua.QualifiedName The browse name.
instance Opc.Ua.BaseInstanceState The instance to create.
return Opc.Ua.NodeId

CustomNodeManager2() protected method

Initializes the node manager.
protected CustomNodeManager2 ( IServerInternal server ) : System
server IServerInternal
return System

CustomNodeManager2() protected method

Initializes the node manager.
protected CustomNodeManager2 ( IServerInternal server, ApplicationConfiguration configuration ) : System
server IServerInternal
configuration ApplicationConfiguration
return System

DeleteAddressSpace() public method

Frees any resources allocated for the address space.
public DeleteAddressSpace ( ) : void
return void

DeleteMonitoredItem() protected method

Deletes a monitored item.
protected DeleteMonitoredItem ( ServerSystemContext context, IMonitoredItem monitoredItem, NodeHandle handle ) : ServiceResult
context ServerSystemContext
monitoredItem IMonitoredItem
handle NodeHandle
return Opc.Ua.ServiceResult

DeleteMonitoredItems() public method

Deletes a set of monitored items.
public DeleteMonitoredItems ( OperationContext context, IList monitoredItems, IList processedItems, IList errors ) : void
context OperationContext
monitoredItems IList
processedItems IList
errors IList
return void

DeleteNode() public method

Deletes a node and all of its children.
public DeleteNode ( ServerSystemContext context, Opc.Ua.NodeId nodeId ) : bool
context ServerSystemContext
nodeId Opc.Ua.NodeId
return bool

DeleteReference() public method

This method is used to delete bi-directional references to nodes from other node managers.
public DeleteReference ( object sourceHandle, Opc.Ua.NodeId referenceTypeId, bool isInverse, Opc.Ua.ExpandedNodeId targetId, bool deleteBiDirectional ) : ServiceResult
sourceHandle object
referenceTypeId Opc.Ua.NodeId
isInverse bool
targetId Opc.Ua.ExpandedNodeId
deleteBiDirectional bool
return Opc.Ua.ServiceResult

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

Find() public method

Returns the state object for the specified node if it exists.
public Find ( Opc.Ua.NodeId nodeId ) : NodeState
nodeId Opc.Ua.NodeId
return NodeState

FindNodeInCache() protected method

Finds a node in the dynamic cache.
protected FindNodeInCache ( ServerSystemContext context, NodeHandle handle, NodeState>.IDictionary cache ) : NodeState
context ServerSystemContext The current context.
handle NodeHandle The node handle.
cache NodeState>.IDictionary The cache to search.
return NodeState

FindPredefinedNode() public method

Finds the specified and checks if it is of the expected type.
public FindPredefinedNode ( Opc.Ua.NodeId nodeId, Type expectedType ) : NodeState
nodeId Opc.Ua.NodeId
expectedType System.Type
return NodeState

GetManagerHandle() protected method

Returns a unique handle for the node.
protected GetManagerHandle ( ServerSystemContext context, Opc.Ua.NodeId nodeId, NodeState>.IDictionary cache ) : NodeHandle
context ServerSystemContext
nodeId Opc.Ua.NodeId
cache NodeState>.IDictionary
return NodeHandle

GetManagerHandle() public method

Returns a unique handle for the node.
This must efficiently determine whether the node belongs to the node manager. If it does belong to NodeManager it should return a handle that does not require the NodeId to be validated again when the handle is passed into other methods such as 'Read' or 'Write'.
public GetManagerHandle ( Opc.Ua.NodeId nodeId ) : object
nodeId Opc.Ua.NodeId
return object

GetNodeMetadata() public method

Returns the basic metadata for the node. Returns null if the node does not exist.
This method validates any placeholder handle.
public GetNodeMetadata ( OperationContext context, object targetHandle, BrowseResultMask resultMask ) : NodeMetadata
context OperationContext
targetHandle object
resultMask BrowseResultMask
return NodeMetadata

GetReferenceDescription() protected method

Returns the references for the node that meets the criteria specified.
protected GetReferenceDescription ( ServerSystemContext context, NodeState>.Dictionary cache, IReference reference, ContinuationPoint continuationPoint ) : ReferenceDescription
context ServerSystemContext
cache NodeState>.Dictionary
reference IReference
continuationPoint ContinuationPoint
return Opc.Ua.ReferenceDescription

HistoryDeleteAtTime() protected method

Deletes the data history for one or more nodes.
protected HistoryDeleteAtTime ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryDeleteEvents() protected method

Deletes the event history for one or more nodes.
protected HistoryDeleteEvents ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryDeleteRawModified() protected method

Deletes the data history for one or more nodes.
protected HistoryDeleteRawModified ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryRead() public method

Reads the history for the specified nodes.
public HistoryRead ( OperationContext context, HistoryReadDetails details, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, IList nodesToRead, IList results, IList errors ) : void
context OperationContext
details HistoryReadDetails
timestampsToReturn TimestampsToReturn
releaseContinuationPoints bool
nodesToRead IList
results IList
errors IList
return void

HistoryRead() protected method

Validates the nodes and reads the values from the underlying source.
protected HistoryRead ( ServerSystemContext context, HistoryReadDetails details, TimestampsToReturn timestampsToReturn, bool releaseContinuationPoints, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
details HistoryReadDetails
timestampsToReturn TimestampsToReturn
releaseContinuationPoints bool
nodesToRead IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryReadAtTime() protected method

Reads history data at specified times.
protected HistoryReadAtTime ( ServerSystemContext context, ReadAtTimeDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
details ReadAtTimeDetails
timestampsToReturn TimestampsToReturn
nodesToRead IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryReadEvents() protected method

Reads history events.
protected HistoryReadEvents ( ServerSystemContext context, ReadEventDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
details ReadEventDetails
timestampsToReturn TimestampsToReturn
nodesToRead IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryReadProcessed() protected method

Reads processed history data.
protected HistoryReadProcessed ( ServerSystemContext context, ReadProcessedDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
details ReadProcessedDetails
timestampsToReturn TimestampsToReturn
nodesToRead IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryReadRawModified() protected method

Reads raw history data.
protected HistoryReadRawModified ( ServerSystemContext context, ReadRawModifiedDetails details, TimestampsToReturn timestampsToReturn, IList nodesToRead, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
details ReadRawModifiedDetails
timestampsToReturn TimestampsToReturn
nodesToRead IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryReleaseContinuationPoints() protected method

Releases the continuation points.
protected HistoryReleaseContinuationPoints ( ServerSystemContext context, IList nodesToRead, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToRead IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryUpdate() public method

Updates the history for the specified nodes.
public HistoryUpdate ( OperationContext context, Type detailsType, IList nodesToUpdate, IList results, IList errors ) : void
context OperationContext
detailsType System.Type
nodesToUpdate IList
results IList
errors IList
return void

HistoryUpdate() protected method

Validates the nodes and updates the history.
protected HistoryUpdate ( ServerSystemContext context, Type detailsType, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
detailsType System.Type
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryUpdateData() protected method

Updates the data history for one or more nodes.
protected HistoryUpdateData ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryUpdateEvents() protected method

Updates the event history for one or more nodes.
protected HistoryUpdateEvents ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

HistoryUpdateStructureData() protected method

Updates the structured data history for one or more nodes.
protected HistoryUpdateStructureData ( ServerSystemContext context, IList nodesToUpdate, IList results, IList errors, List nodesToProcess, NodeState>.IDictionary cache ) : void
context ServerSystemContext
nodesToUpdate IList
results IList
errors IList
nodesToProcess List
cache NodeState>.IDictionary
return void

IsHandleInNamespace() protected method

Returns the node if the handle refers to a node managed by this manager.
protected IsHandleInNamespace ( object managerHandle ) : NodeHandle
managerHandle object The handle to check.
return NodeHandle

IsNodeIdInNamespace() protected method

Returns true if the namespace for the node id is one of the namespaces managed by the node manager.
protected IsNodeIdInNamespace ( Opc.Ua.NodeId nodeId ) : bool
nodeId Opc.Ua.NodeId The node id to check.
return bool

IsNodeInView() public method

Returns true if a node is in a view.
public IsNodeInView ( OperationContext context, Opc.Ua.NodeId viewId, object nodeHandle ) : bool
context OperationContext
viewId Opc.Ua.NodeId
nodeHandle object
return bool

IsNodeInView() protected method

Checks if the node is in the view.
protected IsNodeInView ( ServerSystemContext context, ContinuationPoint continuationPoint, NodeState node ) : bool
context ServerSystemContext
continuationPoint ContinuationPoint
node NodeState
return bool

IsNodeInView() protected method

Checks if the node is in the view.
protected IsNodeInView ( ServerSystemContext context, Opc.Ua.NodeId viewId, NodeState node ) : bool
context ServerSystemContext
viewId Opc.Ua.NodeId
node NodeState
return bool

IsReferenceInView() protected method

Checks if the reference is in the view.
protected IsReferenceInView ( ServerSystemContext context, ContinuationPoint continuationPoint, IReference reference ) : bool
context ServerSystemContext
continuationPoint ContinuationPoint
reference IReference
return bool

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

LoadPredefinedNodes() public method

Loads a node set from a file or resource and addes them to the set of predefined nodes.
public LoadPredefinedNodes ( ISystemContext context, Assembly assembly, string resourcePath, IDictionary externalReferences ) : void
context ISystemContext
assembly System.Reflection.Assembly
resourcePath string
externalReferences IDictionary
return void

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, IDictionary externalReferences ) : void
context ISystemContext
externalReferences IDictionary
return void

LookupNodeInComponentCache() protected method

Looks up a component in cache.
protected LookupNodeInComponentCache ( ISystemContext context, NodeHandle handle ) : NodeState
context ISystemContext
handle NodeHandle
return NodeState

ModifyMonitoredItem() protected method

Modifies the parameters for a monitored item.
protected ModifyMonitoredItem ( ServerSystemContext context, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, IMonitoredItem monitoredItem, MonitoredItemModifyRequest itemToModify, NodeHandle handle, MonitoringFilterResult &filterResult ) : ServiceResult
context ServerSystemContext
diagnosticsMasks DiagnosticsMasks
timestampsToReturn TimestampsToReturn
monitoredItem IMonitoredItem
itemToModify Opc.Ua.MonitoredItemModifyRequest
handle NodeHandle
filterResult MonitoringFilterResult
return Opc.Ua.ServiceResult

ModifyMonitoredItems() public method

Modifies the parameters for 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

New() public method

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

OnCreateMonitoredItemsComplete() protected method

Called when a batch of monitored items has been created.
protected OnCreateMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
context ServerSystemContext
monitoredItems IList
return void

OnDeleteMonitoredItemsComplete() protected method

Called when a batch of monitored items has been modified.
protected OnDeleteMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
context ServerSystemContext
monitoredItems IList
return void

OnModifyMonitoredItemsComplete() protected method

Called when a batch of monitored items has been modified.
protected OnModifyMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
context ServerSystemContext
monitoredItems IList
return void

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

OnMonitoredItemModified() protected method

Called after modifying a MonitoredItem.
protected OnMonitoredItemModified ( 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

OnNodeRemoved() protected method

Called after a node has been deleted.
protected OnNodeRemoved ( NodeState node ) : void
node NodeState
return void

OnReportEvent() protected method

Reports an event for a root notifier.
protected OnReportEvent ( ISystemContext context, NodeState node, IFilterTarget e ) : void
context ISystemContext
node NodeState
e IFilterTarget
return void

OnSetMonitoringModeComplete() protected method

Called when a batch of monitored items has their monitoring mode changed.
protected OnSetMonitoringModeComplete ( ServerSystemContext context, IList monitoredItems ) : void
context ServerSystemContext
monitoredItems IList
return void

OnSubscribeToEvents() protected method

Called after subscribing/unsubscribing to events.
protected OnSubscribeToEvents ( ServerSystemContext context, MonitoredNode2 monitoredNode, bool unsubscribe ) : void
context ServerSystemContext The context.
monitoredNode MonitoredNode2 The monitored node.
unsubscribe bool if set to true unsubscribing.
return void

Read() public method

Reads the value for the specified attribute.
public Read ( OperationContext context, double maxAge, IList nodesToRead, IList values, IList errors ) : void
context OperationContext
maxAge double
nodesToRead IList
values IList
errors IList
return void

Read() protected method

Validates the nodes and reads the values from the underlying source.
protected Read ( ServerSystemContext context, IList nodesToRead, IList values, IList errors, List nodesToValidate, NodeState>.IDictionary cache ) : void
context ServerSystemContext The context.
nodesToRead IList The nodes to read.
values IList The values.
errors IList The errors.
nodesToValidate List The nodes to validate.
cache NodeState>.IDictionary The cache.
return void

ReadInitialValue() protected method

Reads the initial value for a monitored item.
protected ReadInitialValue ( ServerSystemContext context, NodeHandle handle, MonitoredItem monitoredItem ) : void
context ServerSystemContext The context.
handle NodeHandle The item handle.
monitoredItem MonitoredItem The monitored item.
return void

RemoveNodeFromComponentCache() protected method

Removes a reference to a component in thecache.
protected RemoveNodeFromComponentCache ( ISystemContext context, NodeHandle handle ) : void
context ISystemContext
handle NodeHandle
return void

RemovePredefinedNode() protected method

Recursively indexes the node and its children.
protected RemovePredefinedNode ( ISystemContext context, NodeState node, List referencesToRemove ) : void
context ISystemContext
node NodeState
referencesToRemove List
return void

RemoveRootNotifier() protected method

Removes a root notifier previously added with AddRootNotifier.
protected RemoveRootNotifier ( NodeState notifier ) : void
notifier NodeState The notifier.
return void

ReviseAggregateFilter() protected method

Revises an aggregate filter (may require knowledge of the variable being used).
protected ReviseAggregateFilter ( ServerSystemContext context, NodeHandle handle, double samplingInterval, uint queueSize, ServerAggregateFilter filterToUse ) : Opc.Ua.StatusCode
context ServerSystemContext The context.
handle NodeHandle The handle.
samplingInterval double The sampling interval for the monitored item.
queueSize uint The queue size for the monitored item.
filterToUse ServerAggregateFilter The filter to revise.
return Opc.Ua.StatusCode

SessionClosing() public method

Called when a session is closed.
public SessionClosing ( OperationContext context, Opc.Ua.NodeId sessionId, bool deleteSubscriptions ) : void
context OperationContext
sessionId Opc.Ua.NodeId
deleteSubscriptions bool
return void

SetMonitoringMode() protected method

Changes the monitoring mode for an item.
protected SetMonitoringMode ( ServerSystemContext context, IMonitoredItem monitoredItem, MonitoringMode monitoringMode, NodeHandle handle ) : ServiceResult
context ServerSystemContext
monitoredItem IMonitoredItem
monitoringMode MonitoringMode
handle NodeHandle
return Opc.Ua.ServiceResult

SetMonitoringMode() public method

Changes the monitoring mode for a set of monitored items.
public SetMonitoringMode ( OperationContext context, MonitoringMode monitoringMode, IList monitoredItems, IList processedItems, IList errors ) : void
context OperationContext The context.
monitoringMode MonitoringMode The monitoring mode.
monitoredItems IList The set of monitoring items to update.
processedItems IList Flags indicating which items have been processed.
errors IList Any errors.
return void

SetNamespaceIndexes() protected method

Sets the namespace indexes supported by the NodeManager.
protected SetNamespaceIndexes ( ushort namespaceIndexes ) : void
namespaceIndexes ushort
return void

SetNamespaces() protected method

Sets the namespaces supported by the NodeManager.
protected SetNamespaces ( ) : void
return void

SubscribeToAllEvents() public method

Subscribes or unsubscribes to events produced by all event sources.
This method is called when a event subscription is created or deleted. The node manager must start/stop reporting events for all objects that it manages.
public SubscribeToAllEvents ( OperationContext context, uint subscriptionId, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult
context OperationContext
subscriptionId uint
monitoredItem IEventMonitoredItem
unsubscribe bool
return Opc.Ua.ServiceResult

SubscribeToEvents() public method

Subscribes or unsubscribes to events produced by the specified source.
This method is called when a event subscription is created or deletes. The node manager must start/stop reporting events for the specified object and all objects below it in the notifier hierarchy.
public SubscribeToEvents ( OperationContext context, object sourceId, uint subscriptionId, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult
context OperationContext
sourceId object
subscriptionId uint
monitoredItem IEventMonitoredItem
unsubscribe bool
return Opc.Ua.ServiceResult

SubscribeToEvents() protected method

Subscribes to events.
protected SubscribeToEvents ( ServerSystemContext context, NodeState source, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult
context ServerSystemContext The context.
source NodeState The source.
monitoredItem IEventMonitoredItem The monitored item.
unsubscribe bool if set to true [unsubscribe].
return Opc.Ua.ServiceResult

TranslateBrowsePath() public method

Returns the target of the specified browse path fragment(s).
If reference exists but the node manager does not know the browse name it must return the NodeId as an unresolvedTargetIds. The caller will try to check the browse name.
public TranslateBrowsePath ( OperationContext context, object sourceHandle, RelativePathElement relativePath, IList targetIds, IList unresolvedTargetIds ) : void
context OperationContext
sourceHandle object
relativePath RelativePathElement
targetIds IList
unresolvedTargetIds IList
return void

ValidateMonitoringFilter() protected method

Validates the monitoring filter specified by the client.
protected ValidateMonitoringFilter ( ServerSystemContext context, NodeHandle handle, uint attributeId, double samplingInterval, uint queueSize, Opc.Ua.ExtensionObject filter, MonitoringFilter &filterToUse, Range &range, MonitoringFilterResult &result ) : Opc.Ua.StatusCode
context ServerSystemContext
handle NodeHandle
attributeId uint
samplingInterval double
queueSize uint
filter Opc.Ua.ExtensionObject
filterToUse MonitoringFilter
range Opc.Ua.Range
result MonitoringFilterResult
return Opc.Ua.StatusCode

ValidateNode() protected method

Verifies that the specified node exists.
protected ValidateNode ( ServerSystemContext context, NodeHandle handle, NodeState>.IDictionary cache ) : NodeState
context ServerSystemContext
handle NodeHandle
cache NodeState>.IDictionary
return NodeState

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 Opc.Ua.ViewDescription
return void

ValidationComplete() protected method

Marks the handle as validated and saves the node in the dynamic cache.
protected ValidationComplete ( ServerSystemContext context, NodeHandle handle, NodeState node, NodeState>.IDictionary cache ) : NodeState
context ServerSystemContext
handle NodeHandle
node NodeState
cache NodeState>.IDictionary
return NodeState

Write() public method

Writes the value for the specified attributes.
public Write ( OperationContext context, IList nodesToWrite, IList errors ) : void
context OperationContext
nodesToWrite IList
errors IList
return void

Write() protected method

Validates the nodes and writes the value to the underlying system.
protected Write ( ServerSystemContext context, IList nodesToWrite, IList errors, List nodesToValidate, NodeState>.IDictionary cache ) : void
context ServerSystemContext The context.
nodesToWrite IList The nodes to write.
errors IList The errors.
nodesToValidate List The nodes to validate.
cache NodeState>.IDictionary The cache.
return void