Skip to content

Modules

harp.devices.behavior #

AnalogDataPayload dataclass #

AnalogDataPayload(AnalogInput0: int, Encoder: int, AnalogInput1: int)

Parameters:

Name Type Description Default
AnalogInput0 int
required
Encoder int
required
AnalogInput1 int
required

Behavior #

Bases: Device

Behavior class for controlling the device.

read_analog_data() #

Reads the contents of the AnalogData register.

Returns:

Type Description
AnalogDataPayload

Value read from the AnalogData register.

read_camera0_frame() #

Reads the contents of the Camera0Frame register.

Returns:

Type Description
FrameAcquired

Value read from the Camera0Frame register.

read_camera0_frequency() #

Reads the contents of the Camera0Frequency register.

Returns:

Type Description
int

Value read from the Camera0Frequency register.

read_camera1_frame() #

Reads the contents of the Camera1Frame register.

Returns:

Type Description
FrameAcquired

Value read from the Camera1Frame register.

read_camera1_frequency() #

Reads the contents of the Camera1Frequency register.

Returns:

Type Description
int

Value read from the Camera1Frequency register.

read_digital_input_state() #

Reads the contents of the DigitalInputState register.

Returns:

Type Description
DigitalInputs

Value read from the DigitalInputState register.

read_disable_servos() #

Reads the contents of the DisableServos register.

Returns:

Type Description
ServoOutputs

Value read from the DisableServos register.

read_enable_encoders() #

Reads the contents of the EnableEncoders register.

Returns:

Type Description
EncoderInputs

Value read from the EnableEncoders register.

read_enable_serial_timestamp() #

Reads the contents of the EnableSerialTimestamp register.

Returns:

Type Description
int

Value read from the EnableSerialTimestamp register.

read_enable_servos() #

Reads the contents of the EnableServos register.

Returns:

Type Description
ServoOutputs

Value read from the EnableServos register.

read_encoder_mode() #

Reads the contents of the EncoderMode register.

Returns:

Type Description
EncoderModeConfig

Value read from the EncoderMode register.

read_encoder_reset() #

Reads the contents of the EncoderReset register.

Returns:

Type Description
EncoderInputs

Value read from the EncoderReset register.

read_event_enable() #

Reads the contents of the EventEnable register.

Returns:

Type Description
Events

Value read from the EventEnable register.

read_led0_current() #

Reads the contents of the Led0Current register.

Returns:

Type Description
int

Value read from the Led0Current register.

read_led0_max_current() #

Reads the contents of the Led0MaxCurrent register.

Returns:

Type Description
int

Value read from the Led0MaxCurrent register.

read_led1_current() #

Reads the contents of the Led1Current register.

Returns:

Type Description
int

Value read from the Led1Current register.

read_led1_max_current() #

Reads the contents of the Led1MaxCurrent register.

Returns:

Type Description
int

Value read from the Led1MaxCurrent register.

read_mimic_port0_ir() #

Reads the contents of the MimicPort0IR register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort0IR register.

read_mimic_port0_valve() #

Reads the contents of the MimicPort0Valve register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort0Valve register.

read_mimic_port1_ir() #

Reads the contents of the MimicPort1IR register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort1IR register.

read_mimic_port1_valve() #

Reads the contents of the MimicPort1Valve register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort1Valve register.

read_mimic_port2_ir() #

Reads the contents of the MimicPort2IR register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort2IR register.

read_mimic_port2_valve() #

Reads the contents of the MimicPort2Valve register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort2Valve register.

read_output_clear() #

Reads the contents of the OutputClear register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputClear register.

read_output_pulse_enable() #

Reads the contents of the OutputPulseEnable register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputPulseEnable register.

read_output_set() #

Reads the contents of the OutputSet register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputSet register.

read_output_state() #

Reads the contents of the OutputState register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputState register.

read_output_toggle() #

Reads the contents of the OutputToggle register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputToggle register.

read_poke_input_filter() #

Reads the contents of the PokeInputFilter register.

Returns:

Type Description
int

Value read from the PokeInputFilter register.

read_port_dio_clear() #

Reads the contents of the PortDIOClear register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOClear register.

read_port_dio_direction() #

Reads the contents of the PortDIODirection register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIODirection register.

read_port_dio_set() #

Reads the contents of the PortDIOSet register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOSet register.

read_port_dio_state() #

Reads the contents of the PortDIOState register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOState register.

read_port_dio_state_event() #

Reads the contents of the PortDIOStateEvent register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOStateEvent register.

read_port_dio_toggle() #

Reads the contents of the PortDIOToggle register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOToggle register.

read_pulse_do0() #

Reads the contents of the PulseDO0 register.

Returns:

Type Description
int

Value read from the PulseDO0 register.

read_pulse_do1() #

Reads the contents of the PulseDO1 register.

Returns:

Type Description
int

Value read from the PulseDO1 register.

read_pulse_do2() #

Reads the contents of the PulseDO2 register.

Returns:

Type Description
int

Value read from the PulseDO2 register.

read_pulse_do3() #

Reads the contents of the PulseDO3 register.

Returns:

Type Description
int

Value read from the PulseDO3 register.

read_pulse_do_port0() #

Reads the contents of the PulseDOPort0 register.

Returns:

Type Description
int

Value read from the PulseDOPort0 register.

read_pulse_do_port1() #

Reads the contents of the PulseDOPort1 register.

Returns:

Type Description
int

Value read from the PulseDOPort1 register.

read_pulse_do_port2() #

Reads the contents of the PulseDOPort2 register.

Returns:

Type Description
int

Value read from the PulseDOPort2 register.

read_pulse_led0() #

Reads the contents of the PulseLed0 register.

Returns:

Type Description
int

Value read from the PulseLed0 register.

read_pulse_led1() #

Reads the contents of the PulseLed1 register.

Returns:

Type Description
int

Value read from the PulseLed1 register.

read_pulse_rgb0() #

Reads the contents of the PulseRgb0 register.

Returns:

Type Description
int

Value read from the PulseRgb0 register.

read_pulse_rgb1() #

Reads the contents of the PulseRgb1 register.

Returns:

Type Description
int

Value read from the PulseRgb1 register.

read_pulse_supply_port0() #

Reads the contents of the PulseSupplyPort0 register.

Returns:

Type Description
int

Value read from the PulseSupplyPort0 register.

read_pulse_supply_port1() #

Reads the contents of the PulseSupplyPort1 register.

Returns:

Type Description
int

Value read from the PulseSupplyPort1 register.

read_pulse_supply_port2() #

Reads the contents of the PulseSupplyPort2 register.

Returns:

Type Description
int

Value read from the PulseSupplyPort2 register.

read_pwm_duty_cycle_do0() #

Reads the contents of the PwmDutyCycleDO0 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO0 register.

read_pwm_duty_cycle_do1() #

Reads the contents of the PwmDutyCycleDO1 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO1 register.

read_pwm_duty_cycle_do2() #

Reads the contents of the PwmDutyCycleDO2 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO2 register.

read_pwm_duty_cycle_do3() #

Reads the contents of the PwmDutyCycleDO3 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO3 register.

read_pwm_frequency_do0() #

Reads the contents of the PwmFrequencyDO0 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO0 register.

read_pwm_frequency_do1() #

Reads the contents of the PwmFrequencyDO1 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO1 register.

read_pwm_frequency_do2() #

Reads the contents of the PwmFrequencyDO2 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO2 register.

read_pwm_frequency_do3() #

Reads the contents of the PwmFrequencyDO3 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO3 register.

read_pwm_start() #

Reads the contents of the PwmStart register.

Returns:

Type Description
PwmOutputs

Value read from the PwmStart register.

read_pwm_stop() #

Reads the contents of the PwmStop register.

Returns:

Type Description
PwmOutputs

Value read from the PwmStop register.

read_rgb0() #

Reads the contents of the Rgb0 register.

Returns:

Type Description
RgbPayload

Value read from the Rgb0 register.

read_rgb1() #

Reads the contents of the Rgb1 register.

Returns:

Type Description
RgbPayload

Value read from the Rgb1 register.

read_rgb_all() #

Reads the contents of the RgbAll register.

Returns:

Type Description
RgbAllPayload

Value read from the RgbAll register.

read_servo_motor2_period() #

Reads the contents of the ServoMotor2Period register.

Returns:

Type Description
int

Value read from the ServoMotor2Period register.

read_servo_motor2_pulse() #

Reads the contents of the ServoMotor2Pulse register.

Returns:

Type Description
int

Value read from the ServoMotor2Pulse register.

read_servo_motor3_period() #

Reads the contents of the ServoMotor3Period register.

Returns:

Type Description
int

Value read from the ServoMotor3Period register.

read_servo_motor3_pulse() #

Reads the contents of the ServoMotor3Pulse register.

Returns:

Type Description
int

Value read from the ServoMotor3Pulse register.

read_start_cameras() #

Reads the contents of the StartCameras register.

Returns:

Type Description
CameraOutputs

Value read from the StartCameras register.

read_stop_cameras() #

Reads the contents of the StopCameras register.

Returns:

Type Description
CameraOutputs

Value read from the StopCameras register.

write_camera0_frequency(value) #

Writes a value to the Camera0Frequency register.

Parameters:

Name Type Description Default
value int

Value to write to the Camera0Frequency register.

required

write_camera1_frequency(value) #

Writes a value to the Camera1Frequency register.

Parameters:

Name Type Description Default
value int

Value to write to the Camera1Frequency register.

required

write_disable_servos(value) #

Writes a value to the DisableServos register.

Parameters:

Name Type Description Default
value ServoOutputs

Value to write to the DisableServos register.

required

write_enable_encoders(value) #

Writes a value to the EnableEncoders register.

Parameters:

Name Type Description Default
value EncoderInputs

Value to write to the EnableEncoders register.

required

write_enable_serial_timestamp(value) #

Writes a value to the EnableSerialTimestamp register.

Parameters:

Name Type Description Default
value int

Value to write to the EnableSerialTimestamp register.

required

write_enable_servos(value) #

Writes a value to the EnableServos register.

Parameters:

Name Type Description Default
value ServoOutputs

Value to write to the EnableServos register.

required

write_encoder_mode(value) #

Writes a value to the EncoderMode register.

Parameters:

Name Type Description Default
value EncoderModeConfig

Value to write to the EncoderMode register.

required

write_encoder_reset(value) #

Writes a value to the EncoderReset register.

Parameters:

Name Type Description Default
value EncoderInputs

Value to write to the EncoderReset register.

required

write_event_enable(value) #

Writes a value to the EventEnable register.

Parameters:

Name Type Description Default
value Events

Value to write to the EventEnable register.

required

write_led0_current(value) #

Writes a value to the Led0Current register.

Parameters:

Name Type Description Default
value int

Value to write to the Led0Current register.

required

write_led0_max_current(value) #

Writes a value to the Led0MaxCurrent register.

Parameters:

Name Type Description Default
value int

Value to write to the Led0MaxCurrent register.

required

write_led1_current(value) #

Writes a value to the Led1Current register.

Parameters:

Name Type Description Default
value int

Value to write to the Led1Current register.

required

write_led1_max_current(value) #

Writes a value to the Led1MaxCurrent register.

Parameters:

Name Type Description Default
value int

Value to write to the Led1MaxCurrent register.

required

write_mimic_port0_ir(value) #

Writes a value to the MimicPort0IR register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort0IR register.

required

write_mimic_port0_valve(value) #

Writes a value to the MimicPort0Valve register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort0Valve register.

required

write_mimic_port1_ir(value) #

Writes a value to the MimicPort1IR register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort1IR register.

required

write_mimic_port1_valve(value) #

Writes a value to the MimicPort1Valve register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort1Valve register.

required

write_mimic_port2_ir(value) #

Writes a value to the MimicPort2IR register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort2IR register.

required

write_mimic_port2_valve(value) #

Writes a value to the MimicPort2Valve register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort2Valve register.

required

write_output_clear(value) #

Writes a value to the OutputClear register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputClear register.

required

write_output_pulse_enable(value) #

Writes a value to the OutputPulseEnable register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputPulseEnable register.

required

write_output_set(value) #

Writes a value to the OutputSet register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputSet register.

required

write_output_state(value) #

Writes a value to the OutputState register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputState register.

required

write_output_toggle(value) #

Writes a value to the OutputToggle register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputToggle register.

required

write_poke_input_filter(value) #

Writes a value to the PokeInputFilter register.

Parameters:

Name Type Description Default
value int

Value to write to the PokeInputFilter register.

required

write_port_dio_clear(value) #

Writes a value to the PortDIOClear register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOClear register.

required

write_port_dio_direction(value) #

Writes a value to the PortDIODirection register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIODirection register.

required

write_port_dio_set(value) #

Writes a value to the PortDIOSet register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOSet register.

required

write_port_dio_state(value) #

Writes a value to the PortDIOState register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOState register.

required

write_port_dio_toggle(value) #

Writes a value to the PortDIOToggle register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOToggle register.

required

write_pulse_do0(value) #

Writes a value to the PulseDO0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO0 register.

required

write_pulse_do1(value) #

Writes a value to the PulseDO1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO1 register.

required

write_pulse_do2(value) #

Writes a value to the PulseDO2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO2 register.

required

write_pulse_do3(value) #

Writes a value to the PulseDO3 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO3 register.

required

write_pulse_do_port0(value) #

Writes a value to the PulseDOPort0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDOPort0 register.

required

write_pulse_do_port1(value) #

Writes a value to the PulseDOPort1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDOPort1 register.

required

write_pulse_do_port2(value) #

Writes a value to the PulseDOPort2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDOPort2 register.

required

write_pulse_led0(value) #

Writes a value to the PulseLed0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseLed0 register.

required

write_pulse_led1(value) #

Writes a value to the PulseLed1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseLed1 register.

required

write_pulse_rgb0(value) #

Writes a value to the PulseRgb0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseRgb0 register.

required

write_pulse_rgb1(value) #

Writes a value to the PulseRgb1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseRgb1 register.

required

write_pulse_supply_port0(value) #

Writes a value to the PulseSupplyPort0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseSupplyPort0 register.

required

write_pulse_supply_port1(value) #

Writes a value to the PulseSupplyPort1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseSupplyPort1 register.

required

write_pulse_supply_port2(value) #

Writes a value to the PulseSupplyPort2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseSupplyPort2 register.

required

write_pwm_duty_cycle_do0(value) #

Writes a value to the PwmDutyCycleDO0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO0 register.

required

write_pwm_duty_cycle_do1(value) #

Writes a value to the PwmDutyCycleDO1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO1 register.

required

write_pwm_duty_cycle_do2(value) #

Writes a value to the PwmDutyCycleDO2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO2 register.

required

write_pwm_duty_cycle_do3(value) #

Writes a value to the PwmDutyCycleDO3 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO3 register.

required

write_pwm_frequency_do0(value) #

Writes a value to the PwmFrequencyDO0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO0 register.

required

write_pwm_frequency_do1(value) #

Writes a value to the PwmFrequencyDO1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO1 register.

required

write_pwm_frequency_do2(value) #

Writes a value to the PwmFrequencyDO2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO2 register.

required

write_pwm_frequency_do3(value) #

Writes a value to the PwmFrequencyDO3 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO3 register.

required

write_pwm_start(value) #

Writes a value to the PwmStart register.

Parameters:

Name Type Description Default
value PwmOutputs

Value to write to the PwmStart register.

required

write_pwm_stop(value) #

Writes a value to the PwmStop register.

Parameters:

Name Type Description Default
value PwmOutputs

Value to write to the PwmStop register.

required

write_rgb0(value) #

Writes a value to the Rgb0 register.

Parameters:

Name Type Description Default
value RgbPayload

Value to write to the Rgb0 register.

required

write_rgb1(value) #

Writes a value to the Rgb1 register.

Parameters:

Name Type Description Default
value RgbPayload

Value to write to the Rgb1 register.

required

write_rgb_all(value) #

Writes a value to the RgbAll register.

Parameters:

Name Type Description Default
value RgbAllPayload

Value to write to the RgbAll register.

required

write_servo_motor2_period(value) #

Writes a value to the ServoMotor2Period register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor2Period register.

required

write_servo_motor2_pulse(value) #

Writes a value to the ServoMotor2Pulse register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor2Pulse register.

required

write_servo_motor3_period(value) #

Writes a value to the ServoMotor3Period register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor3Period register.

required

write_servo_motor3_pulse(value) #

Writes a value to the ServoMotor3Pulse register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor3Pulse register.

required

write_start_cameras(value) #

Writes a value to the StartCameras register.

Parameters:

Name Type Description Default
value CameraOutputs

Value to write to the StartCameras register.

required

write_stop_cameras(value) #

Writes a value to the StopCameras register.

Parameters:

Name Type Description Default
value CameraOutputs

Value to write to the StopCameras register.

required

BehaviorRegisters #

Bases: IntEnum

Enum for all available registers in the Behavior device.

Attributes:

Name Type Description
DIGITAL_INPUT_STATE int

Reflects the state of DI digital lines of each Port

OUTPUT_SET int

Set the specified digital output lines.

OUTPUT_CLEAR int

Clear the specified digital output lines

OUTPUT_TOGGLE int

Toggle the specified digital output lines

OUTPUT_STATE int

Write the state of all digital output lines

PORT_DIO_SET int

Set the specified port DIO lines

PORT_DIO_CLEAR int

Clear the specified port DIO lines

PORT_DIO_TOGGLE int

Toggle the specified port DIO lines

PORT_DIO_STATE int

Write the state of all port DIO lines

PORT_DIO_DIRECTION int

Specifies which of the port DIO lines are outputs

PORT_DIO_STATE_EVENT int

Specifies the state of the port DIO lines on a line change

ANALOG_DATA int

Voltage at the ADC input and encoder value on Port 2

OUTPUT_PULSE_ENABLE int

Enables the pulse function for the specified output lines

PULSE_DO_PORT0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO_PORT1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO_PORT2 int

Specifies the duration of the output pulse in milliseconds.

PULSE_SUPPLY_PORT0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_SUPPLY_PORT1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_SUPPLY_PORT2 int

Specifies the duration of the output pulse in milliseconds.

PULSE_LED0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_LED1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_RGB0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_RGB1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO2 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO3 int

Specifies the duration of the output pulse in milliseconds.

PWM_FREQUENCY_DO0 int

Specifies the frequency of the PWM at DO0.

PWM_FREQUENCY_DO1 int

Specifies the frequency of the PWM at DO1.

PWM_FREQUENCY_DO2 int

Specifies the frequency of the PWM at DO2.

PWM_FREQUENCY_DO3 int

Specifies the frequency of the PWM at DO3.

PWM_DUTY_CYCLE_DO0 int

Specifies the duty cycle of the PWM at DO0.

PWM_DUTY_CYCLE_DO1 int

Specifies the duty cycle of the PWM at DO1.

PWM_DUTY_CYCLE_DO2 int

Specifies the duty cycle of the PWM at DO2.

PWM_DUTY_CYCLE_DO3 int

Specifies the duty cycle of the PWM at DO3.

PWM_START int

Starts the PWM on the selected output lines.

PWM_STOP int

Stops the PWM on the selected output lines.

RGB_ALL int

Specifies the state of all RGB LED channels.

RGB0 int

Specifies the state of the RGB0 LED channels.

RGB1 int

Specifies the state of the RGB1 LED channels.

LED0_CURRENT int

Specifies the configuration of current to drive LED 0.

LED1_CURRENT int

Specifies the configuration of current to drive LED 1.

LED0_MAX_CURRENT int

Specifies the configuration of current to drive LED 0.

LED1_MAX_CURRENT int

Specifies the configuration of current to drive LED 1.

EVENT_ENABLE int

Specifies the active events in the device.

START_CAMERAS int

Specifies the camera outputs to enable in the device.

STOP_CAMERAS int

Specifies the camera outputs to disable in the device. An event will be issued when the trigger signal is actually stopped being generated.

ENABLE_SERVOS int

Specifies the servo outputs to enable in the device.

DISABLE_SERVOS int

Specifies the servo outputs to disable in the device.

ENABLE_ENCODERS int

Specifies the port quadrature counters to enable in the device.

ENCODER_MODE int

Configures the operation mode of the quadrature encoders.

CAMERA0_FRAME int

Specifies that a frame was acquired on camera 0.

CAMERA0_FREQUENCY int

Specifies the trigger frequency for camera 0.

CAMERA1_FRAME int

Specifies that a frame was acquired on camera 1.

CAMERA1_FREQUENCY int

Specifies the trigger frequency for camera 1.

SERVO_MOTOR2_PERIOD int

Specifies the period of the servo motor in DO2, in microseconds.

SERVO_MOTOR2_PULSE int

Specifies the pulse of the servo motor in DO2, in microseconds.

SERVO_MOTOR3_PERIOD int

Specifies the period of the servo motor in DO3, in microseconds.

SERVO_MOTOR3_PULSE int

Specifies the pulse of the servo motor in DO3, in microseconds.

ENCODER_RESET int

Reset the counter of the specified encoders to zero.

ENABLE_SERIAL_TIMESTAMP int

Enables the timestamp for serial TX.

MIMIC_PORT0_IR int

Specifies the digital output to mimic the Port 0 IR state.

MIMIC_PORT1_IR int

Specifies the digital output to mimic the Port 1 IR state.

MIMIC_PORT2_IR int

Specifies the digital output to mimic the Port 2 IR state.

MIMIC_PORT0_VALVE int

Specifies the digital output to mimic the Port 0 valve state.

MIMIC_PORT1_VALVE int

Specifies the digital output to mimic the Port 1 valve state.

MIMIC_PORT2_VALVE int

Specifies the digital output to mimic the Port 2 valve state.

POKE_INPUT_FILTER int

Specifies the low pass filter time value for poke inputs, in ms.

CameraOutputs #

Bases: IntFlag

Specifies camera output enable bits.

Attributes:

Name Type Description
CAMERA_OUTPUT0 int

No description currently available

CAMERA_OUTPUT1 int

No description currently available

Device #

The Device class provides the interface for interacting with Harp devices. This implementation of the Harp device was based on the official documentation available on the harp-tech website.

Attributes:

Name Type Description
WHO_AM_I int

The device ID number. A list of devices can be found here

DEFAULT_DEVICE_NAME str

The device name, i.e. "Behavior". This name is derived by cross-referencing the WHO_AM_I identifier with the corresponding device name in the device_names dictionary

HW_VERSION_H int

The major hardware version

HW_VERSION_L int

The minor hardware version

ASSEMBLY_VERSION int

The version of the assembled components

HARP_VERSION_H int

The major Harp core version

HARP_VERSION_L int

The minor Harp core version

FIRMWARE_VERSION_H int

The major firmware version

FIRMWARE_VERSION_L int

The minor firmware version

DEVICE_NAME str

The device name stored in the Harp device

SERIAL_NUMBER (int, optional)

The serial number of the device

__enter__() #

Support for using Device with 'with' statement.

Returns:

Type Description
Device

The Device instance

__exit__(exc_type, exc_val, exc_tb) #

Cleanup resources when exiting the 'with' block.

Parameters:

Name Type Description Default
exc_type Exception type or None

Type of the exception that caused the context to be exited

required
exc_val Exception or None

Exception instance that caused the context to be exited

required
exc_tb traceback or None

Traceback if an exception occurred

required

__init__(serial_port, dump_file_path=None, read_timeout_s=1, timeout_strategy=TimeoutStrategy.RAISE) #

Parameters:

Name Type Description Default
serial_port str

The serial port used to establish the connection with the Harp device. It must be denoted as /dev/ttyUSBx in Linux and COMx in Windows, where x is the number of the serial port

required
dump_file_path Optional[str]

The binary file to which all Harp messages will be written

None
read_timeout_s float

TODO

1

alive_en(enable) #

Sets the ALIVE_EN bit of the device.

Parameters:

Name Type Description Default
enable bool

If True, enables the ALIVE_EN bit. If False, disables it

required

Returns:

Type Description
bool

True if the operation was successful, False otherwise

connect() #

Connects to the Harp device.

disconnect() #

Disconnects from the Harp device.

dump_registers() #

Asserts the DUMP bit to dump the values of all core and app registers as Harp Read Reply Messages. More information on the DUMP bit can be found here.

Returns:

Type Description
list

The list containing the reply Harp messages for all the device's registers

event_count() #

Gets the number of events in the event queue.

Returns:

Type Description
int

The number of events in the event queue

get_events() #

Gets all events from the event queue.

Returns:

Type Description
list

The list containing every Harp event message that were on the queue

info() #

Prints the device information.

load() #

Loads the data stored in the device's common registers.

mute_reply(enable) #

Sets the MUTE_REPLY bit of the device.

Parameters:

Name Type Description Default
enable bool

If True, the Replies to all the Commands are muted. If False, un-mutes them

required

Returns:

Type Description
bool

True if the operation was successful, False otherwise

op_led_en(enable) #

Sets the operation LED of the device.

Parameters:

Name Type Description Default
enable bool

If True, enables the operation LED. If False, disables it

required

Returns:

Type Description
bool

True if the operation was successful, False otherwise

read_float(address) #

Reads the value of a register of type Float.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_operation_ctrl() #

Reads the OPERATION_CTRL register of the device.

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

read_s16(address) #

Reads the value of a register of type S16.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_s32(address) #

Reads the value of a register of type S32.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_s64(address) #

Reads the value of a register of type S64.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_s8(address) #

Reads the value of a register of type S8.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_u16(address) #

Reads the value of a register of type U16.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_u32(address) #

Reads the value of a register of type U32.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_u64(address) #

Reads the value of a register of type U64.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

read_u8(address) #

Reads the value of a register of type U8.

Parameters:

Name Type Description Default
address int

The register to be read

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message that will contain the value read from the register

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

reset_device(reset_mode=ResetMode.RST_DEF) #

Resets the device and reboots with all the registers with the default values. Beware that the EEPROM will be erased. More information on the reset device register can be found here.

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

send(message, *, expect_reply=True, timeout_strategy=None) #

Sends a Harp message and (optionally) waits for a reply.

Parameters:

Name Type Description Default
message HarpMessage

The HarpMessage to be sent to the device

required
expect_reply bool

If False, do not wait for a reply (fire-and-forget)

True
timeout_strategy TimeoutStrategy | None

Override the device-level timeout strategy for this call

None

Returns:

Type Description
ReplyHarpMessage | None

Reply (or None when allowed by the timeout strategy or expect_reply=False)

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

set_clock_config(clock_config) #

Sets the clock configuration of the device.

Parameters:

Name Type Description Default
clock_config ClockConfig

The clock configuration value

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

set_mode(mode) #

Sets the operation mode of the device.

Parameters:

Name Type Description Default
mode DeviceMode

The new device mode value

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

set_timestamp_offset(timestamp_offset) #

When the value of this register is above 0 (zero), the device's timestamp will be offset by this amount. The register is sensitive to 500 microsecond increments. This register is non-volatile.

Parameters:

Name Type Description Default
timestamp_offset int

The timestamp offset value

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

visual_en(enable) #

Sets the status led of the device.

Parameters:

Name Type Description Default
enable bool

If True, enables the status led. If False, disables it

required

Returns:

Type Description
bool

True if the operation was successful, False otherwise

write_float(address, value) #

Writes the value of a register of type Float.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value float | list[float]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_operation_ctrl(mode=None, mute_rpl=None, visual_en=None, op_led_en=None, alive_en=None) #

Writes the OPERATION_CTRL register of the device.

Parameters:

Name Type Description Default
mode OperationMode

The new operation mode value

None
mute_rpl bool

If True, the Replies to all the Commands are muted

None
visual_en bool

If True, enables the status led

None
op_led_en bool

If True, enables the operation LED

None
alive_en bool

If True, enables the ALIVE_EN bit

None

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

write_s16(address, value) #

Writes the value of a register of type S16.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_s32(address, value) #

Writes the value of a register of type S32.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_s64(address, value) #

Writes the value of a register of type S64.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_s8(address, value) #

Writes the value of a register of type S8.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_u16(address, value) #

Writes the value of a register of type U16.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_u32(address, value) #

Writes the value of a register of type U32.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_u64(address, value) #

Writes the value of a register of type U64.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

write_u8(address, value) #

Writes the value of a register of type U8.

Parameters:

Name Type Description Default
address int

The register to be written on

required
value int | list[int]

The value to be written to the register

required

Returns:

Type Description
ReplyHarpMessage

The reply to the Harp message

Raises:

Type Description
HarpTimeoutError

If no reply is received and the effective strategy requires raising

DigitalInputs #

Bases: IntFlag

Specifies the state of port digital input lines.

Attributes:

Name Type Description
DI_PORT0 int

No description currently available

DI_PORT1 int

No description currently available

DI_PORT2 int

No description currently available

DI3 int

No description currently available

DigitalOutputs #

Bases: IntFlag

Specifies the state of port digital output lines.

Attributes:

Name Type Description
DO_PORT0 int

No description currently available

DO_PORT1 int

No description currently available

DO_PORT2 int

No description currently available

SUPPLY_PORT0 int

No description currently available

SUPPLY_PORT1 int

No description currently available

SUPPLY_PORT2 int

No description currently available

LED0 int

No description currently available

LED1 int

No description currently available

RGB0 int

No description currently available

RGB1 int

No description currently available

DO0 int

No description currently available

DO1 int

No description currently available

DO2 int

No description currently available

DO3 int

No description currently available

EncoderInputs #

Bases: IntFlag

Specifies quadrature counter enable bits.

Attributes:

Name Type Description
ENCODER_PORT2 int

No description currently available

EncoderModeConfig #

Bases: IntEnum

Specifies the type of reading made from the quadrature encoder.

Attributes:

Name Type Description
POSITION int

No description currently available

DISPLACEMENT int

No description currently available

Events #

Bases: IntFlag

Specifies the active events in the device.

Attributes:

Name Type Description
PORT_DI int

No description currently available

PORT_DIO int

No description currently available

ANALOG_DATA int

No description currently available

CAMERA0 int

No description currently available

CAMERA1 int

No description currently available

FrameAcquired #

Bases: IntFlag

Specifies that camera frame was acquired.

Attributes:

Name Type Description
FRAME_ACQUIRED int

No description currently available

HarpMessage #

The HarpMessage class implements the Harp message as described in the protocol.

Attributes:

Name Type Description
frame bytearray

The bytearray containing the whole Harp message

message_type MessageType

The message type

length int

The length parameter of the Harp message

address int

The address of the register to which the Harp message refers to

port int

Indicates the origin or destination of the Harp message in case the device is a hub of Harp devices. The value 255 points to the device itself (default value).

payload_type PayloadType

The payload type

checksum int

The sum of all bytes contained in the Harp message

address property #

The address of the register to which the Harp message refers to.

Returns:

Type Description
int

The address of the register to which the Harp message refers to

checksum property #

The sum of all bytes contained in the Harp message.

Returns:

Type Description
int

The sum of all bytes contained in the Harp message

frame property #

The bytearray containing the whole Harp message.

Returns:

Type Description
bytearray

The bytearray containing the whole Harp message

length property #

The length parameter of the Harp message.

Returns:

Type Description
int

The length parameter of the Harp message

message_type property #

The message type.

Returns:

Type Description
MessageType

The message type

payload property #

The payload sent in the write Harp message.

Returns:

Type Description
Union[int, list[int]]

The payload sent in the write Harp message

payload_type property #

The payload type.

Returns:

Type Description
PayloadType

The payload type

port property writable #

Indicates the origin or destination of the Harp message in case the device is a hub of Harp devices. The value 255 points to the device itself (default value).

Returns:

Type Description
int

The port value

__repr__() #

Prints debug representation of the reply message.

Returns:

Type Description
str

The debug representation of the reply message

__str__() #

Prints friendly representation of a Harp message.

Returns:

Type Description
str

The representation of the Harp message

calculate_checksum() #

Calculates the checksum of the Harp message.

Returns:

Type Description
int

The value of the checksum

create(message_type, address, payload_type, value=None) staticmethod #

Creates a Harp message.

Parameters:

Name Type Description Default
message_type MessageType

The message type. It can only be of type READ or WRITE

required
address int

The address of the register that the message will interact with

required
payload_type PayloadType

The payload type

required
value Optional[int | list[int] | float | list[float]]

The payload of the message. If message_type == MessageType.WRITE, the value cannot be None

None

parse(frame) staticmethod #

Parses a bytearray to a (reply) Harp message.

Parameters:

Name Type Description Default
frame bytearray

The bytearray will be parsed into a (reply) Harp message

required

Returns:

Type Description
ReplyHarpMessage

The Harp message object parsed from the original bytearray

HarpReadException #

Bases: HarpException

Exception raised when there is an error reading from a register in the Harp device.

HarpWriteException #

Bases: HarpException

Exception raised when there is an error writing to a register in the Harp device.

MessageType #

Bases: IntEnum

An enumeration of the allowed message types of a Harp message. More information on the MessageType byte of a Harp message can be found here.

Attributes:

Name Type Description
READ int

The value that corresponds to a Read Harp message (1)

WRITE int

The value that corresponds to a Write Harp message (2)

EVENT int

The value that corresponds to an Event Harp message (3). Messages of this type are only meant to be send by the device

READ_ERROR int

The value that corresponds to a Read Error Harp message (9). Messages of this type are only meant to be send by the device

WRITE_ERROR int

The value that corresponds to a Write Error Harp message (10). Messages of this type are only meant to be send by the device

MimicOutput #

Bases: IntEnum

Specifies the target IO on which to mimic the specified register.

Attributes:

Name Type Description
NONE int

No description currently available

DIO0 int

No description currently available

DIO1 int

No description currently available

DIO2 int

No description currently available

DO0 int

No description currently available

DO1 int

No description currently available

DO2 int

No description currently available

DO3 int

No description currently available

PayloadType #

Bases: IntEnum

An enumeration of the allowed payload types of a Harp message. More information on the PayloadType byte of a Harp message can be found here.

Attributes:

Name Type Description
U8 int

The value that corresponds to a message of type U8

S8 int

The value that corresponds to a message of type S8

U16 int

The value that corresponds to a message of type U16

S16 int

The value that corresponds to a message of type S16

U32 int

The value that corresponds to a message of type U32

S32 int

The value that corresponds to a message of type S32

U64 int

The value that corresponds to a message of type U64

S64 int

The value that corresponds to a message of type S64

Float int

The value that corresponds to a message of type Float

Timestamp int

The value that corresponds to a message of type Timestamp. This is not a valid PayloadType, but it is used to indicate that the message has a timestamp.

TimestampedU8 int

The value that corresponds to a message of type TimestampedU8

TimestampedS8 int

The value that corresponds to a message of type TimestampedS8

TimestampedU16 int

The value that corresponds to a message of type TimestampedU16

TimestampedS16 int

The value that corresponds to a message of type TimestampedS16

TimestampedU32 int

The value that corresponds to a message of type TimestampedU32

TimestampedS32 int

The value that corresponds to a message of type TimestampedS32

TimestampedU64 int

The value that corresponds to a message of type TimestampedU64

TimestampedS64 int

The value that corresponds to a message of type TimestampedS64

TimestampedFloat int

The value that corresponds to a message of type TimestampedFloat

PortDigitalIOS #

Bases: IntFlag

Specifies the state of the port DIO lines.

Attributes:

Name Type Description
DIO0 int

No description currently available

DIO1 int

No description currently available

DIO2 int

No description currently available

PwmOutputs #

Bases: IntFlag

Specifies the state of PWM output lines.

Attributes:

Name Type Description
PWM_DO0 int

No description currently available

PWM_DO1 int

No description currently available

PWM_DO2 int

No description currently available

PWM_DO3 int

No description currently available

ReplyHarpMessage #

Bases: HarpMessage

A response message from a Harp device.

Attributes:

Name Type Description
payload Union[int, list[int]]

The message payload formatted as the appropriate type

timestamp float

The Harp timestamp at which the message was sent

is_error property #

Indicates if this HarpMessage is an error message or not.

Returns:

Type Description
bool

Returns True if this HarpMessage is an error message, False otherwise.

timestamp property #

The Harp timestamp at which the message was sent.

Returns:

Type Description
float

The Harp timestamp at which the message was sent

__init__(frame) #

Parameters:

Name Type Description Default
frame bytearray

The Harp message in bytearray format

required

payload_as_string() #

Returns the payload as a str.

Returns:

Type Description
str

The payload parsed as a str

RgbAllPayload dataclass #

RgbAllPayload(Green0: int, Red0: int, Blue0: int, Green1: int, Red1: int, Blue1: int)

Parameters:

Name Type Description Default
Green0 int
required
Red0 int
required
Blue0 int
required
Green1 int
required
Red1 int
required
Blue1 int
required

RgbPayload dataclass #

RgbPayload(Green: int, Red: int, Blue: int)

Parameters:

Name Type Description Default
Green int
required
Red int
required
Blue int
required

ServoOutputs #

Bases: IntFlag

Specifies servo output enable bits.

Attributes:

Name Type Description
SERVO_OUTPUT2 int

No description currently available

SERVO_OUTPUT3 int

No description currently available

harpdevice #

AnalogDataPayload dataclass #

AnalogDataPayload(AnalogInput0: int, Encoder: int, AnalogInput1: int)

Parameters:

Name Type Description Default
AnalogInput0 int
required
Encoder int
required
AnalogInput1 int
required

Behavior #

Bases: Device

Behavior class for controlling the device.

read_analog_data() #

Reads the contents of the AnalogData register.

Returns:

Type Description
AnalogDataPayload

Value read from the AnalogData register.

read_camera0_frame() #

Reads the contents of the Camera0Frame register.

Returns:

Type Description
FrameAcquired

Value read from the Camera0Frame register.

read_camera0_frequency() #

Reads the contents of the Camera0Frequency register.

Returns:

Type Description
int

Value read from the Camera0Frequency register.

read_camera1_frame() #

Reads the contents of the Camera1Frame register.

Returns:

Type Description
FrameAcquired

Value read from the Camera1Frame register.

read_camera1_frequency() #

Reads the contents of the Camera1Frequency register.

Returns:

Type Description
int

Value read from the Camera1Frequency register.

read_digital_input_state() #

Reads the contents of the DigitalInputState register.

Returns:

Type Description
DigitalInputs

Value read from the DigitalInputState register.

read_disable_servos() #

Reads the contents of the DisableServos register.

Returns:

Type Description
ServoOutputs

Value read from the DisableServos register.

read_enable_encoders() #

Reads the contents of the EnableEncoders register.

Returns:

Type Description
EncoderInputs

Value read from the EnableEncoders register.

read_enable_serial_timestamp() #

Reads the contents of the EnableSerialTimestamp register.

Returns:

Type Description
int

Value read from the EnableSerialTimestamp register.

read_enable_servos() #

Reads the contents of the EnableServos register.

Returns:

Type Description
ServoOutputs

Value read from the EnableServos register.

read_encoder_mode() #

Reads the contents of the EncoderMode register.

Returns:

Type Description
EncoderModeConfig

Value read from the EncoderMode register.

read_encoder_reset() #

Reads the contents of the EncoderReset register.

Returns:

Type Description
EncoderInputs

Value read from the EncoderReset register.

read_event_enable() #

Reads the contents of the EventEnable register.

Returns:

Type Description
Events

Value read from the EventEnable register.

read_led0_current() #

Reads the contents of the Led0Current register.

Returns:

Type Description
int

Value read from the Led0Current register.

read_led0_max_current() #

Reads the contents of the Led0MaxCurrent register.

Returns:

Type Description
int

Value read from the Led0MaxCurrent register.

read_led1_current() #

Reads the contents of the Led1Current register.

Returns:

Type Description
int

Value read from the Led1Current register.

read_led1_max_current() #

Reads the contents of the Led1MaxCurrent register.

Returns:

Type Description
int

Value read from the Led1MaxCurrent register.

read_mimic_port0_ir() #

Reads the contents of the MimicPort0IR register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort0IR register.

read_mimic_port0_valve() #

Reads the contents of the MimicPort0Valve register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort0Valve register.

read_mimic_port1_ir() #

Reads the contents of the MimicPort1IR register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort1IR register.

read_mimic_port1_valve() #

Reads the contents of the MimicPort1Valve register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort1Valve register.

read_mimic_port2_ir() #

Reads the contents of the MimicPort2IR register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort2IR register.

read_mimic_port2_valve() #

Reads the contents of the MimicPort2Valve register.

Returns:

Type Description
MimicOutput

Value read from the MimicPort2Valve register.

read_output_clear() #

Reads the contents of the OutputClear register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputClear register.

read_output_pulse_enable() #

Reads the contents of the OutputPulseEnable register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputPulseEnable register.

read_output_set() #

Reads the contents of the OutputSet register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputSet register.

read_output_state() #

Reads the contents of the OutputState register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputState register.

read_output_toggle() #

Reads the contents of the OutputToggle register.

Returns:

Type Description
DigitalOutputs

Value read from the OutputToggle register.

read_poke_input_filter() #

Reads the contents of the PokeInputFilter register.

Returns:

Type Description
int

Value read from the PokeInputFilter register.

read_port_dio_clear() #

Reads the contents of the PortDIOClear register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOClear register.

read_port_dio_direction() #

Reads the contents of the PortDIODirection register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIODirection register.

read_port_dio_set() #

Reads the contents of the PortDIOSet register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOSet register.

read_port_dio_state() #

Reads the contents of the PortDIOState register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOState register.

read_port_dio_state_event() #

Reads the contents of the PortDIOStateEvent register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOStateEvent register.

read_port_dio_toggle() #

Reads the contents of the PortDIOToggle register.

Returns:

Type Description
PortDigitalIOS

Value read from the PortDIOToggle register.

read_pulse_do0() #

Reads the contents of the PulseDO0 register.

Returns:

Type Description
int

Value read from the PulseDO0 register.

read_pulse_do1() #

Reads the contents of the PulseDO1 register.

Returns:

Type Description
int

Value read from the PulseDO1 register.

read_pulse_do2() #

Reads the contents of the PulseDO2 register.

Returns:

Type Description
int

Value read from the PulseDO2 register.

read_pulse_do3() #

Reads the contents of the PulseDO3 register.

Returns:

Type Description
int

Value read from the PulseDO3 register.

read_pulse_do_port0() #

Reads the contents of the PulseDOPort0 register.

Returns:

Type Description
int

Value read from the PulseDOPort0 register.

read_pulse_do_port1() #

Reads the contents of the PulseDOPort1 register.

Returns:

Type Description
int

Value read from the PulseDOPort1 register.

read_pulse_do_port2() #

Reads the contents of the PulseDOPort2 register.

Returns:

Type Description
int

Value read from the PulseDOPort2 register.

read_pulse_led0() #

Reads the contents of the PulseLed0 register.

Returns:

Type Description
int

Value read from the PulseLed0 register.

read_pulse_led1() #

Reads the contents of the PulseLed1 register.

Returns:

Type Description
int

Value read from the PulseLed1 register.

read_pulse_rgb0() #

Reads the contents of the PulseRgb0 register.

Returns:

Type Description
int

Value read from the PulseRgb0 register.

read_pulse_rgb1() #

Reads the contents of the PulseRgb1 register.

Returns:

Type Description
int

Value read from the PulseRgb1 register.

read_pulse_supply_port0() #

Reads the contents of the PulseSupplyPort0 register.

Returns:

Type Description
int

Value read from the PulseSupplyPort0 register.

read_pulse_supply_port1() #

Reads the contents of the PulseSupplyPort1 register.

Returns:

Type Description
int

Value read from the PulseSupplyPort1 register.

read_pulse_supply_port2() #

Reads the contents of the PulseSupplyPort2 register.

Returns:

Type Description
int

Value read from the PulseSupplyPort2 register.

read_pwm_duty_cycle_do0() #

Reads the contents of the PwmDutyCycleDO0 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO0 register.

read_pwm_duty_cycle_do1() #

Reads the contents of the PwmDutyCycleDO1 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO1 register.

read_pwm_duty_cycle_do2() #

Reads the contents of the PwmDutyCycleDO2 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO2 register.

read_pwm_duty_cycle_do3() #

Reads the contents of the PwmDutyCycleDO3 register.

Returns:

Type Description
int

Value read from the PwmDutyCycleDO3 register.

read_pwm_frequency_do0() #

Reads the contents of the PwmFrequencyDO0 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO0 register.

read_pwm_frequency_do1() #

Reads the contents of the PwmFrequencyDO1 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO1 register.

read_pwm_frequency_do2() #

Reads the contents of the PwmFrequencyDO2 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO2 register.

read_pwm_frequency_do3() #

Reads the contents of the PwmFrequencyDO3 register.

Returns:

Type Description
int

Value read from the PwmFrequencyDO3 register.

read_pwm_start() #

Reads the contents of the PwmStart register.

Returns:

Type Description
PwmOutputs

Value read from the PwmStart register.

read_pwm_stop() #

Reads the contents of the PwmStop register.

Returns:

Type Description
PwmOutputs

Value read from the PwmStop register.

read_rgb0() #

Reads the contents of the Rgb0 register.

Returns:

Type Description
RgbPayload

Value read from the Rgb0 register.

read_rgb1() #

Reads the contents of the Rgb1 register.

Returns:

Type Description
RgbPayload

Value read from the Rgb1 register.

read_rgb_all() #

Reads the contents of the RgbAll register.

Returns:

Type Description
RgbAllPayload

Value read from the RgbAll register.

read_servo_motor2_period() #

Reads the contents of the ServoMotor2Period register.

Returns:

Type Description
int

Value read from the ServoMotor2Period register.

read_servo_motor2_pulse() #

Reads the contents of the ServoMotor2Pulse register.

Returns:

Type Description
int

Value read from the ServoMotor2Pulse register.

read_servo_motor3_period() #

Reads the contents of the ServoMotor3Period register.

Returns:

Type Description
int

Value read from the ServoMotor3Period register.

read_servo_motor3_pulse() #

Reads the contents of the ServoMotor3Pulse register.

Returns:

Type Description
int

Value read from the ServoMotor3Pulse register.

read_start_cameras() #

Reads the contents of the StartCameras register.

Returns:

Type Description
CameraOutputs

Value read from the StartCameras register.

read_stop_cameras() #

Reads the contents of the StopCameras register.

Returns:

Type Description
CameraOutputs

Value read from the StopCameras register.

write_camera0_frequency(value) #

Writes a value to the Camera0Frequency register.

Parameters:

Name Type Description Default
value int

Value to write to the Camera0Frequency register.

required
write_camera1_frequency(value) #

Writes a value to the Camera1Frequency register.

Parameters:

Name Type Description Default
value int

Value to write to the Camera1Frequency register.

required
write_disable_servos(value) #

Writes a value to the DisableServos register.

Parameters:

Name Type Description Default
value ServoOutputs

Value to write to the DisableServos register.

required
write_enable_encoders(value) #

Writes a value to the EnableEncoders register.

Parameters:

Name Type Description Default
value EncoderInputs

Value to write to the EnableEncoders register.

required
write_enable_serial_timestamp(value) #

Writes a value to the EnableSerialTimestamp register.

Parameters:

Name Type Description Default
value int

Value to write to the EnableSerialTimestamp register.

required
write_enable_servos(value) #

Writes a value to the EnableServos register.

Parameters:

Name Type Description Default
value ServoOutputs

Value to write to the EnableServos register.

required
write_encoder_mode(value) #

Writes a value to the EncoderMode register.

Parameters:

Name Type Description Default
value EncoderModeConfig

Value to write to the EncoderMode register.

required
write_encoder_reset(value) #

Writes a value to the EncoderReset register.

Parameters:

Name Type Description Default
value EncoderInputs

Value to write to the EncoderReset register.

required
write_event_enable(value) #

Writes a value to the EventEnable register.

Parameters:

Name Type Description Default
value Events

Value to write to the EventEnable register.

required
write_led0_current(value) #

Writes a value to the Led0Current register.

Parameters:

Name Type Description Default
value int

Value to write to the Led0Current register.

required
write_led0_max_current(value) #

Writes a value to the Led0MaxCurrent register.

Parameters:

Name Type Description Default
value int

Value to write to the Led0MaxCurrent register.

required
write_led1_current(value) #

Writes a value to the Led1Current register.

Parameters:

Name Type Description Default
value int

Value to write to the Led1Current register.

required
write_led1_max_current(value) #

Writes a value to the Led1MaxCurrent register.

Parameters:

Name Type Description Default
value int

Value to write to the Led1MaxCurrent register.

required
write_mimic_port0_ir(value) #

Writes a value to the MimicPort0IR register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort0IR register.

required
write_mimic_port0_valve(value) #

Writes a value to the MimicPort0Valve register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort0Valve register.

required
write_mimic_port1_ir(value) #

Writes a value to the MimicPort1IR register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort1IR register.

required
write_mimic_port1_valve(value) #

Writes a value to the MimicPort1Valve register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort1Valve register.

required
write_mimic_port2_ir(value) #

Writes a value to the MimicPort2IR register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort2IR register.

required
write_mimic_port2_valve(value) #

Writes a value to the MimicPort2Valve register.

Parameters:

Name Type Description Default
value MimicOutput

Value to write to the MimicPort2Valve register.

required
write_output_clear(value) #

Writes a value to the OutputClear register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputClear register.

required
write_output_pulse_enable(value) #

Writes a value to the OutputPulseEnable register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputPulseEnable register.

required
write_output_set(value) #

Writes a value to the OutputSet register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputSet register.

required
write_output_state(value) #

Writes a value to the OutputState register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputState register.

required
write_output_toggle(value) #

Writes a value to the OutputToggle register.

Parameters:

Name Type Description Default
value DigitalOutputs

Value to write to the OutputToggle register.

required
write_poke_input_filter(value) #

Writes a value to the PokeInputFilter register.

Parameters:

Name Type Description Default
value int

Value to write to the PokeInputFilter register.

required
write_port_dio_clear(value) #

Writes a value to the PortDIOClear register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOClear register.

required
write_port_dio_direction(value) #

Writes a value to the PortDIODirection register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIODirection register.

required
write_port_dio_set(value) #

Writes a value to the PortDIOSet register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOSet register.

required
write_port_dio_state(value) #

Writes a value to the PortDIOState register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOState register.

required
write_port_dio_toggle(value) #

Writes a value to the PortDIOToggle register.

Parameters:

Name Type Description Default
value PortDigitalIOS

Value to write to the PortDIOToggle register.

required
write_pulse_do0(value) #

Writes a value to the PulseDO0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO0 register.

required
write_pulse_do1(value) #

Writes a value to the PulseDO1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO1 register.

required
write_pulse_do2(value) #

Writes a value to the PulseDO2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO2 register.

required
write_pulse_do3(value) #

Writes a value to the PulseDO3 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDO3 register.

required
write_pulse_do_port0(value) #

Writes a value to the PulseDOPort0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDOPort0 register.

required
write_pulse_do_port1(value) #

Writes a value to the PulseDOPort1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDOPort1 register.

required
write_pulse_do_port2(value) #

Writes a value to the PulseDOPort2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseDOPort2 register.

required
write_pulse_led0(value) #

Writes a value to the PulseLed0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseLed0 register.

required
write_pulse_led1(value) #

Writes a value to the PulseLed1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseLed1 register.

required
write_pulse_rgb0(value) #

Writes a value to the PulseRgb0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseRgb0 register.

required
write_pulse_rgb1(value) #

Writes a value to the PulseRgb1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseRgb1 register.

required
write_pulse_supply_port0(value) #

Writes a value to the PulseSupplyPort0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseSupplyPort0 register.

required
write_pulse_supply_port1(value) #

Writes a value to the PulseSupplyPort1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseSupplyPort1 register.

required
write_pulse_supply_port2(value) #

Writes a value to the PulseSupplyPort2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PulseSupplyPort2 register.

required
write_pwm_duty_cycle_do0(value) #

Writes a value to the PwmDutyCycleDO0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO0 register.

required
write_pwm_duty_cycle_do1(value) #

Writes a value to the PwmDutyCycleDO1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO1 register.

required
write_pwm_duty_cycle_do2(value) #

Writes a value to the PwmDutyCycleDO2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO2 register.

required
write_pwm_duty_cycle_do3(value) #

Writes a value to the PwmDutyCycleDO3 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmDutyCycleDO3 register.

required
write_pwm_frequency_do0(value) #

Writes a value to the PwmFrequencyDO0 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO0 register.

required
write_pwm_frequency_do1(value) #

Writes a value to the PwmFrequencyDO1 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO1 register.

required
write_pwm_frequency_do2(value) #

Writes a value to the PwmFrequencyDO2 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO2 register.

required
write_pwm_frequency_do3(value) #

Writes a value to the PwmFrequencyDO3 register.

Parameters:

Name Type Description Default
value int

Value to write to the PwmFrequencyDO3 register.

required
write_pwm_start(value) #

Writes a value to the PwmStart register.

Parameters:

Name Type Description Default
value PwmOutputs

Value to write to the PwmStart register.

required
write_pwm_stop(value) #

Writes a value to the PwmStop register.

Parameters:

Name Type Description Default
value PwmOutputs

Value to write to the PwmStop register.

required
write_rgb0(value) #

Writes a value to the Rgb0 register.

Parameters:

Name Type Description Default
value RgbPayload

Value to write to the Rgb0 register.

required
write_rgb1(value) #

Writes a value to the Rgb1 register.

Parameters:

Name Type Description Default
value RgbPayload

Value to write to the Rgb1 register.

required
write_rgb_all(value) #

Writes a value to the RgbAll register.

Parameters:

Name Type Description Default
value RgbAllPayload

Value to write to the RgbAll register.

required
write_servo_motor2_period(value) #

Writes a value to the ServoMotor2Period register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor2Period register.

required
write_servo_motor2_pulse(value) #

Writes a value to the ServoMotor2Pulse register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor2Pulse register.

required
write_servo_motor3_period(value) #

Writes a value to the ServoMotor3Period register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor3Period register.

required
write_servo_motor3_pulse(value) #

Writes a value to the ServoMotor3Pulse register.

Parameters:

Name Type Description Default
value int

Value to write to the ServoMotor3Pulse register.

required
write_start_cameras(value) #

Writes a value to the StartCameras register.

Parameters:

Name Type Description Default
value CameraOutputs

Value to write to the StartCameras register.

required
write_stop_cameras(value) #

Writes a value to the StopCameras register.

Parameters:

Name Type Description Default
value CameraOutputs

Value to write to the StopCameras register.

required

BehaviorRegisters #

Bases: IntEnum

Enum for all available registers in the Behavior device.

Attributes:

Name Type Description
DIGITAL_INPUT_STATE int

Reflects the state of DI digital lines of each Port

OUTPUT_SET int

Set the specified digital output lines.

OUTPUT_CLEAR int

Clear the specified digital output lines

OUTPUT_TOGGLE int

Toggle the specified digital output lines

OUTPUT_STATE int

Write the state of all digital output lines

PORT_DIO_SET int

Set the specified port DIO lines

PORT_DIO_CLEAR int

Clear the specified port DIO lines

PORT_DIO_TOGGLE int

Toggle the specified port DIO lines

PORT_DIO_STATE int

Write the state of all port DIO lines

PORT_DIO_DIRECTION int

Specifies which of the port DIO lines are outputs

PORT_DIO_STATE_EVENT int

Specifies the state of the port DIO lines on a line change

ANALOG_DATA int

Voltage at the ADC input and encoder value on Port 2

OUTPUT_PULSE_ENABLE int

Enables the pulse function for the specified output lines

PULSE_DO_PORT0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO_PORT1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO_PORT2 int

Specifies the duration of the output pulse in milliseconds.

PULSE_SUPPLY_PORT0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_SUPPLY_PORT1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_SUPPLY_PORT2 int

Specifies the duration of the output pulse in milliseconds.

PULSE_LED0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_LED1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_RGB0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_RGB1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO0 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO1 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO2 int

Specifies the duration of the output pulse in milliseconds.

PULSE_DO3 int

Specifies the duration of the output pulse in milliseconds.

PWM_FREQUENCY_DO0 int

Specifies the frequency of the PWM at DO0.

PWM_FREQUENCY_DO1 int

Specifies the frequency of the PWM at DO1.

PWM_FREQUENCY_DO2 int

Specifies the frequency of the PWM at DO2.

PWM_FREQUENCY_DO3 int

Specifies the frequency of the PWM at DO3.

PWM_DUTY_CYCLE_DO0 int

Specifies the duty cycle of the PWM at DO0.

PWM_DUTY_CYCLE_DO1 int

Specifies the duty cycle of the PWM at DO1.

PWM_DUTY_CYCLE_DO2 int

Specifies the duty cycle of the PWM at DO2.

PWM_DUTY_CYCLE_DO3 int

Specifies the duty cycle of the PWM at DO3.

PWM_START int

Starts the PWM on the selected output lines.

PWM_STOP int

Stops the PWM on the selected output lines.

RGB_ALL int

Specifies the state of all RGB LED channels.

RGB0 int

Specifies the state of the RGB0 LED channels.

RGB1 int

Specifies the state of the RGB1 LED channels.

LED0_CURRENT int

Specifies the configuration of current to drive LED 0.

LED1_CURRENT int

Specifies the configuration of current to drive LED 1.

LED0_MAX_CURRENT int

Specifies the configuration of current to drive LED 0.

LED1_MAX_CURRENT int

Specifies the configuration of current to drive LED 1.

EVENT_ENABLE int

Specifies the active events in the device.

START_CAMERAS int

Specifies the camera outputs to enable in the device.

STOP_CAMERAS int

Specifies the camera outputs to disable in the device. An event will be issued when the trigger signal is actually stopped being generated.

ENABLE_SERVOS int

Specifies the servo outputs to enable in the device.

DISABLE_SERVOS int

Specifies the servo outputs to disable in the device.

ENABLE_ENCODERS int

Specifies the port quadrature counters to enable in the device.

ENCODER_MODE int

Configures the operation mode of the quadrature encoders.

CAMERA0_FRAME int

Specifies that a frame was acquired on camera 0.

CAMERA0_FREQUENCY int

Specifies the trigger frequency for camera 0.

CAMERA1_FRAME int

Specifies that a frame was acquired on camera 1.

CAMERA1_FREQUENCY int

Specifies the trigger frequency for camera 1.

SERVO_MOTOR2_PERIOD int

Specifies the period of the servo motor in DO2, in microseconds.

SERVO_MOTOR2_PULSE int

Specifies the pulse of the servo motor in DO2, in microseconds.

SERVO_MOTOR3_PERIOD int

Specifies the period of the servo motor in DO3, in microseconds.

SERVO_MOTOR3_PULSE int

Specifies the pulse of the servo motor in DO3, in microseconds.

ENCODER_RESET int

Reset the counter of the specified encoders to zero.

ENABLE_SERIAL_TIMESTAMP int

Enables the timestamp for serial TX.

MIMIC_PORT0_IR int

Specifies the digital output to mimic the Port 0 IR state.

MIMIC_PORT1_IR int

Specifies the digital output to mimic the Port 1 IR state.

MIMIC_PORT2_IR int

Specifies the digital output to mimic the Port 2 IR state.

MIMIC_PORT0_VALVE int

Specifies the digital output to mimic the Port 0 valve state.

MIMIC_PORT1_VALVE int

Specifies the digital output to mimic the Port 1 valve state.

MIMIC_PORT2_VALVE int

Specifies the digital output to mimic the Port 2 valve state.

POKE_INPUT_FILTER int

Specifies the low pass filter time value for poke inputs, in ms.

CameraOutputs #

Bases: IntFlag

Specifies camera output enable bits.

Attributes:

Name Type Description
CAMERA_OUTPUT0 int

No description currently available

CAMERA_OUTPUT1 int

No description currently available

DigitalInputs #

Bases: IntFlag

Specifies the state of port digital input lines.

Attributes:

Name Type Description
DI_PORT0 int

No description currently available

DI_PORT1 int

No description currently available

DI_PORT2 int

No description currently available

DI3 int

No description currently available

DigitalOutputs #

Bases: IntFlag

Specifies the state of port digital output lines.

Attributes:

Name Type Description
DO_PORT0 int

No description currently available

DO_PORT1 int

No description currently available

DO_PORT2 int

No description currently available

SUPPLY_PORT0 int

No description currently available

SUPPLY_PORT1 int

No description currently available

SUPPLY_PORT2 int

No description currently available

LED0 int

No description currently available

LED1 int

No description currently available

RGB0 int

No description currently available

RGB1 int

No description currently available

DO0 int

No description currently available

DO1 int

No description currently available

DO2 int

No description currently available

DO3 int

No description currently available

EncoderInputs #

Bases: IntFlag

Specifies quadrature counter enable bits.

Attributes:

Name Type Description
ENCODER_PORT2 int

No description currently available

EncoderModeConfig #

Bases: IntEnum

Specifies the type of reading made from the quadrature encoder.

Attributes:

Name Type Description
POSITION int

No description currently available

DISPLACEMENT int

No description currently available

Events #

Bases: IntFlag

Specifies the active events in the device.

Attributes:

Name Type Description
PORT_DI int

No description currently available

PORT_DIO int

No description currently available

ANALOG_DATA int

No description currently available

CAMERA0 int

No description currently available

CAMERA1 int

No description currently available

FrameAcquired #

Bases: IntFlag

Specifies that camera frame was acquired.

Attributes:

Name Type Description
FRAME_ACQUIRED int

No description currently available

MimicOutput #

Bases: IntEnum

Specifies the target IO on which to mimic the specified register.

Attributes:

Name Type Description
NONE int

No description currently available

DIO0 int

No description currently available

DIO1 int

No description currently available

DIO2 int

No description currently available

DO0 int

No description currently available

DO1 int

No description currently available

DO2 int

No description currently available

DO3 int

No description currently available

PortDigitalIOS #

Bases: IntFlag

Specifies the state of the port DIO lines.

Attributes:

Name Type Description
DIO0 int

No description currently available

DIO1 int

No description currently available

DIO2 int

No description currently available

PwmOutputs #

Bases: IntFlag

Specifies the state of PWM output lines.

Attributes:

Name Type Description
PWM_DO0 int

No description currently available

PWM_DO1 int

No description currently available

PWM_DO2 int

No description currently available

PWM_DO3 int

No description currently available

RgbAllPayload dataclass #

RgbAllPayload(Green0: int, Red0: int, Blue0: int, Green1: int, Red1: int, Blue1: int)

Parameters:

Name Type Description Default
Green0 int
required
Red0 int
required
Blue0 int
required
Green1 int
required
Red1 int
required
Blue1 int
required

RgbPayload dataclass #

RgbPayload(Green: int, Red: int, Blue: int)

Parameters:

Name Type Description Default
Green int
required
Red int
required
Blue int
required

ServoOutputs #

Bases: IntFlag

Specifies servo output enable bits.

Attributes:

Name Type Description
SERVO_OUTPUT2 int

No description currently available

SERVO_OUTPUT3 int

No description currently available