def get_magnetometer_reading(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.get_magnetometer_reading, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='x_axis', data_type='float', index=0, size=1, ), Parameter( name='y_axis', data_type='float', index=1, size=1, ), Parameter( name='z_axis', data_type='float', index=2, size=1, ), ] }
def start_robot_to_robot_infrared_evading(far_code, near_code, target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.start_robot_to_robot_infrared_evading, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='farCode', data_type='uint8_t', index=0, value=far_code, size=1), Parameter(name='nearCode', data_type='uint8_t', index=1, value=near_code, size=1), ], }
def get_battery_voltage_in_volts(reading_type, target, timeout): return { 'did': DevicesEnum.power, 'cid': CommandsEnum.get_battery_voltage_in_volts, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='reading_type', data_type='uint8_t', index=0, value=reading_type, size=1), ], 'outputs': [ Parameter( name='voltage', data_type='float', index=0, size=1, ), ] }
def get_default_control_system_for_type(control_system_type, target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.get_default_control_system_for_type, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter( name='control_system_type', data_type='uint8_t', index=0, value=control_system_type, size=1 ), ], 'outputs': [ Parameter( name='controller_id', data_type='uint8_t', index=0, size=1, ), ] }
def get_motor_temperature(motor_index, target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.get_motor_temperature, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='motorIndex', data_type='uint8_t', index=0, value=motor_index, size=1), ], 'outputs': [ Parameter( name='windingCoilTemperature', data_type='float', index=0, size=1, ), Parameter( name='caseTemperature', data_type='float', index=1, size=1, ), ] }
def get_current_sense_amplifier_current(amplifier_id, target, timeout): return { 'did': DevicesEnum.power, 'cid': CommandsEnum.get_current_sense_amplifier_current, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='amplifier_id', data_type='uint8_t', index=0, value=amplifier_id, size=1), ], 'outputs': [ Parameter( name='amplifier_current', data_type='float', index=0, size=1, ), ] }
def set_all_leds(led_group, led_brightness_values, target, timeout): return { 'did': DevicesEnum.io, 'cid': CommandsEnum.set_all_leds, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='led_group', data_type='uint32_t', index=0, value=led_group, size=1), Parameter(name='led_brightness_values', data_type='uint8_t', index=1, value=led_brightness_values, size=32), ], }
def drive_rc_normalized(yaw_angular_velocity, linear_velocity, flags, target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.drive_rc_normalized, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter( name='yaw_angular_velocity', data_type='int8_t', index=0, value=yaw_angular_velocity, size=1 ), Parameter( name='linear_velocity', data_type='int8_t', index=1, value=linear_velocity, size=1 ), Parameter( name='flags', data_type='uint8_t', index=2, value=flags, size=1 ), ], }
def configure_streaming_service(token, configuration, target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.configure_streaming_service, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='token', data_type='uint8_t', index=0, value=token, size=1), Parameter(name='configuration', data_type='uint8_t', index=1, value=configuration, size=15), ], }
def enable_color_detection_notify(is_enabled, interval, minimum_confidence_threshold, target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.enable_color_detection_notify, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='isEnabled', data_type='bool', index=0, value=is_enabled, size=1), Parameter(name='interval', data_type='uint16_t', index=1, value=interval, size=1), Parameter(name='minimumConfidenceThreshold', data_type='uint8_t', index=2, value=minimum_confidence_threshold, size=1), ], }
def get_battery_voltage_state_thresholds(target, timeout): return { 'did': DevicesEnum.power, 'cid': CommandsEnum.get_battery_voltage_state_thresholds, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='critical_threshold', data_type='float', index=0, size=1, ), Parameter( name='low_threshold', data_type='float', index=1, size=1, ), Parameter( name='hysteresis', data_type='float', index=2, size=1, ), ] }
def get_bootloader_version(target, timeout): return { 'did': DevicesEnum.system_info, 'cid': CommandsEnum.get_bootloader_version, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='major', data_type='uint16_t', index=0, size=1, ), Parameter( name='minor', data_type='uint16_t', index=1, size=1, ), Parameter( name='revision', data_type='uint16_t', index=2, size=1, ), ] }
def drive_with_heading(speed, heading, flags, target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.drive_with_heading, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter( name='speed', data_type='uint8_t', index=0, value=speed, size=1 ), Parameter( name='heading', data_type='uint16_t', index=1, value=heading, size=1 ), Parameter( name='flags', data_type='uint8_t', index=2, value=flags, size=1 ), ], }
def echo(data, target, timeout): return { 'did': DevicesEnum.api_and_shell, 'cid': CommandsEnum.echo, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='data', data_type='uint8_t', index=0, value=data, size=16), ], 'outputs': [ Parameter( name='data', data_type='uint8_t', index=0, size=16, ), ] }
def clear_streaming_service(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.clear_streaming_service, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def get_current_detected_color_reading(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.get_current_detected_color_reading, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def stop_robot_to_robot_infrared_evading(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.stop_robot_to_robot_infrared_evading, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def release_led_requests(target, timeout): return { 'did': DevicesEnum.io, 'cid': CommandsEnum.release_led_requests, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def disable_notifications_and_active_commands(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.disable_notifications_and_active_commands, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def reset_locator_x_and_y(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.reset_locator_x_and_y, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def magnetometer_calibrate_to_north(target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.magnetometer_calibrate_to_north, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def restore_default_drive_target_slew_parameters(target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.restore_default_drive_target_slew_parameters, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def restore_initial_default_control_systems(target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.restore_initial_default_control_systems, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def drive_stop(target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.drive_stop, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def wake(target, timeout): return { 'did': DevicesEnum.power, 'cid': CommandsEnum.wake, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, }
def get_temperature(id0, id1, target, timeout): return { 'did': DevicesEnum.sensor, 'cid': CommandsEnum.get_temperature, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'inputs': [ Parameter(name='id0', data_type='uint8_t', index=0, value=id0, size=1), Parameter(name='id1', data_type='uint8_t', index=1, value=id1, size=1), ], 'outputs': [ Parameter( name='id0', data_type='uint8_t', index=0, size=1, ), Parameter( name='temp0', data_type='float', index=1, size=1, ), Parameter( name='id1', data_type='uint8_t', index=2, size=1, ), Parameter( name='temp1', data_type='float', index=3, size=1, ), ] }
def get_active_control_system_id(target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.get_active_control_system_id, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='controller_id', data_type='uint8_t', index=0, size=1, ), ] }
def get_stop_controller_state(target, timeout): return { 'did': DevicesEnum.drive, 'cid': CommandsEnum.get_stop_controller_state, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='stopped', data_type='bool', index=0, size=1, ), ] }
def get_mac_address(target, timeout): return { 'did': DevicesEnum.system_info, 'cid': CommandsEnum.get_mac_address, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='mac_address', data_type='std::string', index=0, size=1, ), ] }
def get_bluetooth_advertising_name(target, timeout): return { 'did': DevicesEnum.connection, 'cid': CommandsEnum.get_bluetooth_advertising_name, 'seq': SequenceNumberGenerator.get_sequence_number(), 'target': target, 'timeout': timeout, 'outputs': [ Parameter( name='name', data_type='std::string', index=0, size=1, ), ] }