Skip to content

Reference

OpcNodeManager Members

Provides an abstract base class used to organize and maintain the address space or only a part of it.

Reference

OpcNodeManager Members ​

Type
OpcNodeManager
Namespace
Opc.UaFx.Server
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Constructors ​

OpcNodeManager ​

protected · 3 overloads

OverloadDescription
OpcNodeManager(OpcNamespace, params OpcNamespace[])protected · since v2.8Initializes a new instance of the OpcNodeManager class using the defaultNamespace and additionally specified namespaces.
OpcNodeManager(string, params string[])protectedInitializes a new instance of the OpcNodeManager class using the defaultNamespace and additionally specified string-based namespaces.
OpcNodeManager(Uri, params Uri[])protectedInitializes a new instance of the OpcNodeManager class using the defaultNamespaceUri and additionally specified Uri-based namespaceUris.

OpcNodeManager(OpcNamespace, params OpcNamespace[]) ​

protected · since v2.8

Initializes a new instance of the OpcNodeManager class using the defaultNamespace and additionally specified namespaces.

csharp
protected OpcNodeManager(
    OpcNamespace defaultNamespace,
    params OpcNamespace[] namespaces)
vbnet
Protected Sub New(
    defaultNamespace As OpcNamespace,
    ParamArray namespaces As OpcNamespace())

Parameters

NameTypeDescription
defaultNamespaceOpcNamespaceThe default OpcNamespace used for the DefaultNamespace property. In case there AssignDefaultNamespaceOfManager is equals true (the default value) the Name and Id of the OpcNode instances defined are linked to this namespace in case there is no namespace information associated to them.
namespacesparams OpcNamespace[]An array of OpcNamespace instances indicating which namespaces are as well maintained by the new OpcNodeManager. The instances can then found in the Namespaces property as well.

Exceptions

ExceptionCondition
ArgumentExceptionThe defaultNamespace or one of the items in namespaces refers to a namespace which presets a namespace index. The according namespace index is determined by the server.
ArgumentNullExceptionThe defaultNamespace or one of the items in namespaces is a null reference (Nothing in Visual Basic).

OpcNodeManager(string, params string[]) ​

protected

Initializes a new instance of the OpcNodeManager class using the defaultNamespace and additionally specified string-based namespaces.

csharp
protected OpcNodeManager(string defaultNamespace, params string[] namespaces)
vbnet
Protected Sub New(defaultNamespace As String, ParamArray namespaces As String())

Parameters

NameTypeDescription
defaultNamespaceStringThe string representation of the default OpcNamespace which is used for the DefaultNamespace property. In case there AssignDefaultNamespaceOfManager is equals true (the default value) the Name and Id of the OpcNode instances defined are linked to this namespace in case there is no namespace information associated to them.
namespacesparams String[]An array of string representations of the OpcNamespace indicating which namespaces are as well maintained by the new OpcNodeManager. The used OpcNamespace instances can be found in the Namespaces property as well.

Exceptions

ExceptionCondition
ArgumentExceptionThe defaultNamespace or one of the items in namespaces is an empty string.
ArgumentNullExceptionThe defaultNamespace or one of the items in namespaces is a null reference (Nothing in Visual Basic).

OpcNodeManager(Uri, params Uri[]) ​

protected

Initializes a new instance of the OpcNodeManager class using the defaultNamespaceUri and additionally specified Uri-based namespaceUris.

csharp
protected OpcNodeManager(Uri defaultNamespaceUri, params Uri[] namespaceUris)
vbnet
Protected Sub New(defaultNamespaceUri As Uri, ParamArray namespaceUris As Uri())

Parameters

NameTypeDescription
defaultNamespaceUriUriThe Uri representation of the default OpcNamespace which is used for the DefaultNamespace property. In case there AssignDefaultNamespaceOfManager is equals true (the default value) the Name and Id of the OpcNode instances defined are linked to this namespace in case there is no namespace information associated to them.
namespaceUrisparams Uri[]An array of Uri representations of the OpcNamespace indicating which namespaces are as well maintained by the new OpcNodeManager. The used OpcNamespace instances can be found in the Namespaces property as well.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe defaultNamespaceUri or one of the items in namespaceUris is a null reference (Nothing in Visual Basic).

Properties ​

DefaultNamespace ​

Gets the default namespace of the node manager.

csharp
public OpcNamespace DefaultNamespace { get; }
vbnet
Public ReadOnly Property DefaultNamespace As OpcNamespace

Property value

OpcNamespace

The OpcNamespace specified as the default namespace when the node manager was created. When the server is started, the instance is replaced by the namespace the server has registered for it.

DefaultNamespaceIndex ​

Gets the index of the default namespace of the node manager.

csharp
public int DefaultNamespaceIndex { get; }
vbnet
Public ReadOnly Property DefaultNamespaceIndex As Integer

Property value

Int32

The Index of the DefaultNamespace, which the server assigns when it is started.

DefaultNamespaceUri ​

Gets the URI of the default namespace of the node manager.

csharp
public Uri DefaultNamespaceUri { get; }
vbnet
Public ReadOnly Property DefaultNamespaceUri As Uri

Property value

Uri

The Uri of the DefaultNamespace.

DefaultNamespaceValue ​

since v2.8

Gets the textual value of the default namespace of the node manager.

csharp
public string DefaultNamespaceValue { get; }
vbnet
Public ReadOnly Property DefaultNamespaceValue As String

Property value

String

The Value of the DefaultNamespace.

Namespaces ​

since v2.8

Gets the namespaces maintained by the node manager.

csharp
public OpcReadOnlyNamespaceCollection Namespaces { get; }
vbnet
Public ReadOnly Property Namespaces As OpcReadOnlyNamespaceCollection

Property value

OpcReadOnlyNamespaceCollection

An OpcReadOnlyNamespaceCollection which starts with the DefaultNamespace, followed by the further namespaces specified when the node manager was created, without duplicates.

NodeIdFactory ​

protected · virtual

Gets or sets the OpcNodeIdFactory instance used by this node manager to determine / create node identifiers for the nodes provided / defined by the node manager.

csharp
protected virtual OpcNodeIdFactory NodeIdFactory { get; set; }
vbnet
Protected Overridable Property NodeIdFactory As OpcNodeIdFactory

Property value

OpcNodeIdFactory

An instance of the OpcNodeIdFactory class. In case there is no custom OpcNodeIdFactory defined. The Factory is used.

Nodes ​

Gets the nodes of the node manager.

csharp
public OpcReadOnlyNodeCollection Nodes { get; }
vbnet
Public ReadOnly Property Nodes As OpcReadOnlyNodeCollection

Property value

OpcReadOnlyNodeCollection

An OpcReadOnlyNodeCollection with the nodes of the address space part maintained by the node manager; an empty collection until the server has created the address space.

NodeSetImportOptions ​

protected · virtual · since v2.50

Gets or sets the options to use to import the node sets provided by ImportNodes.

csharp
protected virtual OpcNodeSetImportOptions NodeSetImportOptions { get; set; }
vbnet
Protected Overridable Property NodeSetImportOptions As OpcNodeSetImportOptions

Property value

OpcNodeSetImportOptions

A combination of the OpcNodeSetImportOptions flags. The default value is None.

Remarks

The flags CompleteDataTypeDefinitionFields and CompleteDataTypeDefinitionDefaultEncoding apply to the data types of all node managers of the server as soon as one node manager sets them.

NotifierNodes ​

Gets the nodes of the node manager which act as notifiers (event sources) of the 'Server' node.

csharp
public OpcReadOnlyNodeCollection NotifierNodes { get; }
vbnet
Public ReadOnly Property NotifierNodes As OpcReadOnlyNodeCollection

Property value

OpcReadOnlyNodeCollection

An OpcReadOnlyNodeCollection with the notifier nodes; an empty collection until the server has created the address space.

SyncRoot ​

protected

Gets the object the node manager locks while it notifies monitored items about changes of its nodes and while it creates, modifies or deletes monitored items, browses, translates browse paths or accesses the history of its nodes.

csharp
protected object SyncRoot { get; }
vbnet
Protected ReadOnly Property SyncRoot As Object

Property value

Object

The lock of this node manager. Every node manager has a lock of its own.

Remarks

The SDK does not synchronize changes of nodes. A value set, ApplyChanges and ReportEvent can be called from any thread, but changes of the same node from several threads at once can lose a notification or report a torn state.

Holding this lock while changing and applying changes serializes them with other code holding it and with the notification of monitored items. It does not serialize them with the Read and Write services of clients, which only lock the node accessed, nor with method calls, which run without this lock.

The notification of monitored items and the creation of monitored items call read callbacks and the monitored item events with this lock held. Such code must not wait for another thread that holds the lock of a different node manager and reports an event, because an event takes the lock of the node manager of every notifier it passes.

The lock is not public, because holding it outside of the node manager would not make changes atomic to clients either. Code that changes several nodes together therefore belongs into a method of the node manager, which can hold this lock.

SystemContext ​

protected

Gets the context which the node manager uses to access its nodes.

csharp
protected OpcContext SystemContext { get; }
vbnet
Protected ReadOnly Property SystemContext As OpcContext

Property value

OpcContext

The OpcContext of the server for the node manager; a null reference (Nothing in Visual Basic) until the server using the node manager has been started.

UseAsyncMethodCalls ​

protected · virtual · since v2.24

Gets a value indicating whether every call to a OpcMethodNode defined by the current OpcNodeManager is to be processed asynchronously using one worker thread per method call.

csharp
protected virtual bool UseAsyncMethodCalls { get; }
vbnet
Protected Overridable ReadOnly Property UseAsyncMethodCalls As Boolean

Property value

Boolean

The value true if every method call (which belongs to OpcMethodNode objects defined by the current OpcNodeManager) is to be processed parallel to each other; otherwise the value false to process method calls in their sequence. The default value is false.

Remarks

This behavior can be controlled by each node manager on its own. Just override the UseAsyncMethodCalls property and provide the value true in the node managers which shall process method calls in parallel.

Every OpcMethodNode defined with a delegate to a method its return value provides a Task is already processed in parallel.

Use the UseAsyncMethodCalls property to control this behavior for every node manager used.

Methods ​

AddNode ​

8 overloads

OverloadDescription
AddNode(IOpcNode)Adds the node specified to the address space of the node manager.
AddNode(OpcContext, IOpcNode)since v2.7Adds the node specified to the address space of the node manager using the context specified.
AddNode(IOpcNode, IEnumerable<IOpcNodeReferenceAware>)protected · since v2.7Adds the node specified to the address space of the node manager using the references specified.
AddNode(IOpcNode, params IOpcNodeReferenceAware[])protected · since v2.7Adds the node specified to the address space of the node manager using the references specified.
AddNode(IOpcNode, OpcNodeReferenceCollection)protected · since v2.7Adds the node specified to the address space of the node manager using the references specified.
AddNode(OpcContext, IOpcNode, IEnumerable<IOpcNodeReferenceAware>)protected · virtual · since v2.7Adds the node specified to the address space of the node manager using the context and references specified.
AddNode(OpcContext, IOpcNode, params IOpcNodeReferenceAware[])protected · since v2.7Adds the node specified to the address space of the node manager using the context and references specified.
AddNode(OpcContext, IOpcNode, OpcNodeReferenceCollection)protected · virtual · since v2.7Adds the node specified to the address space of the node manager using the context and references specified.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThe server using the node manager has not yet been started.

AddNode(IOpcNode) ​

Adds the node specified to the address space of the node manager.

csharp
public void AddNode(IOpcNode node)
vbnet
Public Sub AddNode(node As IOpcNode)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode to add.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(OpcContext, IOpcNode) ​

since v2.7

Adds the node specified to the address space of the node manager using the context specified.

csharp
public void AddNode(OpcContext context, IOpcNode node)
vbnet
Public Sub AddNode(context As OpcContext, node As IOpcNode)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to add the node.
nodeIOpcNodeThe IOpcNode to add.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or node is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(IOpcNode, IEnumerable<IOpcNodeReferenceAware>) ​

protected · since v2.7

Adds the node specified to the address space of the node manager using the references specified.

csharp
protected void AddNode(
    IOpcNode node,
    IEnumerable<IOpcNodeReferenceAware> references)
vbnet
Protected Sub AddNode(
    node As IOpcNode,
    references As IEnumerable(Of IOpcNodeReferenceAware))

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode to add.
referencesIEnumerable<IOpcNodeReferenceAware>A sequence of IOpcNodeReferenceAware instances which define the references of the node to further nodes.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node or references is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(IOpcNode, params IOpcNodeReferenceAware[]) ​

protected · since v2.7

Adds the node specified to the address space of the node manager using the references specified.

csharp
protected void AddNode(
    IOpcNode node,
    params IOpcNodeReferenceAware[] references)
vbnet
Protected Sub AddNode(
    node As IOpcNode,
    ParamArray references As IOpcNodeReferenceAware())

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode to add.
referencesparams IOpcNodeReferenceAware[]An array of IOpcNodeReferenceAware instances which define the references of the node to further nodes.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node or references is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(IOpcNode, OpcNodeReferenceCollection) ​

protected · since v2.7

Adds the node specified to the address space of the node manager using the references specified.

csharp
protected void AddNode(IOpcNode node, OpcNodeReferenceCollection references)
vbnet
Protected Sub AddNode(
    node As IOpcNode,
    references As OpcNodeReferenceCollection)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode to add.
referencesOpcNodeReferenceCollectionThe OpcNodeReferenceCollection which defines the references of the node to further nodes.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node or references is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(OpcContext, IOpcNode, IEnumerable<IOpcNodeReferenceAware>) ​

protected · virtual · since v2.7

Adds the node specified to the address space of the node manager using the context and references specified.

csharp
protected virtual void AddNode(
    OpcContext context,
    IOpcNode node,
    IEnumerable<IOpcNodeReferenceAware> references)
vbnet
Protected Overridable Sub AddNode(
    context As OpcContext,
    node As IOpcNode,
    references As IEnumerable(Of IOpcNodeReferenceAware))

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to add the node.
nodeIOpcNodeThe IOpcNode to add.
referencesIEnumerable<IOpcNodeReferenceAware>A sequence of IOpcNodeReferenceAware instances which define the references of the node to further nodes.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context, node or references is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(OpcContext, IOpcNode, params IOpcNodeReferenceAware[]) ​

protected · since v2.7

Adds the node specified to the address space of the node manager using the context and references specified.

csharp
protected void AddNode(
    OpcContext context,
    IOpcNode node,
    params IOpcNodeReferenceAware[] references)
vbnet
Protected Sub AddNode(
    context As OpcContext,
    node As IOpcNode,
    ParamArray references As IOpcNodeReferenceAware())

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to add the node.
nodeIOpcNodeThe IOpcNode to add.
referencesparams IOpcNodeReferenceAware[]An array of IOpcNodeReferenceAware instances which define the references of the node to further nodes.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context, node or references is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNode(OpcContext, IOpcNode, OpcNodeReferenceCollection) ​

protected · virtual · since v2.7

Adds the node specified to the address space of the node manager using the context and references specified.

csharp
protected virtual void AddNode(
    OpcContext context,
    IOpcNode node,
    OpcNodeReferenceCollection references)
vbnet
Protected Overridable Sub AddNode(
    context As OpcContext,
    node As IOpcNode,
    references As OpcNodeReferenceCollection)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to add the node.
nodeIOpcNodeThe IOpcNode to add.
referencesOpcNodeReferenceCollectionThe OpcNodeReferenceCollection which defines the references of the node to further nodes.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context, node or references is a null reference (Nothing in Visual Basic).

Remarks

A node which is already part of the address space is not added again.

AddNotifierNode ​

protected

Adds the node to the collection of 'root' notifiers (= event sources) of the 'Server' node.

csharp
protected void AddNotifierNode(IOpcNode node)
vbnet
Protected Sub AddNotifierNode(node As IOpcNode)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode instance acting as the notifier of the 'Server' node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe master node has not yet been created, therefore the operation is at the moment not available.

Browse ​

protected · virtual · since v2.7

Browses the references of a node of the node manager on behalf of a client.

csharp
protected virtual OpcBrowsePoint Browse(
    OpcContext context,
    OpcBrowsePoint browsePoint,
    OpcReferenceDescriptionCollection references)
vbnet
Protected Overridable Function Browse(
    context As OpcContext,
    browsePoint As OpcBrowsePoint,
    references As OpcReferenceDescriptionCollection) As OpcBrowsePoint

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the browse operation.
browsePointOpcBrowsePointThe OpcBrowsePoint which describes the node and the references to browse and the position to continue at.
referencesOpcReferenceDescriptionCollectionThe OpcReferenceDescriptionCollection to which the references found are added.

Returns

OpcBrowsePoint

An OpcBrowsePoint to continue browsing at if not all references could be provided; otherwise a null reference (Nothing in Visual Basic).

CreateHistory ​

protected · virtual

Creates the history entries of the values specified for the node specified.

csharp
protected virtual OpcStatusCollection CreateHistory(
    IOpcNode node,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Protected Overridable Function CreateHistory(
    node As IOpcNode,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is changed.
modificationInfoOpcHistoryModificationInfoThe OpcHistoryModificationInfo which describes the modification.
valuesOpcValueCollectionThe OpcValueCollection with the values to create.

Returns

OpcStatusCollection

An OpcStatusCollection with the result per value. If RetrieveNodeHistoryProvider provides no provider, each result has the code BadHistoryOperationUnsupported.

CreateNodes ​

protected · virtual

When overridden in a derived class, creates the nodes of the address space part maintained by the node manager.

csharp
protected virtual IEnumerable<IOpcNode> CreateNodes(
    OpcNodeReferenceCollection references)
vbnet
Protected Overridable Function CreateNodes(
    references As OpcNodeReferenceCollection) As IEnumerable(Of IOpcNode)

Parameters

NameTypeDescription
referencesOpcNodeReferenceCollectionThe OpcNodeReferenceCollection to which the references of the created nodes to further nodes (e.g. to their parent nodes) are to be added.

Returns

IEnumerable<IOpcNode>

A sequence of the IOpcNode instances created. The base implementation provides no nodes.

Remarks

The server calls the method when it creates its address space while it is started. An exception thrown by the method is passed on as an OpcException and fails the start of the server.

DeleteHistory ​

protected · virtual · 3 overloads

OverloadDescription
DeleteHistory(IOpcNode, OpcHistoryModificationInfo, IEnumerable<DateTime>)protected · virtualDeletes the history entries at the times specified of the node specified.
DeleteHistory(IOpcNode, OpcHistoryModificationInfo, OpcValueCollection)protected · virtualDeletes the history entries of the values specified of the node specified.
DeleteHistory(IOpcNode, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions)protected · virtualDeletes the history entries of the node specified within the time range specified.

DeleteHistory(IOpcNode, OpcHistoryModificationInfo, IEnumerable<DateTime>) ​

protected · virtual

Deletes the history entries at the times specified of the node specified.

csharp
protected virtual OpcStatusCollection DeleteHistory(
    IOpcNode node,
    OpcHistoryModificationInfo modificationInfo,
    IEnumerable<DateTime> times)
vbnet
Protected Overridable Function DeleteHistory(
    node As IOpcNode,
    modificationInfo As OpcHistoryModificationInfo,
    times As IEnumerable(Of Date)) As OpcStatusCollection

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is changed.
modificationInfoOpcHistoryModificationInfoThe OpcHistoryModificationInfo which describes the modification.
timesIEnumerable<DateTime>A sequence of the timestamps of the entries to delete.

Returns

OpcStatusCollection

An OpcStatusCollection with the result per timestamp. If RetrieveNodeHistoryProvider provides no provider, each result has the code BadHistoryOperationUnsupported.

DeleteHistory(IOpcNode, OpcHistoryModificationInfo, OpcValueCollection) ​

protected · virtual

Deletes the history entries of the values specified of the node specified.

csharp
protected virtual OpcStatusCollection DeleteHistory(
    IOpcNode node,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Protected Overridable Function DeleteHistory(
    node As IOpcNode,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is changed.
modificationInfoOpcHistoryModificationInfoThe OpcHistoryModificationInfo which describes the modification.
valuesOpcValueCollectionThe OpcValueCollection with the values whose entries are to be deleted.

Returns

OpcStatusCollection

An OpcStatusCollection with the result per value. If RetrieveNodeHistoryProvider provides no provider, each result has the code BadHistoryOperationUnsupported.

DeleteHistory(IOpcNode, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions) ​

protected · virtual

Deletes the history entries of the node specified within the time range specified.

csharp
protected virtual OpcStatusCollection DeleteHistory(
    IOpcNode node,
    OpcHistoryModificationInfo modificationInfo,
    DateTime? startTime,
    DateTime? endTime,
    OpcDeleteHistoryOptions options)
vbnet
Protected Overridable Function DeleteHistory(
    node As IOpcNode,
    modificationInfo As OpcHistoryModificationInfo,
    startTime As Date?,
    endTime As Date?,
    options As OpcDeleteHistoryOptions) As OpcStatusCollection

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is changed.
modificationInfoOpcHistoryModificationInfoThe OpcHistoryModificationInfo which describes the modification.
startTimeNullable<DateTime>The begin of the time range or a null reference (Nothing in Visual Basic) if the range is not limited at its begin.
endTimeNullable<DateTime>The end of the time range or a null reference (Nothing in Visual Basic) if the range is not limited at its end.
optionsOpcDeleteHistoryOptionsA combination of the OpcDeleteHistoryOptions flags which specify the entries to delete.

Returns

OpcStatusCollection

An OpcStatusCollection with the result of the operation. If RetrieveNodeHistoryProvider provides no provider, the collection contains one result with the code BadHistoryOperationUnsupported.

DeleteNodes ​

protected · virtual

When overridden in a derived class, releases the nodes of the node manager.

csharp
protected virtual void DeleteNodes()
vbnet
Protected Overridable Sub DeleteNodes()

Remarks

The server calls the method when it deletes its address space. The base implementation does nothing.

Dispose ​

2 overloads

OverloadDescription
Dispose()Releases all resources used by the OpcNodeManager.
Dispose(bool)protected · virtualReleases the unmanaged resources used by the OpcNodeManager and optionally releases the managed resources.

Dispose() ​

Releases all resources used by the OpcNodeManager.

csharp
public void Dispose()
vbnet
Public Sub Dispose()

Implements

Dispose()

Dispose(bool) ​

protected · virtual

Releases the unmanaged resources used by the OpcNodeManager and optionally releases the managed resources.

csharp
protected virtual void Dispose(bool disposing)
vbnet
Protected Overridable Sub Dispose(disposing As Boolean)

Parameters

NameTypeDescription
disposingBooleanThe value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources.

ExportNodes ​

2 overloads

OverloadDescription
ExportNodes()since v2.11Exports the Nodes of the node manager using the Default options.
ExportNodes(OpcNodeExportOptions)since v2.12Exports the Nodes of the node manager using the options specified.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThe server using the node manager has not yet been started.

ExportNodes() ​

since v2.11

Exports the Nodes of the node manager using the Default options.

csharp
public IEnumerable<OpcNodeSet> ExportNodes()
vbnet
Public Function ExportNodes() As IEnumerable(Of OpcNodeSet)

Returns

IEnumerable<OpcNodeSet>

A sequence of OpcNodeSet instances, one per namespace of the node manager which contains nodes.

Remarks

The nodes are exported while the sequence is enumerated; the exception is thrown then as well. Nodes of a namespace which is not maintained by the node manager (see Namespaces) are not exported.

ExportNodes(OpcNodeExportOptions) ​

since v2.12

Exports the Nodes of the node manager using the options specified.

csharp
public IEnumerable<OpcNodeSet> ExportNodes(OpcNodeExportOptions options)
vbnet
Public Function ExportNodes(
    options As OpcNodeExportOptions) As IEnumerable(Of OpcNodeSet)

Parameters

NameTypeDescription
optionsOpcNodeExportOptionsThe OpcNodeExportOptions to use or a null reference (Nothing in Visual Basic) to use the Default options.

Returns

IEnumerable<OpcNodeSet>

A sequence of OpcNodeSet instances, one per namespace of the node manager which contains nodes.

Remarks

The nodes are exported while the sequence is enumerated; the exception is thrown then as well. Nodes of a namespace which is not maintained by the node manager (see Namespaces) are not exported.

GetNode ​

2 overloads · since v2.15

OverloadDescription
GetNode(string)since v2.15Retrieves the IOpcNode which is maintained by the Nodes of this OpcNodeManager and is known under the nodePath specified.
GetNode(OpcNodeId)since v2.15Retrieves the IOpcNode which is maintained by the Nodes of this OpcNodeManager and is known under the nodeId specified.

GetNode(string) ​

since v2.15

Retrieves the IOpcNode which is maintained by the Nodes of this OpcNodeManager and is known under the nodePath specified.

csharp
public IOpcNode GetNode(string nodePath)
vbnet
Public Function GetNode(nodePath As String) As IOpcNode

Parameters

NameTypeDescription
nodePathStringA sequence of browse and symbolic names combined using a slash ('/') to describe the 'path' to the node to determine. To query a node using its browse name use the namespace qualified name format 'namespaceIndex:name'; otherwise the 'part of the path' is compared to the symbolic name of the node.

Returns

IOpcNode

An instance implementing the IOpcNode interface its Name or SymbolicName matches the last 'part' in the nodePath specified, if found; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentExceptionThe nodePath is an empty string.
ArgumentNullExceptionThe nodePath is a null reference (Nothing in Visual Basic).

Remarks

The first 'part' in the nodePath shall refer to a unique browse or symbolic name of a node maintained by the Nodes; otherwise the first node which matches the browse or symbolic name specified is used to continue the node query. Note that this method does not support querying nodes which are organized in an ambiguous way (according to their sub-tree they reside).

GetNode(OpcNodeId) ​

since v2.15

Retrieves the IOpcNode which is maintained by the Nodes of this OpcNodeManager and is known under the nodeId specified.

csharp
public IOpcNode GetNode(OpcNodeId nodeId)
vbnet
Public Function GetNode(nodeId As OpcNodeId) As IOpcNode

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the IOpcNode instance to determine.

Returns

IOpcNode

An instance implementing the IOpcNode interface its Id attribute is equals to the nodeId specified if found; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).

ImplementNode ​

protected · virtual · since v2.9

When implemented in a derived class, implements the logic required to integrate the node into the underlying system.

csharp
protected virtual void ImplementNode(IOpcNode node)
vbnet
Protected Overridable Sub ImplementNode(node As IOpcNode)

Parameters

NameTypeDescription
nodeIOpcNodeAn instance implementing the IOpcNode interface which is to be integrated into the underlying system.

Remarks

This method is called during the whole address space creation. This includes the import of nodes using ImportNodes and the creation of nodes using CreateNodes. Each node imported / created is passed to this method to integrate it accordingly into the underlying system.

Additionally this method is called after the startup of the server whenever a client adds another node to the address space part(s) maintained by the current OpcNodeManager.

ImportNodes ​

protected · virtual · since v2.9

When implemented in a derived class, offers the different OpcNodeSets which are imported prior any other nodes are created within the address space part organized by the current OpcNodeManager.

csharp
protected virtual IEnumerable<OpcNodeSet> ImportNodes()
vbnet
Protected Overridable Function ImportNodes() As IEnumerable(Of OpcNodeSet)

Returns

IEnumerable<OpcNodeSet>

A sequence of OpcNodeSet instances to use to import external stored node information into the address space.

IsNodeAccessible ​

protected · virtual · since v2.7

Determines whether the node specified is accessible in the context and view specified.

csharp
protected virtual bool IsNodeAccessible(
    OpcContext context,
    OpcNodeId viewId,
    IOpcNodeInfo node)
vbnet
Protected Overridable Function IsNodeAccessible(
    context As OpcContext,
    viewId As OpcNodeId,
    node As IOpcNodeInfo) As Boolean

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the operation which accesses the node.
viewIdOpcNodeIdThe OpcNodeId of the view to check or Null if the node is not accessed through a view.
nodeIOpcNodeInfoThe IOpcNodeInfo of the node to check.

Returns

Boolean

The value true if the node is accessible; otherwise the value false. The base implementation evaluates IsAccessible and, for a variable node, requires an AccessLevel or UserAccessLevel other than None.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context, viewId or node is a null reference (Nothing in Visual Basic).

Remarks

The server treats a node which is not accessible like a node which does not exist.

IsNodeReadyToPublish ​

protected · since v2.50

Determines a value indicating whether any applied node changes are awaiting to be published by at least one monitored item.

csharp
protected bool IsNodeReadyToPublish(IOpcNode node)
vbnet
Protected Function IsNodeReadyToPublish(node As IOpcNode) As Boolean

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode its publishing state is to be verified.

Returns

Boolean

The value true if the node has applied changes which are awaiting to be published; otherwise the value false.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).

OnAfterRead ​

protected · virtual

Raises the AfterRead event of the OpcNodeManager.

csharp
protected virtual void OnAfterRead(OpcNodeAccessEventArgs e)
vbnet
Protected Overridable Sub OnAfterRead(e As OpcNodeAccessEventArgs)

Parameters

NameTypeDescription
eOpcNodeAccessEventArgsThe event data.

OnAfterWrite ​

protected · virtual

Raises the AfterWrite event of the OpcNodeManager.

csharp
protected virtual void OnAfterWrite(OpcNodeAccessEventArgs e)
vbnet
Protected Overridable Sub OnAfterWrite(e As OpcNodeAccessEventArgs)

Parameters

NameTypeDescription
eOpcNodeAccessEventArgsThe event data.

OnBeforeRead ​

protected · virtual

Raises the BeforeRead event of the OpcNodeManager.

csharp
protected virtual void OnBeforeRead(OpcNodeAccessEventArgs e)
vbnet
Protected Overridable Sub OnBeforeRead(e As OpcNodeAccessEventArgs)

Parameters

NameTypeDescription
eOpcNodeAccessEventArgsThe event data.

OnBeforeWrite ​

protected · virtual

Raises the BeforeWrite event of the OpcNodeManager.

csharp
protected virtual void OnBeforeWrite(OpcNodeAccessEventArgs e)
vbnet
Protected Overridable Sub OnBeforeWrite(e As OpcNodeAccessEventArgs)

Parameters

NameTypeDescription
eOpcNodeAccessEventArgsThe event data.

OnMonitoredItemCreated ​

protected · virtual

Raises the MonitoredItemCreated event of the OpcNodeManager.

csharp
protected virtual void OnMonitoredItemCreated(OpcMonitoredItemEventArgs e)
vbnet
Protected Overridable Sub OnMonitoredItemCreated(e As OpcMonitoredItemEventArgs)

Parameters

NameTypeDescription
eOpcMonitoredItemEventArgsThe event data.

OnMonitoredItemDeleted ​

protected · virtual

Raises the MonitoredItemDeleted event of the OpcNodeManager.

csharp
protected virtual void OnMonitoredItemDeleted(OpcMonitoredItemEventArgs e)
vbnet
Protected Overridable Sub OnMonitoredItemDeleted(e As OpcMonitoredItemEventArgs)

Parameters

NameTypeDescription
eOpcMonitoredItemEventArgsThe event data.

OnMonitoredItemModified ​

protected · virtual

Raises the MonitoredItemModified event of the OpcNodeManager.

csharp
protected virtual void OnMonitoredItemModified(OpcMonitoredItemEventArgs e)
vbnet
Protected Overridable Sub OnMonitoredItemModified(
    e As OpcMonitoredItemEventArgs)

Parameters

NameTypeDescription
eOpcMonitoredItemEventArgsThe event data.

OnMonitoredItemsCreated ​

protected · virtual · since v2.7

Raises the MonitoredItemsCreated event of the OpcNodeManager.

csharp
protected virtual void OnMonitoredItemsCreated(OpcMonitoredItemsEventArgs e)
vbnet
Protected Overridable Sub OnMonitoredItemsCreated(
    e As OpcMonitoredItemsEventArgs)

Parameters

NameTypeDescription
eOpcMonitoredItemsEventArgsThe event data.

OnMonitoredItemsDeleted ​

protected · virtual · since v2.7

Raises the MonitoredItemsDeleted event of the OpcNodeManager.

csharp
protected virtual void OnMonitoredItemsDeleted(OpcMonitoredItemsEventArgs e)
vbnet
Protected Overridable Sub OnMonitoredItemsDeleted(
    e As OpcMonitoredItemsEventArgs)

Parameters

NameTypeDescription
eOpcMonitoredItemsEventArgsThe event data.

OnMonitoredItemsModified ​

protected · virtual · since v2.7

Raises the MonitoredItemsModified event of the OpcNodeManager.

csharp
protected virtual void OnMonitoredItemsModified(OpcMonitoredItemsEventArgs e)
vbnet
Protected Overridable Sub OnMonitoredItemsModified(
    e As OpcMonitoredItemsEventArgs)

Parameters

NameTypeDescription
eOpcMonitoredItemsEventArgsThe event data.

QueryNode ​

protected · virtual

When overridden in a derived class, provides the node with the nodeId specified which is not part of the Nodes.

csharp
protected virtual IOpcNode QueryNode(OpcNodeId nodeId)
vbnet
Protected Overridable Function QueryNode(nodeId As OpcNodeId) As IOpcNode

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the node to provide.

Returns

IOpcNode

The IOpcNode with the nodeId specified, if known; otherwise a null reference (Nothing in Visual Basic). The base implementation returns a null reference.

Remarks

The method is called by GetNode and when the server looks up a node of the node manager which is not part of the Nodes.

Read ​

protected · virtual

Reads the attribute values requested by the tokens specified on behalf of a client.

csharp
protected virtual void Read(
    OpcContext context,
    OpcNodeAccessTokenCollection tokens)
vbnet
Protected Overridable Sub Read(
    context As OpcContext,
    tokens As OpcNodeAccessTokenCollection)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the read operation.
tokensOpcNodeAccessTokenCollectionThe OpcNodeAccessTokenCollection with one OpcNodeAccessToken per attribute value to read, which receives the value and the result of the read.

Remarks

The method raises the BeforeRead event before and the AfterRead event after reading, also if reading fails.

ReadEventHistory ​

protected · virtual · since v2.54

Reads the history of the events of the node specified on behalf of a client.

csharp
protected virtual IEnumerable<OpcEvent> ReadEventHistory(
    OpcContext context,
    IOpcNode node,
    OpcEventFilter eventFilter,
    DateTime? startTime,
    DateTime? endTime,
    bool timeFlowsBackward,
    uint? maxCount)
vbnet
Protected Overridable Function ReadEventHistory(
    context As OpcContext,
    node As IOpcNode,
    eventFilter As OpcEventFilter,
    startTime As Date?,
    endTime As Date?,
    timeFlowsBackward As Boolean,
    maxCount As UInteger?) As IEnumerable(Of OpcEvent)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the read operation.
nodeIOpcNodeThe IOpcNode whose event history is read.
eventFilterOpcEventFilterThe OpcEventFilter which specifies the fields of the events to provide.
startTimeNullable<DateTime>The begin of the time range to read or a null reference (Nothing in Visual Basic) if the range is not limited at its begin.
endTimeNullable<DateTime>The end of the time range to read or a null reference (Nothing in Visual Basic) if the range is not limited at its end.
timeFlowsBackwardBooleanThe value true to provide the events in descending order of their timestamps; otherwise the value false.
maxCountNullable<UInt32>The maximum number of events to provide or a null reference (Nothing in Visual Basic) if the number is not limited.

Returns

IEnumerable<OpcEvent>

A sequence of the OpcEvent instances read or a null reference (Nothing in Visual Basic) if RetrieveEventHistoryProvider provides no provider; in this case the client receives the code BadNotSupported for the node.

ReadHistory ​

protected · virtual · since v2.51

Reads the history of the values of the node specified on behalf of a client.

csharp
protected virtual IEnumerable<OpcHistoryValue> ReadHistory(
    OpcContext context,
    IOpcNode node,
    DateTime? startTime,
    DateTime? endTime,
    bool timeFlowsBackward,
    uint? maxCount,
    OpcReadHistoryOptions options)
vbnet
Protected Overridable Function ReadHistory(
    context As OpcContext,
    node As IOpcNode,
    startTime As Date?,
    endTime As Date?,
    timeFlowsBackward As Boolean,
    maxCount As UInteger?,
    options As OpcReadHistoryOptions) As IEnumerable(Of OpcHistoryValue)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the read operation.
nodeIOpcNodeThe IOpcNode whose history is read.
startTimeNullable<DateTime>The begin of the time range to read or a null reference (Nothing in Visual Basic) if the range is not limited at its begin.
endTimeNullable<DateTime>The end of the time range to read or a null reference (Nothing in Visual Basic) if the range is not limited at its end.
timeFlowsBackwardBooleanThe value true to provide the values in descending order of their timestamps; otherwise the value false.
maxCountNullable<UInt32>The maximum number of values to provide or a null reference (Nothing in Visual Basic) if the number is not limited.
optionsOpcReadHistoryOptionsA combination of the OpcReadHistoryOptions flags which specify the values to provide.

Returns

IEnumerable<OpcHistoryValue>

A sequence of the OpcHistoryValue instances read or a null reference (Nothing in Visual Basic) if RetrieveNodeHistoryProvider provides no provider; in this case the client receives the code BadNotSupported for the node.

RemoveNode ​

4 overloads

OverloadDescription
RemoveNode(IOpcNode)Removes the node specified from the address space of the node manager.
RemoveNode(OpcContext, IOpcNode)since v2.7Removes the node specified from the address space of the node manager using the context specified.
RemoveNode(IOpcNode, OpcLocalReferenceCollection)protected · since v2.7Removes the node specified from the address space of the node manager and collects the references to remove from further node managers.
RemoveNode(OpcContext, IOpcNode, OpcLocalReferenceCollection)protected · virtual · since v2.7Removes the node specified from the address space of the node manager using the context specified and collects the references to remove from further node managers.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThe server using the node manager has not yet been started.

RemoveNode(IOpcNode) ​

Removes the node specified from the address space of the node manager.

csharp
public void RemoveNode(IOpcNode node)
vbnet
Public Sub RemoveNode(node As IOpcNode)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode to remove.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).

Remarks

The references between the node and the nodes of other node managers are removed as well.

RemoveNode(OpcContext, IOpcNode) ​

since v2.7

Removes the node specified from the address space of the node manager using the context specified.

csharp
public void RemoveNode(OpcContext context, IOpcNode node)
vbnet
Public Sub RemoveNode(context As OpcContext, node As IOpcNode)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to remove the node.
nodeIOpcNodeThe IOpcNode to remove.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or node is a null reference (Nothing in Visual Basic).

Remarks

The references between the node and the nodes of other node managers are removed as well.

RemoveNode(IOpcNode, OpcLocalReferenceCollection) ​

protected · since v2.7

Removes the node specified from the address space of the node manager and collects the references to remove from further node managers.

csharp
protected void RemoveNode(IOpcNode node, OpcLocalReferenceCollection references)
vbnet
Protected Sub RemoveNode(
    node As IOpcNode,
    references As OpcLocalReferenceCollection)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode to remove.
referencesOpcLocalReferenceCollectionThe OpcLocalReferenceCollection to which the references between the node and the nodes of other node managers are added.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).

Remarks

Unlike RemoveNode the method does not remove the collected references from the other node managers.

RemoveNode(OpcContext, IOpcNode, OpcLocalReferenceCollection) ​

protected · virtual · since v2.7

Removes the node specified from the address space of the node manager using the context specified and collects the references to remove from further node managers.

csharp
protected virtual void RemoveNode(
    OpcContext context,
    IOpcNode node,
    OpcLocalReferenceCollection references)
vbnet
Protected Overridable Sub RemoveNode(
    context As OpcContext,
    node As IOpcNode,
    references As OpcLocalReferenceCollection)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to remove the node.
nodeIOpcNodeThe IOpcNode to remove.
referencesOpcLocalReferenceCollectionThe OpcLocalReferenceCollection to which the references between the node and the nodes of other node managers are added.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or node is a null reference (Nothing in Visual Basic).

Remarks

The server calls the method also when it removes a node of the node manager. The method does not remove the collected references from the other node managers.

RemoveNotifierNode ​

protected

Removes the node from the collection of 'root' notifiers (= event sources) of the 'Server' node.

csharp
protected void RemoveNotifierNode(IOpcNode node)
vbnet
Protected Sub RemoveNotifierNode(node As IOpcNode)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode instance acting as the notifier of the 'Server' node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe master node has not yet been created, therefore the operation is at the moment not available.

ReplaceHistory ​

protected · virtual

Replaces the history entries of the values specified of the node specified.

csharp
protected virtual OpcStatusCollection ReplaceHistory(
    IOpcNode node,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Protected Overridable Function ReplaceHistory(
    node As IOpcNode,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is changed.
modificationInfoOpcHistoryModificationInfoThe OpcHistoryModificationInfo which describes the modification.
valuesOpcValueCollectionThe OpcValueCollection with the values to replace the existing entries with.

Returns

OpcStatusCollection

An OpcStatusCollection with the result per value. If RetrieveNodeHistoryProvider provides no provider, each result has the code BadHistoryOperationUnsupported.

ReplaceNode ​

protected · since v2.9

Replaces an existing IOpcNode instance with the specified node without invalidating existing monitored items nor previously defined notifiers.

csharp
protected void ReplaceNode(IOpcNode node)
vbnet
Protected Sub ReplaceNode(node As IOpcNode)

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode instance its Id is used to determine existing monitored items, notifiers and nodes to replace with the new one.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe master node has not yet been created, therefore the operation is at the moment not available.

Remarks

To replace an existing node the OpcNodeId of the node specified needs to match the Id of an existing IOpcNode instance.

This method replaces an existing node and all of its children recursively in the Nodes of this OpcNodeManager and in the list of notifiers as well in the list of monitored items / nodes.

The caller of this method have to ensure that the node specified is as compatible to the previous node as the clients of the server expect. This includes for example the attributes or other metrics of a dedicated type of node to which a client may belong.

ReportEvent ​

7 overloads

OverloadDescription
ReportEvent(OpcEventNode)Produces a global event using the eventNode specified.
ReportEvent(OpcEventSeverity, OpcText)Produces a global event using the event data specified.
ReportEvent(OpcEventSeverity, OpcText, params object[])Produces a global event using the event data specified.
ReportEvent(OpcNodeId, string, OpcEventSeverity, OpcText)Produces a global event using the event data specified.
ReportEvent(OpcNodeId, string, OpcEventSeverity, OpcText, params object[])Produces a global event using the event data specified.
ReportEvent(IOpcNode, OpcEventSeverity, OpcText)Produces a global event using the event data specified.
ReportEvent(IOpcNode, OpcEventSeverity, OpcText, params object[])Produces a global event using the event data specified.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThe master node has not yet been created, therefore the operation is at the moment not available.
OpcExceptionThe operation failed (see exception details for more information).

ReportEvent(OpcEventNode) ​

Produces a global event using the eventNode specified.

csharp
public void ReportEvent(OpcEventNode eventNode)
vbnet
Public Sub ReportEvent(eventNode As OpcEventNode)

Parameters

NameTypeDescription
eventNodeOpcEventNodeThe OpcEventNode its event information is to be reported as a global event.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe eventNode is a null reference (Nothing in Visual Basic).

ReportEvent(OpcEventSeverity, OpcText) ​

Produces a global event using the event data specified.

csharp
public void ReportEvent(OpcEventSeverity severity, OpcText message)
vbnet
Public Sub ReportEvent(severity As OpcEventSeverity, message As OpcText)

Parameters

NameTypeDescription
severityOpcEventSeverityAn indication of the urgency of the event.
messageOpcTextA human-readable and localizable text description of the event.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe message is a null reference (Nothing in Visual Basic).

ReportEvent(OpcEventSeverity, OpcText, params object[]) ​

Produces a global event using the event data specified.

csharp
public void ReportEvent(
    OpcEventSeverity severity,
    OpcText message,
    params object[] arguments)
vbnet
Public Sub ReportEvent(
    severity As OpcEventSeverity,
    message As OpcText,
    ParamArray arguments As Object())

Parameters

NameTypeDescription
severityOpcEventSeverityAn indication of the urgency of the event.
messageOpcTextA human-readable and localizable text description of the event with format placeholders which where replaced with the arguments specified.
argumentsparams Object[]The values to place into the message using its format placeholders.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe message is a null reference (Nothing in Visual Basic).

ReportEvent(OpcNodeId, string, OpcEventSeverity, OpcText) ​

Produces a global event using the event data specified.

csharp
public void ReportEvent(
    OpcNodeId sourceNodeId,
    string sourceName,
    OpcEventSeverity severity,
    OpcText message)
vbnet
Public Sub ReportEvent(
    sourceNodeId As OpcNodeId,
    sourceName As String,
    severity As OpcEventSeverity,
    message As OpcText)

Parameters

NameTypeDescription
sourceNodeIdOpcNodeIdThe OpcNodeId which is to be used for the SourceNodeId property to define the origin of the event produced.
sourceNameStringThe string which is to be used for the SourceName.
severityOpcEventSeverityAn indication of the urgency of the event.
messageOpcTextA human-readable and localizable text description of the event.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe message is a null reference (Nothing in Visual Basic).

ReportEvent(OpcNodeId, string, OpcEventSeverity, OpcText, params object[]) ​

Produces a global event using the event data specified.

csharp
public void ReportEvent(
    OpcNodeId sourceNodeId,
    string sourceName,
    OpcEventSeverity severity,
    OpcText message,
    params object[] arguments)
vbnet
Public Sub ReportEvent(
    sourceNodeId As OpcNodeId,
    sourceName As String,
    severity As OpcEventSeverity,
    message As OpcText,
    ParamArray arguments As Object())

Parameters

NameTypeDescription
sourceNodeIdOpcNodeIdThe OpcNodeId which is to be used for the SourceNodeId property to define the origin of the event produced.
sourceNameStringThe string which is to be used for the SourceName.
severityOpcEventSeverityAn indication of the urgency of the event.
messageOpcTextA human-readable and localizable text description of the event with format placeholders which where replaced with the arguments specified.
argumentsparams Object[]The values to place into the message using its format placeholders.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe message is a null reference (Nothing in Visual Basic).

ReportEvent(IOpcNode, OpcEventSeverity, OpcText) ​

Produces a global event using the event data specified.

csharp
public void ReportEvent(
    IOpcNode source,
    OpcEventSeverity severity,
    OpcText message)
vbnet
Public Sub ReportEvent(
    source As IOpcNode,
    severity As OpcEventSeverity,
    message As OpcText)

Parameters

NameTypeDescription
sourceIOpcNodeThe IOpcNode instance its Id is used for the SourceNodeId property and its SymbolicName is used for the SourceName property to define the origin of the event produced.
severityOpcEventSeverityAn indication of the urgency of the event.
messageOpcTextA human-readable and localizable text description of the event.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe source or message is a null reference (Nothing in Visual Basic).

ReportEvent(IOpcNode, OpcEventSeverity, OpcText, params object[]) ​

Produces a global event using the event data specified.

csharp
public void ReportEvent(
    IOpcNode source,
    OpcEventSeverity severity,
    OpcText message,
    params object[] arguments)
vbnet
Public Sub ReportEvent(
    source As IOpcNode,
    severity As OpcEventSeverity,
    message As OpcText,
    ParamArray arguments As Object())

Parameters

NameTypeDescription
sourceIOpcNodeThe IOpcNode instance its Id is used for the SourceNodeId property and its SymbolicName is used for the SourceName property to define the origin of the event produced.
severityOpcEventSeverityAn indication of the urgency of the event.
messageOpcTextA human-readable and localizable text description of the event with format placeholders which where replaced with the arguments specified.
argumentsparams Object[]The values to place into the message using its format placeholders.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe source or message is a null reference (Nothing in Visual Basic).

RetrieveEventHistoryProvider ​

protected · virtual · since v2.54

Retrieves the provider which provides the history of the events of the node specified.

csharp
protected virtual IOpcEventHistoryProvider RetrieveEventHistoryProvider(
    IOpcNode node)
vbnet
Protected Overridable Function RetrieveEventHistoryProvider(
    node As IOpcNode) As IOpcEventHistoryProvider

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose event history is accessed.

Returns

IOpcEventHistoryProvider

The IOpcEventHistoryProvider to use or a null reference (Nothing in Visual Basic) if the event history of the node is not available. The base implementation returns the node if it implements IOpcEventHistoryProvider.

RetrieveNodeHistoryProvider ​

protected · virtual

Retrieves the provider which provides the history of the values of the node specified.

csharp
protected virtual IOpcNodeHistoryProvider RetrieveNodeHistoryProvider(
    IOpcNode node)
vbnet
Protected Overridable Function RetrieveNodeHistoryProvider(
    node As IOpcNode) As IOpcNodeHistoryProvider

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is accessed.

Returns

IOpcNodeHistoryProvider

The IOpcNodeHistoryProvider to use or a null reference (Nothing in Visual Basic) if the history of the node is not available. The base implementation returns the node if it implements IOpcNodeHistoryProvider.

UpdateHistory ​

protected · virtual

Updates the history entries of the values specified of the node specified.

csharp
protected virtual OpcStatusCollection UpdateHistory(
    IOpcNode node,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Protected Overridable Function UpdateHistory(
    node As IOpcNode,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
nodeIOpcNodeThe IOpcNode whose history is changed.
modificationInfoOpcHistoryModificationInfoThe OpcHistoryModificationInfo which describes the modification.
valuesOpcValueCollectionThe OpcValueCollection with the values to create or to replace the existing entries with.

Returns

OpcStatusCollection

An OpcStatusCollection with the result per value. If RetrieveNodeHistoryProvider provides no provider, each result has the code BadHistoryOperationUnsupported.

Write ​

protected · virtual

Writes the attribute values provided by the tokens specified on behalf of a client.

csharp
protected virtual void Write(
    OpcContext context,
    OpcNodeAccessTokenCollection tokens)
vbnet
Protected Overridable Sub Write(
    context As OpcContext,
    tokens As OpcNodeAccessTokenCollection)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the write operation.
tokensOpcNodeAccessTokenCollectionThe OpcNodeAccessTokenCollection with one OpcNodeAccessToken per attribute value to write, which receives the result of the write.

Remarks

The method raises the BeforeWrite event before and the AfterWrite event after writing, also if writing fails.

Events ​

AfterRead ​

Occurs after the node manager has read attribute values of its nodes on behalf of a client (see Read), also if reading has failed.

csharp
public event OpcNodeAccessEventHandler AfterRead
vbnet
Public Event AfterRead As OpcNodeAccessEventHandler

Event type

OpcNodeAccessEventHandler

AfterWrite ​

Occurs after the node manager has written attribute values of its nodes on behalf of a client (see Write), also if writing has failed.

csharp
public event OpcNodeAccessEventHandler AfterWrite
vbnet
Public Event AfterWrite As OpcNodeAccessEventHandler

Event type

OpcNodeAccessEventHandler

BeforeRead ​

Occurs before the node manager reads attribute values of its nodes on behalf of a client (see Read).

csharp
public event OpcNodeAccessEventHandler BeforeRead
vbnet
Public Event BeforeRead As OpcNodeAccessEventHandler

Event type

OpcNodeAccessEventHandler

BeforeWrite ​

Occurs before the node manager writes attribute values of its nodes on behalf of a client (see Write).

csharp
public event OpcNodeAccessEventHandler BeforeWrite
vbnet
Public Event BeforeWrite As OpcNodeAccessEventHandler

Event type

OpcNodeAccessEventHandler

MonitoredItemCreated ​

Occurs when a new monitored item is created through a OpcSession.

csharp
public event OpcMonitoredItemEventHandler MonitoredItemCreated
vbnet
Public Event MonitoredItemCreated As OpcMonitoredItemEventHandler

Event type

OpcMonitoredItemEventHandler

MonitoredItemDeleted ​

Occurs when an existing monitored item of a OpcSession has been deleted.

csharp
public event OpcMonitoredItemEventHandler MonitoredItemDeleted
vbnet
Public Event MonitoredItemDeleted As OpcMonitoredItemEventHandler

Event type

OpcMonitoredItemEventHandler

MonitoredItemModified ​

Occurs when an existing monitored item of a OpcSession has been modified.

csharp
public event OpcMonitoredItemEventHandler MonitoredItemModified
vbnet
Public Event MonitoredItemModified As OpcMonitoredItemEventHandler

Event type

OpcMonitoredItemEventHandler

MonitoredItemsCreated ​

since v2.7

Occurs when a set of new monitored items is created through a OpcSession.

csharp
public event OpcMonitoredItemsEventHandler MonitoredItemsCreated
vbnet
Public Event MonitoredItemsCreated As OpcMonitoredItemsEventHandler

Event type

OpcMonitoredItemsEventHandler

MonitoredItemsDeleted ​

since v2.7

Occurs when a set of existing monitored items of a OpcSession has been deleted.

csharp
public event OpcMonitoredItemsEventHandler MonitoredItemsDeleted
vbnet
Public Event MonitoredItemsDeleted As OpcMonitoredItemsEventHandler

Event type

OpcMonitoredItemsEventHandler

MonitoredItemsModified ​

since v2.7

Occurs when a set of existing monitored items of a OpcSession has been modified.

csharp
public event OpcMonitoredItemsEventHandler MonitoredItemsModified
vbnet
Public Event MonitoredItemsModified As OpcMonitoredItemsEventHandler

Event type

OpcMonitoredItemsEventHandler