# IOpcNode Members

> Reference: Defines an interface which can be used to access and change the properties of a node and to notify about the changes performed on it.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcNode</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Inherits members from [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/members).

## Properties

### Description

Gets or sets the value of the optional [Description](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#description) attribute which shall explain the meaning of the node.

<div class="api-signature" data-lang="csharp">

```csharp
OpcText Description { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Property Description As OpcText
```

</div>

**Property value**

[OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/)

A localizable instance of the [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) class which optionally explains the meaning of the node or a null reference (Nothing in Visual Basic) if there is no description associated with the node.

**Remarks**

The menaning of the node defines the usage, the context and the purpose of the node.

### DisplayName

<span class="api-meta">since v2.7</span>

Gets or sets the value of the [DisplayName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#displayname) attribute which defines the localizable name of the node.

<div class="api-signature" data-lang="csharp">

```csharp
OpcText DisplayName { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Property DisplayName As OpcText
```

</div>

**Property value**

[OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/)

An instance of the [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) class which defines the localizable name of the node.

**Remarks**

Client application should use this attribute if they want to display the name of the node to the user. The [string](https://learn.microsoft.com/dotnet/api/system.string) part of the [DisplayName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#displayname) is restricted to 512 characters.

### HasPendingChanges

Gets a value indicating whether there exists any pending change on the node.

<div class="api-signature" data-lang="csharp">

```csharp
bool HasPendingChanges { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
ReadOnly Property HasPendingChanges As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if [PendingChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#pendingchanges) is not equals to [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none); otherwise the value false.

### Name

<span class="api-meta">since v2.7</span>

Gets or sets the value of the [BrowseName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#browsename) attribute which defines the non-localizable human-readable name used when browsing the address space.

<div class="api-signature" data-lang="csharp">

```csharp
OpcName Name { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Property Name As OpcName
```

</div>

**Property value**

[OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/)

**Remarks**

The [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#name) should never be used to display the name of the a node. Use the [DisplayName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#displayname) instead for this purpose.

Unlike node identifiers the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#name) cannot be used to unambiguously identify the node. Different nodes may have the same browse name. The namespace is provided to make the browse name unique in some cases in the context of a node (e.g. properties of a node) although not unique in the context of the server. If different organizations define browse names for properties, the namespace of the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#name) provided by the organization makes the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#name) unique, although different organizations may use the same string having a slightly different meaning. Servers may often choose to use the same namespace for the node identifier and the browse name. However, if they want to provide a standard property, its browse name shall have the namespace of the standards body although the namespace of the node identifier reflects something else, for example the local server.

It is recommended that standard bodies defining standard type definitions use their namespace for the node identifier of the type definition node as well as for the browse name of the type definition node.

The [string](https://learn.microsoft.com/dotnet/api/system.string)-part of the browse name is case sensitive. That is, clients shall consider them case sensitive. Server are allowed to handle browse names passed in service requests as case insensitive.

Use the value of this property to construct browse paths (see [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/)).

### Namespace

Gets the namespace of the node.

<div class="api-signature" data-lang="csharp">

```csharp
OpcNamespace Namespace { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
ReadOnly Property [Namespace] As OpcNamespace
```

</div>

**Property value**

[OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/)

The [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) assigned to the node or, if no namespace has been assigned to the node, the [Namespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespace) of its [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/members#id).

### Parent

Gets the parent node of the node.

<div class="api-signature" data-lang="csharp">

```csharp
IOpcNode Parent { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
ReadOnly Property Parent As IOpcNode
```

</div>

**Property value**

[IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/)

An instance implementing the [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) interface which represents the physical parent of the node, or a null reference (Nothing in Visual Basic) if the node only has logical parent nodes.

### PendingChanges

Gets a value indicating the changes performed on the node since their last notification.

<div class="api-signature" data-lang="csharp">

```csharp
OpcNodeChanges PendingChanges { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
ReadOnly Property PendingChanges As OpcNodeChanges
```

</div>

**Property value**

[OpcNodeChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/)

A bitwise combination of [OpcNodeChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/) members identifying the changes made on the node, or [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none) if there was no change on the node since the last notification.

**Remarks**

Use one of the [ApplyChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#applychanges-opc-uafx-opccontext) overloads to notify about the changes and to reset the value of this property to [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none).

### Tag

Gets or sets the object that contains additional user data about the node.

<div class="api-signature" data-lang="csharp">

```csharp
object Tag { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Property Tag As Object
```

</div>

**Property value**

[Object](https://learn.microsoft.com/dotnet/api/system.object)

An [object](https://learn.microsoft.com/dotnet/api/system.object) that contains additional user data about the node. The default is null (Nothing in Visual Basic).

### UserWriteAccess

Gets or sets the value of the optional [UserWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#userwriteaccess) attribute which exposes the possibilities of a client to write the attributes of the node taking user access rights into account.

<div class="api-signature" data-lang="csharp">

```csharp
OpcAttributeWriteAccess UserWriteAccess { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Property UserWriteAccess As OpcAttributeWriteAccess
```

</div>

**Property value**

[OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/)

A combination of the members defined by the [OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/) enumeration.

**Remarks**

The mask value of this attribute can only further restrict the [WriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#writeaccess) attribute, when it is set to not writable in the general case that applies for every user.

### WriteAccess

Gets or sets the value of the optional [WriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#writeaccess) attribute which exposes the posibilities of a client to write the attributes of the node.

<div class="api-signature" data-lang="csharp">

```csharp
OpcAttributeWriteAccess WriteAccess { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Property WriteAccess As OpcAttributeWriteAccess
```

</div>

**Property value**

[OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/)

A combination of the members defined by the [OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/) enumeration.

**Remarks**

The mask value of this attribute does not take any user access rights into account, that is, altough an attribute is writable this may be restricted to a certain user / user group.

If a server does not have the ability to get the write mask information for a specific attribute from the underlying system, it should state that it is writable. If a write opertation is called on the attribute, the server should transfer this request and return the corresponding [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) if such a request is rejected.

Only in case there a corresponding attribute is set in the mask of this attribute the according attribute is writable; otherwise it can not accessed for writing.

## Methods

### AddNotifier

Adds the `node` to the collection of notifiers (= event sources) of this node.

<div class="api-signature" data-lang="csharp">

```csharp
void AddNotifier(OpcContext context, IOpcNode node)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Sub AddNotifier(context As OpcContext, node As IOpcNode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to add the `node` as the notifying event source. |
| `node` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) instance acting as the notifier. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `node` is a null reference (Nothing in Visual Basic). |
| [NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception) | This node does not support notifiers; only object nodes do. |

### ApplyChanges

<span class="api-meta">2 overloads</span>

| Overload | Description |
|---|---|
| [ApplyChanges(OpcContext)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#applychanges-opc-uafx-opccontext) | Notifies about changes performed on the node since the last notification and resets the pending changes to [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none). |
| [ApplyChanges(OpcContext, bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#applychanges-opc-uafx-opccontext-system-boolean) | Notifies about changes performed on the node (and optionally on its children) since the last notification and resets the pending changes to [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none). |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` is a null reference (Nothing in Visual Basic). |

#### ApplyChanges(OpcContext)

Notifies about changes performed on the node since the last notification and resets the pending changes to [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none).

<div class="api-signature" data-lang="csharp">

```csharp
void ApplyChanges(OpcContext context)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Sub ApplyChanges(context As OpcContext)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to notify about changes performed on the node. |

#### ApplyChanges(OpcContext, bool)

Notifies about changes performed on the node (and optionally on its children) since the last notification and resets the pending changes to [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/#none).

<div class="api-signature" data-lang="csharp">

```csharp
void ApplyChanges(OpcContext context, bool recursive)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Sub ApplyChanges(context As OpcContext, recursive As Boolean)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to notify about changes performed on the node. |
| `recursive` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) | The value true if pending changes are to be notified for all children as well; otherwise the value false. |

### Child

<span class="api-meta">since v2.7</span>

Retrieves the child node its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/members#name) property matches exactly the `name` specified.

<div class="api-signature" data-lang="csharp">

```csharp
IOpcNode Child(OpcContext context, OpcName name)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function Child(context As OpcContext, name As OpcName) As IOpcNode
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to lookup the requested child node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The full qualified [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) of the node to lookup. |

**Returns**

[IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/)

An instance implementing the [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) interface its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/members#name) exactly matches the `name` specified, if such a node is a known child node of this node. Otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `name` is a null reference (Nothing in Visual Basic). |

### Children

Retrieves a sequence of all nodes organized as children of this node.

<div class="api-signature" data-lang="csharp">

```csharp
IEnumerable<IOpcNode> Children(OpcContext context)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function Children(context As OpcContext) As IEnumerable(Of IOpcNode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to lookup the child nodes. |

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/)&gt;

A sequence of instances implementing the [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) interface which representing the nodes organized as child nodes of this node.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` is a null reference (Nothing in Visual Basic). |

### IsChangePending

Determines whether all of the changes specified by the `change` are pending on the node (see [PendingChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/members#pendingchanges)).

<div class="api-signature" data-lang="csharp">

```csharp
bool IsChangePending(OpcNodeChanges change)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function IsChangePending(change As OpcNodeChanges) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `change` | [OpcNodeChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/) | A bitwise combination of [OpcNodeChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodechanges/) members identifying the changes to check. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if all of the changes specified by the `change` are pending on the node; otherwise the value false.

### RemoveNotifier

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

<div class="api-signature" data-lang="csharp">

```csharp
void RemoveNotifier(OpcContext context, IOpcNode node)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Sub RemoveNotifier(context As OpcContext, node As IOpcNode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to remove the `node` as the notifying event source. |
| `node` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) instance no longer acting as the notifier. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `node` is a null reference (Nothing in Visual Basic). |
