IAccessorRawValue.ReadArrayElementRawAsync Method

Reads the array element value as bytes asynchronously.

Namespace:  TwinCAT.ValueAccess
Assembly:  TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 6.0.328+39e3229

Syntax

C#

Task<ResultReadRawAccess> ReadArrayElementRawAsync(
    IArrayInstance arrayInstance,
    int[] indices,
    Memory<byte> readBuffer,
    CancellationToken cancel
)

Parameters

arrayInstance

Type: TwinCAT.TypeSystem.IArrayInstance
The array instance.

indices

Type: .System.Int32.
The indices, which specify the element to read.

readBuffer

Type: System.Memory.Byte.
Read buffer where to read the data

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultReadRawAccess.
A task that represents the asynchronous 'ReadArrayElementRaw' operation. The ResultReadRawAccess result contains the (Value) and the ErrorCode after execution.

Reference

IAccessorRawValue Interface

TwinCAT.ValueAccess Namespace