Table of Contents

Class Device

Namespace
Harp.AnalogInput
Assembly
Harp.AnalogInput.dll

Represents an observable source of messages from the Harp device connected at the specified serial port.

AnalogInput
whoAmI1236
firmwareVersion1.2
hardwareTargets1.0

Registers

name address type length access description range interfaceType
AcquisitionState 32 U8 Write Enables the data acquisition. EnableFlag
AnalogData 33 S16 4 Event Value from a single read of all ADC channels. AnalogDataPayload
DigitalInputState 34 U8 Event State of the digital input pin 0. DigitalInputs
RangeAndFilter 37 U8 Write Sets the range and LowPass filter cutoff of the ADC. RangeAndFilterConfig
SamplingRate 38 U8 Write Sets the sampling frequency of the ADC. SamplingRateMode
DI0Trigger 39 U8 Write Configuration of the digital input pin 0. TriggerConfig
DO0Sync 40 U8 Write Configuration of the digital output pin 0. SyncConfig
DO0PulseWidth 41 U8 Write Pulse duration (ms) for the digital output pin 0. The pulse will only be emitted when DO0Sync == Pulse. [1:250]
DigitalOutputSet 42 U8 Write Set the specified digital output lines. DigitalOutputs
DigitalOutputClear 43 U8 Write Clear the specified digital output lines. DigitalOutputs
DigitalOutputToggle 44 U8 Write Toggle the specified digital output lines DigitalOutputs
DigitalOutputState 45 U8 Write, Event Write the state of all digital output lines. An event will be emitted when the value of any pin was changed by a threshold event. DigitalOutputs
SyncOutput 48 U8 Write Digital output that will be set when acquisition starts. StartSyncOutputTarget
DO0TargetChannel 58 U8 Write Target ADC channel that will be used to trigger a threshold event on DO0 pin. AdcChannel
DO1TargetChannel 59 U8 Write Target ADC channel that will be used to trigger a threshold event on DO1 pin. AdcChannel
DO2TargetChannel 60 U8 Write Target ADC channel that will be used to trigger a threshold event on DO2 pin. AdcChannel
DO3TargetChannel 61 U8 Write Target ADC channel that will be used to trigger a threshold event on DO3 pin. AdcChannel
DO0Threshold 66 S16 Write Value used to threshold an ADC read, and trigger DO0 pin.
DO1Threshold 67 S16 Write Value used to threshold an ADC read, and trigger DO1 pin.
DO2Threshold 68 S16 Write Value used to threshold an ADC read, and trigger DO2 pin.
DO3Threshold 69 S16 Write Value used to threshold an ADC read, and trigger DO3 pin.
DO0TimeAboveThreshold 74 U16 Write Time (ms) above threshold value that is required to trigger a DO0 pin event. 0
DO1TimeAboveThreshold 75 U16 Write Time (ms) above threshold value that is required to trigger a DO1 pin event. 0
DO2TimeAboveThreshold 76 U16 Write Time (ms) above threshold value that is required to trigger a DO2 pin event. 0
DO3TimeAboveThreshold 77 U16 Write Time (ms) above threshold value that is required to trigger a DO3 pin event. 0
DO0TimeBelowThreshold 82 U16 Write Time (ms) below threshold value that is required to trigger a DO0 pin event. 0
DO1TimeBelowThreshold 83 U16 Write Time (ms) below threshold value that is required to trigger a DO1 pin event. 0
DO2TimeBelowThreshold 84 U16 Write Time (ms) below threshold value that is required to trigger a DO2 pin event. 0
DO3TimeBelowThreshold 85 U16 Write Time (ms) below threshold value that is required to trigger a DO3 pin event. 0
[Combinator(MethodName = "Generate")]
[WorkflowElementCategory(ElementCategory.Source)]
public class Device : Device, INamedElement
Inheritance
Device
Implements
Inherited Members

Constructors

Device()

Initializes a new instance of the Device class.

public Device()

Fields

WhoAmI

Represents the unique identity class of the Harp.AnalogInput device. This field is constant.

public const int WhoAmI = 1236

Field Value

int

Properties

RegisterMap

Gets a read-only mapping from address to register type.

public static IReadOnlyDictionary<int, Type> RegisterMap { get; }

Property Value

IReadOnlyDictionary<int, Type>

Methods

CreateAsync(string)

Initializes a new instance of the asynchronous API to configure and interface with AnalogInput devices on the specified serial port.

public static Task<AsyncDevice> CreateAsync(string portName)

Parameters

portName string

The name of the serial port used to communicate with the Harp device.

Returns

Task<AsyncDevice>

A task that represents the asynchronous initialization operation. The value of the Result parameter contains a new instance of the AsyncDevice class.