# OpcCondition Members

> Reference: Represents a snapshot of a 'Opc.UaFx.OpcConditionNode'.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcCondition</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 [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members).

## Constructors

### OpcCondition

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

Initializes a new instance of the [OpcCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/) class using the `dataStore` specified.

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

```csharp
public OpcCondition(IOpcReadOnlyNodeDataStore dataStore)
```

</div>

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

```vbnet
Public Sub New(dataStore As IOpcReadOnlyNodeDataStore)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `dataStore` | [IOpcReadOnlyNodeDataStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/) | The [IOpcReadOnlyNodeDataStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/) of the 'Opc.UaFx.OpcConditionNode' to represent. |

**Exceptions**

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

## Properties

### BranchId

Gets an identifier which identifies the branch to that the event does belong.

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

```csharp
public OpcNodeId BranchId { get; }
```

</div>

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

```vbnet
Public ReadOnly Property BranchId As OpcNodeId
```

</div>

**Property value**

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

The identifier of the branch. For more information see 'Opc.UaFx.OpcConditionNode.BranchId'.

### 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).

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

```csharp
public string ClientUserId { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ClientUserId As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The identifier that is related to the [Comment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members#comment). For more information see 'Opc.UaFx.OpcConditionNode.ClientUserId'.

### Comment

Gets the last comment provided for a certain state (condition branch).

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

```csharp
public OpcText Comment { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Comment As OpcText
```

</div>

**Property value**

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

The last comment provided for a certain state. For more information see 'Opc.UaFx.OpcConditionNode.Comment'.

### ConditionClassId

Gets a value which specifies in which domain this condition is used. It is the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the corresponding condition class type.

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

```csharp
public OpcNodeId ConditionClassId { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ConditionClassId As OpcNodeId
```

</div>

**Property value**

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

The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the corresponding condition class type. For more information see 'Opc.UaFx.OpcConditionNode.ConditionClassId'.

### ConditionClassName

Gets a value that matches the display name of the condition class type.

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

```csharp
public OpcText ConditionClassName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ConditionClassName As OpcText
```

</div>

**Property value**

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

The display name of the condition class type. For more information see 'Opc.UaFx.OpcConditionNode.ConditionClassName'.

### ConditionName

Gets a value which identifies the condition instance that the event originated from.

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

```csharp
public string ConditionName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ConditionName As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The name of the condition instance that the event originated from. For more information see 'Opc.UaFx.OpcConditionNode.ConditionName'.

### IsEnabled

Gets a value indicating whether the condition is enabled.

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

```csharp
public bool IsEnabled { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsEnabled As Boolean
```

</div>

**Property value**

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

A value indicating whether the condition is enabled. For more information see 'Opc.UaFx.OpcConditionNode.IsEnabled'.

### 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.

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

```csharp
public bool IsRetained { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsRetained As Boolean
```

</div>

**Property value**

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

The value true if the condition (or condition branch) is being in a state that is interesting for a client wishing to synchronize its state with the server's state. For more information see 'Opc.UaFx.OpcConditionNode.IsRetained'.

### LastSeverity

Gets a value which provides the previous severity of the condition branch.

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

```csharp
public OpcEventSeverity LastSeverity { get; }
```

</div>

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

```vbnet
Public ReadOnly Property LastSeverity As OpcEventSeverity
```

</div>

**Property value**

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

One of the members defined by the [OpcEventSeverity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventseverity/) enumeration. For more information see 'Opc.UaFx.OpcConditionNode.LastSeverity'.

### Quality

Gets a value which reveals the status of process values or other resources that this condition is based upon.

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

```csharp
public OpcStatus Quality { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Quality As OpcStatus
```

</div>

**Property value**

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

The quality of data that this condition is based upon. For more information see 'Opc.UaFx.OpcConditionNode.Quality'.
