Class Device
- Namespace
- Harp.OutputExpander
- Assembly
- Harp.OutputExpander.dll
Represents an observable source of messages from the Harp device connected at the specified serial port.
OutputExpander | |
---|---|
whoAmI | 1108 |
firmwareVersion | 2.2 |
hardwareTargets | 1.2 |
Registers
name | address | type | length | access | description | range | interfaceType |
---|---|---|---|---|---|---|---|
AuxInState | 32 | U8 | Event | Reports the state of the auxiliary inputs. | AuxiliaryInputs | ||
AuxInRisingEdge | 33 | U8 | Write | Enables rising edge detection on the auxiliary inputs. | AuxiliaryInputs | ||
AuxInFallingEdge | 34 | U8 | Write | Enables falling edge detection on the auxiliary input port. | AuxiliaryInputs | ||
OutputSet | 35 | U16 | Write | Set the specified digital output lines. | DigitalOutputs | ||
OutputClear | 36 | U16 | Write | Clear the specified digital output lines | DigitalOutputs | ||
OutputToggle | 37 | U16 | Write | Toggle the specified digital output lines | DigitalOutputs | ||
OutputState | 38 | U16 | Write | Write the state of all digital output lines | DigitalOutputs | ||
PwmAndStimEnable | 39 | U16 | Write | Enables PWM and stimulation on the specified digital output lines. | PwmAndStimMappings | ||
PwmAndStimDisable | 40 | U16 | Write | Disables PWM and stimulation on the specified digital output lines. | PwmAndStimMappings | ||
PwmAndStimState | 41 | U16 | Write | Writes the mapping between PWM/stimulation and the specified digital output lines in a single command. | PwmAndStimMappings | ||
Pwm0Frequency | 42 | Float | Write | Sets the frequency of PWM0 (Hz). | [0.5:1000] | ||
Pwm0DutyCycle | 43 | Float | Write | Sets the duty cycle of PWM0 (%). | 50 [1:100] | ||
Pwm0PulseCount | 44 | U16 | Write | Sets the number of pulses to generate for PWM0. | |||
Pwm0ActualFrequency | 45 | Float | Read | Reports the actual frequency to be generated from PWM0 (Hz). | |||
Pwm0ActualDutyCycle | 46 | Float | Read | Reports the actual duty cycle to be generated from PWM0 (%). | |||
Pwm0AcquisitionMode | 47 | U8 | Write | Sets the acquisition mode of PWM0. | AcquisitionMode | ||
Pwm0TriggerSource | 48 | U8 | Write | Sets the trigger source of PWM0. | TriggerSource | ||
Pwm0EventConfig | 49 | U8 | Write | Enables the generation of events for PWM0. | EnableFlag | ||
Pwm1Frequency | 50 | Float | Write | Sets the frequency of PWM1 (Hz). | [0.5:1000] | ||
Pwm1DutyCycle | 51 | Float | Write | Sets the duty cycle of PWM1 (%). | 50 [1:100] | ||
Pwm1PulseCount | 52 | U16 | Write | Sets the number of pulses to generate for PWM1. | |||
Pwm1ActualFrequency | 53 | Float | Read | Reports the actual frequency to be generated from PWM1 (Hz). | |||
Pwm1ActualDutyCycle | 54 | Float | Read | Reports the actual duty cycle to be generated from PWM1 (%). | |||
Pwm1AcquisitionMode | 55 | U8 | Write | Sets the acquisition mode of PWM1. | AcquisitionMode | ||
Pwm1TriggerSource | 56 | U8 | Write | Sets the trigger source of PWM1. | TriggerSource | ||
Pwm1EventConfig | 57 | U8 | Write | Enables the generation of events for PWM1. | EnableFlag | ||
Pwm2Frequency | 58 | Float | Write | Sets the frequency of PWM2 (Hz). | [0.5:1000] | ||
Pwm2DutyCycle | 59 | Float | Write | Sets the duty cycle of PWM2 (%). | 50 [1:100] | ||
Pwm2PulseCount | 60 | U16 | Write | Sets the number of pulses to generate for PWM2. | |||
Pwm2ActualFrequency | 61 | Float | Read | Reports the actual frequency to be generated from PWM2 (Hz). | |||
Pwm2ActualDutyCycle | 62 | Float | Read | Reports the actual duty cycle to be generated from PWM2 (%). | |||
Pwm2AcquisitionMode | 63 | U8 | Write | Sets the acquisition mode of PWM2. | AcquisitionMode | ||
Pwm2TriggerSource | 64 | U8 | Write | Sets the trigger source of PWM2. | TriggerSource | ||
Pwm2EventConfig | 65 | U8 | Write | Enables the generation of events for PWM2. | EnableFlag | ||
PwmStart | 66 | U8 | Write, Event | Starts the a PWM on the specified channels. An event will be generated if the start was triggered by an auxiliary input. | PwmChannels | ||
PwmStop | 67 | U8 | Write | Stops the a PWM on the specified channels. | PwmChannels | ||
PwmRiseEvent | 68 | U8 | Write, Event | Enables the generation of an event on every rising edge of the PWM line. | PwmChannels | ||
Stim0PulseOnTime | 69 | U16 | Write | Sets the duration (us) each pulse is on for. | |||
Stim0PulseOffTime | 70 | U16 | Write | Sets the duration (us) each pulse is off for. | |||
Stim0PulseCount | 71 | U16 | Write | Sets the number of pulses to be generate when triggered. | |||
Stim0AcquisitionMode | 72 | U8 | Write | Sets the acquisition mode of Stim0. | AcquisitionMode | ||
Stim0TriggerSource | 73 | U8 | Write | Sets the trigger source of Stim0. | TriggerSource | ||
StimStart | 74 | U8 | Write | Starts a target Stim protocol. | StimChannels | ||
StimStop | 75 | U8 | Write | Stops the target Stim protocol. | StimChannels | ||
OutputPulse | 76 | U16 | Write | Enables pulse generation on the specified digital output line. | DigitalOutputs | ||
Out0PulseWidth | 77 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out1PulseWidth | 78 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out2PulseWidth | 79 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out3PulseWidth | 80 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out4PulseWidth | 81 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out5PulseWidth | 82 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out6PulseWidth | 83 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out7PulseWidth | 84 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out8PulseWidth | 85 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
Out9PulseWidth | 86 | U16 | Write | Sets the duration (ms) of the pulse to be generated on the specified digital output line. | |||
ExpansionBoard | 87 | U8 | Write | Selects the board to be interfaced with via the expansion port. | ExpansionBoardType | ||
MagneticEncoder | 90 | U16 | 2 | Event | Generated event with the latest read from the magnetic encoder. | MagneticEncoderPayload | |
MagneticEncoderSampleRate | 91 | U8 | Write | Sets the sample rate of the magnetic encoder. | MagneticEncoderSampleRateMode | ||
ServoPeriod | 94 | U16 | Write | Sets the period of the servo pulses (us). | |||
Servo0PulseWidth | 95 | U16 | Write | Sets the pulse width of the Servo0 pulses (us). | |||
Servo1PulseWidth | 96 | U16 | Write | Sets the pulse width of the Servo1 pulses (us). | |||
Servo2PulseWidth | 97 | U16 | Write | Sets the pulse width of the Servo2 pulses (us). | |||
OpticalFlow | 100 | S16 | 3 | Event | Generated event with the latest read from the optical flow sensor. | OpticalFlowPayload |
[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.OutputExpander device. This field is constant.
public const int WhoAmI = 1108
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 OutputExpander 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.