# CMxIndirect Class

Namespace: `ArchestrA.Toolkit`

CMxIndirect is a support class that allows a user to connect to an external attribute and read/write its value.

**Syntax**

```csharp
public class CMxIndirect : CMxIndirectBase
```

## CMxIndirect Properties

### Value Property

Allows a user to read/write the value of the referenced attribute.

**Syntax**

```csharp
public CMxValue Value { get; set; }
```

**Returns**

CMxValue

### DataQualityOfLastRead Property

There are several methods that cause the value of the referenced attribute to be read, that is, Value, TestRead but they do not directly return the data quality. This property contains the data quality of the last read attribute so that it can be used.

**Syntax**

```csharp
public CMxDataQuality DataQualityOfLastRead { get; }
```

**Returns**

CMxDataQuality

### StatusOfLastRead Property

There are several methods that cause the value of the referenced attribute to be read, that is, Value, TestRead but do not directly return the status. This property contains the status of the last read so that it can be checked.

**Syntax**

```csharp
public MxStatus StatusOfLastRead { get; }
```

**Returns**

MxStatus

### TestRead Property

TestRead performs a read check on the indirect but does not return the value. It returns true if the status of the read was successful. The data quality and full status can be accessed by DataQualityOfLastRead and StatusOfLastRead.

**Syntax**

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

**Returns**

bool

### TimeStampOfLastRead Property

There are several methods that cause the value of the referenced attribute to be read, that is, Value, TestRead but do not directly return the timestamp. This property contains the timestamp of the last read so that it can be used.

**Syntax**

```csharp
DateTime TimeStampOfLastRead { get; }
```

**Returns**

DateTime

## CMxIndirect Constructor

### CMxIndirect Constructor string,string,IMxSupervisoryConnection3,RuntimeBase, int,short,int

This is an internal constructor intended for use only in BindTo.

**Syntax**

```csharp
CMxIndirect(string _fullRefString, string _context, IMxSupervisoryConnection3 _superConn, RuntimeBase _rb, int _refHandle, short _statusId, int _statusIndex)
```

**Parameters**

**`_fullRefString`**

[in] Full reference string of the attribute to bind to.

**`_context`**

[in] Context of the reference.

**`_superConn`**

[in] A supervisory connection to the runtime.

**`_rb`**

[in] handle to the RuntimeBase class instance that created this indirect.

**`_refHandle`**

[in] The ArchestrA reference handle of the registered reference.

**`_statusId`**

[in] The attribute id of the dynamic array that holds the write status.

**`_statusIndex`**

[in] The index of the element in the dynamic status array that this reference uses.

## CMxIndirect Method

### Get Method

Provides a method to get the value, timestamp, and data quality of the referenced attribute in a single operation.

**Syntax**

```csharp
public bool Get(out CMxValue value, out DateTime timeStamp, out CMxDataQuality quality);
```

**Parameters**

**`value`**

[out] the value of the reference attribute.

**`timestamp`**

[out] the timestamp of the reference attribute.

**`quality`**

[out] the data quality of the reference attribute.

**Returns**

bool
