Table of Contents

Class Device

Namespace
Harp.LedArray
Assembly
Harp.LedArray.dll

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

LedArray
whoAmI1088
firmwareVersion2.4
hardwareTargets1.1

Registers

name address type length access description range interfaceType
EnablePower 32 U8 Write Control the enable of both LEDs' power supply. LedState
EnableLedMode 33 U8 Write Start/stop the LEDs according to the pulse configuration. LedState
EnableLed 34 U8 Write, Event Enables/disables the LEDs. LedState
DigitalInputState 35 U8 Event State of the digital input pins. An event will be emitted when the value of any digital input pin changes. DigitalInputs
DigitalOutputSync 36 U8 Write Configuration of the digital outputs behavior. DigitalOutputSyncPayload
DigitalInputTrigger 37 U8 Write Configuration of the digital inputs pins behavior. DigitalInputTriggerPayload
PulseMode 38 U8 Write Sets the pulse mode used by the LEDs. PulseModePayload
Led0Power 39 U8 Write Sets the power to LED0, between 1 and 120 (arbitrary units). [1:120]
Led1Power 40 U8 Write Sets the power to LED1, between 1 and 120 (arbitrary units). [1:120]
Led0PwmFrequency 41 Float Write Sets the frequency (Hz) of LED0 when in Pwm mode, between 0.5 and 2000. [0.5:2000]
Led0PwmDutyCycle 42 Float Write Sets the duty cycle (%) of LED0 when in Pwm mode, between 0.1 and 99.9. [0.1:99.9]
Led0PwmPulseCounter 43 U16 Write Sets the number of pulses of LED0 when in Pwm mode, between 1 and 65535. [1:65535]
Led0PulseTimeOn 44 U16 Write Sets the time on (milliseconds) of LED0 when in PulseTime mode, between 1 and 65535. [1:65535]
Led0PulseTimeOff 45 U16 Write Sets the time off (milliseconds) of LED0 when in PulseTime mode, between 1 and 65535. [1:65535]
Led0PulseTimePulseCounter 46 U16 Write Sets the number of pulses of LED0 when in PulseTime mode, between 1 and 65535. [1:65535]
Led0PulseTimeTail 47 U16 Write Sets the wait time between pulses (milliseconds) of LED0 when in PulseTime mode, between 1 and 65535. [1:65535]
Led0PulseRepeatCounter 48 U16 Write Sets the number of repetitions of LED0 pulse protocol when in PulseTime mode, between 1 and 65535. [1:65535]
Led1PwmFrequency 49 Float Write Sets the frequency (Hz) of LED1 when in Pwm mode, between 0.5 and 2000. [0.5:2000]
Led1PwmDutyCycle 50 Float Write Sets the duty cycle (%) of LED1 when in Pwm mode, between 0.1 and 99.9. [0.1:99.9]
Led1PwmPulseCounter 51 U16 Write Sets the number of pulses of LED1 when in Pwm mode, between 1 and 65535. [1:65535]
Led1PulseTimeOn 52 U16 Write Sets the time on (milliseconds) of LED1 when in PulseTime mode, between 1 and 65535. [1:65535]
Led1PulseTimeOff 53 U16 Write Sets the time off (milliseconds) of LED1 when in PulseTime mode, between 1 and 65535. [1:65535]
Led1PulseTimePulseCounter 54 U16 Write Sets the number of pulses of LED1 when in PulseTime mode, between 1 and 65535. [1:65535]
Led1PulseTimeTail 55 U16 Write Sets the wait time between pulses (milliseconds) of LED1 when in PulseTime mode, between 1 and 65535. [1:65535]
Led1PulseRepeatCounter 56 U16 Write Sets the number of repetitions of LED1 pulse protocol when in PulseTime mode, between 1 and 65535. [1:65535]
Led0PwmReal 57 Float Read Get the real frequency (Hz) of LED0 when in Pwm mode.
Led0PwmDutyCycleReal 58 Float Read Get the real duty cycle (%) of LED0 when in Pwm mode.
Led1PwmReal 59 Float Read Get the real frequency (Hz) of LED1 when in Pwm mode.
LedD1PwmDutyCycleReal 60 Float Read Get the real duty cycle (%) of LED1 when in Pwm mode.
AuxDigitalOutputState 61 U8 Write Write the state of the auxiliary digital output bit. AuxDigitalOutputs
AuxLedPower 62 U8 Write Sets the power to be applied to auxiliary LED, between 1 and 120. [1:120]
DigitalOutputState 63 U8 Write Write the state of digital output lines. DigitalOutputs
EnableEvents 65 U8 Write Specifies all the active events in the device. LedArrayEvents
[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.LedArray device. This field is constant.

public const int WhoAmI = 1088

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