Skip to content

Reference

OpcInstanceNode Members

Defines the abstract base class of all instance nodes.

Reference

OpcInstanceNode Members ​

Type
OpcInstanceNode
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Inherits members from OpcNode.

Properties ​

DefaultReferenceTypeId ​

protected · virtual

Gets the default identifier which identifies the type that defines the underlying node reference within this OpcInstanceNode is referenced by its parent node.

csharp
protected virtual OpcNodeId DefaultReferenceTypeId { get; }
vbnet
Protected Overridable ReadOnly Property DefaultReferenceTypeId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the reference wihin this OpcInstanceNode is referenced. These reference defines the typical behaviour of an instance node and its role in the address space regarding its parent. If there exists no specific reference type a null reference (Nothing in Visual Basic).

DefaultTypeDefinitionId ​

protected · virtual

Gets the default identifier which identifies the node that defines the underlying node type from that this OpcInstanceNode has been created.

csharp
protected virtual OpcNodeId DefaultTypeDefinitionId { get; }
vbnet
Protected Overridable ReadOnly Property DefaultTypeDefinitionId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the type node from that this OpcInstanceNode has been created from. These type node defines the typical structure of an instance node of its type definition. If there exists no specific type definition node a null reference (Nothing in Visual Basic).

InheritReferenceTypeId ​

protected · virtual · since v2.54

Gets a value indicating whether the DefaultReferenceTypeId of the current node is to be used for its children nodes initial ReferenceTypeId. This applies only under the conditions where ReferenceTypeId of the child node is a null reference (Nothing in Visual Basic) or the DefaultReferenceTypeId of the child node is used.

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

Property value

Boolean

The value true to inherit the DefaultReferenceTypeId to the direct children nodes of the parent node; otherwise the value false. The default value is false.

ModellingRuleId ​

Gets or sets the identifier which defines how the OpcInstanceNode is used for instantiation.

csharp
public OpcNodeId ModellingRuleId { get; set; }
vbnet
Public Property ModellingRuleId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the rule which defined how the OpcInstanceNode is used for instantiation. This rule also defines subtyping rules for the OpcInstanceNode. If there does no specific rule apply to the node a null reference (Nothing in Visual Basic).

Parent ​

override

Gets the parent node of the node.

csharp
public override sealed IOpcNode Parent { get; }
vbnet
Public NotOverridable Overrides ReadOnly Property Parent As IOpcNode

Property value

IOpcNode

An instance implementing the IOpcNode interface which represents the phyiscal parent of the node. In general a node can have multiple (logical) parent nodes, but this property provides the only physical parent node of the node. The value can also be a null reference (Nothing in Visual Basic) in case there the node does only have logical parent nodes.

Overrides

Parent

ReferenceType ​

Gets a value which defines a pre-defined used ReferenceTypeId as one of the members defined by the OpcReferenceType enumeration to simplify querying standard reference types.

csharp
public OpcReferenceType ReferenceType { get; }
vbnet
Public ReadOnly Property ReferenceType As OpcReferenceType

Property value

OpcReferenceType

One of the members defined by the OpcReferenceType enumeration.

ReferenceTypeId ​

Gets or sets the identifier which identifies the node that defines the semantic of the reference between a source and a target node and generally reflects an operation between the two, such as "A contains B".

csharp
public OpcNodeId ReferenceTypeId { get; set; }
vbnet
Public Property ReferenceTypeId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the reference type node which defines the relation semantic between the source and a target node. If there does no specific reference apply between the source and the target node a null reference (Nothing in Visual Basic).

Remarks

Since reference types will be used as filters in the browse service and in queries, the server shall provide all its reference types, directly or indirectly following hierarchical references starting from the "ReferenceTypes" object. This means that, whenever the client follows a reference, the server shall expose the type of this reference in the reference type hierarchy. It shall provide all reference types so that the client would be able, following the inverse subtype of references, to come to the base references reference type. It does not mean that the server shall expose the reference type that the client has not used any reference of.

TypeDefinitionId ​

Gets or sets the identifier which identifies the node that defines the underlying node type from that this OpcInstanceNode has been created.

csharp
public OpcNodeId TypeDefinitionId { get; set; }
vbnet
Public Property TypeDefinitionId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the type node from that this OpcInstanceNode has been created from. These type node defines the typical structure of an instance node of its type definition. If there exists no specific type definition node a null reference (Nothing in Visual Basic).

Methods ​

AddChild ​

Adds the node specified as a child node of this node.

csharp
public void AddChild(OpcContext context, OpcInstanceNode node)
vbnet
Public Sub AddChild(context As OpcContext, node As OpcInstanceNode)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to add the child node.
nodeOpcInstanceNodeThe OpcInstanceNode to add as a child node.

Exceptions

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

Remarks

If this node has already been initialized, the node is initialized in the Namespace of this node before it is added. If the context is an OpcNodeContext of a node manager, the node is added to the node manager too.

GetNodeValue ​

2 overloads · since v2.20

OverloadDescription
GetNodeValue<T>(string)since v2.20Retrieves the value of the child variable node with the name specified in the Namespace of this node.
GetNodeValue<T>(OpcName)since v2.20Retrieves the value of the child variable node with the name specified.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThis node has no child variable node with the name.

GetNodeValue<T>(string) ​

since v2.20

Retrieves the value of the child variable node with the name specified in the Namespace of this node.

csharp
public T GetNodeValue<T>(string name = "")
vbnet
Public Function GetNodeValue(Of T)(name As String = "") As T

Type parameters

NameDescription
TThe type of the value to retrieve.

Parameters

NameTypeDescription
nameStringThe name of the child variable node; by default the name of the calling member, e.g. of the property which provides the value. Optional, default "".

Returns

T

The value of the child variable node if it is a T; otherwise the default value of T.

GetNodeValue<T>(OpcName) ​

since v2.20

Retrieves the value of the child variable node with the name specified.

csharp
public T GetNodeValue<T>(OpcName name)
vbnet
Public Function GetNodeValue(Of T)(name As OpcName) As T

Type parameters

NameDescription
TThe type of the value to retrieve.

Parameters

NameTypeDescription
nameOpcNameThe OpcName of the child variable node.

Returns

T

The value of the child variable node if it is a T; otherwise the default value of T.

Exceptions

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

InitializeDefaults ​

protected · override

Initializes the default values used by the OpcInstanceNode.

csharp
protected override void InitializeDefaults()
vbnet
Protected Overrides Sub InitializeDefaults()

Overrides

InitializeDefaults

Remarks

This method is used to ensure the availability of appropriate node specific default values. For more information like when this method is to be overwritten see InitializeDefaults.

RemoveChild ​

Removes the node specified from the child nodes of this node.

csharp
public void RemoveChild(OpcContext context, OpcInstanceNode node)
vbnet
Public Sub RemoveChild(context As OpcContext, node As OpcInstanceNode)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to remove the child node.
nodeOpcInstanceNodeThe OpcInstanceNode to remove from the child nodes.

Exceptions

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

Remarks

If the context is an OpcNodeContext of a node manager, the node is removed from the node manager too.

RemoveNotifier ​

override

Removes the node from the collection of notifiers (= event sources) of this node.

csharp
public override void RemoveNotifier(OpcContext context, IOpcNode node)
vbnet
Public Overrides Sub RemoveNotifier(context As OpcContext, node As IOpcNode)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to remove the node as the notifying event source.
nodeIOpcNodeThe IOpcNode instance no longer acting as the notifier.

Exceptions

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

Overrides

RemoveNotifier

Remarks

If the node is the last notifier being removed from the collection of notifiers the EventNotifier attribute of this OpcInstanceNode is unset from 'SubscribeToEvents'.

SetNodeValue ​

2 overloads · since v2.20

OverloadDescription
SetNodeValue<T>(string, T)since v2.20Changes the value of the child variable node with the name specified in the Namespace of this node and applies the change.
SetNodeValue<T>(OpcName, T)since v2.20Changes the value of the child variable node with the name specified and applies the change.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThis node has no child variable node with the name.

SetNodeValue<T>(string, T) ​

since v2.20

Changes the value of the child variable node with the name specified in the Namespace of this node and applies the change.

csharp
public void SetNodeValue<T>(string name = "", T value = default)
vbnet
Public Sub SetNodeValue(Of T)(name As String = "", value As T = Nothing)

Type parameters

NameDescription
TThe type of the value to store.

Parameters

NameTypeDescription
nameStringThe name of the child variable node; by default the name of the calling member, e.g. of the property which stores the value. Optional, default "".
valueTThe new value of the child variable node. Optional, default default.

SetNodeValue<T>(OpcName, T) ​

since v2.20

Changes the value of the child variable node with the name specified and applies the change.

csharp
public void SetNodeValue<T>(OpcName name, T value)
vbnet
Public Sub SetNodeValue(Of T)(name As OpcName, value As T)

Type parameters

NameDescription
TThe type of the value to store.

Parameters

NameTypeDescription
nameOpcNameThe OpcName of the child variable node.
valueTThe new value of the child variable node.

Exceptions

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