# OpcConditionNode Class

<dl class="api-definition">
<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>Members</dt>
<dd><a href="./members">OpcConditionNode Members</a></dd>
</dl>

Defines all general characteristics of a condition.

## Syntax

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

```csharp
[OpcNodeType(2782)]
public class OpcConditionNode : OpcEventNode
```

</div>

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

```vbnet
<OpcEventType(GetType(OpcCondition))>
<OpcNodeType(2782)>
Public Class OpcConditionNode
    Inherits OpcEventNode
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/) → [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) → [OpcObjectNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjectnode/) → [OpcEventNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/) → **OpcConditionNode**

## Implements

<ul class="api-implements">
<li><a href="../opc.uafx.iopcnode/">IOpcNode</a></li>
<li><a href="../opc.uafx.iopcnodeinfo/">IOpcNodeInfo</a></li>
</ul>

## Derived types

- [OpcAcknowledgeableConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcacknowledgeableconditionnode/)
- [OpcDialogConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogconditionnode/)

## Remarks

Events of this type cause at least an event notification in case one of the following properties will change: [Quality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#quality), [Severity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/members#severity) and [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#comment).

## Constructors

| Name | Description |
|---|---|
| [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#opcconditionnode)<span class="api-meta">10 overloads</span> | Initializes a new instance of the OpcConditionNode class accessible by the `name` specified. |

## Properties

| Name | Description |
|---|---|
| [AddCommentCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#addcommentcallback) | Gets or sets a callback used to add a comment to the condition node. |
| [AddCommentNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#addcommentnode) | Gets the [OpcAddCommentMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddcommentmethodnode/) used to handle 'AddComment' method calls to add a comment to the condition node. |
| [AutoReportChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#autoreportchanges) | Gets or sets a value indicating whether the OpcConditionNode will automatically report an event when a change method call completes. |
| [BranchId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#branchid) | Gets or sets an identifier which identifies the branch to that the event does belong. |
| [BranchIdNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#branchidnode) | Gets the [OpcNodeIdPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidpropertynode/) of the [BranchId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#branchid) property. |
| [ClientUserId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#clientuserid) | Gets or sets an identifier that is related to the [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#comment) and contains the identity of the user who inserted the most recent [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#comment). |
| [ClientUserIdNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#clientuseridnode) | Gets the [OpcPropertyNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpropertynode-1/) of the [ClientUserId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#clientuserid) property. |
| [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#comment) | Gets or sets the last comment provided for a certain state (condition branch). |
| [CommentNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#commentnode) | Gets the [OpcTextConditionVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextconditionvariablenode/) of the [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#comment) property. |
| [ConditionClassId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionclassid) | Gets or sets a value which specifies in which domain this condition is used. |
| [ConditionClassIdNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionclassidnode) | Gets the [OpcNodeIdPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidpropertynode/) of the [ConditionClassId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionclassid) property. |
| [ConditionClassName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionclassname) | Gets or sets a value that matches the display name of the condition class type. |
| [ConditionClassNameNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionclassnamenode) | Gets the [OpcTextPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextpropertynode/) of the [ConditionClassName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionclassname) property. |
| [ConditionName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionname) | Gets or sets a value which identifies the condition instance that the event originated from. |
| [ConditionNameNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionnamenode) | Gets the [OpcPropertyNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpropertynode-1/) of the [ConditionName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#conditionname) property. |
| [DefaultTypeDefinitionId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#defaulttypedefinitionid)<span class="api-meta">protected · override</span> | Gets the default identifier which identifies the node that defines the underlying node type from that this [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) has been created. |
| [DisableCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#disablecallback) | Gets or sets a callback used to disable the condition node. |
| [DisableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#disablenode) | Gets the [OpcActionMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcactionmethodnode/) used to handle 'Disable' method calls to disable the condition. |
| [EnableCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#enablecallback) | Gets or sets a callback used to enable the condition node. |
| [EnableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#enablenode) | Gets the [OpcActionMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcactionmethodnode/) used to handle 'Enable' method calls to enable the condition. |
| [IsEnabled](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isenabled) | Gets a value indicating whether the condition is enabled. |
| [IsEnabledNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isenablednode) | Gets the [OpcTwoStateVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/) of the [IsEnabled](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isenabled) property. |
| [IsRetained](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isretained) | Gets or sets a value indicating whether the condition is in a state that is interesting for a client wishing to synchronize its state with the server's state. |
| [IsRetainedNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isretainednode) | Gets the [OpcPropertyNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpropertynode-1/) of the [IsRetained](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isretained) property. |
| [IsRetainedPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isretainedpolicy)<span class="api-meta">since v2.55</span> | Gets or sets the evaluation policy that controls the lifecycle of the [IsRetained](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#isretained) property for this OpcConditionNode. |
| [LastSeverity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#lastseverity) | Gets or sets a value which provides the previous severity of the condition branch. |
| [LastSeverityNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#lastseveritynode) | Gets the [OpcConditionVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionvariablenode-1/) of the [LastSeverity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#lastseverity) property. |
| [Quality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#quality) | Gets or sets a value which reveals the status of process values or other resources that this condition is based upon. |
| [QualityNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#qualitynode) | Gets the [OpcStatusConditionVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatusconditionvariablenode/) of the [Quality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#quality) property. |

## Methods

| Name | Description |
|---|---|
| [AddComment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#addcomment)<span class="api-meta">2 overloads</span> | Applies a comment to the state reported by an event notification which can be identified by the [EventId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/members#eventid) using the specified `context`. |
| [AddCommentCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#addcommentcore)<span class="api-meta">protected · virtual</span> | Applies the `comment` to the state of the condition node. |
| [CreateBranch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#createbranch)<span class="api-meta">2 overloads</span> | Creates a new instance of the OpcConditionNode class which can be used to maintain branched event information. |
| [CreateBranchCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#createbranchcore)<span class="api-meta">protected · virtual</span> | Creates a new instance of the OpcConditionNode using the same [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#id) and [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#name) as this node. |
| [Disable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#disable) | Changes the condition state to 'Disabled' using the specified `context`. |
| [DisableCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#disablecore)<span class="api-meta">protected · virtual</span> | Disables the condition node. |
| [Enable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#enable) | Changes the condition state to 'Enabled' using the specified `context`. |
| [EnableCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#enablecore)<span class="api-meta">protected · virtual</span> | Enables the condition node. |
| [InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/members#initializedefaults)<span class="api-meta">protected · override</span> | Initializes the default values used by the OpcConditionNode. |

Inherits members from [OpcEventNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/members), [OpcObjectNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjectnode/members), [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/members), [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members).

## Extension methods

| Name | Description |
|---|---|
| [OpcConditionNodeExtension.AddComment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionnodeextension/members#addcomment) | Applies a comment to the state reported by an event notification which can be identified by the [EventId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/members#eventid) of the `conditionNode` specified using the further specified `client`. |
| [OpcConditionNodeExtension.ChangeComment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcconditionnodeextension/members#changecomment) | Changes the condition 'Comment' state of the `conditionNode` specified using the further specified `context` without raising change events. |
| [OpcConditionNodeExtension.ChangeIsEnabled](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcconditionnodeextension/members#changeisenabled) | Changes the condition 'Enabled' state of the `conditionNode` specified using the further specified `context` without raising change events. |
| [OpcConditionNodeExtension.ChangeSeverity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcconditionnodeextension/members#changeseverity) | Changes the condition 'Severity' of the `conditionNode` specified using the further specified `context` without raising change events. |
| [OpcConditionNodeExtension.Disable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionnodeextension/members#disable) | Changes the condition state to 'Disabled' of the `conditionNode` specified using the further specified `client`. |
| [OpcConditionNodeExtension.Enable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionnodeextension/members#enable) | Changes the condition state to 'Enabled' of the `conditionNode` specified using the further specified `client`. |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
