Table of Contents

Class AsyncDevice

Namespace
Harp.SyringePump
Assembly
Harp.SyringePump.dll

Represents an asynchronous API to configure and interface with SyringePump devices.

public class AsyncDevice : AsyncDevice, IDisposable
Inheritance
AsyncDevice
Implements
Inherited Members

Methods

ReadDI0TriggerAsync(CancellationToken)

Asynchronously reads the contents of the DI0Trigger register.

public Task<DI0TriggerConfig> ReadDI0TriggerAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DI0TriggerConfig>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadDO0SyncAsync(CancellationToken)

Asynchronously reads the contents of the DO0Sync register.

public Task<DO0SyncConfig> ReadDO0SyncAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DO0SyncConfig>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadDO1SyncAsync(CancellationToken)

Asynchronously reads the contents of the DO1Sync register.

public Task<DO1SyncConfig> ReadDO1SyncAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DO1SyncConfig>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadDigitalInputStateAsync(CancellationToken)

Asynchronously reads the contents of the DigitalInputState register.

public Task<DigitalInputs> ReadDigitalInputStateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DigitalInputs>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadDigitalOutputClearAsync(CancellationToken)

Asynchronously reads the contents of the DigitalOutputClear register.

public Task<DigitalOutputs> ReadDigitalOutputClearAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DigitalOutputs>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadDigitalOutputSetAsync(CancellationToken)

Asynchronously reads the contents of the DigitalOutputSet register.

public Task<DigitalOutputs> ReadDigitalOutputSetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DigitalOutputs>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadDirectionAsync(CancellationToken)

Asynchronously reads the contents of the Direction register.

public Task<DirectionState> ReadDirectionAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<DirectionState>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadEnableEventsAsync(CancellationToken)

Asynchronously reads the contents of the EnableEvents register.

public Task<PumpEvents> ReadEnableEventsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<PumpEvents>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadEnableMotorDriverAsync(CancellationToken)

Asynchronously reads the contents of the EnableMotorDriver register.

public Task<EnableFlag> ReadEnableMotorDriverAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<EnableFlag>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadEnableProtocolAsync(CancellationToken)

Asynchronously reads the contents of the EnableProtocol register.

public Task<EnableFlag> ReadEnableProtocolAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<EnableFlag>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadForwardSwitchAsync(CancellationToken)

Asynchronously reads the contents of the ForwardSwitch register.

public Task<ForwardSwitchState> ReadForwardSwitchAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<ForwardSwitchState>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadProtocolAsync(CancellationToken)

Asynchronously reads the contents of the Protocol register.

public Task<ProtocolState> ReadProtocolAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<ProtocolState>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadProtocolDirectionAsync(CancellationToken)

Asynchronously reads the contents of the ProtocolDirection register.

public Task<ProtocolDirectionState> ReadProtocolDirectionAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<ProtocolDirectionState>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadProtocolPeriodAsync(CancellationToken)

Asynchronously reads the contents of the ProtocolPeriod register.

public Task<ushort> ReadProtocolPeriodAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<ushort>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadProtocolStepCountAsync(CancellationToken)

Asynchronously reads the contents of the ProtocolStepCount register.

public Task<ushort> ReadProtocolStepCountAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<ushort>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadReverseSwitchAsync(CancellationToken)

Asynchronously reads the contents of the ReverseSwitch register.

public Task<ReverseSwitchState> ReadReverseSwitchAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<ReverseSwitchState>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadStepAsync(CancellationToken)

Asynchronously reads the contents of the Step register.

public Task<StepState> ReadStepAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<StepState>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadStepModeAsync(CancellationToken)

Asynchronously reads the contents of the StepMode register.

public Task<StepModeType> ReadStepModeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<StepModeType>

A task that represents the asynchronous read operation. The Result property contains the register payload.

ReadTimestampedDI0TriggerAsync(CancellationToken)

Asynchronously reads the timestamped contents of the DI0Trigger register.

public Task<Timestamped<DI0TriggerConfig>> ReadTimestampedDI0TriggerAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DI0TriggerConfig>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedDO0SyncAsync(CancellationToken)

Asynchronously reads the timestamped contents of the DO0Sync register.

public Task<Timestamped<DO0SyncConfig>> ReadTimestampedDO0SyncAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DO0SyncConfig>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedDO1SyncAsync(CancellationToken)

Asynchronously reads the timestamped contents of the DO1Sync register.

public Task<Timestamped<DO1SyncConfig>> ReadTimestampedDO1SyncAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DO1SyncConfig>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedDigitalInputStateAsync(CancellationToken)

Asynchronously reads the timestamped contents of the DigitalInputState register.

public Task<Timestamped<DigitalInputs>> ReadTimestampedDigitalInputStateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DigitalInputs>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedDigitalOutputClearAsync(CancellationToken)

Asynchronously reads the timestamped contents of the DigitalOutputClear register.

public Task<Timestamped<DigitalOutputs>> ReadTimestampedDigitalOutputClearAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DigitalOutputs>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedDigitalOutputSetAsync(CancellationToken)

Asynchronously reads the timestamped contents of the DigitalOutputSet register.

public Task<Timestamped<DigitalOutputs>> ReadTimestampedDigitalOutputSetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DigitalOutputs>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedDirectionAsync(CancellationToken)

Asynchronously reads the timestamped contents of the Direction register.

public Task<Timestamped<DirectionState>> ReadTimestampedDirectionAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<DirectionState>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedEnableEventsAsync(CancellationToken)

Asynchronously reads the timestamped contents of the EnableEvents register.

public Task<Timestamped<PumpEvents>> ReadTimestampedEnableEventsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<PumpEvents>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedEnableMotorDriverAsync(CancellationToken)

Asynchronously reads the timestamped contents of the EnableMotorDriver register.

public Task<Timestamped<EnableFlag>> ReadTimestampedEnableMotorDriverAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<EnableFlag>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedEnableProtocolAsync(CancellationToken)

Asynchronously reads the timestamped contents of the EnableProtocol register.

public Task<Timestamped<EnableFlag>> ReadTimestampedEnableProtocolAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<EnableFlag>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedForwardSwitchAsync(CancellationToken)

Asynchronously reads the timestamped contents of the ForwardSwitch register.

public Task<Timestamped<ForwardSwitchState>> ReadTimestampedForwardSwitchAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<ForwardSwitchState>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedProtocolAsync(CancellationToken)

Asynchronously reads the timestamped contents of the Protocol register.

public Task<Timestamped<ProtocolState>> ReadTimestampedProtocolAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<ProtocolState>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedProtocolDirectionAsync(CancellationToken)

Asynchronously reads the timestamped contents of the ProtocolDirection register.

public Task<Timestamped<ProtocolDirectionState>> ReadTimestampedProtocolDirectionAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<ProtocolDirectionState>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedProtocolPeriodAsync(CancellationToken)

Asynchronously reads the timestamped contents of the ProtocolPeriod register.

public Task<Timestamped<ushort>> ReadTimestampedProtocolPeriodAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<ushort>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedProtocolStepCountAsync(CancellationToken)

Asynchronously reads the timestamped contents of the ProtocolStepCount register.

public Task<Timestamped<ushort>> ReadTimestampedProtocolStepCountAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<ushort>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedReverseSwitchAsync(CancellationToken)

Asynchronously reads the timestamped contents of the ReverseSwitch register.

public Task<Timestamped<ReverseSwitchState>> ReadTimestampedReverseSwitchAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<ReverseSwitchState>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedStepAsync(CancellationToken)

Asynchronously reads the timestamped contents of the Step register.

public Task<Timestamped<StepState>> ReadTimestampedStepAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<StepState>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

ReadTimestampedStepModeAsync(CancellationToken)

Asynchronously reads the timestamped contents of the StepMode register.

public Task<Timestamped<StepModeType>> ReadTimestampedStepModeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<Timestamped<StepModeType>>

A task that represents the asynchronous read operation. The Result property contains the timestamped register payload.

WriteDI0TriggerAsync(DI0TriggerConfig, CancellationToken)

Asynchronously writes a value to the DI0Trigger register.

public Task WriteDI0TriggerAsync(DI0TriggerConfig value, CancellationToken cancellationToken = default)

Parameters

value DI0TriggerConfig

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteDO0SyncAsync(DO0SyncConfig, CancellationToken)

Asynchronously writes a value to the DO0Sync register.

public Task WriteDO0SyncAsync(DO0SyncConfig value, CancellationToken cancellationToken = default)

Parameters

value DO0SyncConfig

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteDO1SyncAsync(DO1SyncConfig, CancellationToken)

Asynchronously writes a value to the DO1Sync register.

public Task WriteDO1SyncAsync(DO1SyncConfig value, CancellationToken cancellationToken = default)

Parameters

value DO1SyncConfig

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteDigitalOutputClearAsync(DigitalOutputs, CancellationToken)

Asynchronously writes a value to the DigitalOutputClear register.

public Task WriteDigitalOutputClearAsync(DigitalOutputs value, CancellationToken cancellationToken = default)

Parameters

value DigitalOutputs

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteDigitalOutputSetAsync(DigitalOutputs, CancellationToken)

Asynchronously writes a value to the DigitalOutputSet register.

public Task WriteDigitalOutputSetAsync(DigitalOutputs value, CancellationToken cancellationToken = default)

Parameters

value DigitalOutputs

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteDirectionAsync(DirectionState, CancellationToken)

Asynchronously writes a value to the Direction register.

public Task WriteDirectionAsync(DirectionState value, CancellationToken cancellationToken = default)

Parameters

value DirectionState

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteEnableEventsAsync(PumpEvents, CancellationToken)

Asynchronously writes a value to the EnableEvents register.

public Task WriteEnableEventsAsync(PumpEvents value, CancellationToken cancellationToken = default)

Parameters

value PumpEvents

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteEnableMotorDriverAsync(EnableFlag, CancellationToken)

Asynchronously writes a value to the EnableMotorDriver register.

public Task WriteEnableMotorDriverAsync(EnableFlag value, CancellationToken cancellationToken = default)

Parameters

value EnableFlag

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteEnableProtocolAsync(EnableFlag, CancellationToken)

Asynchronously writes a value to the EnableProtocol register.

public Task WriteEnableProtocolAsync(EnableFlag value, CancellationToken cancellationToken = default)

Parameters

value EnableFlag

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteProtocolDirectionAsync(ProtocolDirectionState, CancellationToken)

Asynchronously writes a value to the ProtocolDirection register.

public Task WriteProtocolDirectionAsync(ProtocolDirectionState value, CancellationToken cancellationToken = default)

Parameters

value ProtocolDirectionState

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteProtocolPeriodAsync(ushort, CancellationToken)

Asynchronously writes a value to the ProtocolPeriod register.

public Task WriteProtocolPeriodAsync(ushort value, CancellationToken cancellationToken = default)

Parameters

value ushort

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteProtocolStepCountAsync(ushort, CancellationToken)

Asynchronously writes a value to the ProtocolStepCount register.

public Task WriteProtocolStepCountAsync(ushort value, CancellationToken cancellationToken = default)

Parameters

value ushort

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteStepAsync(StepState, CancellationToken)

Asynchronously writes a value to the Step register.

public Task WriteStepAsync(StepState value, CancellationToken cancellationToken = default)

Parameters

value StepState

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.

WriteStepModeAsync(StepModeType, CancellationToken)

Asynchronously writes a value to the StepMode register.

public Task WriteStepModeAsync(StepModeType value, CancellationToken cancellationToken = default)

Parameters

value StepModeType

The value to be stored in the register.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task

The task object representing the asynchronous write operation.