C# Класс DsatsDemoServer.DsatsDemoNodeManager

A node manager for a server that exposes several variables.
Наследование: Opc.Ua.Server.CustomNodeManager2
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

DsatsDemoNodeManager ( IServerInternal server, ApplicationConfiguration configuration ) : System

Initializes the node manager.

LoadDataSource ( ISystemContext context ) : void

Loads the datasource file.

LoadDataSourceAccessRules ( ISystemContext context, ToolState tool, DsatsDemo declaration ) : void
LoadDataSourceDeclarations ( ISystemContext context, DsatsDemo datasource ) : void
LoadDataSourceLocks ( ISystemContext context, DsatsDemo datasource ) : void
LoadDataSourcePhases ( ISystemContext context, DsatsDemo datasource ) : void
LoadDataSourceSources ( ISystemContext context, ToolState tool, DsatsDemo datasource, DsatsDemo declaration ) : void
New ( ISystemContext context, NodeState node ) : Opc.Ua.NodeId

Creates the NodeId for the specified node.

OnChangeLockByWrite ( ISystemContext context, NodeState node, NumericRange indexRange, Opc.Ua.QualifiedName dataEncoding, object &value, Opc.Ua.StatusCode &statusCode, System.DateTime &timestamp ) : ServiceResult
OnChangePhase ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, Opc.Ua.NodeId phaseId ) : ServiceResult

Handles a request to change the phase.

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.

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

Writes the value for the specified attributes.

Защищенные методы

Метод Описание
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.

OnCreateMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
OnDeleteMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
OnModifyMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
OnSetMonitoringModeComplete ( ServerSystemContext context, IList monitoredItems ) : void
ValidateNode ( ServerSystemContext context, NodeHandle handle, NodeState>.IDictionary cache ) : NodeState

Verifies that the specified node exists.

Приватные методы

Метод Описание
ChangePhase ( ISystemContext context, Opc.Ua.NodeId phaseId ) : void
CheckAdminAccess ( ISystemContext context ) : bool

Checks if the current session has admin priviledges.

CheckWriteAccess ( ServerSystemContext context, RemoteNode remoteNode ) : bool

Checks if the current user has write access to the remote node.

CollectRequests ( ServerSystemContext context, IList monitoredItems ) : List
GrantLockToSession ( ISystemContext context, Opc.Ua.NodeId sessionId, Opc.Ua.NodeId lockId ) : void

Grants the lock to the session.

OnApproveLock ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, IList inputArguments, IList outputArguments ) : ServiceResult
OnChangePhaseByWrite ( ISystemContext context, NodeState node, NumericRange indexRange, Opc.Ua.QualifiedName dataEncoding, object &value, Opc.Ua.StatusCode &statusCode, System.DateTime &timestamp ) : ServiceResult
OnReadPhase ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Used to receive notifications when the value attribute is read or written.

OnReleaseLock ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, IList inputArguments, IList outputArguments ) : ServiceResult
OnRequestLock ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, IList inputArguments, IList outputArguments ) : ServiceResult
RevokeLockForSession ( ISystemContext context, Opc.Ua.NodeId sessionId, Opc.Ua.NodeId lockId ) : void

Revokes the lock to the session.

SessionHasLock ( ISystemContext context, Opc.Ua.NodeId lockId ) : bool

Returns true if the current session has the lock.

Описание методов

CreateAddressSpace() публичный Метод

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
Результат void

DeleteAddressSpace() публичный Метод

Frees any resources allocated for the address space.
public DeleteAddressSpace ( ) : void
Результат void

Dispose() защищенный Метод

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

DsatsDemoNodeManager() публичный Метод

Initializes the node manager.
public DsatsDemoNodeManager ( IServerInternal server, ApplicationConfiguration configuration ) : System
server IServerInternal
configuration ApplicationConfiguration
Результат System

GetManagerHandle() защищенный Метод

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
Результат Opc.Ua.Server.NodeHandle

LoadDataSource() публичный Метод

Loads the datasource file.
public LoadDataSource ( ISystemContext context ) : void
context ISystemContext
Результат void

LoadDataSourceAccessRules() публичный Метод

public LoadDataSourceAccessRules ( ISystemContext context, ToolState tool, DsatsDemo declaration ) : void
context ISystemContext
tool DsatsDemo.ToolState
declaration DsatsDemo
Результат void

LoadDataSourceDeclarations() публичный Метод

public LoadDataSourceDeclarations ( ISystemContext context, DsatsDemo datasource ) : void
context ISystemContext
datasource DsatsDemo
Результат void

LoadDataSourceLocks() публичный Метод

public LoadDataSourceLocks ( ISystemContext context, DsatsDemo datasource ) : void
context ISystemContext
datasource DsatsDemo
Результат void

LoadDataSourcePhases() публичный Метод

public LoadDataSourcePhases ( ISystemContext context, DsatsDemo datasource ) : void
context ISystemContext
datasource DsatsDemo
Результат void

LoadDataSourceSources() публичный Метод

public LoadDataSourceSources ( ISystemContext context, ToolState tool, DsatsDemo datasource, DsatsDemo declaration ) : void
context ISystemContext
tool DsatsDemo.ToolState
datasource DsatsDemo
declaration DsatsDemo
Результат void

LoadPredefinedNodes() защищенный Метод

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
Результат NodeStateCollection

New() публичный Метод

Creates the NodeId for the specified node.
public New ( ISystemContext context, NodeState node ) : Opc.Ua.NodeId
context ISystemContext
node NodeState
Результат Opc.Ua.NodeId

OnChangeLockByWrite() публичный Метод

public OnChangeLockByWrite ( ISystemContext context, NodeState node, NumericRange indexRange, Opc.Ua.QualifiedName dataEncoding, object &value, Opc.Ua.StatusCode &statusCode, System.DateTime &timestamp ) : ServiceResult
context ISystemContext
node NodeState
indexRange Opc.Ua.NumericRange
dataEncoding Opc.Ua.QualifiedName
value object
statusCode Opc.Ua.StatusCode
timestamp System.DateTime
Результат Opc.Ua.ServiceResult

OnChangePhase() публичный Метод

Handles a request to change the phase.
public OnChangePhase ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, Opc.Ua.NodeId phaseId ) : ServiceResult
context ISystemContext
method Opc.Ua.MethodState
objectId Opc.Ua.NodeId
phaseId Opc.Ua.NodeId
Результат Opc.Ua.ServiceResult

OnCreateMonitoredItemsComplete() защищенный Метод

protected OnCreateMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
context Opc.Ua.Server.ServerSystemContext
monitoredItems IList
Результат void

OnDeleteMonitoredItemsComplete() защищенный Метод

protected OnDeleteMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
context Opc.Ua.Server.ServerSystemContext
monitoredItems IList
Результат void

OnModifyMonitoredItemsComplete() защищенный Метод

protected OnModifyMonitoredItemsComplete ( ServerSystemContext context, IList monitoredItems ) : void
context Opc.Ua.Server.ServerSystemContext
monitoredItems IList
Результат void

OnSetMonitoringModeComplete() защищенный Метод

protected OnSetMonitoringModeComplete ( ServerSystemContext context, IList monitoredItems ) : void
context Opc.Ua.Server.ServerSystemContext
monitoredItems IList
Результат void

Read() публичный Метод

Reads the value for the specified attribute.
public Read ( OperationContext context, double maxAge, IList nodesToRead, IList values, IList errors ) : void
context Opc.Ua.Server.OperationContext
maxAge double
nodesToRead IList
values IList
errors IList
Результат void

SessionClosing() публичный Метод

Called when a session is closed.
public SessionClosing ( OperationContext context, Opc.Ua.NodeId sessionId, bool deleteSubscriptions ) : void
context Opc.Ua.Server.OperationContext
sessionId Opc.Ua.NodeId
deleteSubscriptions bool
Результат void

ValidateNode() защищенный Метод

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
Результат NodeState

Write() публичный Метод

Writes the value for the specified attributes.
public Write ( OperationContext context, IList nodesToWrite, IList errors ) : void
context Opc.Ua.Server.OperationContext
nodesToWrite IList
errors IList
Результат void