C# Class Opc.Ua.Com.Client.ComAeClientNodeManager

A node manager for a server that exposes several variables.
Inheritance: ComClientNodeManager
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
ComAeClientNodeManager ( IServerInternal server, string namespaceUri, ComAeClientConfiguration configuration, bool ownsTypeModel ) : System

Initializes the node manager.

ConditionRefresh ( OperationContext context, IList monitoredItems ) : ServiceResult

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

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.

DeleteAddressSpace ( ) : void

Frees any resources allocated for the address space.

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

Creates the NodeId for the specified node.

This method is called by the NodeState.Create() method which initializes a Node from the type model. During initialization a number of child nodes are created and need to have NodeIds assigned to them. This implementation constructs NodeIds by constructing strings. Other implementations could assign unique integers or Guids and save the new Node in a dictionary for later lookup.

OnServerReconnected ( object state ) : void

Called when client manager has reconnected to the COM server.

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.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

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

Returns a unique handle for the node.

LoadPredefinedNodes ( ISystemContext context ) : NodeStateCollection

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

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

Subscribes to events.

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

Verifies that the specified node exists.

Private Methods

Method Description
DoMetadataUpdate ( object state ) : void

Updates the type cache.

OnAcknowledge ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, byte eventId, Opc.Ua.LocalizedText comment ) : ServiceResult

Called when the alarm is acknowledged.

WaitForTypeCache ( ) : bool

Waits for the type cache to be initialized.

Method Details

ComAeClientNodeManager() public method

Initializes the node manager.
public ComAeClientNodeManager ( IServerInternal server, string namespaceUri, ComAeClientConfiguration configuration, bool ownsTypeModel ) : System
server IServerInternal
namespaceUri string
configuration ComAeClientConfiguration
ownsTypeModel bool
return System

ConditionRefresh() public method

Tells the node manager to refresh any conditions associated with the specified monitored items.
public ConditionRefresh ( OperationContext context, IList monitoredItems ) : ServiceResult
context Opc.Ua.Server.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

DeleteAddressSpace() public method

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

Dispose() protected method

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

GetManagerHandle() protected method

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

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.
This method is called by the NodeState.Create() method which initializes a Node from the type model. During initialization a number of child nodes are created and need to have NodeIds assigned to them. This implementation constructs NodeIds by constructing strings. Other implementations could assign unique integers or Guids and save the new Node in a dictionary for later lookup.
public New ( ISystemContext context, NodeState node ) : Opc.Ua.NodeId
context ISystemContext The context.
node NodeState The node.
return Opc.Ua.NodeId

OnServerReconnected() public method

Called when client manager has reconnected to the COM server.
public OnServerReconnected ( object state ) : void
state object
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 Opc.Ua.Server.OperationContext
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 Opc.Ua.Server.ServerSystemContext
source NodeState
monitoredItem IEventMonitoredItem
unsubscribe bool
return Opc.Ua.ServiceResult

ValidateNode() protected method

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