# OpcCondition 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">OpcCondition Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Represents a snapshot of a 'Opc.UaFx.OpcConditionNode'.

## Syntax

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

```csharp
public class OpcCondition : OpcEvent
```

</div>

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

```vbnet
Public Class OpcCondition
    Inherits OpcEvent
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) → **OpcCondition**

## Derived types

- [OpcAcknowledgeableCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcacknowledgeablecondition/)
- [OpcDialogCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/)

## Constructors

| Name | Description |
|---|---|
| [OpcCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#opccondition)<span class="api-meta">since v2.8</span> | Initializes a new instance of the OpcCondition class using the `dataStore` specified. |

## Properties

| Name | Description |
|---|---|
| [BranchId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#branchid) | Gets an identifier which identifies the branch to that the event does belong. |
| [ClientUserId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#clientuserid) | Gets an identifier that is related to the [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/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.opccondition/members#comment). |
| [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#comment) | Gets the last comment provided for a certain state (condition branch). |
| [ConditionClassId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#conditionclassid) | Gets a value which specifies in which domain this condition is used. |
| [ConditionClassName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#conditionclassname) | Gets a value that matches the display name of the condition class type. |
| [ConditionName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#conditionname) | Gets a value which identifies the condition instance that the event originated from. |
| [IsEnabled](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#isenabled) | Gets a value indicating whether the condition is enabled. |
| [IsRetained](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#isretained) | Gets 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. |
| [LastSeverity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#lastseverity) | Gets a value which provides the previous severity of the condition branch. |
| [Quality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#quality) | Gets a value which reveals the status of process values or other resources that this condition is based upon. |

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

## Extension methods

| Name | Description |
|---|---|
| [OpcConditionExtension.AddComment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionextension/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.opcevent/members#eventid) of the `condition` specified using the further specified `client`. |
| [OpcConditionExtension.Disable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionextension/members#disable) | Changes the condition state to 'Disabled' of the `condition` specified using the further specified `client`. |
| [OpcConditionExtension.Enable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionextension/members#enable) | Changes the condition state to 'Enabled' of the `condition` specified using the further specified `client`. |

## Applies to

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