Class Device
Represents an observable source of messages from the Harp device connected at the specified serial port.
Behavior | |
---|---|
whoAmI | 1216 |
firmwareVersion | 3.2 |
hardwareTargets | 1.1 |
Registers
name | address | type | length | access | description | range | interfaceType |
---|---|---|---|---|---|---|---|
DigitalInputState | 32 | U8 | Event | Reflects the state of DI digital lines of each Port | DigitalInputs | ||
OutputSet | 34 | U16 | Write | Set the specified digital output lines. | DigitalOutputs | ||
OutputClear | 35 | U16 | Write | Clear the specified digital output lines | DigitalOutputs | ||
OutputToggle | 36 | U16 | Write | Toggle the specified digital output lines | DigitalOutputs | ||
OutputState | 37 | U16 | Write | Write the state of all digital output lines | DigitalOutputs | ||
PortDIOSet | 38 | U8 | Write | Set the specified port DIO lines | PortDigitalIOS | ||
PortDIOClear | 39 | U8 | Write | Clear the specified port DIO lines | PortDigitalIOS | ||
PortDIOToggle | 40 | U8 | Write | Toggle the specified port DIO lines | PortDigitalIOS | ||
PortDIOState | 41 | U8 | Write | Write the state of all port DIO lines | PortDigitalIOS | ||
PortDIODirection | 42 | U8 | Write | Specifies which of the port DIO lines are outputs | PortDigitalIOS | ||
PortDIOStateEvent | 43 | U8 | Event | Specifies the state of the port DIO lines on a line change | PortDigitalIOS | ||
AnalogData | 44 | S16 | 3 | Event | Voltage at the ADC input and encoder value on Port 2 | AnalogDataPayload | |
OutputPulseEnable | 45 | U16 | Write | Enables the pulse function for the specified output lines | DigitalOutputs | ||
PulseDOPort0 | 46 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseDOPort1 | 47 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseDOPort2 | 48 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseSupplyPort0 | 49 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseSupplyPort1 | 50 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseSupplyPort2 | 51 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseLed0 | 52 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseLed1 | 53 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseRgb0 | 54 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseRgb1 | 55 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseDO0 | 56 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseDO1 | 57 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseDO2 | 58 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PulseDO3 | 59 | U16 | Write | Specifies the duration of the output pulse in milliseconds. | [1:] | ||
PwmFrequencyDO0 | 60 | U16 | Write | Specifies the frequency of the PWM at DO0. | [1:] | ||
PwmFrequencyDO1 | 61 | U16 | Write | Specifies the frequency of the PWM at DO1. | [1:] | ||
PwmFrequencyDO2 | 62 | U16 | Write | Specifies the frequency of the PWM at DO2. | [1:] | ||
PwmFrequencyDO3 | 63 | U16 | Write | Specifies the frequency of the PWM at DO3. | [1:] | ||
PwmDutyCycleDO0 | 64 | U8 | Write | Specifies the duty cycle of the PWM at DO0. | [1:99] | ||
PwmDutyCycleDO1 | 65 | U8 | Write | Specifies the duty cycle of the PWM at DO1. | [1:99] | ||
PwmDutyCycleDO2 | 66 | U8 | Write | Specifies the duty cycle of the PWM at DO2. | [1:99] | ||
PwmDutyCycleDO3 | 67 | U8 | Write | Specifies the duty cycle of the PWM at DO3. | [1:99] | ||
PwmStart | 68 | U8 | Write | Starts the PWM on the selected output lines. | PwmOutputs | ||
PwmStop | 69 | U8 | Write | Stops the PWM on the selected output lines. | PwmOutputs | ||
RgbAll | 70 | U8 | 6 | Write | Specifies the state of all RGB LED channels. | RgbAllPayload | |
Rgb0 | 71 | U8 | 3 | Write | Specifies the state of the RGB0 LED channels. | RgbPayload | |
Rgb1 | 72 | U8 | 3 | Write | Specifies the state of the RGB1 LED channels. | RgbPayload | |
Led0Current | 73 | U8 | Write | Specifies the configuration of current to drive LED 0. | [2:100] | ||
Led1Current | 74 | U8 | Write | Specifies the configuration of current to drive LED 1. | [2:100] | ||
Led0MaxCurrent | 75 | U8 | Write | Specifies the configuration of current to drive LED 0. | [5:100] | ||
Led1MaxCurrent | 76 | U8 | Write | Specifies the configuration of current to drive LED 1. | [5:100] | ||
EventEnable | 77 | U8 | Write | Specifies the active events in the device. | Events | ||
StartCameras | 78 | U8 | Write | Specifies the camera outputs to enable in the device. | CameraOutputs | ||
StopCameras | 79 | U8 | Write | Specifies the camera outputs to disable in the device. | CameraOutputs | ||
EnableServos | 80 | U8 | Write | Specifies the servo outputs to enable in the device. | ServoOutputs | ||
DisableServos | 81 | U8 | Write | Specifies the servo outputs to disable in the device. | ServoOutputs | ||
EnableEncoders | 82 | U8 | Write | Specifies the port quadrature counters to enable in the device. | EncoderInputs | ||
EncoderMode | 83 | U8 | Write | Configures the operation mode of the quadrature encoders. | EncoderModeConfig | ||
Camera0Frame | 92 | U8 | Event | Specifies that a frame was acquired on camera 0. | FrameAcquired | ||
Camera0Frequency | 93 | U16 | Write | Specifies the trigger frequency for camera 0. | [1:600] | ||
Camera1Frame | 94 | U8 | Event | Specifies that a frame was acquired on camera 1. | FrameAcquired | ||
Camera1Frequency | 95 | U16 | Write | Specifies the trigger frequency for camera 1. | [1:600] | ||
ServoMotor2Period | 100 | U16 | Write | Specifies the period of the servo motor in DO2, in microseconds. | [2:65534] | ||
ServoMotor2Pulse | 101 | U16 | Write | Specifies the pulse of the servo motor in DO2, in microseconds. | [6:65530] | ||
ServoMotor3Period | 102 | U16 | Write | Specifies the period of the servo motor in DO3, in microseconds. | [2:65534] | ||
ServoMotor3Pulse | 103 | U16 | Write | Specifies the pulse of the servo motor in DO3, in microseconds. | [6:65530] | ||
EncoderReset | 108 | U8 | Write | Reset the counter of the specified encoders to zero. | EncoderInputs | ||
EnableSerialTimestamp | 110 | U8 | Write | Enables the timestamp for serial TX. | |||
MimicPort0IR | 111 | U8 | Write | Specifies the digital output to mimic the Port 0 IR state. | MimicOutput | ||
MimicPort1IR | 112 | U8 | Write | Specifies the digital output to mimic the Port 1 IR state. | MimicOutput | ||
MimicPort2IR | 113 | U8 | Write | Specifies the digital output to mimic the Port 2 IR state. | MimicOutput | ||
MimicPort0Valve | 117 | U8 | Write | Specifies the digital output to mimic the Port 0 valve state. | MimicOutput | ||
MimicPort1Valve | 118 | U8 | Write | Specifies the digital output to mimic the Port 1 valve state. | MimicOutput | ||
MimicPort2Valve | 119 | U8 | Write | Specifies the digital output to mimic the Port 2 valve state. | MimicOutput | ||
PokeInputFilter | 122 | U8 | Write | Specifies the low pass filter time value for poke inputs, in ms. |
[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.Behavior device. This field is constant.
public const int WhoAmI = 1216
Field Value
Properties
RegisterMap
Gets a read-only mapping from address to register type.
public static IReadOnlyDictionary<int, Type> RegisterMap { get; }
Property Value
Methods
CreateAsync(string)
Initializes a new instance of the asynchronous API to configure and interface with Behavior devices on the specified serial port.
public static Task<AsyncDevice> CreateAsync(string portName)
Parameters
portName
stringThe 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.