zaber-motion 7.13.0__py3-none-win_amd64.whl → 7.14.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zaber_motion/__init__.py +103 -103
- zaber_motion/ascii/__init__.py +73 -73
- zaber_motion/ascii/all_axes.py +352 -352
- zaber_motion/ascii/axis.py +1673 -1673
- zaber_motion/ascii/axis_group.py +391 -391
- zaber_motion/ascii/axis_settings.py +752 -752
- zaber_motion/ascii/connection.py +1174 -1174
- zaber_motion/ascii/device.py +908 -908
- zaber_motion/ascii/device_io.py +1170 -1170
- zaber_motion/ascii/device_settings.py +735 -735
- zaber_motion/ascii/lockstep.py +1184 -1184
- zaber_motion/ascii/oscilloscope.py +635 -635
- zaber_motion/ascii/oscilloscope_data.py +240 -240
- zaber_motion/ascii/pvt.py +105 -105
- zaber_motion/ascii/pvt_buffer.py +146 -146
- zaber_motion/ascii/pvt_io.py +630 -630
- zaber_motion/ascii/pvt_sequence.py +1530 -1530
- zaber_motion/ascii/servo_tuner.py +637 -637
- zaber_motion/ascii/setting_constants.py +1755 -1755
- zaber_motion/ascii/storage.py +905 -905
- zaber_motion/ascii/stream.py +2182 -2182
- zaber_motion/ascii/stream_buffer.py +101 -101
- zaber_motion/ascii/stream_io.py +700 -700
- zaber_motion/ascii/streams.py +105 -105
- zaber_motion/ascii/transport.py +202 -202
- zaber_motion/ascii/trigger.py +886 -886
- zaber_motion/ascii/triggers.py +241 -241
- zaber_motion/ascii/warning_flags.py +178 -178
- zaber_motion/ascii/warnings.py +152 -152
- zaber_motion/async_utils.py +46 -46
- zaber_motion/binary/__init__.py +14 -14
- zaber_motion/binary/connection.py +648 -648
- zaber_motion/binary/device.py +924 -924
- zaber_motion/binary/device_settings.py +121 -121
- zaber_motion/bindings.py +50 -50
- zaber_motion/call.py +198 -198
- zaber_motion/convert_exception.py +138 -138
- zaber_motion/dto/__init__.py +11 -11
- zaber_motion/dto/ascii/__init__.py +46 -46
- zaber_motion/dto/ascii/alert_event.py +110 -110
- zaber_motion/dto/ascii/axis_identity.py +134 -134
- zaber_motion/dto/ascii/axis_type.py +14 -14
- zaber_motion/dto/ascii/can_set_state_axis_response.py +69 -69
- zaber_motion/dto/ascii/can_set_state_device_response.py +75 -75
- zaber_motion/dto/ascii/conversion_factor.py +81 -81
- zaber_motion/dto/ascii/device_identity.py +136 -136
- zaber_motion/dto/ascii/device_io_info.py +108 -108
- zaber_motion/dto/ascii/digital_output_action.py +13 -13
- zaber_motion/dto/ascii/get_axis_setting.py +64 -64
- zaber_motion/dto/ascii/get_axis_setting_result.py +81 -81
- zaber_motion/dto/ascii/get_setting.py +88 -88
- zaber_motion/dto/ascii/get_setting_result.py +87 -87
- zaber_motion/dto/ascii/io_port_label.py +84 -84
- zaber_motion/dto/ascii/io_port_type.py +14 -14
- zaber_motion/dto/ascii/lockstep_axes.py +108 -108
- zaber_motion/dto/ascii/measurement_sequence.py +73 -73
- zaber_motion/dto/ascii/message_type.py +14 -14
- zaber_motion/dto/ascii/optional_measurement_sequence.py +71 -71
- zaber_motion/dto/ascii/oscilloscope_capture_properties.py +116 -116
- zaber_motion/dto/ascii/oscilloscope_data_source.py +11 -11
- zaber_motion/dto/ascii/paramset_info.py +92 -92
- zaber_motion/dto/ascii/pid_tuning.py +125 -125
- zaber_motion/dto/ascii/pvt_axis_definition.py +70 -70
- zaber_motion/dto/ascii/pvt_axis_type.py +11 -11
- zaber_motion/dto/ascii/pvt_csv_data.py +75 -75
- zaber_motion/dto/ascii/pvt_mode.py +12 -12
- zaber_motion/dto/ascii/pvt_sequence_data.py +99 -99
- zaber_motion/dto/ascii/response.py +137 -137
- zaber_motion/dto/ascii/servo_tuning_param.py +66 -66
- zaber_motion/dto/ascii/servo_tuning_paramset.py +21 -21
- zaber_motion/dto/ascii/set_state_axis_response.py +75 -75
- zaber_motion/dto/ascii/set_state_device_response.py +80 -80
- zaber_motion/dto/ascii/simple_tuning.py +118 -118
- zaber_motion/dto/ascii/simple_tuning_param_definition.py +100 -100
- zaber_motion/dto/ascii/stream_axis_definition.py +70 -70
- zaber_motion/dto/ascii/stream_axis_type.py +11 -11
- zaber_motion/dto/ascii/stream_mode.py +13 -13
- zaber_motion/dto/ascii/trigger_action.py +12 -12
- zaber_motion/dto/ascii/trigger_condition.py +15 -15
- zaber_motion/dto/ascii/trigger_enabled_state.py +68 -68
- zaber_motion/dto/ascii/trigger_operation.py +12 -12
- zaber_motion/dto/ascii/trigger_state.py +114 -114
- zaber_motion/dto/ascii/unknown_response_event.py +137 -137
- zaber_motion/dto/axis_address.py +74 -74
- zaber_motion/dto/binary/__init__.py +11 -11
- zaber_motion/dto/binary/binary_settings.py +74 -74
- zaber_motion/dto/binary/command_code.py +106 -106
- zaber_motion/dto/binary/device_identity.py +156 -156
- zaber_motion/dto/binary/device_type.py +12 -12
- zaber_motion/dto/binary/error_code.py +101 -101
- zaber_motion/dto/binary/message.py +91 -91
- zaber_motion/dto/binary/reply_code.py +16 -16
- zaber_motion/dto/binary/reply_only_event.py +91 -91
- zaber_motion/dto/binary/unknown_response_event.py +91 -91
- zaber_motion/dto/channel_address.py +74 -74
- zaber_motion/dto/device_db_source.py +66 -66
- zaber_motion/dto/device_db_source_type.py +11 -11
- zaber_motion/dto/exceptions/__init__.py +24 -24
- zaber_motion/dto/exceptions/binary_command_failed_exception_data.py +57 -57
- zaber_motion/dto/exceptions/command_failed_exception_data.py +151 -151
- zaber_motion/dto/exceptions/command_too_long_exception_data.py +98 -98
- zaber_motion/dto/exceptions/device_address_conflict_exception_data.py +63 -63
- zaber_motion/dto/exceptions/device_db_failed_exception_data.py +74 -74
- zaber_motion/dto/exceptions/device_db_inner_error.py +85 -85
- zaber_motion/dto/exceptions/g_code_execution_exception_data.py +75 -75
- zaber_motion/dto/exceptions/g_code_syntax_exception_data.py +75 -75
- zaber_motion/dto/exceptions/invalid_packet_exception_data.py +63 -63
- zaber_motion/dto/exceptions/invalid_pvt_point.py +69 -69
- zaber_motion/dto/exceptions/invalid_response_exception_data.py +51 -51
- zaber_motion/dto/exceptions/movement_failed_exception_data.py +104 -104
- zaber_motion/dto/exceptions/movement_interrupted_exception_data.py +104 -104
- zaber_motion/dto/exceptions/operation_failed_exception_data.py +104 -104
- zaber_motion/dto/exceptions/pvt_execution_exception_data.py +86 -86
- zaber_motion/dto/exceptions/pvt_movement_failed_exception_data.py +69 -69
- zaber_motion/dto/exceptions/pvt_movement_interrupted_exception_data.py +69 -69
- zaber_motion/dto/exceptions/set_device_state_exception_data.py +176 -176
- zaber_motion/dto/exceptions/set_peripheral_state_exception_data.py +121 -121
- zaber_motion/dto/exceptions/stream_execution_exception_data.py +63 -63
- zaber_motion/dto/exceptions/stream_movement_failed_exception_data.py +69 -69
- zaber_motion/dto/exceptions/stream_movement_interrupted_exception_data.py +69 -69
- zaber_motion/dto/firmware_version.py +91 -91
- zaber_motion/dto/gcode/__init__.py +9 -9
- zaber_motion/dto/gcode/axis_definition.py +74 -74
- zaber_motion/dto/gcode/axis_mapping.py +69 -69
- zaber_motion/dto/gcode/axis_transformation.py +79 -79
- zaber_motion/dto/gcode/device_definition.py +99 -99
- zaber_motion/dto/gcode/translate_message.py +87 -87
- zaber_motion/dto/gcode/translate_result.py +79 -79
- zaber_motion/dto/gcode/translator_config.py +84 -84
- zaber_motion/dto/log_output_mode.py +13 -13
- zaber_motion/dto/measurement.py +67 -67
- zaber_motion/dto/microscopy/__init__.py +6 -6
- zaber_motion/dto/microscopy/autofocus_status.py +57 -57
- zaber_motion/dto/microscopy/microscope_config.py +159 -159
- zaber_motion/dto/microscopy/third_party_components.py +55 -55
- zaber_motion/dto/microscopy/wdi_autofocus_provider_status.py +57 -57
- zaber_motion/dto/named_parameter.py +64 -64
- zaber_motion/dto/product/__init__.py +5 -5
- zaber_motion/dto/product/process_controller_mode.py +13 -13
- zaber_motion/dto/product/process_controller_source.py +72 -72
- zaber_motion/dto/product/process_controller_source_sensor.py +11 -11
- zaber_motion/dto/requests/__init__.py +256 -254
- zaber_motion/dto/requests/alert_event_wrapper.py +82 -82
- zaber_motion/dto/requests/autofocus_focus_request.py +131 -131
- zaber_motion/dto/requests/autofocus_get_objective_params_request.py +121 -121
- zaber_motion/dto/requests/autofocus_get_objective_params_response.py +56 -56
- zaber_motion/dto/requests/autofocus_get_status_response.py +50 -50
- zaber_motion/dto/requests/autofocus_set_objective_params_request.py +141 -141
- zaber_motion/dto/requests/axes_empty_request.py +95 -95
- zaber_motion/dto/requests/axes_get_setting_request.py +121 -121
- zaber_motion/dto/requests/axes_move_request.py +114 -114
- zaber_motion/dto/requests/axis_empty_request.py +79 -79
- zaber_motion/dto/requests/axis_move_type.py +12 -12
- zaber_motion/dto/requests/axis_to_string_request.py +88 -88
- zaber_motion/dto/requests/binary_device_detect_request.py +56 -56
- zaber_motion/dto/requests/binary_device_detect_response.py +57 -57
- zaber_motion/dto/requests/binary_device_get_setting_request.py +89 -89
- zaber_motion/dto/requests/binary_device_home_request.py +88 -88
- zaber_motion/dto/requests/binary_device_move_request.py +111 -111
- zaber_motion/dto/requests/binary_device_set_setting_request.py +100 -100
- zaber_motion/dto/requests/binary_device_stop_request.py +88 -88
- zaber_motion/dto/requests/binary_generic_with_units_request.py +122 -122
- zaber_motion/dto/requests/binary_message_collection.py +56 -56
- zaber_motion/dto/requests/binary_reply_only_event_wrapper.py +82 -82
- zaber_motion/dto/requests/bool_response.py +43 -43
- zaber_motion/dto/requests/can_set_state_axis_response.py +60 -60
- zaber_motion/dto/requests/can_set_state_request.py +100 -100
- zaber_motion/dto/requests/channel_on.py +84 -84
- zaber_motion/dto/requests/channel_set_intensity.py +90 -90
- zaber_motion/dto/requests/check_version_request.py +54 -54
- zaber_motion/dto/requests/custom_interface_close_request.py +60 -60
- zaber_motion/dto/requests/custom_interface_open_response.py +51 -51
- zaber_motion/dto/requests/custom_interface_read_request.py +51 -51
- zaber_motion/dto/requests/custom_interface_write_request.py +60 -60
- zaber_motion/dto/requests/device_cancel_all_outputs_schedule_request.py +80 -80
- zaber_motion/dto/requests/device_cancel_output_schedule_request.py +84 -84
- zaber_motion/dto/requests/device_convert_setting_request.py +116 -116
- zaber_motion/dto/requests/device_detect_request.py +68 -68
- zaber_motion/dto/requests/device_detect_response.py +57 -57
- zaber_motion/dto/requests/device_empty_request.py +65 -65
- zaber_motion/dto/requests/device_get_all_analog_io_request.py +74 -74
- zaber_motion/dto/requests/device_get_all_analog_io_response.py +54 -54
- zaber_motion/dto/requests/device_get_all_digital_io_request.py +74 -74
- zaber_motion/dto/requests/device_get_all_digital_io_response.py +46 -46
- zaber_motion/dto/requests/device_get_analog_io_request.py +88 -88
- zaber_motion/dto/requests/device_get_digital_io_request.py +88 -88
- zaber_motion/dto/requests/device_get_setting_request.py +100 -100
- zaber_motion/dto/requests/device_get_storage_request.py +93 -93
- zaber_motion/dto/requests/device_get_warnings_request.py +84 -84
- zaber_motion/dto/requests/device_get_warnings_response.py +51 -51
- zaber_motion/dto/requests/device_home_request.py +84 -84
- zaber_motion/dto/requests/device_identify_request.py +77 -77
- zaber_motion/dto/requests/device_move_request.py +177 -177
- zaber_motion/dto/requests/device_move_sin_request.py +140 -140
- zaber_motion/dto/requests/device_multi_get_setting_request.py +118 -118
- zaber_motion/dto/requests/device_on_all_request.py +56 -56
- zaber_motion/dto/requests/device_on_all_response.py +57 -57
- zaber_motion/dto/requests/device_restore_request.py +84 -84
- zaber_motion/dto/requests/device_set_all_analog_outputs_request.py +82 -82
- zaber_motion/dto/requests/device_set_all_analog_outputs_schedule_request.py +121 -121
- zaber_motion/dto/requests/device_set_all_digital_outputs_request.py +83 -83
- zaber_motion/dto/requests/device_set_all_digital_outputs_schedule_request.py +122 -122
- zaber_motion/dto/requests/device_set_analog_output_request.py +90 -90
- zaber_motion/dto/requests/device_set_analog_output_schedule_request.py +124 -124
- zaber_motion/dto/requests/device_set_digital_output_request.py +91 -91
- zaber_motion/dto/requests/device_set_digital_output_schedule_request.py +125 -125
- zaber_motion/dto/requests/device_set_lowpass_filter_request.py +102 -102
- zaber_motion/dto/requests/device_set_setting_bool_request.py +93 -93
- zaber_motion/dto/requests/device_set_setting_int_request.py +102 -102
- zaber_motion/dto/requests/device_set_setting_request.py +111 -111
- zaber_motion/dto/requests/device_set_setting_str_request.py +97 -97
- zaber_motion/dto/requests/device_set_storage_bool_request.py +93 -93
- zaber_motion/dto/requests/device_set_storage_number_request.py +99 -99
- zaber_motion/dto/requests/device_set_storage_request.py +102 -102
- zaber_motion/dto/requests/device_set_unit_conversions_request.py +108 -108
- zaber_motion/dto/requests/device_stop_request.py +84 -84
- zaber_motion/dto/requests/device_storage_list_keys_request.py +88 -88
- zaber_motion/dto/requests/device_storage_request.py +88 -88
- zaber_motion/dto/requests/device_type.py +8 -8
- zaber_motion/dto/requests/device_wait_until_idle_request.py +84 -84
- zaber_motion/dto/requests/disconnected_event.py +101 -101
- zaber_motion/dto/requests/double_array_response.py +54 -54
- zaber_motion/dto/requests/double_response.py +48 -48
- zaber_motion/dto/requests/driver_enable_request.py +90 -90
- zaber_motion/dto/requests/empty_autofocus_request.py +107 -107
- zaber_motion/dto/requests/empty_request.py +38 -38
- zaber_motion/dto/requests/errors.py +68 -68
- zaber_motion/dto/requests/find_device_request.py +65 -65
- zaber_motion/dto/requests/find_device_response.py +51 -51
- zaber_motion/dto/requests/forget_devices_request.py +71 -71
- zaber_motion/dto/requests/gateway_event.py +45 -45
- zaber_motion/dto/requests/gateway_request.py +45 -45
- zaber_motion/dto/requests/gateway_response.py +69 -69
- zaber_motion/dto/requests/generic_binary_request.py +107 -107
- zaber_motion/dto/requests/generic_command_request.py +107 -107
- zaber_motion/dto/requests/generic_command_response_collection.py +56 -56
- zaber_motion/dto/requests/get_all_io_port_labels_response.py +56 -56
- zaber_motion/dto/requests/get_axis_setting_results.py +56 -56
- zaber_motion/dto/requests/get_io_port_label_request.py +91 -91
- zaber_motion/dto/requests/get_setting_results.py +56 -56
- zaber_motion/dto/requests/get_simple_tuning_param_definition_response.py +56 -56
- zaber_motion/dto/requests/int_64_response.py +51 -51
- zaber_motion/dto/requests/int_array_response.py +57 -57
- zaber_motion/dto/requests/int_request.py +51 -51
- zaber_motion/dto/requests/int_response.py +51 -51
- zaber_motion/dto/requests/interface_empty_request.py +51 -51
- zaber_motion/dto/requests/interface_type.py +11 -11
- zaber_motion/dto/requests/load_paramset.py +102 -102
- zaber_motion/dto/requests/lockstep_disable_request.py +84 -84
- zaber_motion/dto/requests/lockstep_empty_request.py +79 -79
- zaber_motion/dto/requests/lockstep_enable_request.py +99 -99
- zaber_motion/dto/requests/lockstep_get_axis_numbers_response.py +57 -57
- zaber_motion/dto/requests/lockstep_get_request.py +91 -91
- zaber_motion/dto/requests/lockstep_home_request.py +84 -84
- zaber_motion/dto/requests/lockstep_move_request.py +163 -163
- zaber_motion/dto/requests/lockstep_move_sin_request.py +140 -140
- zaber_motion/dto/requests/lockstep_set_request.py +116 -116
- zaber_motion/dto/requests/lockstep_stop_request.py +84 -84
- zaber_motion/dto/requests/lockstep_wait_until_idle_request.py +84 -84
- zaber_motion/dto/requests/microscope_config_response.py +50 -50
- zaber_motion/dto/requests/microscope_empty_request.py +65 -65
- zaber_motion/dto/requests/microscope_find_request.py +63 -63
- zaber_motion/dto/requests/microscope_init_request.py +70 -70
- zaber_motion/dto/requests/microscope_trigger_camera_request.py +107 -107
- zaber_motion/dto/requests/objective_changer_change_request.py +119 -119
- zaber_motion/dto/requests/objective_changer_create_response.py +79 -79
- zaber_motion/dto/requests/objective_changer_get_current_response.py +51 -51
- zaber_motion/dto/requests/objective_changer_request.py +93 -93
- zaber_motion/dto/requests/objective_changer_set_request.py +116 -116
- zaber_motion/dto/requests/open_binary_interface_request.py +100 -100
- zaber_motion/dto/requests/open_interface_request.py +159 -159
- zaber_motion/dto/requests/open_interface_response.py +51 -51
- zaber_motion/dto/requests/oscilloscope_add_io_channel_request.py +91 -91
- zaber_motion/dto/requests/oscilloscope_add_setting_channel_request.py +88 -88
- zaber_motion/dto/requests/oscilloscope_data_get_request.py +63 -63
- zaber_motion/dto/requests/oscilloscope_data_get_sample_time_request.py +77 -77
- zaber_motion/dto/requests/oscilloscope_data_get_samples_response.py +54 -54
- zaber_motion/dto/requests/oscilloscope_data_identifier.py +51 -51
- zaber_motion/dto/requests/oscilloscope_read_response.py +57 -57
- zaber_motion/dto/requests/oscilloscope_request.py +65 -65
- zaber_motion/dto/requests/oscilloscope_start_request.py +79 -79
- zaber_motion/dto/requests/prepare_command_request.py +108 -108
- zaber_motion/dto/requests/process_on.py +107 -107
- zaber_motion/dto/requests/pvt_buffer_get_sequence_data_request.py +79 -79
- zaber_motion/dto/requests/pvt_csv_request.py +59 -59
- zaber_motion/dto/requests/pvt_generate_positions_request.py +74 -74
- zaber_motion/dto/requests/pvt_generate_velocities_and_times_request.py +96 -96
- zaber_motion/dto/requests/pvt_generate_velocities_request.py +93 -93
- zaber_motion/dto/requests/pvt_load_csv_request.py +45 -45
- zaber_motion/dto/requests/pvt_point_request.py +145 -145
- zaber_motion/dto/requests/pvt_points_request.py +147 -147
- zaber_motion/dto/requests/pvt_save_csv_request.py +74 -74
- zaber_motion/dto/requests/pvt_submit_sequence_data_request.py +93 -93
- zaber_motion/dto/requests/renumber_request.py +79 -79
- zaber_motion/dto/requests/response_type.py +8 -8
- zaber_motion/dto/requests/servo_tuning_paramset_response.py +48 -48
- zaber_motion/dto/requests/servo_tuning_request.py +91 -91
- zaber_motion/dto/requests/set_device_db_layered_sources_request.py +56 -56
- zaber_motion/dto/requests/set_device_db_source_request.py +63 -63
- zaber_motion/dto/requests/set_interface_checksum_enabled_request.py +56 -56
- zaber_motion/dto/requests/set_interface_timeout_request.py +65 -65
- zaber_motion/dto/requests/set_internal_mode_request.py +43 -43
- zaber_motion/dto/requests/set_io_port_label_request.py +100 -100
- zaber_motion/dto/requests/set_log_output_request.py +57 -57
- zaber_motion/dto/requests/set_process_controller_source.py +93 -93
- zaber_motion/dto/requests/set_servo_tuning_pid_request.py +135 -135
- zaber_motion/dto/requests/set_servo_tuning_request.py +116 -116
- zaber_motion/dto/requests/set_simple_tuning.py +174 -174
- zaber_motion/dto/requests/set_state_request.py +93 -93
- zaber_motion/dto/requests/stream_arc_request.py +199 -199
- zaber_motion/dto/requests/stream_buffer_erase_request.py +84 -84
- zaber_motion/dto/requests/stream_buffer_get_content_request.py +84 -84
- zaber_motion/dto/requests/stream_buffer_get_content_response.py +51 -51
- zaber_motion/dto/requests/stream_buffer_list.py +70 -70
- zaber_motion/dto/requests/stream_call_request.py +112 -112
- zaber_motion/dto/requests/stream_cancel_all_outputs_schedule_request.py +99 -99
- zaber_motion/dto/requests/stream_cancel_output_schedule_request.py +103 -103
- zaber_motion/dto/requests/stream_circle_request.py +155 -155
- zaber_motion/dto/requests/stream_empty_request.py +84 -84
- zaber_motion/dto/requests/stream_generic_command_batch_request.py +99 -99
- zaber_motion/dto/requests/stream_generic_command_request.py +93 -93
- zaber_motion/dto/requests/stream_get_axes_response.py +75 -75
- zaber_motion/dto/requests/stream_get_max_centripetal_acceleration_request.py +96 -96
- zaber_motion/dto/requests/stream_get_max_speed_request.py +96 -96
- zaber_motion/dto/requests/stream_get_max_tangential_acceleration_request.py +96 -96
- zaber_motion/dto/requests/stream_line_request.py +135 -135
- zaber_motion/dto/requests/stream_mode_response.py +60 -60
- zaber_motion/dto/requests/stream_segment_type.py +8 -8
- zaber_motion/dto/requests/stream_set_all_analog_outputs_request.py +101 -101
- zaber_motion/dto/requests/stream_set_all_analog_outputs_schedule_request.py +140 -140
- zaber_motion/dto/requests/stream_set_all_digital_outputs_request.py +102 -102
- zaber_motion/dto/requests/stream_set_all_digital_outputs_schedule_request.py +141 -141
- zaber_motion/dto/requests/stream_set_analog_output_request.py +109 -109
- zaber_motion/dto/requests/stream_set_analog_output_schedule_request.py +143 -143
- zaber_motion/dto/requests/stream_set_digital_output_request.py +110 -110
- zaber_motion/dto/requests/stream_set_digital_output_schedule_request.py +144 -144
- zaber_motion/dto/requests/stream_set_hold_request.py +89 -89
- zaber_motion/dto/requests/stream_set_max_centripetal_acceleration_request.py +107 -107
- zaber_motion/dto/requests/stream_set_max_speed_request.py +107 -107
- zaber_motion/dto/requests/stream_set_max_tangential_acceleration_request.py +107 -107
- zaber_motion/dto/requests/stream_setup_live_composite_request.py +123 -123
- zaber_motion/dto/requests/stream_setup_live_request.py +104 -104
- zaber_motion/dto/requests/stream_setup_store_arbitrary_axes_request.py +126 -126
- zaber_motion/dto/requests/stream_setup_store_composite_request.py +151 -151
- zaber_motion/dto/requests/stream_setup_store_request.py +132 -132
- zaber_motion/dto/requests/stream_wait_analog_input_request.py +118 -118
- zaber_motion/dto/requests/stream_wait_digital_input_request.py +103 -103
- zaber_motion/dto/requests/stream_wait_request.py +107 -107
- zaber_motion/dto/requests/stream_wait_until_idle_request.py +89 -89
- zaber_motion/dto/requests/string_array_response.py +51 -51
- zaber_motion/dto/requests/string_response.py +45 -45
- zaber_motion/dto/requests/test_event.py +45 -45
- zaber_motion/dto/requests/test_request.py +55 -55
- zaber_motion/dto/requests/test_request_complex.py +57 -0
- zaber_motion/dto/requests/test_response.py +45 -45
- zaber_motion/dto/requests/test_response_long.py +51 -51
- zaber_motion/dto/requests/toggle_device_db_store_request.py +50 -50
- zaber_motion/dto/requests/tools_list_serial_ports_response.py +51 -51
- zaber_motion/dto/requests/translator_create_from_device_request.py +97 -97
- zaber_motion/dto/requests/translator_create_live_request.py +91 -91
- zaber_motion/dto/requests/translator_create_request.py +62 -62
- zaber_motion/dto/requests/translator_create_response.py +51 -51
- zaber_motion/dto/requests/translator_empty_request.py +51 -51
- zaber_motion/dto/requests/translator_flush_live_request.py +56 -56
- zaber_motion/dto/requests/translator_flush_response.py +51 -51
- zaber_motion/dto/requests/translator_get_axis_offset_request.py +81 -81
- zaber_motion/dto/requests/translator_get_axis_position_request.py +72 -72
- zaber_motion/dto/requests/translator_set_axis_position_request.py +83 -83
- zaber_motion/dto/requests/translator_set_feed_rate_override_request.py +62 -62
- zaber_motion/dto/requests/translator_set_traverse_rate_request.py +74 -74
- zaber_motion/dto/requests/translator_translate_request.py +60 -60
- zaber_motion/dto/requests/trigger_clear_action_request.py +91 -91
- zaber_motion/dto/requests/trigger_empty_request.py +79 -79
- zaber_motion/dto/requests/trigger_enable_request.py +93 -93
- zaber_motion/dto/requests/trigger_enabled_states.py +56 -56
- zaber_motion/dto/requests/trigger_fire_at_interval_request.py +102 -102
- zaber_motion/dto/requests/trigger_fire_when_distance_travelled_request.py +116 -116
- zaber_motion/dto/requests/trigger_fire_when_io_request.py +128 -128
- zaber_motion/dto/requests/trigger_fire_when_request.py +88 -88
- zaber_motion/dto/requests/trigger_fire_when_setting_request.py +137 -137
- zaber_motion/dto/requests/trigger_on_fire_request.py +114 -114
- zaber_motion/dto/requests/trigger_on_fire_set_request.py +149 -149
- zaber_motion/dto/requests/trigger_on_fire_set_to_setting_request.py +149 -149
- zaber_motion/dto/requests/trigger_set_label_request.py +88 -88
- zaber_motion/dto/requests/trigger_states.py +56 -56
- zaber_motion/dto/requests/unit_convert_unit_request.py +71 -71
- zaber_motion/dto/requests/unit_get_enum_request.py +45 -45
- zaber_motion/dto/requests/unit_get_enum_response.py +48 -48
- zaber_motion/dto/requests/unit_get_symbol_request.py +48 -48
- zaber_motion/dto/requests/unit_get_symbol_response.py +45 -45
- zaber_motion/dto/requests/unknown_binary_response_event_wrapper.py +82 -82
- zaber_motion/dto/requests/unknown_response_event_wrapper.py +82 -82
- zaber_motion/dto/requests/wait_to_clear_warnings_request.py +105 -105
- zaber_motion/dto/requests/wait_to_respond_request.py +76 -76
- zaber_motion/dto/requests/wdi_generic_float_request.py +119 -0
- zaber_motion/dto/requests/wdi_generic_request.py +136 -136
- zaber_motion/dto/requests/wdi_get_status_response.py +50 -50
- zaber_motion/dto/rotation_direction.py +13 -13
- zaber_motion/dto_object.py +18 -18
- zaber_motion/events.py +112 -112
- zaber_motion/exceptions/__init__.py +87 -87
- zaber_motion/exceptions/bad_command_exception.py +10 -10
- zaber_motion/exceptions/bad_data_exception.py +10 -10
- zaber_motion/exceptions/binary_command_failed_exception.py +27 -27
- zaber_motion/exceptions/command_failed_exception.py +27 -27
- zaber_motion/exceptions/command_preempted_exception.py +10 -10
- zaber_motion/exceptions/command_too_long_exception.py +27 -27
- zaber_motion/exceptions/connection_closed_exception.py +10 -10
- zaber_motion/exceptions/connection_failed_exception.py +10 -10
- zaber_motion/exceptions/conversion_failed_exception.py +10 -10
- zaber_motion/exceptions/device_address_conflict_exception.py +27 -27
- zaber_motion/exceptions/device_busy_exception.py +10 -10
- zaber_motion/exceptions/device_db_failed_exception.py +27 -27
- zaber_motion/exceptions/device_detection_failed_exception.py +10 -10
- zaber_motion/exceptions/device_failed_exception.py +11 -11
- zaber_motion/exceptions/device_not_identified_exception.py +10 -10
- zaber_motion/exceptions/driver_disabled_exception.py +10 -10
- zaber_motion/exceptions/g_code_execution_exception.py +27 -27
- zaber_motion/exceptions/g_code_syntax_exception.py +27 -27
- zaber_motion/exceptions/incompatible_shared_library_exception.py +11 -11
- zaber_motion/exceptions/internal_error_exception.py +10 -10
- zaber_motion/exceptions/invalid_argument_exception.py +10 -10
- zaber_motion/exceptions/invalid_csv_data_exception.py +10 -10
- zaber_motion/exceptions/invalid_data_exception.py +10 -10
- zaber_motion/exceptions/invalid_operation_exception.py +10 -10
- zaber_motion/exceptions/invalid_packet_exception.py +27 -27
- zaber_motion/exceptions/invalid_park_state_exception.py +10 -10
- zaber_motion/exceptions/invalid_request_data_exception.py +11 -11
- zaber_motion/exceptions/invalid_response_exception.py +27 -27
- zaber_motion/exceptions/io_channel_out_of_range_exception.py +10 -10
- zaber_motion/exceptions/io_failed_exception.py +10 -10
- zaber_motion/exceptions/lockstep_enabled_exception.py +10 -10
- zaber_motion/exceptions/lockstep_not_enabled_exception.py +10 -10
- zaber_motion/exceptions/motion_lib_exception.py +18 -18
- zaber_motion/exceptions/movement_failed_exception.py +27 -27
- zaber_motion/exceptions/movement_interrupted_exception.py +27 -27
- zaber_motion/exceptions/no_device_found_exception.py +10 -10
- zaber_motion/exceptions/no_value_for_key_exception.py +10 -10
- zaber_motion/exceptions/not_supported_exception.py +10 -10
- zaber_motion/exceptions/operation_failed_exception.py +27 -27
- zaber_motion/exceptions/os_failed_exception.py +10 -10
- zaber_motion/exceptions/out_of_request_ids_exception.py +10 -10
- zaber_motion/exceptions/pvt_discontinuity_exception.py +10 -10
- zaber_motion/exceptions/pvt_execution_exception.py +27 -27
- zaber_motion/exceptions/pvt_mode_exception.py +10 -10
- zaber_motion/exceptions/pvt_movement_failed_exception.py +27 -27
- zaber_motion/exceptions/pvt_movement_interrupted_exception.py +27 -27
- zaber_motion/exceptions/pvt_sequence_generation_failed_exception.py +10 -10
- zaber_motion/exceptions/pvt_setup_failed_exception.py +10 -10
- zaber_motion/exceptions/remote_mode_exception.py +11 -11
- zaber_motion/exceptions/request_timeout_exception.py +10 -10
- zaber_motion/exceptions/serial_port_busy_exception.py +10 -10
- zaber_motion/exceptions/set_device_state_failed_exception.py +27 -27
- zaber_motion/exceptions/set_peripheral_state_failed_exception.py +27 -27
- zaber_motion/exceptions/setting_not_found_exception.py +10 -10
- zaber_motion/exceptions/stream_discontinuity_exception.py +10 -10
- zaber_motion/exceptions/stream_execution_exception.py +27 -27
- zaber_motion/exceptions/stream_mode_exception.py +10 -10
- zaber_motion/exceptions/stream_movement_failed_exception.py +27 -27
- zaber_motion/exceptions/stream_movement_interrupted_exception.py +27 -27
- zaber_motion/exceptions/stream_setup_failed_exception.py +10 -10
- zaber_motion/exceptions/timeout_exception.py +10 -10
- zaber_motion/exceptions/transport_already_used_exception.py +10 -10
- zaber_motion/exceptions/unknown_request_exception.py +10 -10
- zaber_motion/gcode/__init__.py +11 -11
- zaber_motion/gcode/offline_translator.py +401 -401
- zaber_motion/gcode/translator.py +424 -424
- zaber_motion/library.py +179 -179
- zaber_motion/microscopy/__init__.py +14 -14
- zaber_motion/microscopy/autofocus.py +645 -645
- zaber_motion/microscopy/camera_trigger.py +108 -108
- zaber_motion/microscopy/filter_changer.py +167 -167
- zaber_motion/microscopy/illuminator.py +139 -139
- zaber_motion/microscopy/illuminator_channel.py +616 -616
- zaber_motion/microscopy/microscope.py +315 -315
- zaber_motion/microscopy/objective_changer.py +403 -403
- zaber_motion/microscopy/wdi_autofocus_provider.py +536 -396
- zaber_motion/product/__init__.py +7 -7
- zaber_motion/product/process.py +818 -818
- zaber_motion/product/process_controller.py +134 -134
- zaber_motion/serialization.py +32 -32
- zaber_motion/tools.py +78 -78
- zaber_motion/unit_table.py +86 -86
- zaber_motion/units.py +206 -206
- zaber_motion/version.py +1 -1
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.14.0.dist-info}/LICENSE.txt +2119 -2119
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.14.0.dist-info}/METADATA +1 -1
- zaber_motion-7.14.0.dist-info/RECORD +496 -0
- zaber_motion_bindings/zaber-motion-core-windows-amd64.dll +0 -0
- zaber_motion-7.13.0.dist-info/RECORD +0 -494
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.14.0.dist-info}/WHEEL +0 -0
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.14.0.dist-info}/top_level.txt +0 -0
zaber_motion/ascii/stream.py
CHANGED
|
@@ -1,2182 +1,2182 @@
|
|
|
1
|
-
# pylint: disable=too-many-arguments, too-many-lines
|
|
2
|
-
|
|
3
|
-
# ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== #
|
|
4
|
-
# ============== DO NOT EDIT DIRECTLY ============== #
|
|
5
|
-
from typing import TYPE_CHECKING, List
|
|
6
|
-
from ..dto import requests as dto
|
|
7
|
-
from ..units import Units, VelocityUnits, AccelerationUnits, TimeUnits
|
|
8
|
-
from ..call import call, call_async, call_sync
|
|
9
|
-
from ..dto.measurement import Measurement
|
|
10
|
-
from ..dto.rotation_direction import RotationDirection
|
|
11
|
-
from .stream_buffer import StreamBuffer
|
|
12
|
-
from ..dto.ascii.stream_mode import StreamMode
|
|
13
|
-
from ..dto.ascii.stream_axis_definition import StreamAxisDefinition
|
|
14
|
-
from .stream_io import StreamIo
|
|
15
|
-
from ..dto.ascii.digital_output_action import DigitalOutputAction
|
|
16
|
-
|
|
17
|
-
if TYPE_CHECKING:
|
|
18
|
-
from .device import Device
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class Stream:
|
|
22
|
-
"""
|
|
23
|
-
A handle for a stream with this number on the device.
|
|
24
|
-
Streams provide a way to execute or store a sequence of actions.
|
|
25
|
-
Stream methods append actions to a queue which executes or stores actions in a first in, first out order.
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
@property
|
|
29
|
-
def device(self) -> 'Device':
|
|
30
|
-
"""
|
|
31
|
-
Device that controls this stream.
|
|
32
|
-
"""
|
|
33
|
-
return self._device
|
|
34
|
-
|
|
35
|
-
@property
|
|
36
|
-
def stream_id(self) -> int:
|
|
37
|
-
"""
|
|
38
|
-
The number that identifies the stream on the device.
|
|
39
|
-
"""
|
|
40
|
-
return self._stream_id
|
|
41
|
-
|
|
42
|
-
@property
|
|
43
|
-
def mode(self) -> StreamMode:
|
|
44
|
-
"""
|
|
45
|
-
Current mode of the stream.
|
|
46
|
-
"""
|
|
47
|
-
return self.__retrieve_mode()
|
|
48
|
-
|
|
49
|
-
@property
|
|
50
|
-
def axes(self) -> List[StreamAxisDefinition]:
|
|
51
|
-
"""
|
|
52
|
-
An array of axes definitions the stream is set up to control.
|
|
53
|
-
"""
|
|
54
|
-
return self.__retrieve_axes()
|
|
55
|
-
|
|
56
|
-
@property
|
|
57
|
-
def io(self) -> StreamIo:
|
|
58
|
-
"""
|
|
59
|
-
Gets an object that provides access to I/O for this stream.
|
|
60
|
-
"""
|
|
61
|
-
return self._io
|
|
62
|
-
|
|
63
|
-
def __init__(self, device: 'Device', stream_id: int):
|
|
64
|
-
self._device: 'Device' = device
|
|
65
|
-
self._stream_id: int = stream_id
|
|
66
|
-
self._io: StreamIo = StreamIo(device, stream_id)
|
|
67
|
-
|
|
68
|
-
def setup_live_composite(
|
|
69
|
-
self,
|
|
70
|
-
*axes: StreamAxisDefinition
|
|
71
|
-
) -> None:
|
|
72
|
-
"""
|
|
73
|
-
Setup the stream to control the specified axes and to queue actions on the device.
|
|
74
|
-
Allows use of lockstep axes in a stream.
|
|
75
|
-
|
|
76
|
-
Args:
|
|
77
|
-
axes: Definition of the stream axes.
|
|
78
|
-
"""
|
|
79
|
-
request = dto.StreamSetupLiveCompositeRequest(
|
|
80
|
-
interface_id=self.device.connection.interface_id,
|
|
81
|
-
device=self.device.device_address,
|
|
82
|
-
stream_id=self.stream_id,
|
|
83
|
-
axes=list(axes),
|
|
84
|
-
)
|
|
85
|
-
call("device/stream_setup_live_composite", request)
|
|
86
|
-
|
|
87
|
-
async def setup_live_composite_async(
|
|
88
|
-
self,
|
|
89
|
-
*axes: StreamAxisDefinition
|
|
90
|
-
) -> None:
|
|
91
|
-
"""
|
|
92
|
-
Setup the stream to control the specified axes and to queue actions on the device.
|
|
93
|
-
Allows use of lockstep axes in a stream.
|
|
94
|
-
|
|
95
|
-
Args:
|
|
96
|
-
axes: Definition of the stream axes.
|
|
97
|
-
"""
|
|
98
|
-
request = dto.StreamSetupLiveCompositeRequest(
|
|
99
|
-
interface_id=self.device.connection.interface_id,
|
|
100
|
-
device=self.device.device_address,
|
|
101
|
-
stream_id=self.stream_id,
|
|
102
|
-
axes=list(axes),
|
|
103
|
-
)
|
|
104
|
-
await call_async("device/stream_setup_live_composite", request)
|
|
105
|
-
|
|
106
|
-
def setup_live(
|
|
107
|
-
self,
|
|
108
|
-
*axes: int
|
|
109
|
-
) -> None:
|
|
110
|
-
"""
|
|
111
|
-
Setup the stream to control the specified axes and to queue actions on the device.
|
|
112
|
-
|
|
113
|
-
Args:
|
|
114
|
-
axes: Numbers of physical axes to setup the stream on.
|
|
115
|
-
"""
|
|
116
|
-
request = dto.StreamSetupLiveRequest(
|
|
117
|
-
interface_id=self.device.connection.interface_id,
|
|
118
|
-
device=self.device.device_address,
|
|
119
|
-
stream_id=self.stream_id,
|
|
120
|
-
axes=list(axes),
|
|
121
|
-
)
|
|
122
|
-
call("device/stream_setup_live", request)
|
|
123
|
-
|
|
124
|
-
async def setup_live_async(
|
|
125
|
-
self,
|
|
126
|
-
*axes: int
|
|
127
|
-
) -> None:
|
|
128
|
-
"""
|
|
129
|
-
Setup the stream to control the specified axes and to queue actions on the device.
|
|
130
|
-
|
|
131
|
-
Args:
|
|
132
|
-
axes: Numbers of physical axes to setup the stream on.
|
|
133
|
-
"""
|
|
134
|
-
request = dto.StreamSetupLiveRequest(
|
|
135
|
-
interface_id=self.device.connection.interface_id,
|
|
136
|
-
device=self.device.device_address,
|
|
137
|
-
stream_id=self.stream_id,
|
|
138
|
-
axes=list(axes),
|
|
139
|
-
)
|
|
140
|
-
await call_async("device/stream_setup_live", request)
|
|
141
|
-
|
|
142
|
-
def setup_store_composite(
|
|
143
|
-
self,
|
|
144
|
-
stream_buffer: StreamBuffer,
|
|
145
|
-
*axes: StreamAxisDefinition
|
|
146
|
-
) -> None:
|
|
147
|
-
"""
|
|
148
|
-
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
149
|
-
Allows use of lockstep axes in a stream.
|
|
150
|
-
|
|
151
|
-
Args:
|
|
152
|
-
stream_buffer: The stream buffer to queue actions in.
|
|
153
|
-
axes: Definition of the stream axes.
|
|
154
|
-
"""
|
|
155
|
-
request = dto.StreamSetupStoreCompositeRequest(
|
|
156
|
-
interface_id=self.device.connection.interface_id,
|
|
157
|
-
device=self.device.device_address,
|
|
158
|
-
stream_id=self.stream_id,
|
|
159
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
160
|
-
axes=list(axes),
|
|
161
|
-
)
|
|
162
|
-
call("device/stream_setup_store_composite", request)
|
|
163
|
-
|
|
164
|
-
async def setup_store_composite_async(
|
|
165
|
-
self,
|
|
166
|
-
stream_buffer: StreamBuffer,
|
|
167
|
-
*axes: StreamAxisDefinition
|
|
168
|
-
) -> None:
|
|
169
|
-
"""
|
|
170
|
-
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
171
|
-
Allows use of lockstep axes in a stream.
|
|
172
|
-
|
|
173
|
-
Args:
|
|
174
|
-
stream_buffer: The stream buffer to queue actions in.
|
|
175
|
-
axes: Definition of the stream axes.
|
|
176
|
-
"""
|
|
177
|
-
request = dto.StreamSetupStoreCompositeRequest(
|
|
178
|
-
interface_id=self.device.connection.interface_id,
|
|
179
|
-
device=self.device.device_address,
|
|
180
|
-
stream_id=self.stream_id,
|
|
181
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
182
|
-
axes=list(axes),
|
|
183
|
-
)
|
|
184
|
-
await call_async("device/stream_setup_store_composite", request)
|
|
185
|
-
|
|
186
|
-
def setup_store(
|
|
187
|
-
self,
|
|
188
|
-
stream_buffer: StreamBuffer,
|
|
189
|
-
*axes: int
|
|
190
|
-
) -> None:
|
|
191
|
-
"""
|
|
192
|
-
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
193
|
-
|
|
194
|
-
Args:
|
|
195
|
-
stream_buffer: The stream buffer to queue actions in.
|
|
196
|
-
axes: Numbers of physical axes to setup the stream on.
|
|
197
|
-
"""
|
|
198
|
-
request = dto.StreamSetupStoreRequest(
|
|
199
|
-
interface_id=self.device.connection.interface_id,
|
|
200
|
-
device=self.device.device_address,
|
|
201
|
-
stream_id=self.stream_id,
|
|
202
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
203
|
-
axes=list(axes),
|
|
204
|
-
)
|
|
205
|
-
call("device/stream_setup_store", request)
|
|
206
|
-
|
|
207
|
-
async def setup_store_async(
|
|
208
|
-
self,
|
|
209
|
-
stream_buffer: StreamBuffer,
|
|
210
|
-
*axes: int
|
|
211
|
-
) -> None:
|
|
212
|
-
"""
|
|
213
|
-
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
214
|
-
|
|
215
|
-
Args:
|
|
216
|
-
stream_buffer: The stream buffer to queue actions in.
|
|
217
|
-
axes: Numbers of physical axes to setup the stream on.
|
|
218
|
-
"""
|
|
219
|
-
request = dto.StreamSetupStoreRequest(
|
|
220
|
-
interface_id=self.device.connection.interface_id,
|
|
221
|
-
device=self.device.device_address,
|
|
222
|
-
stream_id=self.stream_id,
|
|
223
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
224
|
-
axes=list(axes),
|
|
225
|
-
)
|
|
226
|
-
await call_async("device/stream_setup_store", request)
|
|
227
|
-
|
|
228
|
-
def setup_store_arbitrary_axes(
|
|
229
|
-
self,
|
|
230
|
-
stream_buffer: StreamBuffer,
|
|
231
|
-
axes_count: int
|
|
232
|
-
) -> None:
|
|
233
|
-
"""
|
|
234
|
-
Setup the stream to use a specified number of axes, and to queue actions in a stream buffer.
|
|
235
|
-
Afterwards, you may call the resulting stream buffer on arbitrary axes.
|
|
236
|
-
This mode does not allow for unit conversions.
|
|
237
|
-
|
|
238
|
-
Args:
|
|
239
|
-
stream_buffer: The stream buffer to queue actions in.
|
|
240
|
-
axes_count: The number of axes in the stream.
|
|
241
|
-
"""
|
|
242
|
-
request = dto.StreamSetupStoreArbitraryAxesRequest(
|
|
243
|
-
interface_id=self.device.connection.interface_id,
|
|
244
|
-
device=self.device.device_address,
|
|
245
|
-
stream_id=self.stream_id,
|
|
246
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
247
|
-
axes_count=axes_count,
|
|
248
|
-
)
|
|
249
|
-
call("device/stream_setup_store_arbitrary_axes", request)
|
|
250
|
-
|
|
251
|
-
async def setup_store_arbitrary_axes_async(
|
|
252
|
-
self,
|
|
253
|
-
stream_buffer: StreamBuffer,
|
|
254
|
-
axes_count: int
|
|
255
|
-
) -> None:
|
|
256
|
-
"""
|
|
257
|
-
Setup the stream to use a specified number of axes, and to queue actions in a stream buffer.
|
|
258
|
-
Afterwards, you may call the resulting stream buffer on arbitrary axes.
|
|
259
|
-
This mode does not allow for unit conversions.
|
|
260
|
-
|
|
261
|
-
Args:
|
|
262
|
-
stream_buffer: The stream buffer to queue actions in.
|
|
263
|
-
axes_count: The number of axes in the stream.
|
|
264
|
-
"""
|
|
265
|
-
request = dto.StreamSetupStoreArbitraryAxesRequest(
|
|
266
|
-
interface_id=self.device.connection.interface_id,
|
|
267
|
-
device=self.device.device_address,
|
|
268
|
-
stream_id=self.stream_id,
|
|
269
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
270
|
-
axes_count=axes_count,
|
|
271
|
-
)
|
|
272
|
-
await call_async("device/stream_setup_store_arbitrary_axes", request)
|
|
273
|
-
|
|
274
|
-
def call(
|
|
275
|
-
self,
|
|
276
|
-
stream_buffer: StreamBuffer
|
|
277
|
-
) -> None:
|
|
278
|
-
"""
|
|
279
|
-
Append the actions in a stream buffer to the queue.
|
|
280
|
-
|
|
281
|
-
Args:
|
|
282
|
-
stream_buffer: The stream buffer to call.
|
|
283
|
-
"""
|
|
284
|
-
request = dto.StreamCallRequest(
|
|
285
|
-
interface_id=self.device.connection.interface_id,
|
|
286
|
-
device=self.device.device_address,
|
|
287
|
-
stream_id=self.stream_id,
|
|
288
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
289
|
-
)
|
|
290
|
-
call("device/stream_call", request)
|
|
291
|
-
|
|
292
|
-
async def call_async(
|
|
293
|
-
self,
|
|
294
|
-
stream_buffer: StreamBuffer
|
|
295
|
-
) -> None:
|
|
296
|
-
"""
|
|
297
|
-
Append the actions in a stream buffer to the queue.
|
|
298
|
-
|
|
299
|
-
Args:
|
|
300
|
-
stream_buffer: The stream buffer to call.
|
|
301
|
-
"""
|
|
302
|
-
request = dto.StreamCallRequest(
|
|
303
|
-
interface_id=self.device.connection.interface_id,
|
|
304
|
-
device=self.device.device_address,
|
|
305
|
-
stream_id=self.stream_id,
|
|
306
|
-
stream_buffer=stream_buffer.buffer_id,
|
|
307
|
-
)
|
|
308
|
-
await call_async("device/stream_call", request)
|
|
309
|
-
|
|
310
|
-
def line_absolute(
|
|
311
|
-
self,
|
|
312
|
-
*endpoint: Measurement
|
|
313
|
-
) -> None:
|
|
314
|
-
"""
|
|
315
|
-
Queue an absolute line movement in the stream.
|
|
316
|
-
|
|
317
|
-
Args:
|
|
318
|
-
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
319
|
-
"""
|
|
320
|
-
request = dto.StreamLineRequest(
|
|
321
|
-
interface_id=self.device.connection.interface_id,
|
|
322
|
-
device=self.device.device_address,
|
|
323
|
-
stream_id=self.stream_id,
|
|
324
|
-
type=dto.StreamSegmentType.ABS,
|
|
325
|
-
endpoint=list(endpoint),
|
|
326
|
-
)
|
|
327
|
-
call("device/stream_line", request)
|
|
328
|
-
|
|
329
|
-
async def line_absolute_async(
|
|
330
|
-
self,
|
|
331
|
-
*endpoint: Measurement
|
|
332
|
-
) -> None:
|
|
333
|
-
"""
|
|
334
|
-
Queue an absolute line movement in the stream.
|
|
335
|
-
|
|
336
|
-
Args:
|
|
337
|
-
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
338
|
-
"""
|
|
339
|
-
request = dto.StreamLineRequest(
|
|
340
|
-
interface_id=self.device.connection.interface_id,
|
|
341
|
-
device=self.device.device_address,
|
|
342
|
-
stream_id=self.stream_id,
|
|
343
|
-
type=dto.StreamSegmentType.ABS,
|
|
344
|
-
endpoint=list(endpoint),
|
|
345
|
-
)
|
|
346
|
-
await call_async("device/stream_line", request)
|
|
347
|
-
|
|
348
|
-
def line_relative(
|
|
349
|
-
self,
|
|
350
|
-
*endpoint: Measurement
|
|
351
|
-
) -> None:
|
|
352
|
-
"""
|
|
353
|
-
Queue a relative line movement in the stream.
|
|
354
|
-
|
|
355
|
-
Args:
|
|
356
|
-
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
357
|
-
"""
|
|
358
|
-
request = dto.StreamLineRequest(
|
|
359
|
-
interface_id=self.device.connection.interface_id,
|
|
360
|
-
device=self.device.device_address,
|
|
361
|
-
stream_id=self.stream_id,
|
|
362
|
-
type=dto.StreamSegmentType.REL,
|
|
363
|
-
endpoint=list(endpoint),
|
|
364
|
-
)
|
|
365
|
-
call("device/stream_line", request)
|
|
366
|
-
|
|
367
|
-
async def line_relative_async(
|
|
368
|
-
self,
|
|
369
|
-
*endpoint: Measurement
|
|
370
|
-
) -> None:
|
|
371
|
-
"""
|
|
372
|
-
Queue a relative line movement in the stream.
|
|
373
|
-
|
|
374
|
-
Args:
|
|
375
|
-
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
376
|
-
"""
|
|
377
|
-
request = dto.StreamLineRequest(
|
|
378
|
-
interface_id=self.device.connection.interface_id,
|
|
379
|
-
device=self.device.device_address,
|
|
380
|
-
stream_id=self.stream_id,
|
|
381
|
-
type=dto.StreamSegmentType.REL,
|
|
382
|
-
endpoint=list(endpoint),
|
|
383
|
-
)
|
|
384
|
-
await call_async("device/stream_line", request)
|
|
385
|
-
|
|
386
|
-
def line_absolute_on(
|
|
387
|
-
self,
|
|
388
|
-
target_axes_indices: List[int],
|
|
389
|
-
endpoint: List[Measurement]
|
|
390
|
-
) -> None:
|
|
391
|
-
"""
|
|
392
|
-
Queue an absolute line movement in the stream, targeting a subset of the stream axes.
|
|
393
|
-
Requires at least Firmware 7.11.
|
|
394
|
-
|
|
395
|
-
Args:
|
|
396
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
397
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
398
|
-
Indices are zero-based.
|
|
399
|
-
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
400
|
-
"""
|
|
401
|
-
request = dto.StreamLineRequest(
|
|
402
|
-
interface_id=self.device.connection.interface_id,
|
|
403
|
-
device=self.device.device_address,
|
|
404
|
-
stream_id=self.stream_id,
|
|
405
|
-
type=dto.StreamSegmentType.ABS,
|
|
406
|
-
target_axes_indices=target_axes_indices,
|
|
407
|
-
endpoint=endpoint,
|
|
408
|
-
)
|
|
409
|
-
call("device/stream_line", request)
|
|
410
|
-
|
|
411
|
-
async def line_absolute_on_async(
|
|
412
|
-
self,
|
|
413
|
-
target_axes_indices: List[int],
|
|
414
|
-
endpoint: List[Measurement]
|
|
415
|
-
) -> None:
|
|
416
|
-
"""
|
|
417
|
-
Queue an absolute line movement in the stream, targeting a subset of the stream axes.
|
|
418
|
-
Requires at least Firmware 7.11.
|
|
419
|
-
|
|
420
|
-
Args:
|
|
421
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
422
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
423
|
-
Indices are zero-based.
|
|
424
|
-
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
425
|
-
"""
|
|
426
|
-
request = dto.StreamLineRequest(
|
|
427
|
-
interface_id=self.device.connection.interface_id,
|
|
428
|
-
device=self.device.device_address,
|
|
429
|
-
stream_id=self.stream_id,
|
|
430
|
-
type=dto.StreamSegmentType.ABS,
|
|
431
|
-
target_axes_indices=target_axes_indices,
|
|
432
|
-
endpoint=endpoint,
|
|
433
|
-
)
|
|
434
|
-
await call_async("device/stream_line", request)
|
|
435
|
-
|
|
436
|
-
def line_relative_on(
|
|
437
|
-
self,
|
|
438
|
-
target_axes_indices: List[int],
|
|
439
|
-
endpoint: List[Measurement]
|
|
440
|
-
) -> None:
|
|
441
|
-
"""
|
|
442
|
-
Queue a relative line movement in the stream, targeting a subset of the stream axes.
|
|
443
|
-
Requires at least Firmware 7.11.
|
|
444
|
-
|
|
445
|
-
Args:
|
|
446
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
447
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
448
|
-
Indices are zero-based.
|
|
449
|
-
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
450
|
-
"""
|
|
451
|
-
request = dto.StreamLineRequest(
|
|
452
|
-
interface_id=self.device.connection.interface_id,
|
|
453
|
-
device=self.device.device_address,
|
|
454
|
-
stream_id=self.stream_id,
|
|
455
|
-
type=dto.StreamSegmentType.REL,
|
|
456
|
-
target_axes_indices=target_axes_indices,
|
|
457
|
-
endpoint=endpoint,
|
|
458
|
-
)
|
|
459
|
-
call("device/stream_line", request)
|
|
460
|
-
|
|
461
|
-
async def line_relative_on_async(
|
|
462
|
-
self,
|
|
463
|
-
target_axes_indices: List[int],
|
|
464
|
-
endpoint: List[Measurement]
|
|
465
|
-
) -> None:
|
|
466
|
-
"""
|
|
467
|
-
Queue a relative line movement in the stream, targeting a subset of the stream axes.
|
|
468
|
-
Requires at least Firmware 7.11.
|
|
469
|
-
|
|
470
|
-
Args:
|
|
471
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
472
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
473
|
-
Indices are zero-based.
|
|
474
|
-
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
475
|
-
"""
|
|
476
|
-
request = dto.StreamLineRequest(
|
|
477
|
-
interface_id=self.device.connection.interface_id,
|
|
478
|
-
device=self.device.device_address,
|
|
479
|
-
stream_id=self.stream_id,
|
|
480
|
-
type=dto.StreamSegmentType.REL,
|
|
481
|
-
target_axes_indices=target_axes_indices,
|
|
482
|
-
endpoint=endpoint,
|
|
483
|
-
)
|
|
484
|
-
await call_async("device/stream_line", request)
|
|
485
|
-
|
|
486
|
-
def arc_absolute(
|
|
487
|
-
self,
|
|
488
|
-
rotation_direction: RotationDirection,
|
|
489
|
-
center_x: Measurement,
|
|
490
|
-
center_y: Measurement,
|
|
491
|
-
end_x: Measurement,
|
|
492
|
-
end_y: Measurement
|
|
493
|
-
) -> None:
|
|
494
|
-
"""
|
|
495
|
-
Queue an absolute arc movement on the first two axes of the stream.
|
|
496
|
-
Absolute meaning that the home positions of the axes is treated as the origin.
|
|
497
|
-
|
|
498
|
-
Args:
|
|
499
|
-
rotation_direction: The direction of the rotation.
|
|
500
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
501
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
502
|
-
end_x: The first dimension of the end position of the arc.
|
|
503
|
-
end_y: The second dimension of the end position of the arc.
|
|
504
|
-
"""
|
|
505
|
-
request = dto.StreamArcRequest(
|
|
506
|
-
interface_id=self.device.connection.interface_id,
|
|
507
|
-
device=self.device.device_address,
|
|
508
|
-
stream_id=self.stream_id,
|
|
509
|
-
type=dto.StreamSegmentType.ABS,
|
|
510
|
-
rotation_direction=rotation_direction,
|
|
511
|
-
center_x=center_x,
|
|
512
|
-
center_y=center_y,
|
|
513
|
-
end_x=end_x,
|
|
514
|
-
end_y=end_y,
|
|
515
|
-
)
|
|
516
|
-
call("device/stream_arc", request)
|
|
517
|
-
|
|
518
|
-
async def arc_absolute_async(
|
|
519
|
-
self,
|
|
520
|
-
rotation_direction: RotationDirection,
|
|
521
|
-
center_x: Measurement,
|
|
522
|
-
center_y: Measurement,
|
|
523
|
-
end_x: Measurement,
|
|
524
|
-
end_y: Measurement
|
|
525
|
-
) -> None:
|
|
526
|
-
"""
|
|
527
|
-
Queue an absolute arc movement on the first two axes of the stream.
|
|
528
|
-
Absolute meaning that the home positions of the axes is treated as the origin.
|
|
529
|
-
|
|
530
|
-
Args:
|
|
531
|
-
rotation_direction: The direction of the rotation.
|
|
532
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
533
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
534
|
-
end_x: The first dimension of the end position of the arc.
|
|
535
|
-
end_y: The second dimension of the end position of the arc.
|
|
536
|
-
"""
|
|
537
|
-
request = dto.StreamArcRequest(
|
|
538
|
-
interface_id=self.device.connection.interface_id,
|
|
539
|
-
device=self.device.device_address,
|
|
540
|
-
stream_id=self.stream_id,
|
|
541
|
-
type=dto.StreamSegmentType.ABS,
|
|
542
|
-
rotation_direction=rotation_direction,
|
|
543
|
-
center_x=center_x,
|
|
544
|
-
center_y=center_y,
|
|
545
|
-
end_x=end_x,
|
|
546
|
-
end_y=end_y,
|
|
547
|
-
)
|
|
548
|
-
await call_async("device/stream_arc", request)
|
|
549
|
-
|
|
550
|
-
def arc_relative(
|
|
551
|
-
self,
|
|
552
|
-
rotation_direction: RotationDirection,
|
|
553
|
-
center_x: Measurement,
|
|
554
|
-
center_y: Measurement,
|
|
555
|
-
end_x: Measurement,
|
|
556
|
-
end_y: Measurement
|
|
557
|
-
) -> None:
|
|
558
|
-
"""
|
|
559
|
-
Queue a relative arc movement on the first two axes of the stream.
|
|
560
|
-
Relative meaning that the current position of the axes is treated as the origin.
|
|
561
|
-
|
|
562
|
-
Args:
|
|
563
|
-
rotation_direction: The direction of the rotation.
|
|
564
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
565
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
566
|
-
end_x: The first dimension of the end position of the arc.
|
|
567
|
-
end_y: The second dimension of the end position of the arc.
|
|
568
|
-
"""
|
|
569
|
-
request = dto.StreamArcRequest(
|
|
570
|
-
interface_id=self.device.connection.interface_id,
|
|
571
|
-
device=self.device.device_address,
|
|
572
|
-
stream_id=self.stream_id,
|
|
573
|
-
type=dto.StreamSegmentType.REL,
|
|
574
|
-
rotation_direction=rotation_direction,
|
|
575
|
-
center_x=center_x,
|
|
576
|
-
center_y=center_y,
|
|
577
|
-
end_x=end_x,
|
|
578
|
-
end_y=end_y,
|
|
579
|
-
)
|
|
580
|
-
call("device/stream_arc", request)
|
|
581
|
-
|
|
582
|
-
async def arc_relative_async(
|
|
583
|
-
self,
|
|
584
|
-
rotation_direction: RotationDirection,
|
|
585
|
-
center_x: Measurement,
|
|
586
|
-
center_y: Measurement,
|
|
587
|
-
end_x: Measurement,
|
|
588
|
-
end_y: Measurement
|
|
589
|
-
) -> None:
|
|
590
|
-
"""
|
|
591
|
-
Queue a relative arc movement on the first two axes of the stream.
|
|
592
|
-
Relative meaning that the current position of the axes is treated as the origin.
|
|
593
|
-
|
|
594
|
-
Args:
|
|
595
|
-
rotation_direction: The direction of the rotation.
|
|
596
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
597
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
598
|
-
end_x: The first dimension of the end position of the arc.
|
|
599
|
-
end_y: The second dimension of the end position of the arc.
|
|
600
|
-
"""
|
|
601
|
-
request = dto.StreamArcRequest(
|
|
602
|
-
interface_id=self.device.connection.interface_id,
|
|
603
|
-
device=self.device.device_address,
|
|
604
|
-
stream_id=self.stream_id,
|
|
605
|
-
type=dto.StreamSegmentType.REL,
|
|
606
|
-
rotation_direction=rotation_direction,
|
|
607
|
-
center_x=center_x,
|
|
608
|
-
center_y=center_y,
|
|
609
|
-
end_x=end_x,
|
|
610
|
-
end_y=end_y,
|
|
611
|
-
)
|
|
612
|
-
await call_async("device/stream_arc", request)
|
|
613
|
-
|
|
614
|
-
def arc_absolute_on(
|
|
615
|
-
self,
|
|
616
|
-
target_axes_indices: List[int],
|
|
617
|
-
rotation_direction: RotationDirection,
|
|
618
|
-
center_x: Measurement,
|
|
619
|
-
center_y: Measurement,
|
|
620
|
-
end_x: Measurement,
|
|
621
|
-
end_y: Measurement
|
|
622
|
-
) -> None:
|
|
623
|
-
"""
|
|
624
|
-
Queue an absolute arc movement in the stream.
|
|
625
|
-
The movement will only target the specified subset of axes in the stream.
|
|
626
|
-
Requires at least Firmware 7.11.
|
|
627
|
-
|
|
628
|
-
Args:
|
|
629
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
630
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
631
|
-
Indices are zero-based.
|
|
632
|
-
rotation_direction: The direction of the rotation.
|
|
633
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
634
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
635
|
-
end_x: The first dimension of the end position of the arc.
|
|
636
|
-
end_y: The second dimension of the end position of the arc.
|
|
637
|
-
"""
|
|
638
|
-
request = dto.StreamArcRequest(
|
|
639
|
-
interface_id=self.device.connection.interface_id,
|
|
640
|
-
device=self.device.device_address,
|
|
641
|
-
stream_id=self.stream_id,
|
|
642
|
-
type=dto.StreamSegmentType.ABS,
|
|
643
|
-
target_axes_indices=target_axes_indices,
|
|
644
|
-
rotation_direction=rotation_direction,
|
|
645
|
-
center_x=center_x,
|
|
646
|
-
center_y=center_y,
|
|
647
|
-
end_x=end_x,
|
|
648
|
-
end_y=end_y,
|
|
649
|
-
)
|
|
650
|
-
call("device/stream_arc", request)
|
|
651
|
-
|
|
652
|
-
async def arc_absolute_on_async(
|
|
653
|
-
self,
|
|
654
|
-
target_axes_indices: List[int],
|
|
655
|
-
rotation_direction: RotationDirection,
|
|
656
|
-
center_x: Measurement,
|
|
657
|
-
center_y: Measurement,
|
|
658
|
-
end_x: Measurement,
|
|
659
|
-
end_y: Measurement
|
|
660
|
-
) -> None:
|
|
661
|
-
"""
|
|
662
|
-
Queue an absolute arc movement in the stream.
|
|
663
|
-
The movement will only target the specified subset of axes in the stream.
|
|
664
|
-
Requires at least Firmware 7.11.
|
|
665
|
-
|
|
666
|
-
Args:
|
|
667
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
668
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
669
|
-
Indices are zero-based.
|
|
670
|
-
rotation_direction: The direction of the rotation.
|
|
671
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
672
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
673
|
-
end_x: The first dimension of the end position of the arc.
|
|
674
|
-
end_y: The second dimension of the end position of the arc.
|
|
675
|
-
"""
|
|
676
|
-
request = dto.StreamArcRequest(
|
|
677
|
-
interface_id=self.device.connection.interface_id,
|
|
678
|
-
device=self.device.device_address,
|
|
679
|
-
stream_id=self.stream_id,
|
|
680
|
-
type=dto.StreamSegmentType.ABS,
|
|
681
|
-
target_axes_indices=target_axes_indices,
|
|
682
|
-
rotation_direction=rotation_direction,
|
|
683
|
-
center_x=center_x,
|
|
684
|
-
center_y=center_y,
|
|
685
|
-
end_x=end_x,
|
|
686
|
-
end_y=end_y,
|
|
687
|
-
)
|
|
688
|
-
await call_async("device/stream_arc", request)
|
|
689
|
-
|
|
690
|
-
def arc_relative_on(
|
|
691
|
-
self,
|
|
692
|
-
target_axes_indices: List[int],
|
|
693
|
-
rotation_direction: RotationDirection,
|
|
694
|
-
center_x: Measurement,
|
|
695
|
-
center_y: Measurement,
|
|
696
|
-
end_x: Measurement,
|
|
697
|
-
end_y: Measurement
|
|
698
|
-
) -> None:
|
|
699
|
-
"""
|
|
700
|
-
Queue a relative arc movement in the stream.
|
|
701
|
-
The movement will only target the specified subset of axes in the stream.
|
|
702
|
-
Requires at least Firmware 7.11.
|
|
703
|
-
|
|
704
|
-
Args:
|
|
705
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
706
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
707
|
-
Indices are zero-based.
|
|
708
|
-
rotation_direction: The direction of the rotation.
|
|
709
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
710
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
711
|
-
end_x: The first dimension of the end position of the arc.
|
|
712
|
-
end_y: The second dimension of the end position of the arc.
|
|
713
|
-
"""
|
|
714
|
-
request = dto.StreamArcRequest(
|
|
715
|
-
interface_id=self.device.connection.interface_id,
|
|
716
|
-
device=self.device.device_address,
|
|
717
|
-
stream_id=self.stream_id,
|
|
718
|
-
type=dto.StreamSegmentType.REL,
|
|
719
|
-
target_axes_indices=target_axes_indices,
|
|
720
|
-
rotation_direction=rotation_direction,
|
|
721
|
-
center_x=center_x,
|
|
722
|
-
center_y=center_y,
|
|
723
|
-
end_x=end_x,
|
|
724
|
-
end_y=end_y,
|
|
725
|
-
)
|
|
726
|
-
call("device/stream_arc", request)
|
|
727
|
-
|
|
728
|
-
async def arc_relative_on_async(
|
|
729
|
-
self,
|
|
730
|
-
target_axes_indices: List[int],
|
|
731
|
-
rotation_direction: RotationDirection,
|
|
732
|
-
center_x: Measurement,
|
|
733
|
-
center_y: Measurement,
|
|
734
|
-
end_x: Measurement,
|
|
735
|
-
end_y: Measurement
|
|
736
|
-
) -> None:
|
|
737
|
-
"""
|
|
738
|
-
Queue a relative arc movement in the stream.
|
|
739
|
-
The movement will only target the specified subset of axes in the stream.
|
|
740
|
-
Requires at least Firmware 7.11.
|
|
741
|
-
|
|
742
|
-
Args:
|
|
743
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
744
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
745
|
-
Indices are zero-based.
|
|
746
|
-
rotation_direction: The direction of the rotation.
|
|
747
|
-
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
748
|
-
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
749
|
-
end_x: The first dimension of the end position of the arc.
|
|
750
|
-
end_y: The second dimension of the end position of the arc.
|
|
751
|
-
"""
|
|
752
|
-
request = dto.StreamArcRequest(
|
|
753
|
-
interface_id=self.device.connection.interface_id,
|
|
754
|
-
device=self.device.device_address,
|
|
755
|
-
stream_id=self.stream_id,
|
|
756
|
-
type=dto.StreamSegmentType.REL,
|
|
757
|
-
target_axes_indices=target_axes_indices,
|
|
758
|
-
rotation_direction=rotation_direction,
|
|
759
|
-
center_x=center_x,
|
|
760
|
-
center_y=center_y,
|
|
761
|
-
end_x=end_x,
|
|
762
|
-
end_y=end_y,
|
|
763
|
-
)
|
|
764
|
-
await call_async("device/stream_arc", request)
|
|
765
|
-
|
|
766
|
-
def helix_absolute_on(
|
|
767
|
-
self,
|
|
768
|
-
target_axes_indices: List[int],
|
|
769
|
-
rotation_direction: RotationDirection,
|
|
770
|
-
center_x: Measurement,
|
|
771
|
-
center_y: Measurement,
|
|
772
|
-
end_x: Measurement,
|
|
773
|
-
end_y: Measurement,
|
|
774
|
-
*endpoint: Measurement
|
|
775
|
-
) -> None:
|
|
776
|
-
"""
|
|
777
|
-
Queue an absolute helix movement in the stream.
|
|
778
|
-
Requires at least Firmware 7.28.
|
|
779
|
-
|
|
780
|
-
Args:
|
|
781
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
782
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
783
|
-
Indices are zero-based.
|
|
784
|
-
The first two axes refer to the helix's arc component,
|
|
785
|
-
while the rest refers to the helix's line component.
|
|
786
|
-
rotation_direction: The direction of the rotation.
|
|
787
|
-
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
788
|
-
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
789
|
-
end_x: The first dimension of the end position of the helix's arc component.
|
|
790
|
-
end_y: The second dimension of the end position of the helix's arc component.
|
|
791
|
-
endpoint: Positions for the helix's line component axes, relative to their home positions.
|
|
792
|
-
"""
|
|
793
|
-
request = dto.StreamArcRequest(
|
|
794
|
-
interface_id=self.device.connection.interface_id,
|
|
795
|
-
device=self.device.device_address,
|
|
796
|
-
stream_id=self.stream_id,
|
|
797
|
-
type=dto.StreamSegmentType.ABS,
|
|
798
|
-
target_axes_indices=target_axes_indices,
|
|
799
|
-
rotation_direction=rotation_direction,
|
|
800
|
-
center_x=center_x,
|
|
801
|
-
center_y=center_y,
|
|
802
|
-
end_x=end_x,
|
|
803
|
-
end_y=end_y,
|
|
804
|
-
endpoint=list(endpoint),
|
|
805
|
-
)
|
|
806
|
-
call("device/stream_helix", request)
|
|
807
|
-
|
|
808
|
-
async def helix_absolute_on_async(
|
|
809
|
-
self,
|
|
810
|
-
target_axes_indices: List[int],
|
|
811
|
-
rotation_direction: RotationDirection,
|
|
812
|
-
center_x: Measurement,
|
|
813
|
-
center_y: Measurement,
|
|
814
|
-
end_x: Measurement,
|
|
815
|
-
end_y: Measurement,
|
|
816
|
-
*endpoint: Measurement
|
|
817
|
-
) -> None:
|
|
818
|
-
"""
|
|
819
|
-
Queue an absolute helix movement in the stream.
|
|
820
|
-
Requires at least Firmware 7.28.
|
|
821
|
-
|
|
822
|
-
Args:
|
|
823
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
824
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
825
|
-
Indices are zero-based.
|
|
826
|
-
The first two axes refer to the helix's arc component,
|
|
827
|
-
while the rest refers to the helix's line component.
|
|
828
|
-
rotation_direction: The direction of the rotation.
|
|
829
|
-
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
830
|
-
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
831
|
-
end_x: The first dimension of the end position of the helix's arc component.
|
|
832
|
-
end_y: The second dimension of the end position of the helix's arc component.
|
|
833
|
-
endpoint: Positions for the helix's line component axes, relative to their home positions.
|
|
834
|
-
"""
|
|
835
|
-
request = dto.StreamArcRequest(
|
|
836
|
-
interface_id=self.device.connection.interface_id,
|
|
837
|
-
device=self.device.device_address,
|
|
838
|
-
stream_id=self.stream_id,
|
|
839
|
-
type=dto.StreamSegmentType.ABS,
|
|
840
|
-
target_axes_indices=target_axes_indices,
|
|
841
|
-
rotation_direction=rotation_direction,
|
|
842
|
-
center_x=center_x,
|
|
843
|
-
center_y=center_y,
|
|
844
|
-
end_x=end_x,
|
|
845
|
-
end_y=end_y,
|
|
846
|
-
endpoint=list(endpoint),
|
|
847
|
-
)
|
|
848
|
-
await call_async("device/stream_helix", request)
|
|
849
|
-
|
|
850
|
-
def helix_relative_on(
|
|
851
|
-
self,
|
|
852
|
-
target_axes_indices: List[int],
|
|
853
|
-
rotation_direction: RotationDirection,
|
|
854
|
-
center_x: Measurement,
|
|
855
|
-
center_y: Measurement,
|
|
856
|
-
end_x: Measurement,
|
|
857
|
-
end_y: Measurement,
|
|
858
|
-
*endpoint: Measurement
|
|
859
|
-
) -> None:
|
|
860
|
-
"""
|
|
861
|
-
Queue a relative helix movement in the stream.
|
|
862
|
-
Requires at least Firmware 7.28.
|
|
863
|
-
|
|
864
|
-
Args:
|
|
865
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
866
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
867
|
-
Indices are zero-based.
|
|
868
|
-
The first two axes refer to the helix's arc component,
|
|
869
|
-
while the rest refers to the helix's line component.
|
|
870
|
-
rotation_direction: The direction of the rotation.
|
|
871
|
-
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
872
|
-
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
873
|
-
end_x: The first dimension of the end position of the helix's arc component.
|
|
874
|
-
end_y: The second dimension of the end position of the helix's arc component.
|
|
875
|
-
endpoint: Positions for the helix's line component axes, relative to their positions before movement.
|
|
876
|
-
"""
|
|
877
|
-
request = dto.StreamArcRequest(
|
|
878
|
-
interface_id=self.device.connection.interface_id,
|
|
879
|
-
device=self.device.device_address,
|
|
880
|
-
stream_id=self.stream_id,
|
|
881
|
-
type=dto.StreamSegmentType.REL,
|
|
882
|
-
target_axes_indices=target_axes_indices,
|
|
883
|
-
rotation_direction=rotation_direction,
|
|
884
|
-
center_x=center_x,
|
|
885
|
-
center_y=center_y,
|
|
886
|
-
end_x=end_x,
|
|
887
|
-
end_y=end_y,
|
|
888
|
-
endpoint=list(endpoint),
|
|
889
|
-
)
|
|
890
|
-
call("device/stream_helix", request)
|
|
891
|
-
|
|
892
|
-
async def helix_relative_on_async(
|
|
893
|
-
self,
|
|
894
|
-
target_axes_indices: List[int],
|
|
895
|
-
rotation_direction: RotationDirection,
|
|
896
|
-
center_x: Measurement,
|
|
897
|
-
center_y: Measurement,
|
|
898
|
-
end_x: Measurement,
|
|
899
|
-
end_y: Measurement,
|
|
900
|
-
*endpoint: Measurement
|
|
901
|
-
) -> None:
|
|
902
|
-
"""
|
|
903
|
-
Queue a relative helix movement in the stream.
|
|
904
|
-
Requires at least Firmware 7.28.
|
|
905
|
-
|
|
906
|
-
Args:
|
|
907
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
908
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
909
|
-
Indices are zero-based.
|
|
910
|
-
The first two axes refer to the helix's arc component,
|
|
911
|
-
while the rest refers to the helix's line component.
|
|
912
|
-
rotation_direction: The direction of the rotation.
|
|
913
|
-
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
914
|
-
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
915
|
-
end_x: The first dimension of the end position of the helix's arc component.
|
|
916
|
-
end_y: The second dimension of the end position of the helix's arc component.
|
|
917
|
-
endpoint: Positions for the helix's line component axes, relative to their positions before movement.
|
|
918
|
-
"""
|
|
919
|
-
request = dto.StreamArcRequest(
|
|
920
|
-
interface_id=self.device.connection.interface_id,
|
|
921
|
-
device=self.device.device_address,
|
|
922
|
-
stream_id=self.stream_id,
|
|
923
|
-
type=dto.StreamSegmentType.REL,
|
|
924
|
-
target_axes_indices=target_axes_indices,
|
|
925
|
-
rotation_direction=rotation_direction,
|
|
926
|
-
center_x=center_x,
|
|
927
|
-
center_y=center_y,
|
|
928
|
-
end_x=end_x,
|
|
929
|
-
end_y=end_y,
|
|
930
|
-
endpoint=list(endpoint),
|
|
931
|
-
)
|
|
932
|
-
await call_async("device/stream_helix", request)
|
|
933
|
-
|
|
934
|
-
def circle_absolute(
|
|
935
|
-
self,
|
|
936
|
-
rotation_direction: RotationDirection,
|
|
937
|
-
center_x: Measurement,
|
|
938
|
-
center_y: Measurement
|
|
939
|
-
) -> None:
|
|
940
|
-
"""
|
|
941
|
-
Queue an absolute circle movement on the first two axes of the stream.
|
|
942
|
-
Absolute meaning that the home positions of the axes are treated as the origin.
|
|
943
|
-
|
|
944
|
-
Args:
|
|
945
|
-
rotation_direction: The direction of the rotation.
|
|
946
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
947
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
948
|
-
"""
|
|
949
|
-
request = dto.StreamCircleRequest(
|
|
950
|
-
interface_id=self.device.connection.interface_id,
|
|
951
|
-
device=self.device.device_address,
|
|
952
|
-
stream_id=self.stream_id,
|
|
953
|
-
type=dto.StreamSegmentType.ABS,
|
|
954
|
-
rotation_direction=rotation_direction,
|
|
955
|
-
center_x=center_x,
|
|
956
|
-
center_y=center_y,
|
|
957
|
-
)
|
|
958
|
-
call("device/stream_circle", request)
|
|
959
|
-
|
|
960
|
-
async def circle_absolute_async(
|
|
961
|
-
self,
|
|
962
|
-
rotation_direction: RotationDirection,
|
|
963
|
-
center_x: Measurement,
|
|
964
|
-
center_y: Measurement
|
|
965
|
-
) -> None:
|
|
966
|
-
"""
|
|
967
|
-
Queue an absolute circle movement on the first two axes of the stream.
|
|
968
|
-
Absolute meaning that the home positions of the axes are treated as the origin.
|
|
969
|
-
|
|
970
|
-
Args:
|
|
971
|
-
rotation_direction: The direction of the rotation.
|
|
972
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
973
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
974
|
-
"""
|
|
975
|
-
request = dto.StreamCircleRequest(
|
|
976
|
-
interface_id=self.device.connection.interface_id,
|
|
977
|
-
device=self.device.device_address,
|
|
978
|
-
stream_id=self.stream_id,
|
|
979
|
-
type=dto.StreamSegmentType.ABS,
|
|
980
|
-
rotation_direction=rotation_direction,
|
|
981
|
-
center_x=center_x,
|
|
982
|
-
center_y=center_y,
|
|
983
|
-
)
|
|
984
|
-
await call_async("device/stream_circle", request)
|
|
985
|
-
|
|
986
|
-
def circle_relative(
|
|
987
|
-
self,
|
|
988
|
-
rotation_direction: RotationDirection,
|
|
989
|
-
center_x: Measurement,
|
|
990
|
-
center_y: Measurement
|
|
991
|
-
) -> None:
|
|
992
|
-
"""
|
|
993
|
-
Queue a relative circle movement on the first two axes of the stream.
|
|
994
|
-
Relative meaning that the current position of the axes is treated as the origin.
|
|
995
|
-
|
|
996
|
-
Args:
|
|
997
|
-
rotation_direction: The direction of the rotation.
|
|
998
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
999
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
1000
|
-
"""
|
|
1001
|
-
request = dto.StreamCircleRequest(
|
|
1002
|
-
interface_id=self.device.connection.interface_id,
|
|
1003
|
-
device=self.device.device_address,
|
|
1004
|
-
stream_id=self.stream_id,
|
|
1005
|
-
type=dto.StreamSegmentType.REL,
|
|
1006
|
-
rotation_direction=rotation_direction,
|
|
1007
|
-
center_x=center_x,
|
|
1008
|
-
center_y=center_y,
|
|
1009
|
-
)
|
|
1010
|
-
call("device/stream_circle", request)
|
|
1011
|
-
|
|
1012
|
-
async def circle_relative_async(
|
|
1013
|
-
self,
|
|
1014
|
-
rotation_direction: RotationDirection,
|
|
1015
|
-
center_x: Measurement,
|
|
1016
|
-
center_y: Measurement
|
|
1017
|
-
) -> None:
|
|
1018
|
-
"""
|
|
1019
|
-
Queue a relative circle movement on the first two axes of the stream.
|
|
1020
|
-
Relative meaning that the current position of the axes is treated as the origin.
|
|
1021
|
-
|
|
1022
|
-
Args:
|
|
1023
|
-
rotation_direction: The direction of the rotation.
|
|
1024
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
1025
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
1026
|
-
"""
|
|
1027
|
-
request = dto.StreamCircleRequest(
|
|
1028
|
-
interface_id=self.device.connection.interface_id,
|
|
1029
|
-
device=self.device.device_address,
|
|
1030
|
-
stream_id=self.stream_id,
|
|
1031
|
-
type=dto.StreamSegmentType.REL,
|
|
1032
|
-
rotation_direction=rotation_direction,
|
|
1033
|
-
center_x=center_x,
|
|
1034
|
-
center_y=center_y,
|
|
1035
|
-
)
|
|
1036
|
-
await call_async("device/stream_circle", request)
|
|
1037
|
-
|
|
1038
|
-
def circle_absolute_on(
|
|
1039
|
-
self,
|
|
1040
|
-
target_axes_indices: List[int],
|
|
1041
|
-
rotation_direction: RotationDirection,
|
|
1042
|
-
center_x: Measurement,
|
|
1043
|
-
center_y: Measurement
|
|
1044
|
-
) -> None:
|
|
1045
|
-
"""
|
|
1046
|
-
Queue an absolute circle movement in the stream.
|
|
1047
|
-
The movement will only target the specified subset of axes in the stream.
|
|
1048
|
-
Requires at least Firmware 7.11.
|
|
1049
|
-
|
|
1050
|
-
Args:
|
|
1051
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1052
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
1053
|
-
Indices are zero-based.
|
|
1054
|
-
rotation_direction: The direction of the rotation.
|
|
1055
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
1056
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
1057
|
-
"""
|
|
1058
|
-
request = dto.StreamCircleRequest(
|
|
1059
|
-
interface_id=self.device.connection.interface_id,
|
|
1060
|
-
device=self.device.device_address,
|
|
1061
|
-
stream_id=self.stream_id,
|
|
1062
|
-
type=dto.StreamSegmentType.ABS,
|
|
1063
|
-
target_axes_indices=target_axes_indices,
|
|
1064
|
-
rotation_direction=rotation_direction,
|
|
1065
|
-
center_x=center_x,
|
|
1066
|
-
center_y=center_y,
|
|
1067
|
-
)
|
|
1068
|
-
call("device/stream_circle", request)
|
|
1069
|
-
|
|
1070
|
-
async def circle_absolute_on_async(
|
|
1071
|
-
self,
|
|
1072
|
-
target_axes_indices: List[int],
|
|
1073
|
-
rotation_direction: RotationDirection,
|
|
1074
|
-
center_x: Measurement,
|
|
1075
|
-
center_y: Measurement
|
|
1076
|
-
) -> None:
|
|
1077
|
-
"""
|
|
1078
|
-
Queue an absolute circle movement in the stream.
|
|
1079
|
-
The movement will only target the specified subset of axes in the stream.
|
|
1080
|
-
Requires at least Firmware 7.11.
|
|
1081
|
-
|
|
1082
|
-
Args:
|
|
1083
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1084
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
1085
|
-
Indices are zero-based.
|
|
1086
|
-
rotation_direction: The direction of the rotation.
|
|
1087
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
1088
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
1089
|
-
"""
|
|
1090
|
-
request = dto.StreamCircleRequest(
|
|
1091
|
-
interface_id=self.device.connection.interface_id,
|
|
1092
|
-
device=self.device.device_address,
|
|
1093
|
-
stream_id=self.stream_id,
|
|
1094
|
-
type=dto.StreamSegmentType.ABS,
|
|
1095
|
-
target_axes_indices=target_axes_indices,
|
|
1096
|
-
rotation_direction=rotation_direction,
|
|
1097
|
-
center_x=center_x,
|
|
1098
|
-
center_y=center_y,
|
|
1099
|
-
)
|
|
1100
|
-
await call_async("device/stream_circle", request)
|
|
1101
|
-
|
|
1102
|
-
def circle_relative_on(
|
|
1103
|
-
self,
|
|
1104
|
-
target_axes_indices: List[int],
|
|
1105
|
-
rotation_direction: RotationDirection,
|
|
1106
|
-
center_x: Measurement,
|
|
1107
|
-
center_y: Measurement
|
|
1108
|
-
) -> None:
|
|
1109
|
-
"""
|
|
1110
|
-
Queue a relative circle movement in the stream.
|
|
1111
|
-
The movement will only target the specified subset of axes in the stream.
|
|
1112
|
-
Requires at least Firmware 7.11.
|
|
1113
|
-
|
|
1114
|
-
Args:
|
|
1115
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1116
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
1117
|
-
Indices are zero-based.
|
|
1118
|
-
rotation_direction: The direction of the rotation.
|
|
1119
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
1120
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
1121
|
-
"""
|
|
1122
|
-
request = dto.StreamCircleRequest(
|
|
1123
|
-
interface_id=self.device.connection.interface_id,
|
|
1124
|
-
device=self.device.device_address,
|
|
1125
|
-
stream_id=self.stream_id,
|
|
1126
|
-
type=dto.StreamSegmentType.REL,
|
|
1127
|
-
target_axes_indices=target_axes_indices,
|
|
1128
|
-
rotation_direction=rotation_direction,
|
|
1129
|
-
center_x=center_x,
|
|
1130
|
-
center_y=center_y,
|
|
1131
|
-
)
|
|
1132
|
-
call("device/stream_circle", request)
|
|
1133
|
-
|
|
1134
|
-
async def circle_relative_on_async(
|
|
1135
|
-
self,
|
|
1136
|
-
target_axes_indices: List[int],
|
|
1137
|
-
rotation_direction: RotationDirection,
|
|
1138
|
-
center_x: Measurement,
|
|
1139
|
-
center_y: Measurement
|
|
1140
|
-
) -> None:
|
|
1141
|
-
"""
|
|
1142
|
-
Queue a relative circle movement in the stream.
|
|
1143
|
-
The movement will only target the specified subset of axes in the stream.
|
|
1144
|
-
Requires at least Firmware 7.11.
|
|
1145
|
-
|
|
1146
|
-
Args:
|
|
1147
|
-
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1148
|
-
Refers to the axes provided during the stream setup or further execution.
|
|
1149
|
-
Indices are zero-based.
|
|
1150
|
-
rotation_direction: The direction of the rotation.
|
|
1151
|
-
center_x: The first dimension of the position of the center of the circle.
|
|
1152
|
-
center_y: The second dimension of the position of the center of the circle.
|
|
1153
|
-
"""
|
|
1154
|
-
request = dto.StreamCircleRequest(
|
|
1155
|
-
interface_id=self.device.connection.interface_id,
|
|
1156
|
-
device=self.device.device_address,
|
|
1157
|
-
stream_id=self.stream_id,
|
|
1158
|
-
type=dto.StreamSegmentType.REL,
|
|
1159
|
-
target_axes_indices=target_axes_indices,
|
|
1160
|
-
rotation_direction=rotation_direction,
|
|
1161
|
-
center_x=center_x,
|
|
1162
|
-
center_y=center_y,
|
|
1163
|
-
)
|
|
1164
|
-
await call_async("device/stream_circle", request)
|
|
1165
|
-
|
|
1166
|
-
def wait(
|
|
1167
|
-
self,
|
|
1168
|
-
time: float,
|
|
1169
|
-
unit: TimeUnits = Units.NATIVE
|
|
1170
|
-
) -> None:
|
|
1171
|
-
"""
|
|
1172
|
-
Wait a specified time.
|
|
1173
|
-
|
|
1174
|
-
Args:
|
|
1175
|
-
time: Amount of time to wait.
|
|
1176
|
-
unit: Units of time.
|
|
1177
|
-
"""
|
|
1178
|
-
request = dto.StreamWaitRequest(
|
|
1179
|
-
interface_id=self.device.connection.interface_id,
|
|
1180
|
-
device=self.device.device_address,
|
|
1181
|
-
stream_id=self.stream_id,
|
|
1182
|
-
time=time,
|
|
1183
|
-
unit=unit,
|
|
1184
|
-
)
|
|
1185
|
-
call("device/stream_wait", request)
|
|
1186
|
-
|
|
1187
|
-
async def wait_async(
|
|
1188
|
-
self,
|
|
1189
|
-
time: float,
|
|
1190
|
-
unit: TimeUnits = Units.NATIVE
|
|
1191
|
-
) -> None:
|
|
1192
|
-
"""
|
|
1193
|
-
Wait a specified time.
|
|
1194
|
-
|
|
1195
|
-
Args:
|
|
1196
|
-
time: Amount of time to wait.
|
|
1197
|
-
unit: Units of time.
|
|
1198
|
-
"""
|
|
1199
|
-
request = dto.StreamWaitRequest(
|
|
1200
|
-
interface_id=self.device.connection.interface_id,
|
|
1201
|
-
device=self.device.device_address,
|
|
1202
|
-
stream_id=self.stream_id,
|
|
1203
|
-
time=time,
|
|
1204
|
-
unit=unit,
|
|
1205
|
-
)
|
|
1206
|
-
await call_async("device/stream_wait", request)
|
|
1207
|
-
|
|
1208
|
-
def wait_until_idle(
|
|
1209
|
-
self,
|
|
1210
|
-
throw_error_on_fault: bool = True
|
|
1211
|
-
) -> None:
|
|
1212
|
-
"""
|
|
1213
|
-
Waits until the live stream executes all queued actions.
|
|
1214
|
-
|
|
1215
|
-
Args:
|
|
1216
|
-
throw_error_on_fault: Determines whether to throw error when fault is observed.
|
|
1217
|
-
"""
|
|
1218
|
-
request = dto.StreamWaitUntilIdleRequest(
|
|
1219
|
-
interface_id=self.device.connection.interface_id,
|
|
1220
|
-
device=self.device.device_address,
|
|
1221
|
-
stream_id=self.stream_id,
|
|
1222
|
-
throw_error_on_fault=throw_error_on_fault,
|
|
1223
|
-
)
|
|
1224
|
-
call("device/stream_wait_until_idle", request)
|
|
1225
|
-
|
|
1226
|
-
async def wait_until_idle_async(
|
|
1227
|
-
self,
|
|
1228
|
-
throw_error_on_fault: bool = True
|
|
1229
|
-
) -> None:
|
|
1230
|
-
"""
|
|
1231
|
-
Waits until the live stream executes all queued actions.
|
|
1232
|
-
|
|
1233
|
-
Args:
|
|
1234
|
-
throw_error_on_fault: Determines whether to throw error when fault is observed.
|
|
1235
|
-
"""
|
|
1236
|
-
request = dto.StreamWaitUntilIdleRequest(
|
|
1237
|
-
interface_id=self.device.connection.interface_id,
|
|
1238
|
-
device=self.device.device_address,
|
|
1239
|
-
stream_id=self.stream_id,
|
|
1240
|
-
throw_error_on_fault=throw_error_on_fault,
|
|
1241
|
-
)
|
|
1242
|
-
await call_async("device/stream_wait_until_idle", request)
|
|
1243
|
-
|
|
1244
|
-
def cork(
|
|
1245
|
-
self
|
|
1246
|
-
) -> None:
|
|
1247
|
-
"""
|
|
1248
|
-
Cork the front of the stream's action queue, blocking execution.
|
|
1249
|
-
Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.
|
|
1250
|
-
Corking eliminates discontinuities in motion due to subsequent stream commands reaching the device late.
|
|
1251
|
-
You can only cork an idle live stream.
|
|
1252
|
-
"""
|
|
1253
|
-
request = dto.StreamEmptyRequest(
|
|
1254
|
-
interface_id=self.device.connection.interface_id,
|
|
1255
|
-
device=self.device.device_address,
|
|
1256
|
-
stream_id=self.stream_id,
|
|
1257
|
-
)
|
|
1258
|
-
call("device/stream_cork", request)
|
|
1259
|
-
|
|
1260
|
-
async def cork_async(
|
|
1261
|
-
self
|
|
1262
|
-
) -> None:
|
|
1263
|
-
"""
|
|
1264
|
-
Cork the front of the stream's action queue, blocking execution.
|
|
1265
|
-
Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.
|
|
1266
|
-
Corking eliminates discontinuities in motion due to subsequent stream commands reaching the device late.
|
|
1267
|
-
You can only cork an idle live stream.
|
|
1268
|
-
"""
|
|
1269
|
-
request = dto.StreamEmptyRequest(
|
|
1270
|
-
interface_id=self.device.connection.interface_id,
|
|
1271
|
-
device=self.device.device_address,
|
|
1272
|
-
stream_id=self.stream_id,
|
|
1273
|
-
)
|
|
1274
|
-
await call_async("device/stream_cork", request)
|
|
1275
|
-
|
|
1276
|
-
def uncork(
|
|
1277
|
-
self
|
|
1278
|
-
) -> None:
|
|
1279
|
-
"""
|
|
1280
|
-
Uncork the front of the queue, unblocking command execution.
|
|
1281
|
-
You can only uncork an idle live stream that is corked.
|
|
1282
|
-
"""
|
|
1283
|
-
request = dto.StreamEmptyRequest(
|
|
1284
|
-
interface_id=self.device.connection.interface_id,
|
|
1285
|
-
device=self.device.device_address,
|
|
1286
|
-
stream_id=self.stream_id,
|
|
1287
|
-
)
|
|
1288
|
-
call("device/stream_uncork", request)
|
|
1289
|
-
|
|
1290
|
-
async def uncork_async(
|
|
1291
|
-
self
|
|
1292
|
-
) -> None:
|
|
1293
|
-
"""
|
|
1294
|
-
Uncork the front of the queue, unblocking command execution.
|
|
1295
|
-
You can only uncork an idle live stream that is corked.
|
|
1296
|
-
"""
|
|
1297
|
-
request = dto.StreamEmptyRequest(
|
|
1298
|
-
interface_id=self.device.connection.interface_id,
|
|
1299
|
-
device=self.device.device_address,
|
|
1300
|
-
stream_id=self.stream_id,
|
|
1301
|
-
)
|
|
1302
|
-
await call_async("device/stream_uncork", request)
|
|
1303
|
-
|
|
1304
|
-
def set_hold(
|
|
1305
|
-
self,
|
|
1306
|
-
hold: bool
|
|
1307
|
-
) -> None:
|
|
1308
|
-
"""
|
|
1309
|
-
Pauses or resumes execution of the stream in live mode.
|
|
1310
|
-
The hold only takes effect during execution of motion segments.
|
|
1311
|
-
|
|
1312
|
-
Args:
|
|
1313
|
-
hold: True to pause execution, false to resume.
|
|
1314
|
-
"""
|
|
1315
|
-
request = dto.StreamSetHoldRequest(
|
|
1316
|
-
interface_id=self.device.connection.interface_id,
|
|
1317
|
-
device=self.device.device_address,
|
|
1318
|
-
stream_id=self.stream_id,
|
|
1319
|
-
hold=hold,
|
|
1320
|
-
)
|
|
1321
|
-
call("device/stream_set_hold", request)
|
|
1322
|
-
|
|
1323
|
-
async def set_hold_async(
|
|
1324
|
-
self,
|
|
1325
|
-
hold: bool
|
|
1326
|
-
) -> None:
|
|
1327
|
-
"""
|
|
1328
|
-
Pauses or resumes execution of the stream in live mode.
|
|
1329
|
-
The hold only takes effect during execution of motion segments.
|
|
1330
|
-
|
|
1331
|
-
Args:
|
|
1332
|
-
hold: True to pause execution, false to resume.
|
|
1333
|
-
"""
|
|
1334
|
-
request = dto.StreamSetHoldRequest(
|
|
1335
|
-
interface_id=self.device.connection.interface_id,
|
|
1336
|
-
device=self.device.device_address,
|
|
1337
|
-
stream_id=self.stream_id,
|
|
1338
|
-
hold=hold,
|
|
1339
|
-
)
|
|
1340
|
-
await call_async("device/stream_set_hold", request)
|
|
1341
|
-
|
|
1342
|
-
def is_busy(
|
|
1343
|
-
self
|
|
1344
|
-
) -> bool:
|
|
1345
|
-
"""
|
|
1346
|
-
Returns a boolean value indicating whether the live stream is executing a queued action.
|
|
1347
|
-
|
|
1348
|
-
Returns:
|
|
1349
|
-
True if the stream is executing a queued action.
|
|
1350
|
-
"""
|
|
1351
|
-
request = dto.StreamEmptyRequest(
|
|
1352
|
-
interface_id=self.device.connection.interface_id,
|
|
1353
|
-
device=self.device.device_address,
|
|
1354
|
-
stream_id=self.stream_id,
|
|
1355
|
-
)
|
|
1356
|
-
response = call(
|
|
1357
|
-
"device/stream_is_busy",
|
|
1358
|
-
request,
|
|
1359
|
-
dto.BoolResponse.from_binary)
|
|
1360
|
-
return response.value
|
|
1361
|
-
|
|
1362
|
-
async def is_busy_async(
|
|
1363
|
-
self
|
|
1364
|
-
) -> bool:
|
|
1365
|
-
"""
|
|
1366
|
-
Returns a boolean value indicating whether the live stream is executing a queued action.
|
|
1367
|
-
|
|
1368
|
-
Returns:
|
|
1369
|
-
True if the stream is executing a queued action.
|
|
1370
|
-
"""
|
|
1371
|
-
request = dto.StreamEmptyRequest(
|
|
1372
|
-
interface_id=self.device.connection.interface_id,
|
|
1373
|
-
device=self.device.device_address,
|
|
1374
|
-
stream_id=self.stream_id,
|
|
1375
|
-
)
|
|
1376
|
-
response = await call_async(
|
|
1377
|
-
"device/stream_is_busy",
|
|
1378
|
-
request,
|
|
1379
|
-
dto.BoolResponse.from_binary)
|
|
1380
|
-
return response.value
|
|
1381
|
-
|
|
1382
|
-
def get_max_speed(
|
|
1383
|
-
self,
|
|
1384
|
-
unit: VelocityUnits = Units.NATIVE
|
|
1385
|
-
) -> float:
|
|
1386
|
-
"""
|
|
1387
|
-
Gets the maximum speed of the live stream.
|
|
1388
|
-
Converts the units using the first axis of the stream.
|
|
1389
|
-
|
|
1390
|
-
Args:
|
|
1391
|
-
unit: Units of velocity.
|
|
1392
|
-
|
|
1393
|
-
Returns:
|
|
1394
|
-
The maximum speed of the stream.
|
|
1395
|
-
"""
|
|
1396
|
-
request = dto.StreamGetMaxSpeedRequest(
|
|
1397
|
-
interface_id=self.device.connection.interface_id,
|
|
1398
|
-
device=self.device.device_address,
|
|
1399
|
-
stream_id=self.stream_id,
|
|
1400
|
-
unit=unit,
|
|
1401
|
-
)
|
|
1402
|
-
response = call(
|
|
1403
|
-
"device/stream_get_max_speed",
|
|
1404
|
-
request,
|
|
1405
|
-
dto.DoubleResponse.from_binary)
|
|
1406
|
-
return response.value
|
|
1407
|
-
|
|
1408
|
-
async def get_max_speed_async(
|
|
1409
|
-
self,
|
|
1410
|
-
unit: VelocityUnits = Units.NATIVE
|
|
1411
|
-
) -> float:
|
|
1412
|
-
"""
|
|
1413
|
-
Gets the maximum speed of the live stream.
|
|
1414
|
-
Converts the units using the first axis of the stream.
|
|
1415
|
-
|
|
1416
|
-
Args:
|
|
1417
|
-
unit: Units of velocity.
|
|
1418
|
-
|
|
1419
|
-
Returns:
|
|
1420
|
-
The maximum speed of the stream.
|
|
1421
|
-
"""
|
|
1422
|
-
request = dto.StreamGetMaxSpeedRequest(
|
|
1423
|
-
interface_id=self.device.connection.interface_id,
|
|
1424
|
-
device=self.device.device_address,
|
|
1425
|
-
stream_id=self.stream_id,
|
|
1426
|
-
unit=unit,
|
|
1427
|
-
)
|
|
1428
|
-
response = await call_async(
|
|
1429
|
-
"device/stream_get_max_speed",
|
|
1430
|
-
request,
|
|
1431
|
-
dto.DoubleResponse.from_binary)
|
|
1432
|
-
return response.value
|
|
1433
|
-
|
|
1434
|
-
def set_max_speed(
|
|
1435
|
-
self,
|
|
1436
|
-
max_speed: float,
|
|
1437
|
-
unit: VelocityUnits = Units.NATIVE
|
|
1438
|
-
) -> None:
|
|
1439
|
-
"""
|
|
1440
|
-
Sets the maximum speed of the live stream.
|
|
1441
|
-
Converts the units using the first axis of the stream.
|
|
1442
|
-
|
|
1443
|
-
Args:
|
|
1444
|
-
max_speed: Maximum speed at which any stream action is executed.
|
|
1445
|
-
unit: Units of velocity.
|
|
1446
|
-
"""
|
|
1447
|
-
request = dto.StreamSetMaxSpeedRequest(
|
|
1448
|
-
interface_id=self.device.connection.interface_id,
|
|
1449
|
-
device=self.device.device_address,
|
|
1450
|
-
stream_id=self.stream_id,
|
|
1451
|
-
max_speed=max_speed,
|
|
1452
|
-
unit=unit,
|
|
1453
|
-
)
|
|
1454
|
-
call("device/stream_set_max_speed", request)
|
|
1455
|
-
|
|
1456
|
-
async def set_max_speed_async(
|
|
1457
|
-
self,
|
|
1458
|
-
max_speed: float,
|
|
1459
|
-
unit: VelocityUnits = Units.NATIVE
|
|
1460
|
-
) -> None:
|
|
1461
|
-
"""
|
|
1462
|
-
Sets the maximum speed of the live stream.
|
|
1463
|
-
Converts the units using the first axis of the stream.
|
|
1464
|
-
|
|
1465
|
-
Args:
|
|
1466
|
-
max_speed: Maximum speed at which any stream action is executed.
|
|
1467
|
-
unit: Units of velocity.
|
|
1468
|
-
"""
|
|
1469
|
-
request = dto.StreamSetMaxSpeedRequest(
|
|
1470
|
-
interface_id=self.device.connection.interface_id,
|
|
1471
|
-
device=self.device.device_address,
|
|
1472
|
-
stream_id=self.stream_id,
|
|
1473
|
-
max_speed=max_speed,
|
|
1474
|
-
unit=unit,
|
|
1475
|
-
)
|
|
1476
|
-
await call_async("device/stream_set_max_speed", request)
|
|
1477
|
-
|
|
1478
|
-
def get_max_tangential_acceleration(
|
|
1479
|
-
self,
|
|
1480
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1481
|
-
) -> float:
|
|
1482
|
-
"""
|
|
1483
|
-
Gets the maximum tangential acceleration of the live stream.
|
|
1484
|
-
Converts the units using the first axis of the stream.
|
|
1485
|
-
|
|
1486
|
-
Args:
|
|
1487
|
-
unit: Units of acceleration.
|
|
1488
|
-
|
|
1489
|
-
Returns:
|
|
1490
|
-
The maximum tangential acceleration of the live stream.
|
|
1491
|
-
"""
|
|
1492
|
-
request = dto.StreamGetMaxTangentialAccelerationRequest(
|
|
1493
|
-
interface_id=self.device.connection.interface_id,
|
|
1494
|
-
device=self.device.device_address,
|
|
1495
|
-
stream_id=self.stream_id,
|
|
1496
|
-
unit=unit,
|
|
1497
|
-
)
|
|
1498
|
-
response = call(
|
|
1499
|
-
"device/stream_get_max_tangential_acceleration",
|
|
1500
|
-
request,
|
|
1501
|
-
dto.DoubleResponse.from_binary)
|
|
1502
|
-
return response.value
|
|
1503
|
-
|
|
1504
|
-
async def get_max_tangential_acceleration_async(
|
|
1505
|
-
self,
|
|
1506
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1507
|
-
) -> float:
|
|
1508
|
-
"""
|
|
1509
|
-
Gets the maximum tangential acceleration of the live stream.
|
|
1510
|
-
Converts the units using the first axis of the stream.
|
|
1511
|
-
|
|
1512
|
-
Args:
|
|
1513
|
-
unit: Units of acceleration.
|
|
1514
|
-
|
|
1515
|
-
Returns:
|
|
1516
|
-
The maximum tangential acceleration of the live stream.
|
|
1517
|
-
"""
|
|
1518
|
-
request = dto.StreamGetMaxTangentialAccelerationRequest(
|
|
1519
|
-
interface_id=self.device.connection.interface_id,
|
|
1520
|
-
device=self.device.device_address,
|
|
1521
|
-
stream_id=self.stream_id,
|
|
1522
|
-
unit=unit,
|
|
1523
|
-
)
|
|
1524
|
-
response = await call_async(
|
|
1525
|
-
"device/stream_get_max_tangential_acceleration",
|
|
1526
|
-
request,
|
|
1527
|
-
dto.DoubleResponse.from_binary)
|
|
1528
|
-
return response.value
|
|
1529
|
-
|
|
1530
|
-
def set_max_tangential_acceleration(
|
|
1531
|
-
self,
|
|
1532
|
-
max_tangential_acceleration: float,
|
|
1533
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1534
|
-
) -> None:
|
|
1535
|
-
"""
|
|
1536
|
-
Sets the maximum tangential acceleration of the live stream.
|
|
1537
|
-
Converts the units using the first axis of the stream.
|
|
1538
|
-
|
|
1539
|
-
Args:
|
|
1540
|
-
max_tangential_acceleration: Maximum tangential acceleration at which any stream action is executed.
|
|
1541
|
-
unit: Units of acceleration.
|
|
1542
|
-
"""
|
|
1543
|
-
request = dto.StreamSetMaxTangentialAccelerationRequest(
|
|
1544
|
-
interface_id=self.device.connection.interface_id,
|
|
1545
|
-
device=self.device.device_address,
|
|
1546
|
-
stream_id=self.stream_id,
|
|
1547
|
-
max_tangential_acceleration=max_tangential_acceleration,
|
|
1548
|
-
unit=unit,
|
|
1549
|
-
)
|
|
1550
|
-
call("device/stream_set_max_tangential_acceleration", request)
|
|
1551
|
-
|
|
1552
|
-
async def set_max_tangential_acceleration_async(
|
|
1553
|
-
self,
|
|
1554
|
-
max_tangential_acceleration: float,
|
|
1555
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1556
|
-
) -> None:
|
|
1557
|
-
"""
|
|
1558
|
-
Sets the maximum tangential acceleration of the live stream.
|
|
1559
|
-
Converts the units using the first axis of the stream.
|
|
1560
|
-
|
|
1561
|
-
Args:
|
|
1562
|
-
max_tangential_acceleration: Maximum tangential acceleration at which any stream action is executed.
|
|
1563
|
-
unit: Units of acceleration.
|
|
1564
|
-
"""
|
|
1565
|
-
request = dto.StreamSetMaxTangentialAccelerationRequest(
|
|
1566
|
-
interface_id=self.device.connection.interface_id,
|
|
1567
|
-
device=self.device.device_address,
|
|
1568
|
-
stream_id=self.stream_id,
|
|
1569
|
-
max_tangential_acceleration=max_tangential_acceleration,
|
|
1570
|
-
unit=unit,
|
|
1571
|
-
)
|
|
1572
|
-
await call_async("device/stream_set_max_tangential_acceleration", request)
|
|
1573
|
-
|
|
1574
|
-
def get_max_centripetal_acceleration(
|
|
1575
|
-
self,
|
|
1576
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1577
|
-
) -> float:
|
|
1578
|
-
"""
|
|
1579
|
-
Gets the maximum centripetal acceleration of the live stream.
|
|
1580
|
-
Converts the units using the first axis of the stream.
|
|
1581
|
-
|
|
1582
|
-
Args:
|
|
1583
|
-
unit: Units of acceleration.
|
|
1584
|
-
|
|
1585
|
-
Returns:
|
|
1586
|
-
The maximum centripetal acceleration of the live stream.
|
|
1587
|
-
"""
|
|
1588
|
-
request = dto.StreamGetMaxCentripetalAccelerationRequest(
|
|
1589
|
-
interface_id=self.device.connection.interface_id,
|
|
1590
|
-
device=self.device.device_address,
|
|
1591
|
-
stream_id=self.stream_id,
|
|
1592
|
-
unit=unit,
|
|
1593
|
-
)
|
|
1594
|
-
response = call(
|
|
1595
|
-
"device/stream_get_max_centripetal_acceleration",
|
|
1596
|
-
request,
|
|
1597
|
-
dto.DoubleResponse.from_binary)
|
|
1598
|
-
return response.value
|
|
1599
|
-
|
|
1600
|
-
async def get_max_centripetal_acceleration_async(
|
|
1601
|
-
self,
|
|
1602
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1603
|
-
) -> float:
|
|
1604
|
-
"""
|
|
1605
|
-
Gets the maximum centripetal acceleration of the live stream.
|
|
1606
|
-
Converts the units using the first axis of the stream.
|
|
1607
|
-
|
|
1608
|
-
Args:
|
|
1609
|
-
unit: Units of acceleration.
|
|
1610
|
-
|
|
1611
|
-
Returns:
|
|
1612
|
-
The maximum centripetal acceleration of the live stream.
|
|
1613
|
-
"""
|
|
1614
|
-
request = dto.StreamGetMaxCentripetalAccelerationRequest(
|
|
1615
|
-
interface_id=self.device.connection.interface_id,
|
|
1616
|
-
device=self.device.device_address,
|
|
1617
|
-
stream_id=self.stream_id,
|
|
1618
|
-
unit=unit,
|
|
1619
|
-
)
|
|
1620
|
-
response = await call_async(
|
|
1621
|
-
"device/stream_get_max_centripetal_acceleration",
|
|
1622
|
-
request,
|
|
1623
|
-
dto.DoubleResponse.from_binary)
|
|
1624
|
-
return response.value
|
|
1625
|
-
|
|
1626
|
-
def set_max_centripetal_acceleration(
|
|
1627
|
-
self,
|
|
1628
|
-
max_centripetal_acceleration: float,
|
|
1629
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1630
|
-
) -> None:
|
|
1631
|
-
"""
|
|
1632
|
-
Sets the maximum centripetal acceleration of the live stream.
|
|
1633
|
-
Converts the units using the first axis of the stream.
|
|
1634
|
-
|
|
1635
|
-
Args:
|
|
1636
|
-
max_centripetal_acceleration: Maximum centripetal acceleration at which any stream action is executed.
|
|
1637
|
-
unit: Units of acceleration.
|
|
1638
|
-
"""
|
|
1639
|
-
request = dto.StreamSetMaxCentripetalAccelerationRequest(
|
|
1640
|
-
interface_id=self.device.connection.interface_id,
|
|
1641
|
-
device=self.device.device_address,
|
|
1642
|
-
stream_id=self.stream_id,
|
|
1643
|
-
max_centripetal_acceleration=max_centripetal_acceleration,
|
|
1644
|
-
unit=unit,
|
|
1645
|
-
)
|
|
1646
|
-
call("device/stream_set_max_centripetal_acceleration", request)
|
|
1647
|
-
|
|
1648
|
-
async def set_max_centripetal_acceleration_async(
|
|
1649
|
-
self,
|
|
1650
|
-
max_centripetal_acceleration: float,
|
|
1651
|
-
unit: AccelerationUnits = Units.NATIVE
|
|
1652
|
-
) -> None:
|
|
1653
|
-
"""
|
|
1654
|
-
Sets the maximum centripetal acceleration of the live stream.
|
|
1655
|
-
Converts the units using the first axis of the stream.
|
|
1656
|
-
|
|
1657
|
-
Args:
|
|
1658
|
-
max_centripetal_acceleration: Maximum centripetal acceleration at which any stream action is executed.
|
|
1659
|
-
unit: Units of acceleration.
|
|
1660
|
-
"""
|
|
1661
|
-
request = dto.StreamSetMaxCentripetalAccelerationRequest(
|
|
1662
|
-
interface_id=self.device.connection.interface_id,
|
|
1663
|
-
device=self.device.device_address,
|
|
1664
|
-
stream_id=self.stream_id,
|
|
1665
|
-
max_centripetal_acceleration=max_centripetal_acceleration,
|
|
1666
|
-
unit=unit,
|
|
1667
|
-
)
|
|
1668
|
-
await call_async("device/stream_set_max_centripetal_acceleration", request)
|
|
1669
|
-
|
|
1670
|
-
def __repr__(
|
|
1671
|
-
self
|
|
1672
|
-
) -> str:
|
|
1673
|
-
"""
|
|
1674
|
-
Returns a string which represents the stream.
|
|
1675
|
-
|
|
1676
|
-
Returns:
|
|
1677
|
-
String which represents the stream.
|
|
1678
|
-
"""
|
|
1679
|
-
request = dto.StreamEmptyRequest(
|
|
1680
|
-
interface_id=self.device.connection.interface_id,
|
|
1681
|
-
device=self.device.device_address,
|
|
1682
|
-
stream_id=self.stream_id,
|
|
1683
|
-
)
|
|
1684
|
-
response = call_sync(
|
|
1685
|
-
"device/stream_to_string",
|
|
1686
|
-
request,
|
|
1687
|
-
dto.StringResponse.from_binary)
|
|
1688
|
-
return response.value
|
|
1689
|
-
|
|
1690
|
-
def disable(
|
|
1691
|
-
self
|
|
1692
|
-
) -> None:
|
|
1693
|
-
"""
|
|
1694
|
-
Disables the stream.
|
|
1695
|
-
If the stream is not setup, this command does nothing.
|
|
1696
|
-
Once disabled, the stream will no longer accept stream commands.
|
|
1697
|
-
The stream will process the rest of the commands in the queue until it is empty.
|
|
1698
|
-
"""
|
|
1699
|
-
request = dto.StreamEmptyRequest(
|
|
1700
|
-
interface_id=self.device.connection.interface_id,
|
|
1701
|
-
device=self.device.device_address,
|
|
1702
|
-
stream_id=self.stream_id,
|
|
1703
|
-
)
|
|
1704
|
-
call("device/stream_disable", request)
|
|
1705
|
-
|
|
1706
|
-
async def disable_async(
|
|
1707
|
-
self
|
|
1708
|
-
) -> None:
|
|
1709
|
-
"""
|
|
1710
|
-
Disables the stream.
|
|
1711
|
-
If the stream is not setup, this command does nothing.
|
|
1712
|
-
Once disabled, the stream will no longer accept stream commands.
|
|
1713
|
-
The stream will process the rest of the commands in the queue until it is empty.
|
|
1714
|
-
"""
|
|
1715
|
-
request = dto.StreamEmptyRequest(
|
|
1716
|
-
interface_id=self.device.connection.interface_id,
|
|
1717
|
-
device=self.device.device_address,
|
|
1718
|
-
stream_id=self.stream_id,
|
|
1719
|
-
)
|
|
1720
|
-
await call_async("device/stream_disable", request)
|
|
1721
|
-
|
|
1722
|
-
def generic_command(
|
|
1723
|
-
self,
|
|
1724
|
-
command: str
|
|
1725
|
-
) -> None:
|
|
1726
|
-
"""
|
|
1727
|
-
Sends a generic ASCII command to the stream.
|
|
1728
|
-
Keeps resending the command while the device rejects with AGAIN reason.
|
|
1729
|
-
|
|
1730
|
-
Args:
|
|
1731
|
-
command: Command and its parameters.
|
|
1732
|
-
"""
|
|
1733
|
-
request = dto.StreamGenericCommandRequest(
|
|
1734
|
-
interface_id=self.device.connection.interface_id,
|
|
1735
|
-
device=self.device.device_address,
|
|
1736
|
-
stream_id=self.stream_id,
|
|
1737
|
-
command=command,
|
|
1738
|
-
)
|
|
1739
|
-
call("device/stream_generic_command", request)
|
|
1740
|
-
|
|
1741
|
-
async def generic_command_async(
|
|
1742
|
-
self,
|
|
1743
|
-
command: str
|
|
1744
|
-
) -> None:
|
|
1745
|
-
"""
|
|
1746
|
-
Sends a generic ASCII command to the stream.
|
|
1747
|
-
Keeps resending the command while the device rejects with AGAIN reason.
|
|
1748
|
-
|
|
1749
|
-
Args:
|
|
1750
|
-
command: Command and its parameters.
|
|
1751
|
-
"""
|
|
1752
|
-
request = dto.StreamGenericCommandRequest(
|
|
1753
|
-
interface_id=self.device.connection.interface_id,
|
|
1754
|
-
device=self.device.device_address,
|
|
1755
|
-
stream_id=self.stream_id,
|
|
1756
|
-
command=command,
|
|
1757
|
-
)
|
|
1758
|
-
await call_async("device/stream_generic_command", request)
|
|
1759
|
-
|
|
1760
|
-
def generic_command_batch(
|
|
1761
|
-
self,
|
|
1762
|
-
batch: List[str]
|
|
1763
|
-
) -> None:
|
|
1764
|
-
"""
|
|
1765
|
-
Sends a batch of generic ASCII commands to the stream.
|
|
1766
|
-
Keeps resending command while the device rejects with AGAIN reason.
|
|
1767
|
-
The batch is atomic in terms of thread safety.
|
|
1768
|
-
|
|
1769
|
-
Args:
|
|
1770
|
-
batch: Array of commands.
|
|
1771
|
-
"""
|
|
1772
|
-
request = dto.StreamGenericCommandBatchRequest(
|
|
1773
|
-
interface_id=self.device.connection.interface_id,
|
|
1774
|
-
device=self.device.device_address,
|
|
1775
|
-
stream_id=self.stream_id,
|
|
1776
|
-
batch=batch,
|
|
1777
|
-
)
|
|
1778
|
-
call("device/stream_generic_command_batch", request)
|
|
1779
|
-
|
|
1780
|
-
async def generic_command_batch_async(
|
|
1781
|
-
self,
|
|
1782
|
-
batch: List[str]
|
|
1783
|
-
) -> None:
|
|
1784
|
-
"""
|
|
1785
|
-
Sends a batch of generic ASCII commands to the stream.
|
|
1786
|
-
Keeps resending command while the device rejects with AGAIN reason.
|
|
1787
|
-
The batch is atomic in terms of thread safety.
|
|
1788
|
-
|
|
1789
|
-
Args:
|
|
1790
|
-
batch: Array of commands.
|
|
1791
|
-
"""
|
|
1792
|
-
request = dto.StreamGenericCommandBatchRequest(
|
|
1793
|
-
interface_id=self.device.connection.interface_id,
|
|
1794
|
-
device=self.device.device_address,
|
|
1795
|
-
stream_id=self.stream_id,
|
|
1796
|
-
batch=batch,
|
|
1797
|
-
)
|
|
1798
|
-
await call_async("device/stream_generic_command_batch", request)
|
|
1799
|
-
|
|
1800
|
-
def check_disabled(
|
|
1801
|
-
self
|
|
1802
|
-
) -> bool:
|
|
1803
|
-
"""
|
|
1804
|
-
Queries the stream status from the device
|
|
1805
|
-
and returns boolean indicating whether the stream is disabled.
|
|
1806
|
-
Useful to determine if streaming was interrupted by other movements.
|
|
1807
|
-
|
|
1808
|
-
Returns:
|
|
1809
|
-
True if the stream is disabled.
|
|
1810
|
-
"""
|
|
1811
|
-
request = dto.StreamEmptyRequest(
|
|
1812
|
-
interface_id=self.device.connection.interface_id,
|
|
1813
|
-
device=self.device.device_address,
|
|
1814
|
-
stream_id=self.stream_id,
|
|
1815
|
-
)
|
|
1816
|
-
response = call(
|
|
1817
|
-
"device/stream_check_disabled",
|
|
1818
|
-
request,
|
|
1819
|
-
dto.BoolResponse.from_binary)
|
|
1820
|
-
return response.value
|
|
1821
|
-
|
|
1822
|
-
async def check_disabled_async(
|
|
1823
|
-
self
|
|
1824
|
-
) -> bool:
|
|
1825
|
-
"""
|
|
1826
|
-
Queries the stream status from the device
|
|
1827
|
-
and returns boolean indicating whether the stream is disabled.
|
|
1828
|
-
Useful to determine if streaming was interrupted by other movements.
|
|
1829
|
-
|
|
1830
|
-
Returns:
|
|
1831
|
-
True if the stream is disabled.
|
|
1832
|
-
"""
|
|
1833
|
-
request = dto.StreamEmptyRequest(
|
|
1834
|
-
interface_id=self.device.connection.interface_id,
|
|
1835
|
-
device=self.device.device_address,
|
|
1836
|
-
stream_id=self.stream_id,
|
|
1837
|
-
)
|
|
1838
|
-
response = await call_async(
|
|
1839
|
-
"device/stream_check_disabled",
|
|
1840
|
-
request,
|
|
1841
|
-
dto.BoolResponse.from_binary)
|
|
1842
|
-
return response.value
|
|
1843
|
-
|
|
1844
|
-
def treat_discontinuities_as_error(
|
|
1845
|
-
self
|
|
1846
|
-
) -> None:
|
|
1847
|
-
"""
|
|
1848
|
-
Makes the stream throw StreamDiscontinuityException when it encounters discontinuities (ND warning flag).
|
|
1849
|
-
"""
|
|
1850
|
-
request = dto.StreamEmptyRequest(
|
|
1851
|
-
interface_id=self.device.connection.interface_id,
|
|
1852
|
-
device=self.device.device_address,
|
|
1853
|
-
stream_id=self.stream_id,
|
|
1854
|
-
)
|
|
1855
|
-
call_sync("device/stream_treat_discontinuities", request)
|
|
1856
|
-
|
|
1857
|
-
def ignore_current_discontinuity(
|
|
1858
|
-
self
|
|
1859
|
-
) -> None:
|
|
1860
|
-
"""
|
|
1861
|
-
Prevents StreamDiscontinuityException as a result of expected discontinuity when resuming streaming.
|
|
1862
|
-
"""
|
|
1863
|
-
request = dto.StreamEmptyRequest(
|
|
1864
|
-
interface_id=self.device.connection.interface_id,
|
|
1865
|
-
device=self.device.device_address,
|
|
1866
|
-
stream_id=self.stream_id,
|
|
1867
|
-
)
|
|
1868
|
-
call_sync("device/stream_ignore_discontinuity", request)
|
|
1869
|
-
|
|
1870
|
-
def __retrieve_axes(
|
|
1871
|
-
self
|
|
1872
|
-
) -> List[StreamAxisDefinition]:
|
|
1873
|
-
"""
|
|
1874
|
-
Gets the axes of the stream.
|
|
1875
|
-
|
|
1876
|
-
Returns:
|
|
1877
|
-
An array of axis numbers of the axes the stream is set up to control.
|
|
1878
|
-
"""
|
|
1879
|
-
request = dto.StreamEmptyRequest(
|
|
1880
|
-
interface_id=self.device.connection.interface_id,
|
|
1881
|
-
device=self.device.device_address,
|
|
1882
|
-
stream_id=self.stream_id,
|
|
1883
|
-
)
|
|
1884
|
-
response = call_sync(
|
|
1885
|
-
"device/stream_get_axes",
|
|
1886
|
-
request,
|
|
1887
|
-
dto.StreamGetAxesResponse.from_binary)
|
|
1888
|
-
return response.axes
|
|
1889
|
-
|
|
1890
|
-
def __retrieve_mode(
|
|
1891
|
-
self
|
|
1892
|
-
) -> StreamMode:
|
|
1893
|
-
"""
|
|
1894
|
-
Get the mode of the stream.
|
|
1895
|
-
|
|
1896
|
-
Returns:
|
|
1897
|
-
Mode of the stream.
|
|
1898
|
-
"""
|
|
1899
|
-
request = dto.StreamEmptyRequest(
|
|
1900
|
-
interface_id=self.device.connection.interface_id,
|
|
1901
|
-
device=self.device.device_address,
|
|
1902
|
-
stream_id=self.stream_id,
|
|
1903
|
-
)
|
|
1904
|
-
response = call_sync(
|
|
1905
|
-
"device/stream_get_mode",
|
|
1906
|
-
request,
|
|
1907
|
-
dto.StreamModeResponse.from_binary)
|
|
1908
|
-
return response.stream_mode
|
|
1909
|
-
|
|
1910
|
-
def wait_digital_input(
|
|
1911
|
-
self,
|
|
1912
|
-
channel_number: int,
|
|
1913
|
-
value: bool
|
|
1914
|
-
) -> None:
|
|
1915
|
-
"""
|
|
1916
|
-
Deprecated: Use Stream.Io.WaitDigitalInput instead.
|
|
1917
|
-
|
|
1918
|
-
Wait for a digital input channel to reach a given value.
|
|
1919
|
-
|
|
1920
|
-
Args:
|
|
1921
|
-
channel_number: The number of the digital input channel.
|
|
1922
|
-
Channel numbers are numbered from one.
|
|
1923
|
-
value: The value that the stream should wait for.
|
|
1924
|
-
"""
|
|
1925
|
-
request = dto.StreamWaitDigitalInputRequest(
|
|
1926
|
-
interface_id=self.device.connection.interface_id,
|
|
1927
|
-
device=self.device.device_address,
|
|
1928
|
-
stream_id=self.stream_id,
|
|
1929
|
-
channel_number=channel_number,
|
|
1930
|
-
value=value,
|
|
1931
|
-
)
|
|
1932
|
-
call("device/stream_wait_digital_input", request)
|
|
1933
|
-
|
|
1934
|
-
async def wait_digital_input_async(
|
|
1935
|
-
self,
|
|
1936
|
-
channel_number: int,
|
|
1937
|
-
value: bool
|
|
1938
|
-
) -> None:
|
|
1939
|
-
"""
|
|
1940
|
-
Deprecated: Use Stream.Io.WaitDigitalInput instead.
|
|
1941
|
-
|
|
1942
|
-
Wait for a digital input channel to reach a given value.
|
|
1943
|
-
|
|
1944
|
-
Args:
|
|
1945
|
-
channel_number: The number of the digital input channel.
|
|
1946
|
-
Channel numbers are numbered from one.
|
|
1947
|
-
value: The value that the stream should wait for.
|
|
1948
|
-
"""
|
|
1949
|
-
request = dto.StreamWaitDigitalInputRequest(
|
|
1950
|
-
interface_id=self.device.connection.interface_id,
|
|
1951
|
-
device=self.device.device_address,
|
|
1952
|
-
stream_id=self.stream_id,
|
|
1953
|
-
channel_number=channel_number,
|
|
1954
|
-
value=value,
|
|
1955
|
-
)
|
|
1956
|
-
await call_async("device/stream_wait_digital_input", request)
|
|
1957
|
-
|
|
1958
|
-
def wait_analog_input(
|
|
1959
|
-
self,
|
|
1960
|
-
channel_number: int,
|
|
1961
|
-
condition: str,
|
|
1962
|
-
value: float
|
|
1963
|
-
) -> None:
|
|
1964
|
-
"""
|
|
1965
|
-
Deprecated: Use Stream.Io.WaitAnalogInput instead.
|
|
1966
|
-
|
|
1967
|
-
Wait for the value of a analog input channel to reach a condition concerning a given value.
|
|
1968
|
-
|
|
1969
|
-
Args:
|
|
1970
|
-
channel_number: The number of the analog input channel.
|
|
1971
|
-
Channel numbers are numbered from one.
|
|
1972
|
-
condition: A condition (e.g. <, <=, ==, !=).
|
|
1973
|
-
value: The value that the condition concerns, in Volts.
|
|
1974
|
-
"""
|
|
1975
|
-
request = dto.StreamWaitAnalogInputRequest(
|
|
1976
|
-
interface_id=self.device.connection.interface_id,
|
|
1977
|
-
device=self.device.device_address,
|
|
1978
|
-
stream_id=self.stream_id,
|
|
1979
|
-
channel_number=channel_number,
|
|
1980
|
-
condition=condition,
|
|
1981
|
-
value=value,
|
|
1982
|
-
)
|
|
1983
|
-
call("device/stream_wait_analog_input", request)
|
|
1984
|
-
|
|
1985
|
-
async def wait_analog_input_async(
|
|
1986
|
-
self,
|
|
1987
|
-
channel_number: int,
|
|
1988
|
-
condition: str,
|
|
1989
|
-
value: float
|
|
1990
|
-
) -> None:
|
|
1991
|
-
"""
|
|
1992
|
-
Deprecated: Use Stream.Io.WaitAnalogInput instead.
|
|
1993
|
-
|
|
1994
|
-
Wait for the value of a analog input channel to reach a condition concerning a given value.
|
|
1995
|
-
|
|
1996
|
-
Args:
|
|
1997
|
-
channel_number: The number of the analog input channel.
|
|
1998
|
-
Channel numbers are numbered from one.
|
|
1999
|
-
condition: A condition (e.g. <, <=, ==, !=).
|
|
2000
|
-
value: The value that the condition concerns, in Volts.
|
|
2001
|
-
"""
|
|
2002
|
-
request = dto.StreamWaitAnalogInputRequest(
|
|
2003
|
-
interface_id=self.device.connection.interface_id,
|
|
2004
|
-
device=self.device.device_address,
|
|
2005
|
-
stream_id=self.stream_id,
|
|
2006
|
-
channel_number=channel_number,
|
|
2007
|
-
condition=condition,
|
|
2008
|
-
value=value,
|
|
2009
|
-
)
|
|
2010
|
-
await call_async("device/stream_wait_analog_input", request)
|
|
2011
|
-
|
|
2012
|
-
def set_digital_output(
|
|
2013
|
-
self,
|
|
2014
|
-
channel_number: int,
|
|
2015
|
-
value: DigitalOutputAction
|
|
2016
|
-
) -> None:
|
|
2017
|
-
"""
|
|
2018
|
-
Deprecated: Use Stream.Io.SetDigitalOutput instead.
|
|
2019
|
-
|
|
2020
|
-
Sets value for the specified digital output channel.
|
|
2021
|
-
|
|
2022
|
-
Args:
|
|
2023
|
-
channel_number: Channel number starting at 1.
|
|
2024
|
-
value: The type of action to perform on the channel.
|
|
2025
|
-
"""
|
|
2026
|
-
request = dto.StreamSetDigitalOutputRequest(
|
|
2027
|
-
interface_id=self.device.connection.interface_id,
|
|
2028
|
-
device=self.device.device_address,
|
|
2029
|
-
stream_id=self.stream_id,
|
|
2030
|
-
channel_number=channel_number,
|
|
2031
|
-
value=value,
|
|
2032
|
-
)
|
|
2033
|
-
call("device/stream_set_digital_output", request)
|
|
2034
|
-
|
|
2035
|
-
async def set_digital_output_async(
|
|
2036
|
-
self,
|
|
2037
|
-
channel_number: int,
|
|
2038
|
-
value: DigitalOutputAction
|
|
2039
|
-
) -> None:
|
|
2040
|
-
"""
|
|
2041
|
-
Deprecated: Use Stream.Io.SetDigitalOutput instead.
|
|
2042
|
-
|
|
2043
|
-
Sets value for the specified digital output channel.
|
|
2044
|
-
|
|
2045
|
-
Args:
|
|
2046
|
-
channel_number: Channel number starting at 1.
|
|
2047
|
-
value: The type of action to perform on the channel.
|
|
2048
|
-
"""
|
|
2049
|
-
request = dto.StreamSetDigitalOutputRequest(
|
|
2050
|
-
interface_id=self.device.connection.interface_id,
|
|
2051
|
-
device=self.device.device_address,
|
|
2052
|
-
stream_id=self.stream_id,
|
|
2053
|
-
channel_number=channel_number,
|
|
2054
|
-
value=value,
|
|
2055
|
-
)
|
|
2056
|
-
await call_async("device/stream_set_digital_output", request)
|
|
2057
|
-
|
|
2058
|
-
def set_all_digital_outputs(
|
|
2059
|
-
self,
|
|
2060
|
-
values: List[DigitalOutputAction]
|
|
2061
|
-
) -> None:
|
|
2062
|
-
"""
|
|
2063
|
-
Deprecated: Use Stream.Io.SetAllDigitalOutputs instead.
|
|
2064
|
-
|
|
2065
|
-
Sets values for all digital output channels.
|
|
2066
|
-
|
|
2067
|
-
Args:
|
|
2068
|
-
values: The type of action to perform on the channel.
|
|
2069
|
-
"""
|
|
2070
|
-
request = dto.StreamSetAllDigitalOutputsRequest(
|
|
2071
|
-
interface_id=self.device.connection.interface_id,
|
|
2072
|
-
device=self.device.device_address,
|
|
2073
|
-
stream_id=self.stream_id,
|
|
2074
|
-
values=values,
|
|
2075
|
-
)
|
|
2076
|
-
call("device/stream_set_all_digital_outputs", request)
|
|
2077
|
-
|
|
2078
|
-
async def set_all_digital_outputs_async(
|
|
2079
|
-
self,
|
|
2080
|
-
values: List[DigitalOutputAction]
|
|
2081
|
-
) -> None:
|
|
2082
|
-
"""
|
|
2083
|
-
Deprecated: Use Stream.Io.SetAllDigitalOutputs instead.
|
|
2084
|
-
|
|
2085
|
-
Sets values for all digital output channels.
|
|
2086
|
-
|
|
2087
|
-
Args:
|
|
2088
|
-
values: The type of action to perform on the channel.
|
|
2089
|
-
"""
|
|
2090
|
-
request = dto.StreamSetAllDigitalOutputsRequest(
|
|
2091
|
-
interface_id=self.device.connection.interface_id,
|
|
2092
|
-
device=self.device.device_address,
|
|
2093
|
-
stream_id=self.stream_id,
|
|
2094
|
-
values=values,
|
|
2095
|
-
)
|
|
2096
|
-
await call_async("device/stream_set_all_digital_outputs", request)
|
|
2097
|
-
|
|
2098
|
-
def set_analog_output(
|
|
2099
|
-
self,
|
|
2100
|
-
channel_number: int,
|
|
2101
|
-
value: float
|
|
2102
|
-
) -> None:
|
|
2103
|
-
"""
|
|
2104
|
-
Deprecated: Use Stream.Io.setAnalogOutput instead.
|
|
2105
|
-
|
|
2106
|
-
Sets value for the specified analog output channel.
|
|
2107
|
-
|
|
2108
|
-
Args:
|
|
2109
|
-
channel_number: Channel number starting at 1.
|
|
2110
|
-
value: Value to set the output channel voltage to.
|
|
2111
|
-
"""
|
|
2112
|
-
request = dto.StreamSetAnalogOutputRequest(
|
|
2113
|
-
interface_id=self.device.connection.interface_id,
|
|
2114
|
-
device=self.device.device_address,
|
|
2115
|
-
stream_id=self.stream_id,
|
|
2116
|
-
channel_number=channel_number,
|
|
2117
|
-
value=value,
|
|
2118
|
-
)
|
|
2119
|
-
call("device/stream_set_analog_output", request)
|
|
2120
|
-
|
|
2121
|
-
async def set_analog_output_async(
|
|
2122
|
-
self,
|
|
2123
|
-
channel_number: int,
|
|
2124
|
-
value: float
|
|
2125
|
-
) -> None:
|
|
2126
|
-
"""
|
|
2127
|
-
Deprecated: Use Stream.Io.setAnalogOutput instead.
|
|
2128
|
-
|
|
2129
|
-
Sets value for the specified analog output channel.
|
|
2130
|
-
|
|
2131
|
-
Args:
|
|
2132
|
-
channel_number: Channel number starting at 1.
|
|
2133
|
-
value: Value to set the output channel voltage to.
|
|
2134
|
-
"""
|
|
2135
|
-
request = dto.StreamSetAnalogOutputRequest(
|
|
2136
|
-
interface_id=self.device.connection.interface_id,
|
|
2137
|
-
device=self.device.device_address,
|
|
2138
|
-
stream_id=self.stream_id,
|
|
2139
|
-
channel_number=channel_number,
|
|
2140
|
-
value=value,
|
|
2141
|
-
)
|
|
2142
|
-
await call_async("device/stream_set_analog_output", request)
|
|
2143
|
-
|
|
2144
|
-
def set_all_analog_outputs(
|
|
2145
|
-
self,
|
|
2146
|
-
values: List[float]
|
|
2147
|
-
) -> None:
|
|
2148
|
-
"""
|
|
2149
|
-
Deprecated: Use Stream.Io.setAllAnalogOutputs instead.
|
|
2150
|
-
|
|
2151
|
-
Sets values for all analog output channels.
|
|
2152
|
-
|
|
2153
|
-
Args:
|
|
2154
|
-
values: Voltage values to set the output channels to.
|
|
2155
|
-
"""
|
|
2156
|
-
request = dto.StreamSetAllAnalogOutputsRequest(
|
|
2157
|
-
interface_id=self.device.connection.interface_id,
|
|
2158
|
-
device=self.device.device_address,
|
|
2159
|
-
stream_id=self.stream_id,
|
|
2160
|
-
values=values,
|
|
2161
|
-
)
|
|
2162
|
-
call("device/stream_set_all_analog_outputs", request)
|
|
2163
|
-
|
|
2164
|
-
async def set_all_analog_outputs_async(
|
|
2165
|
-
self,
|
|
2166
|
-
values: List[float]
|
|
2167
|
-
) -> None:
|
|
2168
|
-
"""
|
|
2169
|
-
Deprecated: Use Stream.Io.setAllAnalogOutputs instead.
|
|
2170
|
-
|
|
2171
|
-
Sets values for all analog output channels.
|
|
2172
|
-
|
|
2173
|
-
Args:
|
|
2174
|
-
values: Voltage values to set the output channels to.
|
|
2175
|
-
"""
|
|
2176
|
-
request = dto.StreamSetAllAnalogOutputsRequest(
|
|
2177
|
-
interface_id=self.device.connection.interface_id,
|
|
2178
|
-
device=self.device.device_address,
|
|
2179
|
-
stream_id=self.stream_id,
|
|
2180
|
-
values=values,
|
|
2181
|
-
)
|
|
2182
|
-
await call_async("device/stream_set_all_analog_outputs", request)
|
|
1
|
+
# pylint: disable=too-many-arguments, too-many-lines
|
|
2
|
+
|
|
3
|
+
# ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== #
|
|
4
|
+
# ============== DO NOT EDIT DIRECTLY ============== #
|
|
5
|
+
from typing import TYPE_CHECKING, List
|
|
6
|
+
from ..dto import requests as dto
|
|
7
|
+
from ..units import Units, VelocityUnits, AccelerationUnits, TimeUnits
|
|
8
|
+
from ..call import call, call_async, call_sync
|
|
9
|
+
from ..dto.measurement import Measurement
|
|
10
|
+
from ..dto.rotation_direction import RotationDirection
|
|
11
|
+
from .stream_buffer import StreamBuffer
|
|
12
|
+
from ..dto.ascii.stream_mode import StreamMode
|
|
13
|
+
from ..dto.ascii.stream_axis_definition import StreamAxisDefinition
|
|
14
|
+
from .stream_io import StreamIo
|
|
15
|
+
from ..dto.ascii.digital_output_action import DigitalOutputAction
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from .device import Device
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Stream:
|
|
22
|
+
"""
|
|
23
|
+
A handle for a stream with this number on the device.
|
|
24
|
+
Streams provide a way to execute or store a sequence of actions.
|
|
25
|
+
Stream methods append actions to a queue which executes or stores actions in a first in, first out order.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def device(self) -> 'Device':
|
|
30
|
+
"""
|
|
31
|
+
Device that controls this stream.
|
|
32
|
+
"""
|
|
33
|
+
return self._device
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def stream_id(self) -> int:
|
|
37
|
+
"""
|
|
38
|
+
The number that identifies the stream on the device.
|
|
39
|
+
"""
|
|
40
|
+
return self._stream_id
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def mode(self) -> StreamMode:
|
|
44
|
+
"""
|
|
45
|
+
Current mode of the stream.
|
|
46
|
+
"""
|
|
47
|
+
return self.__retrieve_mode()
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def axes(self) -> List[StreamAxisDefinition]:
|
|
51
|
+
"""
|
|
52
|
+
An array of axes definitions the stream is set up to control.
|
|
53
|
+
"""
|
|
54
|
+
return self.__retrieve_axes()
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def io(self) -> StreamIo:
|
|
58
|
+
"""
|
|
59
|
+
Gets an object that provides access to I/O for this stream.
|
|
60
|
+
"""
|
|
61
|
+
return self._io
|
|
62
|
+
|
|
63
|
+
def __init__(self, device: 'Device', stream_id: int):
|
|
64
|
+
self._device: 'Device' = device
|
|
65
|
+
self._stream_id: int = stream_id
|
|
66
|
+
self._io: StreamIo = StreamIo(device, stream_id)
|
|
67
|
+
|
|
68
|
+
def setup_live_composite(
|
|
69
|
+
self,
|
|
70
|
+
*axes: StreamAxisDefinition
|
|
71
|
+
) -> None:
|
|
72
|
+
"""
|
|
73
|
+
Setup the stream to control the specified axes and to queue actions on the device.
|
|
74
|
+
Allows use of lockstep axes in a stream.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
axes: Definition of the stream axes.
|
|
78
|
+
"""
|
|
79
|
+
request = dto.StreamSetupLiveCompositeRequest(
|
|
80
|
+
interface_id=self.device.connection.interface_id,
|
|
81
|
+
device=self.device.device_address,
|
|
82
|
+
stream_id=self.stream_id,
|
|
83
|
+
axes=list(axes),
|
|
84
|
+
)
|
|
85
|
+
call("device/stream_setup_live_composite", request)
|
|
86
|
+
|
|
87
|
+
async def setup_live_composite_async(
|
|
88
|
+
self,
|
|
89
|
+
*axes: StreamAxisDefinition
|
|
90
|
+
) -> None:
|
|
91
|
+
"""
|
|
92
|
+
Setup the stream to control the specified axes and to queue actions on the device.
|
|
93
|
+
Allows use of lockstep axes in a stream.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
axes: Definition of the stream axes.
|
|
97
|
+
"""
|
|
98
|
+
request = dto.StreamSetupLiveCompositeRequest(
|
|
99
|
+
interface_id=self.device.connection.interface_id,
|
|
100
|
+
device=self.device.device_address,
|
|
101
|
+
stream_id=self.stream_id,
|
|
102
|
+
axes=list(axes),
|
|
103
|
+
)
|
|
104
|
+
await call_async("device/stream_setup_live_composite", request)
|
|
105
|
+
|
|
106
|
+
def setup_live(
|
|
107
|
+
self,
|
|
108
|
+
*axes: int
|
|
109
|
+
) -> None:
|
|
110
|
+
"""
|
|
111
|
+
Setup the stream to control the specified axes and to queue actions on the device.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
axes: Numbers of physical axes to setup the stream on.
|
|
115
|
+
"""
|
|
116
|
+
request = dto.StreamSetupLiveRequest(
|
|
117
|
+
interface_id=self.device.connection.interface_id,
|
|
118
|
+
device=self.device.device_address,
|
|
119
|
+
stream_id=self.stream_id,
|
|
120
|
+
axes=list(axes),
|
|
121
|
+
)
|
|
122
|
+
call("device/stream_setup_live", request)
|
|
123
|
+
|
|
124
|
+
async def setup_live_async(
|
|
125
|
+
self,
|
|
126
|
+
*axes: int
|
|
127
|
+
) -> None:
|
|
128
|
+
"""
|
|
129
|
+
Setup the stream to control the specified axes and to queue actions on the device.
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
axes: Numbers of physical axes to setup the stream on.
|
|
133
|
+
"""
|
|
134
|
+
request = dto.StreamSetupLiveRequest(
|
|
135
|
+
interface_id=self.device.connection.interface_id,
|
|
136
|
+
device=self.device.device_address,
|
|
137
|
+
stream_id=self.stream_id,
|
|
138
|
+
axes=list(axes),
|
|
139
|
+
)
|
|
140
|
+
await call_async("device/stream_setup_live", request)
|
|
141
|
+
|
|
142
|
+
def setup_store_composite(
|
|
143
|
+
self,
|
|
144
|
+
stream_buffer: StreamBuffer,
|
|
145
|
+
*axes: StreamAxisDefinition
|
|
146
|
+
) -> None:
|
|
147
|
+
"""
|
|
148
|
+
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
149
|
+
Allows use of lockstep axes in a stream.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
stream_buffer: The stream buffer to queue actions in.
|
|
153
|
+
axes: Definition of the stream axes.
|
|
154
|
+
"""
|
|
155
|
+
request = dto.StreamSetupStoreCompositeRequest(
|
|
156
|
+
interface_id=self.device.connection.interface_id,
|
|
157
|
+
device=self.device.device_address,
|
|
158
|
+
stream_id=self.stream_id,
|
|
159
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
160
|
+
axes=list(axes),
|
|
161
|
+
)
|
|
162
|
+
call("device/stream_setup_store_composite", request)
|
|
163
|
+
|
|
164
|
+
async def setup_store_composite_async(
|
|
165
|
+
self,
|
|
166
|
+
stream_buffer: StreamBuffer,
|
|
167
|
+
*axes: StreamAxisDefinition
|
|
168
|
+
) -> None:
|
|
169
|
+
"""
|
|
170
|
+
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
171
|
+
Allows use of lockstep axes in a stream.
|
|
172
|
+
|
|
173
|
+
Args:
|
|
174
|
+
stream_buffer: The stream buffer to queue actions in.
|
|
175
|
+
axes: Definition of the stream axes.
|
|
176
|
+
"""
|
|
177
|
+
request = dto.StreamSetupStoreCompositeRequest(
|
|
178
|
+
interface_id=self.device.connection.interface_id,
|
|
179
|
+
device=self.device.device_address,
|
|
180
|
+
stream_id=self.stream_id,
|
|
181
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
182
|
+
axes=list(axes),
|
|
183
|
+
)
|
|
184
|
+
await call_async("device/stream_setup_store_composite", request)
|
|
185
|
+
|
|
186
|
+
def setup_store(
|
|
187
|
+
self,
|
|
188
|
+
stream_buffer: StreamBuffer,
|
|
189
|
+
*axes: int
|
|
190
|
+
) -> None:
|
|
191
|
+
"""
|
|
192
|
+
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
193
|
+
|
|
194
|
+
Args:
|
|
195
|
+
stream_buffer: The stream buffer to queue actions in.
|
|
196
|
+
axes: Numbers of physical axes to setup the stream on.
|
|
197
|
+
"""
|
|
198
|
+
request = dto.StreamSetupStoreRequest(
|
|
199
|
+
interface_id=self.device.connection.interface_id,
|
|
200
|
+
device=self.device.device_address,
|
|
201
|
+
stream_id=self.stream_id,
|
|
202
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
203
|
+
axes=list(axes),
|
|
204
|
+
)
|
|
205
|
+
call("device/stream_setup_store", request)
|
|
206
|
+
|
|
207
|
+
async def setup_store_async(
|
|
208
|
+
self,
|
|
209
|
+
stream_buffer: StreamBuffer,
|
|
210
|
+
*axes: int
|
|
211
|
+
) -> None:
|
|
212
|
+
"""
|
|
213
|
+
Setup the stream to control the specified axes and queue actions into a stream buffer.
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
stream_buffer: The stream buffer to queue actions in.
|
|
217
|
+
axes: Numbers of physical axes to setup the stream on.
|
|
218
|
+
"""
|
|
219
|
+
request = dto.StreamSetupStoreRequest(
|
|
220
|
+
interface_id=self.device.connection.interface_id,
|
|
221
|
+
device=self.device.device_address,
|
|
222
|
+
stream_id=self.stream_id,
|
|
223
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
224
|
+
axes=list(axes),
|
|
225
|
+
)
|
|
226
|
+
await call_async("device/stream_setup_store", request)
|
|
227
|
+
|
|
228
|
+
def setup_store_arbitrary_axes(
|
|
229
|
+
self,
|
|
230
|
+
stream_buffer: StreamBuffer,
|
|
231
|
+
axes_count: int
|
|
232
|
+
) -> None:
|
|
233
|
+
"""
|
|
234
|
+
Setup the stream to use a specified number of axes, and to queue actions in a stream buffer.
|
|
235
|
+
Afterwards, you may call the resulting stream buffer on arbitrary axes.
|
|
236
|
+
This mode does not allow for unit conversions.
|
|
237
|
+
|
|
238
|
+
Args:
|
|
239
|
+
stream_buffer: The stream buffer to queue actions in.
|
|
240
|
+
axes_count: The number of axes in the stream.
|
|
241
|
+
"""
|
|
242
|
+
request = dto.StreamSetupStoreArbitraryAxesRequest(
|
|
243
|
+
interface_id=self.device.connection.interface_id,
|
|
244
|
+
device=self.device.device_address,
|
|
245
|
+
stream_id=self.stream_id,
|
|
246
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
247
|
+
axes_count=axes_count,
|
|
248
|
+
)
|
|
249
|
+
call("device/stream_setup_store_arbitrary_axes", request)
|
|
250
|
+
|
|
251
|
+
async def setup_store_arbitrary_axes_async(
|
|
252
|
+
self,
|
|
253
|
+
stream_buffer: StreamBuffer,
|
|
254
|
+
axes_count: int
|
|
255
|
+
) -> None:
|
|
256
|
+
"""
|
|
257
|
+
Setup the stream to use a specified number of axes, and to queue actions in a stream buffer.
|
|
258
|
+
Afterwards, you may call the resulting stream buffer on arbitrary axes.
|
|
259
|
+
This mode does not allow for unit conversions.
|
|
260
|
+
|
|
261
|
+
Args:
|
|
262
|
+
stream_buffer: The stream buffer to queue actions in.
|
|
263
|
+
axes_count: The number of axes in the stream.
|
|
264
|
+
"""
|
|
265
|
+
request = dto.StreamSetupStoreArbitraryAxesRequest(
|
|
266
|
+
interface_id=self.device.connection.interface_id,
|
|
267
|
+
device=self.device.device_address,
|
|
268
|
+
stream_id=self.stream_id,
|
|
269
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
270
|
+
axes_count=axes_count,
|
|
271
|
+
)
|
|
272
|
+
await call_async("device/stream_setup_store_arbitrary_axes", request)
|
|
273
|
+
|
|
274
|
+
def call(
|
|
275
|
+
self,
|
|
276
|
+
stream_buffer: StreamBuffer
|
|
277
|
+
) -> None:
|
|
278
|
+
"""
|
|
279
|
+
Append the actions in a stream buffer to the queue.
|
|
280
|
+
|
|
281
|
+
Args:
|
|
282
|
+
stream_buffer: The stream buffer to call.
|
|
283
|
+
"""
|
|
284
|
+
request = dto.StreamCallRequest(
|
|
285
|
+
interface_id=self.device.connection.interface_id,
|
|
286
|
+
device=self.device.device_address,
|
|
287
|
+
stream_id=self.stream_id,
|
|
288
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
289
|
+
)
|
|
290
|
+
call("device/stream_call", request)
|
|
291
|
+
|
|
292
|
+
async def call_async(
|
|
293
|
+
self,
|
|
294
|
+
stream_buffer: StreamBuffer
|
|
295
|
+
) -> None:
|
|
296
|
+
"""
|
|
297
|
+
Append the actions in a stream buffer to the queue.
|
|
298
|
+
|
|
299
|
+
Args:
|
|
300
|
+
stream_buffer: The stream buffer to call.
|
|
301
|
+
"""
|
|
302
|
+
request = dto.StreamCallRequest(
|
|
303
|
+
interface_id=self.device.connection.interface_id,
|
|
304
|
+
device=self.device.device_address,
|
|
305
|
+
stream_id=self.stream_id,
|
|
306
|
+
stream_buffer=stream_buffer.buffer_id,
|
|
307
|
+
)
|
|
308
|
+
await call_async("device/stream_call", request)
|
|
309
|
+
|
|
310
|
+
def line_absolute(
|
|
311
|
+
self,
|
|
312
|
+
*endpoint: Measurement
|
|
313
|
+
) -> None:
|
|
314
|
+
"""
|
|
315
|
+
Queue an absolute line movement in the stream.
|
|
316
|
+
|
|
317
|
+
Args:
|
|
318
|
+
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
319
|
+
"""
|
|
320
|
+
request = dto.StreamLineRequest(
|
|
321
|
+
interface_id=self.device.connection.interface_id,
|
|
322
|
+
device=self.device.device_address,
|
|
323
|
+
stream_id=self.stream_id,
|
|
324
|
+
type=dto.StreamSegmentType.ABS,
|
|
325
|
+
endpoint=list(endpoint),
|
|
326
|
+
)
|
|
327
|
+
call("device/stream_line", request)
|
|
328
|
+
|
|
329
|
+
async def line_absolute_async(
|
|
330
|
+
self,
|
|
331
|
+
*endpoint: Measurement
|
|
332
|
+
) -> None:
|
|
333
|
+
"""
|
|
334
|
+
Queue an absolute line movement in the stream.
|
|
335
|
+
|
|
336
|
+
Args:
|
|
337
|
+
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
338
|
+
"""
|
|
339
|
+
request = dto.StreamLineRequest(
|
|
340
|
+
interface_id=self.device.connection.interface_id,
|
|
341
|
+
device=self.device.device_address,
|
|
342
|
+
stream_id=self.stream_id,
|
|
343
|
+
type=dto.StreamSegmentType.ABS,
|
|
344
|
+
endpoint=list(endpoint),
|
|
345
|
+
)
|
|
346
|
+
await call_async("device/stream_line", request)
|
|
347
|
+
|
|
348
|
+
def line_relative(
|
|
349
|
+
self,
|
|
350
|
+
*endpoint: Measurement
|
|
351
|
+
) -> None:
|
|
352
|
+
"""
|
|
353
|
+
Queue a relative line movement in the stream.
|
|
354
|
+
|
|
355
|
+
Args:
|
|
356
|
+
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
357
|
+
"""
|
|
358
|
+
request = dto.StreamLineRequest(
|
|
359
|
+
interface_id=self.device.connection.interface_id,
|
|
360
|
+
device=self.device.device_address,
|
|
361
|
+
stream_id=self.stream_id,
|
|
362
|
+
type=dto.StreamSegmentType.REL,
|
|
363
|
+
endpoint=list(endpoint),
|
|
364
|
+
)
|
|
365
|
+
call("device/stream_line", request)
|
|
366
|
+
|
|
367
|
+
async def line_relative_async(
|
|
368
|
+
self,
|
|
369
|
+
*endpoint: Measurement
|
|
370
|
+
) -> None:
|
|
371
|
+
"""
|
|
372
|
+
Queue a relative line movement in the stream.
|
|
373
|
+
|
|
374
|
+
Args:
|
|
375
|
+
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
376
|
+
"""
|
|
377
|
+
request = dto.StreamLineRequest(
|
|
378
|
+
interface_id=self.device.connection.interface_id,
|
|
379
|
+
device=self.device.device_address,
|
|
380
|
+
stream_id=self.stream_id,
|
|
381
|
+
type=dto.StreamSegmentType.REL,
|
|
382
|
+
endpoint=list(endpoint),
|
|
383
|
+
)
|
|
384
|
+
await call_async("device/stream_line", request)
|
|
385
|
+
|
|
386
|
+
def line_absolute_on(
|
|
387
|
+
self,
|
|
388
|
+
target_axes_indices: List[int],
|
|
389
|
+
endpoint: List[Measurement]
|
|
390
|
+
) -> None:
|
|
391
|
+
"""
|
|
392
|
+
Queue an absolute line movement in the stream, targeting a subset of the stream axes.
|
|
393
|
+
Requires at least Firmware 7.11.
|
|
394
|
+
|
|
395
|
+
Args:
|
|
396
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
397
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
398
|
+
Indices are zero-based.
|
|
399
|
+
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
400
|
+
"""
|
|
401
|
+
request = dto.StreamLineRequest(
|
|
402
|
+
interface_id=self.device.connection.interface_id,
|
|
403
|
+
device=self.device.device_address,
|
|
404
|
+
stream_id=self.stream_id,
|
|
405
|
+
type=dto.StreamSegmentType.ABS,
|
|
406
|
+
target_axes_indices=target_axes_indices,
|
|
407
|
+
endpoint=endpoint,
|
|
408
|
+
)
|
|
409
|
+
call("device/stream_line", request)
|
|
410
|
+
|
|
411
|
+
async def line_absolute_on_async(
|
|
412
|
+
self,
|
|
413
|
+
target_axes_indices: List[int],
|
|
414
|
+
endpoint: List[Measurement]
|
|
415
|
+
) -> None:
|
|
416
|
+
"""
|
|
417
|
+
Queue an absolute line movement in the stream, targeting a subset of the stream axes.
|
|
418
|
+
Requires at least Firmware 7.11.
|
|
419
|
+
|
|
420
|
+
Args:
|
|
421
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
422
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
423
|
+
Indices are zero-based.
|
|
424
|
+
endpoint: Positions for the axes to move to, relative to their home positions.
|
|
425
|
+
"""
|
|
426
|
+
request = dto.StreamLineRequest(
|
|
427
|
+
interface_id=self.device.connection.interface_id,
|
|
428
|
+
device=self.device.device_address,
|
|
429
|
+
stream_id=self.stream_id,
|
|
430
|
+
type=dto.StreamSegmentType.ABS,
|
|
431
|
+
target_axes_indices=target_axes_indices,
|
|
432
|
+
endpoint=endpoint,
|
|
433
|
+
)
|
|
434
|
+
await call_async("device/stream_line", request)
|
|
435
|
+
|
|
436
|
+
def line_relative_on(
|
|
437
|
+
self,
|
|
438
|
+
target_axes_indices: List[int],
|
|
439
|
+
endpoint: List[Measurement]
|
|
440
|
+
) -> None:
|
|
441
|
+
"""
|
|
442
|
+
Queue a relative line movement in the stream, targeting a subset of the stream axes.
|
|
443
|
+
Requires at least Firmware 7.11.
|
|
444
|
+
|
|
445
|
+
Args:
|
|
446
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
447
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
448
|
+
Indices are zero-based.
|
|
449
|
+
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
450
|
+
"""
|
|
451
|
+
request = dto.StreamLineRequest(
|
|
452
|
+
interface_id=self.device.connection.interface_id,
|
|
453
|
+
device=self.device.device_address,
|
|
454
|
+
stream_id=self.stream_id,
|
|
455
|
+
type=dto.StreamSegmentType.REL,
|
|
456
|
+
target_axes_indices=target_axes_indices,
|
|
457
|
+
endpoint=endpoint,
|
|
458
|
+
)
|
|
459
|
+
call("device/stream_line", request)
|
|
460
|
+
|
|
461
|
+
async def line_relative_on_async(
|
|
462
|
+
self,
|
|
463
|
+
target_axes_indices: List[int],
|
|
464
|
+
endpoint: List[Measurement]
|
|
465
|
+
) -> None:
|
|
466
|
+
"""
|
|
467
|
+
Queue a relative line movement in the stream, targeting a subset of the stream axes.
|
|
468
|
+
Requires at least Firmware 7.11.
|
|
469
|
+
|
|
470
|
+
Args:
|
|
471
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
472
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
473
|
+
Indices are zero-based.
|
|
474
|
+
endpoint: Positions for the axes to move to, relative to their positions before movement.
|
|
475
|
+
"""
|
|
476
|
+
request = dto.StreamLineRequest(
|
|
477
|
+
interface_id=self.device.connection.interface_id,
|
|
478
|
+
device=self.device.device_address,
|
|
479
|
+
stream_id=self.stream_id,
|
|
480
|
+
type=dto.StreamSegmentType.REL,
|
|
481
|
+
target_axes_indices=target_axes_indices,
|
|
482
|
+
endpoint=endpoint,
|
|
483
|
+
)
|
|
484
|
+
await call_async("device/stream_line", request)
|
|
485
|
+
|
|
486
|
+
def arc_absolute(
|
|
487
|
+
self,
|
|
488
|
+
rotation_direction: RotationDirection,
|
|
489
|
+
center_x: Measurement,
|
|
490
|
+
center_y: Measurement,
|
|
491
|
+
end_x: Measurement,
|
|
492
|
+
end_y: Measurement
|
|
493
|
+
) -> None:
|
|
494
|
+
"""
|
|
495
|
+
Queue an absolute arc movement on the first two axes of the stream.
|
|
496
|
+
Absolute meaning that the home positions of the axes is treated as the origin.
|
|
497
|
+
|
|
498
|
+
Args:
|
|
499
|
+
rotation_direction: The direction of the rotation.
|
|
500
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
501
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
502
|
+
end_x: The first dimension of the end position of the arc.
|
|
503
|
+
end_y: The second dimension of the end position of the arc.
|
|
504
|
+
"""
|
|
505
|
+
request = dto.StreamArcRequest(
|
|
506
|
+
interface_id=self.device.connection.interface_id,
|
|
507
|
+
device=self.device.device_address,
|
|
508
|
+
stream_id=self.stream_id,
|
|
509
|
+
type=dto.StreamSegmentType.ABS,
|
|
510
|
+
rotation_direction=rotation_direction,
|
|
511
|
+
center_x=center_x,
|
|
512
|
+
center_y=center_y,
|
|
513
|
+
end_x=end_x,
|
|
514
|
+
end_y=end_y,
|
|
515
|
+
)
|
|
516
|
+
call("device/stream_arc", request)
|
|
517
|
+
|
|
518
|
+
async def arc_absolute_async(
|
|
519
|
+
self,
|
|
520
|
+
rotation_direction: RotationDirection,
|
|
521
|
+
center_x: Measurement,
|
|
522
|
+
center_y: Measurement,
|
|
523
|
+
end_x: Measurement,
|
|
524
|
+
end_y: Measurement
|
|
525
|
+
) -> None:
|
|
526
|
+
"""
|
|
527
|
+
Queue an absolute arc movement on the first two axes of the stream.
|
|
528
|
+
Absolute meaning that the home positions of the axes is treated as the origin.
|
|
529
|
+
|
|
530
|
+
Args:
|
|
531
|
+
rotation_direction: The direction of the rotation.
|
|
532
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
533
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
534
|
+
end_x: The first dimension of the end position of the arc.
|
|
535
|
+
end_y: The second dimension of the end position of the arc.
|
|
536
|
+
"""
|
|
537
|
+
request = dto.StreamArcRequest(
|
|
538
|
+
interface_id=self.device.connection.interface_id,
|
|
539
|
+
device=self.device.device_address,
|
|
540
|
+
stream_id=self.stream_id,
|
|
541
|
+
type=dto.StreamSegmentType.ABS,
|
|
542
|
+
rotation_direction=rotation_direction,
|
|
543
|
+
center_x=center_x,
|
|
544
|
+
center_y=center_y,
|
|
545
|
+
end_x=end_x,
|
|
546
|
+
end_y=end_y,
|
|
547
|
+
)
|
|
548
|
+
await call_async("device/stream_arc", request)
|
|
549
|
+
|
|
550
|
+
def arc_relative(
|
|
551
|
+
self,
|
|
552
|
+
rotation_direction: RotationDirection,
|
|
553
|
+
center_x: Measurement,
|
|
554
|
+
center_y: Measurement,
|
|
555
|
+
end_x: Measurement,
|
|
556
|
+
end_y: Measurement
|
|
557
|
+
) -> None:
|
|
558
|
+
"""
|
|
559
|
+
Queue a relative arc movement on the first two axes of the stream.
|
|
560
|
+
Relative meaning that the current position of the axes is treated as the origin.
|
|
561
|
+
|
|
562
|
+
Args:
|
|
563
|
+
rotation_direction: The direction of the rotation.
|
|
564
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
565
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
566
|
+
end_x: The first dimension of the end position of the arc.
|
|
567
|
+
end_y: The second dimension of the end position of the arc.
|
|
568
|
+
"""
|
|
569
|
+
request = dto.StreamArcRequest(
|
|
570
|
+
interface_id=self.device.connection.interface_id,
|
|
571
|
+
device=self.device.device_address,
|
|
572
|
+
stream_id=self.stream_id,
|
|
573
|
+
type=dto.StreamSegmentType.REL,
|
|
574
|
+
rotation_direction=rotation_direction,
|
|
575
|
+
center_x=center_x,
|
|
576
|
+
center_y=center_y,
|
|
577
|
+
end_x=end_x,
|
|
578
|
+
end_y=end_y,
|
|
579
|
+
)
|
|
580
|
+
call("device/stream_arc", request)
|
|
581
|
+
|
|
582
|
+
async def arc_relative_async(
|
|
583
|
+
self,
|
|
584
|
+
rotation_direction: RotationDirection,
|
|
585
|
+
center_x: Measurement,
|
|
586
|
+
center_y: Measurement,
|
|
587
|
+
end_x: Measurement,
|
|
588
|
+
end_y: Measurement
|
|
589
|
+
) -> None:
|
|
590
|
+
"""
|
|
591
|
+
Queue a relative arc movement on the first two axes of the stream.
|
|
592
|
+
Relative meaning that the current position of the axes is treated as the origin.
|
|
593
|
+
|
|
594
|
+
Args:
|
|
595
|
+
rotation_direction: The direction of the rotation.
|
|
596
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
597
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
598
|
+
end_x: The first dimension of the end position of the arc.
|
|
599
|
+
end_y: The second dimension of the end position of the arc.
|
|
600
|
+
"""
|
|
601
|
+
request = dto.StreamArcRequest(
|
|
602
|
+
interface_id=self.device.connection.interface_id,
|
|
603
|
+
device=self.device.device_address,
|
|
604
|
+
stream_id=self.stream_id,
|
|
605
|
+
type=dto.StreamSegmentType.REL,
|
|
606
|
+
rotation_direction=rotation_direction,
|
|
607
|
+
center_x=center_x,
|
|
608
|
+
center_y=center_y,
|
|
609
|
+
end_x=end_x,
|
|
610
|
+
end_y=end_y,
|
|
611
|
+
)
|
|
612
|
+
await call_async("device/stream_arc", request)
|
|
613
|
+
|
|
614
|
+
def arc_absolute_on(
|
|
615
|
+
self,
|
|
616
|
+
target_axes_indices: List[int],
|
|
617
|
+
rotation_direction: RotationDirection,
|
|
618
|
+
center_x: Measurement,
|
|
619
|
+
center_y: Measurement,
|
|
620
|
+
end_x: Measurement,
|
|
621
|
+
end_y: Measurement
|
|
622
|
+
) -> None:
|
|
623
|
+
"""
|
|
624
|
+
Queue an absolute arc movement in the stream.
|
|
625
|
+
The movement will only target the specified subset of axes in the stream.
|
|
626
|
+
Requires at least Firmware 7.11.
|
|
627
|
+
|
|
628
|
+
Args:
|
|
629
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
630
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
631
|
+
Indices are zero-based.
|
|
632
|
+
rotation_direction: The direction of the rotation.
|
|
633
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
634
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
635
|
+
end_x: The first dimension of the end position of the arc.
|
|
636
|
+
end_y: The second dimension of the end position of the arc.
|
|
637
|
+
"""
|
|
638
|
+
request = dto.StreamArcRequest(
|
|
639
|
+
interface_id=self.device.connection.interface_id,
|
|
640
|
+
device=self.device.device_address,
|
|
641
|
+
stream_id=self.stream_id,
|
|
642
|
+
type=dto.StreamSegmentType.ABS,
|
|
643
|
+
target_axes_indices=target_axes_indices,
|
|
644
|
+
rotation_direction=rotation_direction,
|
|
645
|
+
center_x=center_x,
|
|
646
|
+
center_y=center_y,
|
|
647
|
+
end_x=end_x,
|
|
648
|
+
end_y=end_y,
|
|
649
|
+
)
|
|
650
|
+
call("device/stream_arc", request)
|
|
651
|
+
|
|
652
|
+
async def arc_absolute_on_async(
|
|
653
|
+
self,
|
|
654
|
+
target_axes_indices: List[int],
|
|
655
|
+
rotation_direction: RotationDirection,
|
|
656
|
+
center_x: Measurement,
|
|
657
|
+
center_y: Measurement,
|
|
658
|
+
end_x: Measurement,
|
|
659
|
+
end_y: Measurement
|
|
660
|
+
) -> None:
|
|
661
|
+
"""
|
|
662
|
+
Queue an absolute arc movement in the stream.
|
|
663
|
+
The movement will only target the specified subset of axes in the stream.
|
|
664
|
+
Requires at least Firmware 7.11.
|
|
665
|
+
|
|
666
|
+
Args:
|
|
667
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
668
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
669
|
+
Indices are zero-based.
|
|
670
|
+
rotation_direction: The direction of the rotation.
|
|
671
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
672
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
673
|
+
end_x: The first dimension of the end position of the arc.
|
|
674
|
+
end_y: The second dimension of the end position of the arc.
|
|
675
|
+
"""
|
|
676
|
+
request = dto.StreamArcRequest(
|
|
677
|
+
interface_id=self.device.connection.interface_id,
|
|
678
|
+
device=self.device.device_address,
|
|
679
|
+
stream_id=self.stream_id,
|
|
680
|
+
type=dto.StreamSegmentType.ABS,
|
|
681
|
+
target_axes_indices=target_axes_indices,
|
|
682
|
+
rotation_direction=rotation_direction,
|
|
683
|
+
center_x=center_x,
|
|
684
|
+
center_y=center_y,
|
|
685
|
+
end_x=end_x,
|
|
686
|
+
end_y=end_y,
|
|
687
|
+
)
|
|
688
|
+
await call_async("device/stream_arc", request)
|
|
689
|
+
|
|
690
|
+
def arc_relative_on(
|
|
691
|
+
self,
|
|
692
|
+
target_axes_indices: List[int],
|
|
693
|
+
rotation_direction: RotationDirection,
|
|
694
|
+
center_x: Measurement,
|
|
695
|
+
center_y: Measurement,
|
|
696
|
+
end_x: Measurement,
|
|
697
|
+
end_y: Measurement
|
|
698
|
+
) -> None:
|
|
699
|
+
"""
|
|
700
|
+
Queue a relative arc movement in the stream.
|
|
701
|
+
The movement will only target the specified subset of axes in the stream.
|
|
702
|
+
Requires at least Firmware 7.11.
|
|
703
|
+
|
|
704
|
+
Args:
|
|
705
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
706
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
707
|
+
Indices are zero-based.
|
|
708
|
+
rotation_direction: The direction of the rotation.
|
|
709
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
710
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
711
|
+
end_x: The first dimension of the end position of the arc.
|
|
712
|
+
end_y: The second dimension of the end position of the arc.
|
|
713
|
+
"""
|
|
714
|
+
request = dto.StreamArcRequest(
|
|
715
|
+
interface_id=self.device.connection.interface_id,
|
|
716
|
+
device=self.device.device_address,
|
|
717
|
+
stream_id=self.stream_id,
|
|
718
|
+
type=dto.StreamSegmentType.REL,
|
|
719
|
+
target_axes_indices=target_axes_indices,
|
|
720
|
+
rotation_direction=rotation_direction,
|
|
721
|
+
center_x=center_x,
|
|
722
|
+
center_y=center_y,
|
|
723
|
+
end_x=end_x,
|
|
724
|
+
end_y=end_y,
|
|
725
|
+
)
|
|
726
|
+
call("device/stream_arc", request)
|
|
727
|
+
|
|
728
|
+
async def arc_relative_on_async(
|
|
729
|
+
self,
|
|
730
|
+
target_axes_indices: List[int],
|
|
731
|
+
rotation_direction: RotationDirection,
|
|
732
|
+
center_x: Measurement,
|
|
733
|
+
center_y: Measurement,
|
|
734
|
+
end_x: Measurement,
|
|
735
|
+
end_y: Measurement
|
|
736
|
+
) -> None:
|
|
737
|
+
"""
|
|
738
|
+
Queue a relative arc movement in the stream.
|
|
739
|
+
The movement will only target the specified subset of axes in the stream.
|
|
740
|
+
Requires at least Firmware 7.11.
|
|
741
|
+
|
|
742
|
+
Args:
|
|
743
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
744
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
745
|
+
Indices are zero-based.
|
|
746
|
+
rotation_direction: The direction of the rotation.
|
|
747
|
+
center_x: The first dimension of the position of the center of the circle on which the arc exists.
|
|
748
|
+
center_y: The second dimension of the position of the center of the circle on which the arc exists.
|
|
749
|
+
end_x: The first dimension of the end position of the arc.
|
|
750
|
+
end_y: The second dimension of the end position of the arc.
|
|
751
|
+
"""
|
|
752
|
+
request = dto.StreamArcRequest(
|
|
753
|
+
interface_id=self.device.connection.interface_id,
|
|
754
|
+
device=self.device.device_address,
|
|
755
|
+
stream_id=self.stream_id,
|
|
756
|
+
type=dto.StreamSegmentType.REL,
|
|
757
|
+
target_axes_indices=target_axes_indices,
|
|
758
|
+
rotation_direction=rotation_direction,
|
|
759
|
+
center_x=center_x,
|
|
760
|
+
center_y=center_y,
|
|
761
|
+
end_x=end_x,
|
|
762
|
+
end_y=end_y,
|
|
763
|
+
)
|
|
764
|
+
await call_async("device/stream_arc", request)
|
|
765
|
+
|
|
766
|
+
def helix_absolute_on(
|
|
767
|
+
self,
|
|
768
|
+
target_axes_indices: List[int],
|
|
769
|
+
rotation_direction: RotationDirection,
|
|
770
|
+
center_x: Measurement,
|
|
771
|
+
center_y: Measurement,
|
|
772
|
+
end_x: Measurement,
|
|
773
|
+
end_y: Measurement,
|
|
774
|
+
*endpoint: Measurement
|
|
775
|
+
) -> None:
|
|
776
|
+
"""
|
|
777
|
+
Queue an absolute helix movement in the stream.
|
|
778
|
+
Requires at least Firmware 7.28.
|
|
779
|
+
|
|
780
|
+
Args:
|
|
781
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
782
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
783
|
+
Indices are zero-based.
|
|
784
|
+
The first two axes refer to the helix's arc component,
|
|
785
|
+
while the rest refers to the helix's line component.
|
|
786
|
+
rotation_direction: The direction of the rotation.
|
|
787
|
+
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
788
|
+
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
789
|
+
end_x: The first dimension of the end position of the helix's arc component.
|
|
790
|
+
end_y: The second dimension of the end position of the helix's arc component.
|
|
791
|
+
endpoint: Positions for the helix's line component axes, relative to their home positions.
|
|
792
|
+
"""
|
|
793
|
+
request = dto.StreamArcRequest(
|
|
794
|
+
interface_id=self.device.connection.interface_id,
|
|
795
|
+
device=self.device.device_address,
|
|
796
|
+
stream_id=self.stream_id,
|
|
797
|
+
type=dto.StreamSegmentType.ABS,
|
|
798
|
+
target_axes_indices=target_axes_indices,
|
|
799
|
+
rotation_direction=rotation_direction,
|
|
800
|
+
center_x=center_x,
|
|
801
|
+
center_y=center_y,
|
|
802
|
+
end_x=end_x,
|
|
803
|
+
end_y=end_y,
|
|
804
|
+
endpoint=list(endpoint),
|
|
805
|
+
)
|
|
806
|
+
call("device/stream_helix", request)
|
|
807
|
+
|
|
808
|
+
async def helix_absolute_on_async(
|
|
809
|
+
self,
|
|
810
|
+
target_axes_indices: List[int],
|
|
811
|
+
rotation_direction: RotationDirection,
|
|
812
|
+
center_x: Measurement,
|
|
813
|
+
center_y: Measurement,
|
|
814
|
+
end_x: Measurement,
|
|
815
|
+
end_y: Measurement,
|
|
816
|
+
*endpoint: Measurement
|
|
817
|
+
) -> None:
|
|
818
|
+
"""
|
|
819
|
+
Queue an absolute helix movement in the stream.
|
|
820
|
+
Requires at least Firmware 7.28.
|
|
821
|
+
|
|
822
|
+
Args:
|
|
823
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
824
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
825
|
+
Indices are zero-based.
|
|
826
|
+
The first two axes refer to the helix's arc component,
|
|
827
|
+
while the rest refers to the helix's line component.
|
|
828
|
+
rotation_direction: The direction of the rotation.
|
|
829
|
+
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
830
|
+
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
831
|
+
end_x: The first dimension of the end position of the helix's arc component.
|
|
832
|
+
end_y: The second dimension of the end position of the helix's arc component.
|
|
833
|
+
endpoint: Positions for the helix's line component axes, relative to their home positions.
|
|
834
|
+
"""
|
|
835
|
+
request = dto.StreamArcRequest(
|
|
836
|
+
interface_id=self.device.connection.interface_id,
|
|
837
|
+
device=self.device.device_address,
|
|
838
|
+
stream_id=self.stream_id,
|
|
839
|
+
type=dto.StreamSegmentType.ABS,
|
|
840
|
+
target_axes_indices=target_axes_indices,
|
|
841
|
+
rotation_direction=rotation_direction,
|
|
842
|
+
center_x=center_x,
|
|
843
|
+
center_y=center_y,
|
|
844
|
+
end_x=end_x,
|
|
845
|
+
end_y=end_y,
|
|
846
|
+
endpoint=list(endpoint),
|
|
847
|
+
)
|
|
848
|
+
await call_async("device/stream_helix", request)
|
|
849
|
+
|
|
850
|
+
def helix_relative_on(
|
|
851
|
+
self,
|
|
852
|
+
target_axes_indices: List[int],
|
|
853
|
+
rotation_direction: RotationDirection,
|
|
854
|
+
center_x: Measurement,
|
|
855
|
+
center_y: Measurement,
|
|
856
|
+
end_x: Measurement,
|
|
857
|
+
end_y: Measurement,
|
|
858
|
+
*endpoint: Measurement
|
|
859
|
+
) -> None:
|
|
860
|
+
"""
|
|
861
|
+
Queue a relative helix movement in the stream.
|
|
862
|
+
Requires at least Firmware 7.28.
|
|
863
|
+
|
|
864
|
+
Args:
|
|
865
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
866
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
867
|
+
Indices are zero-based.
|
|
868
|
+
The first two axes refer to the helix's arc component,
|
|
869
|
+
while the rest refers to the helix's line component.
|
|
870
|
+
rotation_direction: The direction of the rotation.
|
|
871
|
+
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
872
|
+
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
873
|
+
end_x: The first dimension of the end position of the helix's arc component.
|
|
874
|
+
end_y: The second dimension of the end position of the helix's arc component.
|
|
875
|
+
endpoint: Positions for the helix's line component axes, relative to their positions before movement.
|
|
876
|
+
"""
|
|
877
|
+
request = dto.StreamArcRequest(
|
|
878
|
+
interface_id=self.device.connection.interface_id,
|
|
879
|
+
device=self.device.device_address,
|
|
880
|
+
stream_id=self.stream_id,
|
|
881
|
+
type=dto.StreamSegmentType.REL,
|
|
882
|
+
target_axes_indices=target_axes_indices,
|
|
883
|
+
rotation_direction=rotation_direction,
|
|
884
|
+
center_x=center_x,
|
|
885
|
+
center_y=center_y,
|
|
886
|
+
end_x=end_x,
|
|
887
|
+
end_y=end_y,
|
|
888
|
+
endpoint=list(endpoint),
|
|
889
|
+
)
|
|
890
|
+
call("device/stream_helix", request)
|
|
891
|
+
|
|
892
|
+
async def helix_relative_on_async(
|
|
893
|
+
self,
|
|
894
|
+
target_axes_indices: List[int],
|
|
895
|
+
rotation_direction: RotationDirection,
|
|
896
|
+
center_x: Measurement,
|
|
897
|
+
center_y: Measurement,
|
|
898
|
+
end_x: Measurement,
|
|
899
|
+
end_y: Measurement,
|
|
900
|
+
*endpoint: Measurement
|
|
901
|
+
) -> None:
|
|
902
|
+
"""
|
|
903
|
+
Queue a relative helix movement in the stream.
|
|
904
|
+
Requires at least Firmware 7.28.
|
|
905
|
+
|
|
906
|
+
Args:
|
|
907
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
908
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
909
|
+
Indices are zero-based.
|
|
910
|
+
The first two axes refer to the helix's arc component,
|
|
911
|
+
while the rest refers to the helix's line component.
|
|
912
|
+
rotation_direction: The direction of the rotation.
|
|
913
|
+
center_x: The first dimension of the position of the center of the circle on which the helix projects.
|
|
914
|
+
center_y: The second dimension of the position of the center of the circle on which the helix projects.
|
|
915
|
+
end_x: The first dimension of the end position of the helix's arc component.
|
|
916
|
+
end_y: The second dimension of the end position of the helix's arc component.
|
|
917
|
+
endpoint: Positions for the helix's line component axes, relative to their positions before movement.
|
|
918
|
+
"""
|
|
919
|
+
request = dto.StreamArcRequest(
|
|
920
|
+
interface_id=self.device.connection.interface_id,
|
|
921
|
+
device=self.device.device_address,
|
|
922
|
+
stream_id=self.stream_id,
|
|
923
|
+
type=dto.StreamSegmentType.REL,
|
|
924
|
+
target_axes_indices=target_axes_indices,
|
|
925
|
+
rotation_direction=rotation_direction,
|
|
926
|
+
center_x=center_x,
|
|
927
|
+
center_y=center_y,
|
|
928
|
+
end_x=end_x,
|
|
929
|
+
end_y=end_y,
|
|
930
|
+
endpoint=list(endpoint),
|
|
931
|
+
)
|
|
932
|
+
await call_async("device/stream_helix", request)
|
|
933
|
+
|
|
934
|
+
def circle_absolute(
|
|
935
|
+
self,
|
|
936
|
+
rotation_direction: RotationDirection,
|
|
937
|
+
center_x: Measurement,
|
|
938
|
+
center_y: Measurement
|
|
939
|
+
) -> None:
|
|
940
|
+
"""
|
|
941
|
+
Queue an absolute circle movement on the first two axes of the stream.
|
|
942
|
+
Absolute meaning that the home positions of the axes are treated as the origin.
|
|
943
|
+
|
|
944
|
+
Args:
|
|
945
|
+
rotation_direction: The direction of the rotation.
|
|
946
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
947
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
948
|
+
"""
|
|
949
|
+
request = dto.StreamCircleRequest(
|
|
950
|
+
interface_id=self.device.connection.interface_id,
|
|
951
|
+
device=self.device.device_address,
|
|
952
|
+
stream_id=self.stream_id,
|
|
953
|
+
type=dto.StreamSegmentType.ABS,
|
|
954
|
+
rotation_direction=rotation_direction,
|
|
955
|
+
center_x=center_x,
|
|
956
|
+
center_y=center_y,
|
|
957
|
+
)
|
|
958
|
+
call("device/stream_circle", request)
|
|
959
|
+
|
|
960
|
+
async def circle_absolute_async(
|
|
961
|
+
self,
|
|
962
|
+
rotation_direction: RotationDirection,
|
|
963
|
+
center_x: Measurement,
|
|
964
|
+
center_y: Measurement
|
|
965
|
+
) -> None:
|
|
966
|
+
"""
|
|
967
|
+
Queue an absolute circle movement on the first two axes of the stream.
|
|
968
|
+
Absolute meaning that the home positions of the axes are treated as the origin.
|
|
969
|
+
|
|
970
|
+
Args:
|
|
971
|
+
rotation_direction: The direction of the rotation.
|
|
972
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
973
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
974
|
+
"""
|
|
975
|
+
request = dto.StreamCircleRequest(
|
|
976
|
+
interface_id=self.device.connection.interface_id,
|
|
977
|
+
device=self.device.device_address,
|
|
978
|
+
stream_id=self.stream_id,
|
|
979
|
+
type=dto.StreamSegmentType.ABS,
|
|
980
|
+
rotation_direction=rotation_direction,
|
|
981
|
+
center_x=center_x,
|
|
982
|
+
center_y=center_y,
|
|
983
|
+
)
|
|
984
|
+
await call_async("device/stream_circle", request)
|
|
985
|
+
|
|
986
|
+
def circle_relative(
|
|
987
|
+
self,
|
|
988
|
+
rotation_direction: RotationDirection,
|
|
989
|
+
center_x: Measurement,
|
|
990
|
+
center_y: Measurement
|
|
991
|
+
) -> None:
|
|
992
|
+
"""
|
|
993
|
+
Queue a relative circle movement on the first two axes of the stream.
|
|
994
|
+
Relative meaning that the current position of the axes is treated as the origin.
|
|
995
|
+
|
|
996
|
+
Args:
|
|
997
|
+
rotation_direction: The direction of the rotation.
|
|
998
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
999
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
1000
|
+
"""
|
|
1001
|
+
request = dto.StreamCircleRequest(
|
|
1002
|
+
interface_id=self.device.connection.interface_id,
|
|
1003
|
+
device=self.device.device_address,
|
|
1004
|
+
stream_id=self.stream_id,
|
|
1005
|
+
type=dto.StreamSegmentType.REL,
|
|
1006
|
+
rotation_direction=rotation_direction,
|
|
1007
|
+
center_x=center_x,
|
|
1008
|
+
center_y=center_y,
|
|
1009
|
+
)
|
|
1010
|
+
call("device/stream_circle", request)
|
|
1011
|
+
|
|
1012
|
+
async def circle_relative_async(
|
|
1013
|
+
self,
|
|
1014
|
+
rotation_direction: RotationDirection,
|
|
1015
|
+
center_x: Measurement,
|
|
1016
|
+
center_y: Measurement
|
|
1017
|
+
) -> None:
|
|
1018
|
+
"""
|
|
1019
|
+
Queue a relative circle movement on the first two axes of the stream.
|
|
1020
|
+
Relative meaning that the current position of the axes is treated as the origin.
|
|
1021
|
+
|
|
1022
|
+
Args:
|
|
1023
|
+
rotation_direction: The direction of the rotation.
|
|
1024
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
1025
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
1026
|
+
"""
|
|
1027
|
+
request = dto.StreamCircleRequest(
|
|
1028
|
+
interface_id=self.device.connection.interface_id,
|
|
1029
|
+
device=self.device.device_address,
|
|
1030
|
+
stream_id=self.stream_id,
|
|
1031
|
+
type=dto.StreamSegmentType.REL,
|
|
1032
|
+
rotation_direction=rotation_direction,
|
|
1033
|
+
center_x=center_x,
|
|
1034
|
+
center_y=center_y,
|
|
1035
|
+
)
|
|
1036
|
+
await call_async("device/stream_circle", request)
|
|
1037
|
+
|
|
1038
|
+
def circle_absolute_on(
|
|
1039
|
+
self,
|
|
1040
|
+
target_axes_indices: List[int],
|
|
1041
|
+
rotation_direction: RotationDirection,
|
|
1042
|
+
center_x: Measurement,
|
|
1043
|
+
center_y: Measurement
|
|
1044
|
+
) -> None:
|
|
1045
|
+
"""
|
|
1046
|
+
Queue an absolute circle movement in the stream.
|
|
1047
|
+
The movement will only target the specified subset of axes in the stream.
|
|
1048
|
+
Requires at least Firmware 7.11.
|
|
1049
|
+
|
|
1050
|
+
Args:
|
|
1051
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1052
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
1053
|
+
Indices are zero-based.
|
|
1054
|
+
rotation_direction: The direction of the rotation.
|
|
1055
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
1056
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
1057
|
+
"""
|
|
1058
|
+
request = dto.StreamCircleRequest(
|
|
1059
|
+
interface_id=self.device.connection.interface_id,
|
|
1060
|
+
device=self.device.device_address,
|
|
1061
|
+
stream_id=self.stream_id,
|
|
1062
|
+
type=dto.StreamSegmentType.ABS,
|
|
1063
|
+
target_axes_indices=target_axes_indices,
|
|
1064
|
+
rotation_direction=rotation_direction,
|
|
1065
|
+
center_x=center_x,
|
|
1066
|
+
center_y=center_y,
|
|
1067
|
+
)
|
|
1068
|
+
call("device/stream_circle", request)
|
|
1069
|
+
|
|
1070
|
+
async def circle_absolute_on_async(
|
|
1071
|
+
self,
|
|
1072
|
+
target_axes_indices: List[int],
|
|
1073
|
+
rotation_direction: RotationDirection,
|
|
1074
|
+
center_x: Measurement,
|
|
1075
|
+
center_y: Measurement
|
|
1076
|
+
) -> None:
|
|
1077
|
+
"""
|
|
1078
|
+
Queue an absolute circle movement in the stream.
|
|
1079
|
+
The movement will only target the specified subset of axes in the stream.
|
|
1080
|
+
Requires at least Firmware 7.11.
|
|
1081
|
+
|
|
1082
|
+
Args:
|
|
1083
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1084
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
1085
|
+
Indices are zero-based.
|
|
1086
|
+
rotation_direction: The direction of the rotation.
|
|
1087
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
1088
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
1089
|
+
"""
|
|
1090
|
+
request = dto.StreamCircleRequest(
|
|
1091
|
+
interface_id=self.device.connection.interface_id,
|
|
1092
|
+
device=self.device.device_address,
|
|
1093
|
+
stream_id=self.stream_id,
|
|
1094
|
+
type=dto.StreamSegmentType.ABS,
|
|
1095
|
+
target_axes_indices=target_axes_indices,
|
|
1096
|
+
rotation_direction=rotation_direction,
|
|
1097
|
+
center_x=center_x,
|
|
1098
|
+
center_y=center_y,
|
|
1099
|
+
)
|
|
1100
|
+
await call_async("device/stream_circle", request)
|
|
1101
|
+
|
|
1102
|
+
def circle_relative_on(
|
|
1103
|
+
self,
|
|
1104
|
+
target_axes_indices: List[int],
|
|
1105
|
+
rotation_direction: RotationDirection,
|
|
1106
|
+
center_x: Measurement,
|
|
1107
|
+
center_y: Measurement
|
|
1108
|
+
) -> None:
|
|
1109
|
+
"""
|
|
1110
|
+
Queue a relative circle movement in the stream.
|
|
1111
|
+
The movement will only target the specified subset of axes in the stream.
|
|
1112
|
+
Requires at least Firmware 7.11.
|
|
1113
|
+
|
|
1114
|
+
Args:
|
|
1115
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1116
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
1117
|
+
Indices are zero-based.
|
|
1118
|
+
rotation_direction: The direction of the rotation.
|
|
1119
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
1120
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
1121
|
+
"""
|
|
1122
|
+
request = dto.StreamCircleRequest(
|
|
1123
|
+
interface_id=self.device.connection.interface_id,
|
|
1124
|
+
device=self.device.device_address,
|
|
1125
|
+
stream_id=self.stream_id,
|
|
1126
|
+
type=dto.StreamSegmentType.REL,
|
|
1127
|
+
target_axes_indices=target_axes_indices,
|
|
1128
|
+
rotation_direction=rotation_direction,
|
|
1129
|
+
center_x=center_x,
|
|
1130
|
+
center_y=center_y,
|
|
1131
|
+
)
|
|
1132
|
+
call("device/stream_circle", request)
|
|
1133
|
+
|
|
1134
|
+
async def circle_relative_on_async(
|
|
1135
|
+
self,
|
|
1136
|
+
target_axes_indices: List[int],
|
|
1137
|
+
rotation_direction: RotationDirection,
|
|
1138
|
+
center_x: Measurement,
|
|
1139
|
+
center_y: Measurement
|
|
1140
|
+
) -> None:
|
|
1141
|
+
"""
|
|
1142
|
+
Queue a relative circle movement in the stream.
|
|
1143
|
+
The movement will only target the specified subset of axes in the stream.
|
|
1144
|
+
Requires at least Firmware 7.11.
|
|
1145
|
+
|
|
1146
|
+
Args:
|
|
1147
|
+
target_axes_indices: Indices of the axes in the stream the movement targets.
|
|
1148
|
+
Refers to the axes provided during the stream setup or further execution.
|
|
1149
|
+
Indices are zero-based.
|
|
1150
|
+
rotation_direction: The direction of the rotation.
|
|
1151
|
+
center_x: The first dimension of the position of the center of the circle.
|
|
1152
|
+
center_y: The second dimension of the position of the center of the circle.
|
|
1153
|
+
"""
|
|
1154
|
+
request = dto.StreamCircleRequest(
|
|
1155
|
+
interface_id=self.device.connection.interface_id,
|
|
1156
|
+
device=self.device.device_address,
|
|
1157
|
+
stream_id=self.stream_id,
|
|
1158
|
+
type=dto.StreamSegmentType.REL,
|
|
1159
|
+
target_axes_indices=target_axes_indices,
|
|
1160
|
+
rotation_direction=rotation_direction,
|
|
1161
|
+
center_x=center_x,
|
|
1162
|
+
center_y=center_y,
|
|
1163
|
+
)
|
|
1164
|
+
await call_async("device/stream_circle", request)
|
|
1165
|
+
|
|
1166
|
+
def wait(
|
|
1167
|
+
self,
|
|
1168
|
+
time: float,
|
|
1169
|
+
unit: TimeUnits = Units.NATIVE
|
|
1170
|
+
) -> None:
|
|
1171
|
+
"""
|
|
1172
|
+
Wait a specified time.
|
|
1173
|
+
|
|
1174
|
+
Args:
|
|
1175
|
+
time: Amount of time to wait.
|
|
1176
|
+
unit: Units of time.
|
|
1177
|
+
"""
|
|
1178
|
+
request = dto.StreamWaitRequest(
|
|
1179
|
+
interface_id=self.device.connection.interface_id,
|
|
1180
|
+
device=self.device.device_address,
|
|
1181
|
+
stream_id=self.stream_id,
|
|
1182
|
+
time=time,
|
|
1183
|
+
unit=unit,
|
|
1184
|
+
)
|
|
1185
|
+
call("device/stream_wait", request)
|
|
1186
|
+
|
|
1187
|
+
async def wait_async(
|
|
1188
|
+
self,
|
|
1189
|
+
time: float,
|
|
1190
|
+
unit: TimeUnits = Units.NATIVE
|
|
1191
|
+
) -> None:
|
|
1192
|
+
"""
|
|
1193
|
+
Wait a specified time.
|
|
1194
|
+
|
|
1195
|
+
Args:
|
|
1196
|
+
time: Amount of time to wait.
|
|
1197
|
+
unit: Units of time.
|
|
1198
|
+
"""
|
|
1199
|
+
request = dto.StreamWaitRequest(
|
|
1200
|
+
interface_id=self.device.connection.interface_id,
|
|
1201
|
+
device=self.device.device_address,
|
|
1202
|
+
stream_id=self.stream_id,
|
|
1203
|
+
time=time,
|
|
1204
|
+
unit=unit,
|
|
1205
|
+
)
|
|
1206
|
+
await call_async("device/stream_wait", request)
|
|
1207
|
+
|
|
1208
|
+
def wait_until_idle(
|
|
1209
|
+
self,
|
|
1210
|
+
throw_error_on_fault: bool = True
|
|
1211
|
+
) -> None:
|
|
1212
|
+
"""
|
|
1213
|
+
Waits until the live stream executes all queued actions.
|
|
1214
|
+
|
|
1215
|
+
Args:
|
|
1216
|
+
throw_error_on_fault: Determines whether to throw error when fault is observed.
|
|
1217
|
+
"""
|
|
1218
|
+
request = dto.StreamWaitUntilIdleRequest(
|
|
1219
|
+
interface_id=self.device.connection.interface_id,
|
|
1220
|
+
device=self.device.device_address,
|
|
1221
|
+
stream_id=self.stream_id,
|
|
1222
|
+
throw_error_on_fault=throw_error_on_fault,
|
|
1223
|
+
)
|
|
1224
|
+
call("device/stream_wait_until_idle", request)
|
|
1225
|
+
|
|
1226
|
+
async def wait_until_idle_async(
|
|
1227
|
+
self,
|
|
1228
|
+
throw_error_on_fault: bool = True
|
|
1229
|
+
) -> None:
|
|
1230
|
+
"""
|
|
1231
|
+
Waits until the live stream executes all queued actions.
|
|
1232
|
+
|
|
1233
|
+
Args:
|
|
1234
|
+
throw_error_on_fault: Determines whether to throw error when fault is observed.
|
|
1235
|
+
"""
|
|
1236
|
+
request = dto.StreamWaitUntilIdleRequest(
|
|
1237
|
+
interface_id=self.device.connection.interface_id,
|
|
1238
|
+
device=self.device.device_address,
|
|
1239
|
+
stream_id=self.stream_id,
|
|
1240
|
+
throw_error_on_fault=throw_error_on_fault,
|
|
1241
|
+
)
|
|
1242
|
+
await call_async("device/stream_wait_until_idle", request)
|
|
1243
|
+
|
|
1244
|
+
def cork(
|
|
1245
|
+
self
|
|
1246
|
+
) -> None:
|
|
1247
|
+
"""
|
|
1248
|
+
Cork the front of the stream's action queue, blocking execution.
|
|
1249
|
+
Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.
|
|
1250
|
+
Corking eliminates discontinuities in motion due to subsequent stream commands reaching the device late.
|
|
1251
|
+
You can only cork an idle live stream.
|
|
1252
|
+
"""
|
|
1253
|
+
request = dto.StreamEmptyRequest(
|
|
1254
|
+
interface_id=self.device.connection.interface_id,
|
|
1255
|
+
device=self.device.device_address,
|
|
1256
|
+
stream_id=self.stream_id,
|
|
1257
|
+
)
|
|
1258
|
+
call("device/stream_cork", request)
|
|
1259
|
+
|
|
1260
|
+
async def cork_async(
|
|
1261
|
+
self
|
|
1262
|
+
) -> None:
|
|
1263
|
+
"""
|
|
1264
|
+
Cork the front of the stream's action queue, blocking execution.
|
|
1265
|
+
Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.
|
|
1266
|
+
Corking eliminates discontinuities in motion due to subsequent stream commands reaching the device late.
|
|
1267
|
+
You can only cork an idle live stream.
|
|
1268
|
+
"""
|
|
1269
|
+
request = dto.StreamEmptyRequest(
|
|
1270
|
+
interface_id=self.device.connection.interface_id,
|
|
1271
|
+
device=self.device.device_address,
|
|
1272
|
+
stream_id=self.stream_id,
|
|
1273
|
+
)
|
|
1274
|
+
await call_async("device/stream_cork", request)
|
|
1275
|
+
|
|
1276
|
+
def uncork(
|
|
1277
|
+
self
|
|
1278
|
+
) -> None:
|
|
1279
|
+
"""
|
|
1280
|
+
Uncork the front of the queue, unblocking command execution.
|
|
1281
|
+
You can only uncork an idle live stream that is corked.
|
|
1282
|
+
"""
|
|
1283
|
+
request = dto.StreamEmptyRequest(
|
|
1284
|
+
interface_id=self.device.connection.interface_id,
|
|
1285
|
+
device=self.device.device_address,
|
|
1286
|
+
stream_id=self.stream_id,
|
|
1287
|
+
)
|
|
1288
|
+
call("device/stream_uncork", request)
|
|
1289
|
+
|
|
1290
|
+
async def uncork_async(
|
|
1291
|
+
self
|
|
1292
|
+
) -> None:
|
|
1293
|
+
"""
|
|
1294
|
+
Uncork the front of the queue, unblocking command execution.
|
|
1295
|
+
You can only uncork an idle live stream that is corked.
|
|
1296
|
+
"""
|
|
1297
|
+
request = dto.StreamEmptyRequest(
|
|
1298
|
+
interface_id=self.device.connection.interface_id,
|
|
1299
|
+
device=self.device.device_address,
|
|
1300
|
+
stream_id=self.stream_id,
|
|
1301
|
+
)
|
|
1302
|
+
await call_async("device/stream_uncork", request)
|
|
1303
|
+
|
|
1304
|
+
def set_hold(
|
|
1305
|
+
self,
|
|
1306
|
+
hold: bool
|
|
1307
|
+
) -> None:
|
|
1308
|
+
"""
|
|
1309
|
+
Pauses or resumes execution of the stream in live mode.
|
|
1310
|
+
The hold only takes effect during execution of motion segments.
|
|
1311
|
+
|
|
1312
|
+
Args:
|
|
1313
|
+
hold: True to pause execution, false to resume.
|
|
1314
|
+
"""
|
|
1315
|
+
request = dto.StreamSetHoldRequest(
|
|
1316
|
+
interface_id=self.device.connection.interface_id,
|
|
1317
|
+
device=self.device.device_address,
|
|
1318
|
+
stream_id=self.stream_id,
|
|
1319
|
+
hold=hold,
|
|
1320
|
+
)
|
|
1321
|
+
call("device/stream_set_hold", request)
|
|
1322
|
+
|
|
1323
|
+
async def set_hold_async(
|
|
1324
|
+
self,
|
|
1325
|
+
hold: bool
|
|
1326
|
+
) -> None:
|
|
1327
|
+
"""
|
|
1328
|
+
Pauses or resumes execution of the stream in live mode.
|
|
1329
|
+
The hold only takes effect during execution of motion segments.
|
|
1330
|
+
|
|
1331
|
+
Args:
|
|
1332
|
+
hold: True to pause execution, false to resume.
|
|
1333
|
+
"""
|
|
1334
|
+
request = dto.StreamSetHoldRequest(
|
|
1335
|
+
interface_id=self.device.connection.interface_id,
|
|
1336
|
+
device=self.device.device_address,
|
|
1337
|
+
stream_id=self.stream_id,
|
|
1338
|
+
hold=hold,
|
|
1339
|
+
)
|
|
1340
|
+
await call_async("device/stream_set_hold", request)
|
|
1341
|
+
|
|
1342
|
+
def is_busy(
|
|
1343
|
+
self
|
|
1344
|
+
) -> bool:
|
|
1345
|
+
"""
|
|
1346
|
+
Returns a boolean value indicating whether the live stream is executing a queued action.
|
|
1347
|
+
|
|
1348
|
+
Returns:
|
|
1349
|
+
True if the stream is executing a queued action.
|
|
1350
|
+
"""
|
|
1351
|
+
request = dto.StreamEmptyRequest(
|
|
1352
|
+
interface_id=self.device.connection.interface_id,
|
|
1353
|
+
device=self.device.device_address,
|
|
1354
|
+
stream_id=self.stream_id,
|
|
1355
|
+
)
|
|
1356
|
+
response = call(
|
|
1357
|
+
"device/stream_is_busy",
|
|
1358
|
+
request,
|
|
1359
|
+
dto.BoolResponse.from_binary)
|
|
1360
|
+
return response.value
|
|
1361
|
+
|
|
1362
|
+
async def is_busy_async(
|
|
1363
|
+
self
|
|
1364
|
+
) -> bool:
|
|
1365
|
+
"""
|
|
1366
|
+
Returns a boolean value indicating whether the live stream is executing a queued action.
|
|
1367
|
+
|
|
1368
|
+
Returns:
|
|
1369
|
+
True if the stream is executing a queued action.
|
|
1370
|
+
"""
|
|
1371
|
+
request = dto.StreamEmptyRequest(
|
|
1372
|
+
interface_id=self.device.connection.interface_id,
|
|
1373
|
+
device=self.device.device_address,
|
|
1374
|
+
stream_id=self.stream_id,
|
|
1375
|
+
)
|
|
1376
|
+
response = await call_async(
|
|
1377
|
+
"device/stream_is_busy",
|
|
1378
|
+
request,
|
|
1379
|
+
dto.BoolResponse.from_binary)
|
|
1380
|
+
return response.value
|
|
1381
|
+
|
|
1382
|
+
def get_max_speed(
|
|
1383
|
+
self,
|
|
1384
|
+
unit: VelocityUnits = Units.NATIVE
|
|
1385
|
+
) -> float:
|
|
1386
|
+
"""
|
|
1387
|
+
Gets the maximum speed of the live stream.
|
|
1388
|
+
Converts the units using the first axis of the stream.
|
|
1389
|
+
|
|
1390
|
+
Args:
|
|
1391
|
+
unit: Units of velocity.
|
|
1392
|
+
|
|
1393
|
+
Returns:
|
|
1394
|
+
The maximum speed of the stream.
|
|
1395
|
+
"""
|
|
1396
|
+
request = dto.StreamGetMaxSpeedRequest(
|
|
1397
|
+
interface_id=self.device.connection.interface_id,
|
|
1398
|
+
device=self.device.device_address,
|
|
1399
|
+
stream_id=self.stream_id,
|
|
1400
|
+
unit=unit,
|
|
1401
|
+
)
|
|
1402
|
+
response = call(
|
|
1403
|
+
"device/stream_get_max_speed",
|
|
1404
|
+
request,
|
|
1405
|
+
dto.DoubleResponse.from_binary)
|
|
1406
|
+
return response.value
|
|
1407
|
+
|
|
1408
|
+
async def get_max_speed_async(
|
|
1409
|
+
self,
|
|
1410
|
+
unit: VelocityUnits = Units.NATIVE
|
|
1411
|
+
) -> float:
|
|
1412
|
+
"""
|
|
1413
|
+
Gets the maximum speed of the live stream.
|
|
1414
|
+
Converts the units using the first axis of the stream.
|
|
1415
|
+
|
|
1416
|
+
Args:
|
|
1417
|
+
unit: Units of velocity.
|
|
1418
|
+
|
|
1419
|
+
Returns:
|
|
1420
|
+
The maximum speed of the stream.
|
|
1421
|
+
"""
|
|
1422
|
+
request = dto.StreamGetMaxSpeedRequest(
|
|
1423
|
+
interface_id=self.device.connection.interface_id,
|
|
1424
|
+
device=self.device.device_address,
|
|
1425
|
+
stream_id=self.stream_id,
|
|
1426
|
+
unit=unit,
|
|
1427
|
+
)
|
|
1428
|
+
response = await call_async(
|
|
1429
|
+
"device/stream_get_max_speed",
|
|
1430
|
+
request,
|
|
1431
|
+
dto.DoubleResponse.from_binary)
|
|
1432
|
+
return response.value
|
|
1433
|
+
|
|
1434
|
+
def set_max_speed(
|
|
1435
|
+
self,
|
|
1436
|
+
max_speed: float,
|
|
1437
|
+
unit: VelocityUnits = Units.NATIVE
|
|
1438
|
+
) -> None:
|
|
1439
|
+
"""
|
|
1440
|
+
Sets the maximum speed of the live stream.
|
|
1441
|
+
Converts the units using the first axis of the stream.
|
|
1442
|
+
|
|
1443
|
+
Args:
|
|
1444
|
+
max_speed: Maximum speed at which any stream action is executed.
|
|
1445
|
+
unit: Units of velocity.
|
|
1446
|
+
"""
|
|
1447
|
+
request = dto.StreamSetMaxSpeedRequest(
|
|
1448
|
+
interface_id=self.device.connection.interface_id,
|
|
1449
|
+
device=self.device.device_address,
|
|
1450
|
+
stream_id=self.stream_id,
|
|
1451
|
+
max_speed=max_speed,
|
|
1452
|
+
unit=unit,
|
|
1453
|
+
)
|
|
1454
|
+
call("device/stream_set_max_speed", request)
|
|
1455
|
+
|
|
1456
|
+
async def set_max_speed_async(
|
|
1457
|
+
self,
|
|
1458
|
+
max_speed: float,
|
|
1459
|
+
unit: VelocityUnits = Units.NATIVE
|
|
1460
|
+
) -> None:
|
|
1461
|
+
"""
|
|
1462
|
+
Sets the maximum speed of the live stream.
|
|
1463
|
+
Converts the units using the first axis of the stream.
|
|
1464
|
+
|
|
1465
|
+
Args:
|
|
1466
|
+
max_speed: Maximum speed at which any stream action is executed.
|
|
1467
|
+
unit: Units of velocity.
|
|
1468
|
+
"""
|
|
1469
|
+
request = dto.StreamSetMaxSpeedRequest(
|
|
1470
|
+
interface_id=self.device.connection.interface_id,
|
|
1471
|
+
device=self.device.device_address,
|
|
1472
|
+
stream_id=self.stream_id,
|
|
1473
|
+
max_speed=max_speed,
|
|
1474
|
+
unit=unit,
|
|
1475
|
+
)
|
|
1476
|
+
await call_async("device/stream_set_max_speed", request)
|
|
1477
|
+
|
|
1478
|
+
def get_max_tangential_acceleration(
|
|
1479
|
+
self,
|
|
1480
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1481
|
+
) -> float:
|
|
1482
|
+
"""
|
|
1483
|
+
Gets the maximum tangential acceleration of the live stream.
|
|
1484
|
+
Converts the units using the first axis of the stream.
|
|
1485
|
+
|
|
1486
|
+
Args:
|
|
1487
|
+
unit: Units of acceleration.
|
|
1488
|
+
|
|
1489
|
+
Returns:
|
|
1490
|
+
The maximum tangential acceleration of the live stream.
|
|
1491
|
+
"""
|
|
1492
|
+
request = dto.StreamGetMaxTangentialAccelerationRequest(
|
|
1493
|
+
interface_id=self.device.connection.interface_id,
|
|
1494
|
+
device=self.device.device_address,
|
|
1495
|
+
stream_id=self.stream_id,
|
|
1496
|
+
unit=unit,
|
|
1497
|
+
)
|
|
1498
|
+
response = call(
|
|
1499
|
+
"device/stream_get_max_tangential_acceleration",
|
|
1500
|
+
request,
|
|
1501
|
+
dto.DoubleResponse.from_binary)
|
|
1502
|
+
return response.value
|
|
1503
|
+
|
|
1504
|
+
async def get_max_tangential_acceleration_async(
|
|
1505
|
+
self,
|
|
1506
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1507
|
+
) -> float:
|
|
1508
|
+
"""
|
|
1509
|
+
Gets the maximum tangential acceleration of the live stream.
|
|
1510
|
+
Converts the units using the first axis of the stream.
|
|
1511
|
+
|
|
1512
|
+
Args:
|
|
1513
|
+
unit: Units of acceleration.
|
|
1514
|
+
|
|
1515
|
+
Returns:
|
|
1516
|
+
The maximum tangential acceleration of the live stream.
|
|
1517
|
+
"""
|
|
1518
|
+
request = dto.StreamGetMaxTangentialAccelerationRequest(
|
|
1519
|
+
interface_id=self.device.connection.interface_id,
|
|
1520
|
+
device=self.device.device_address,
|
|
1521
|
+
stream_id=self.stream_id,
|
|
1522
|
+
unit=unit,
|
|
1523
|
+
)
|
|
1524
|
+
response = await call_async(
|
|
1525
|
+
"device/stream_get_max_tangential_acceleration",
|
|
1526
|
+
request,
|
|
1527
|
+
dto.DoubleResponse.from_binary)
|
|
1528
|
+
return response.value
|
|
1529
|
+
|
|
1530
|
+
def set_max_tangential_acceleration(
|
|
1531
|
+
self,
|
|
1532
|
+
max_tangential_acceleration: float,
|
|
1533
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1534
|
+
) -> None:
|
|
1535
|
+
"""
|
|
1536
|
+
Sets the maximum tangential acceleration of the live stream.
|
|
1537
|
+
Converts the units using the first axis of the stream.
|
|
1538
|
+
|
|
1539
|
+
Args:
|
|
1540
|
+
max_tangential_acceleration: Maximum tangential acceleration at which any stream action is executed.
|
|
1541
|
+
unit: Units of acceleration.
|
|
1542
|
+
"""
|
|
1543
|
+
request = dto.StreamSetMaxTangentialAccelerationRequest(
|
|
1544
|
+
interface_id=self.device.connection.interface_id,
|
|
1545
|
+
device=self.device.device_address,
|
|
1546
|
+
stream_id=self.stream_id,
|
|
1547
|
+
max_tangential_acceleration=max_tangential_acceleration,
|
|
1548
|
+
unit=unit,
|
|
1549
|
+
)
|
|
1550
|
+
call("device/stream_set_max_tangential_acceleration", request)
|
|
1551
|
+
|
|
1552
|
+
async def set_max_tangential_acceleration_async(
|
|
1553
|
+
self,
|
|
1554
|
+
max_tangential_acceleration: float,
|
|
1555
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1556
|
+
) -> None:
|
|
1557
|
+
"""
|
|
1558
|
+
Sets the maximum tangential acceleration of the live stream.
|
|
1559
|
+
Converts the units using the first axis of the stream.
|
|
1560
|
+
|
|
1561
|
+
Args:
|
|
1562
|
+
max_tangential_acceleration: Maximum tangential acceleration at which any stream action is executed.
|
|
1563
|
+
unit: Units of acceleration.
|
|
1564
|
+
"""
|
|
1565
|
+
request = dto.StreamSetMaxTangentialAccelerationRequest(
|
|
1566
|
+
interface_id=self.device.connection.interface_id,
|
|
1567
|
+
device=self.device.device_address,
|
|
1568
|
+
stream_id=self.stream_id,
|
|
1569
|
+
max_tangential_acceleration=max_tangential_acceleration,
|
|
1570
|
+
unit=unit,
|
|
1571
|
+
)
|
|
1572
|
+
await call_async("device/stream_set_max_tangential_acceleration", request)
|
|
1573
|
+
|
|
1574
|
+
def get_max_centripetal_acceleration(
|
|
1575
|
+
self,
|
|
1576
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1577
|
+
) -> float:
|
|
1578
|
+
"""
|
|
1579
|
+
Gets the maximum centripetal acceleration of the live stream.
|
|
1580
|
+
Converts the units using the first axis of the stream.
|
|
1581
|
+
|
|
1582
|
+
Args:
|
|
1583
|
+
unit: Units of acceleration.
|
|
1584
|
+
|
|
1585
|
+
Returns:
|
|
1586
|
+
The maximum centripetal acceleration of the live stream.
|
|
1587
|
+
"""
|
|
1588
|
+
request = dto.StreamGetMaxCentripetalAccelerationRequest(
|
|
1589
|
+
interface_id=self.device.connection.interface_id,
|
|
1590
|
+
device=self.device.device_address,
|
|
1591
|
+
stream_id=self.stream_id,
|
|
1592
|
+
unit=unit,
|
|
1593
|
+
)
|
|
1594
|
+
response = call(
|
|
1595
|
+
"device/stream_get_max_centripetal_acceleration",
|
|
1596
|
+
request,
|
|
1597
|
+
dto.DoubleResponse.from_binary)
|
|
1598
|
+
return response.value
|
|
1599
|
+
|
|
1600
|
+
async def get_max_centripetal_acceleration_async(
|
|
1601
|
+
self,
|
|
1602
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1603
|
+
) -> float:
|
|
1604
|
+
"""
|
|
1605
|
+
Gets the maximum centripetal acceleration of the live stream.
|
|
1606
|
+
Converts the units using the first axis of the stream.
|
|
1607
|
+
|
|
1608
|
+
Args:
|
|
1609
|
+
unit: Units of acceleration.
|
|
1610
|
+
|
|
1611
|
+
Returns:
|
|
1612
|
+
The maximum centripetal acceleration of the live stream.
|
|
1613
|
+
"""
|
|
1614
|
+
request = dto.StreamGetMaxCentripetalAccelerationRequest(
|
|
1615
|
+
interface_id=self.device.connection.interface_id,
|
|
1616
|
+
device=self.device.device_address,
|
|
1617
|
+
stream_id=self.stream_id,
|
|
1618
|
+
unit=unit,
|
|
1619
|
+
)
|
|
1620
|
+
response = await call_async(
|
|
1621
|
+
"device/stream_get_max_centripetal_acceleration",
|
|
1622
|
+
request,
|
|
1623
|
+
dto.DoubleResponse.from_binary)
|
|
1624
|
+
return response.value
|
|
1625
|
+
|
|
1626
|
+
def set_max_centripetal_acceleration(
|
|
1627
|
+
self,
|
|
1628
|
+
max_centripetal_acceleration: float,
|
|
1629
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1630
|
+
) -> None:
|
|
1631
|
+
"""
|
|
1632
|
+
Sets the maximum centripetal acceleration of the live stream.
|
|
1633
|
+
Converts the units using the first axis of the stream.
|
|
1634
|
+
|
|
1635
|
+
Args:
|
|
1636
|
+
max_centripetal_acceleration: Maximum centripetal acceleration at which any stream action is executed.
|
|
1637
|
+
unit: Units of acceleration.
|
|
1638
|
+
"""
|
|
1639
|
+
request = dto.StreamSetMaxCentripetalAccelerationRequest(
|
|
1640
|
+
interface_id=self.device.connection.interface_id,
|
|
1641
|
+
device=self.device.device_address,
|
|
1642
|
+
stream_id=self.stream_id,
|
|
1643
|
+
max_centripetal_acceleration=max_centripetal_acceleration,
|
|
1644
|
+
unit=unit,
|
|
1645
|
+
)
|
|
1646
|
+
call("device/stream_set_max_centripetal_acceleration", request)
|
|
1647
|
+
|
|
1648
|
+
async def set_max_centripetal_acceleration_async(
|
|
1649
|
+
self,
|
|
1650
|
+
max_centripetal_acceleration: float,
|
|
1651
|
+
unit: AccelerationUnits = Units.NATIVE
|
|
1652
|
+
) -> None:
|
|
1653
|
+
"""
|
|
1654
|
+
Sets the maximum centripetal acceleration of the live stream.
|
|
1655
|
+
Converts the units using the first axis of the stream.
|
|
1656
|
+
|
|
1657
|
+
Args:
|
|
1658
|
+
max_centripetal_acceleration: Maximum centripetal acceleration at which any stream action is executed.
|
|
1659
|
+
unit: Units of acceleration.
|
|
1660
|
+
"""
|
|
1661
|
+
request = dto.StreamSetMaxCentripetalAccelerationRequest(
|
|
1662
|
+
interface_id=self.device.connection.interface_id,
|
|
1663
|
+
device=self.device.device_address,
|
|
1664
|
+
stream_id=self.stream_id,
|
|
1665
|
+
max_centripetal_acceleration=max_centripetal_acceleration,
|
|
1666
|
+
unit=unit,
|
|
1667
|
+
)
|
|
1668
|
+
await call_async("device/stream_set_max_centripetal_acceleration", request)
|
|
1669
|
+
|
|
1670
|
+
def __repr__(
|
|
1671
|
+
self
|
|
1672
|
+
) -> str:
|
|
1673
|
+
"""
|
|
1674
|
+
Returns a string which represents the stream.
|
|
1675
|
+
|
|
1676
|
+
Returns:
|
|
1677
|
+
String which represents the stream.
|
|
1678
|
+
"""
|
|
1679
|
+
request = dto.StreamEmptyRequest(
|
|
1680
|
+
interface_id=self.device.connection.interface_id,
|
|
1681
|
+
device=self.device.device_address,
|
|
1682
|
+
stream_id=self.stream_id,
|
|
1683
|
+
)
|
|
1684
|
+
response = call_sync(
|
|
1685
|
+
"device/stream_to_string",
|
|
1686
|
+
request,
|
|
1687
|
+
dto.StringResponse.from_binary)
|
|
1688
|
+
return response.value
|
|
1689
|
+
|
|
1690
|
+
def disable(
|
|
1691
|
+
self
|
|
1692
|
+
) -> None:
|
|
1693
|
+
"""
|
|
1694
|
+
Disables the stream.
|
|
1695
|
+
If the stream is not setup, this command does nothing.
|
|
1696
|
+
Once disabled, the stream will no longer accept stream commands.
|
|
1697
|
+
The stream will process the rest of the commands in the queue until it is empty.
|
|
1698
|
+
"""
|
|
1699
|
+
request = dto.StreamEmptyRequest(
|
|
1700
|
+
interface_id=self.device.connection.interface_id,
|
|
1701
|
+
device=self.device.device_address,
|
|
1702
|
+
stream_id=self.stream_id,
|
|
1703
|
+
)
|
|
1704
|
+
call("device/stream_disable", request)
|
|
1705
|
+
|
|
1706
|
+
async def disable_async(
|
|
1707
|
+
self
|
|
1708
|
+
) -> None:
|
|
1709
|
+
"""
|
|
1710
|
+
Disables the stream.
|
|
1711
|
+
If the stream is not setup, this command does nothing.
|
|
1712
|
+
Once disabled, the stream will no longer accept stream commands.
|
|
1713
|
+
The stream will process the rest of the commands in the queue until it is empty.
|
|
1714
|
+
"""
|
|
1715
|
+
request = dto.StreamEmptyRequest(
|
|
1716
|
+
interface_id=self.device.connection.interface_id,
|
|
1717
|
+
device=self.device.device_address,
|
|
1718
|
+
stream_id=self.stream_id,
|
|
1719
|
+
)
|
|
1720
|
+
await call_async("device/stream_disable", request)
|
|
1721
|
+
|
|
1722
|
+
def generic_command(
|
|
1723
|
+
self,
|
|
1724
|
+
command: str
|
|
1725
|
+
) -> None:
|
|
1726
|
+
"""
|
|
1727
|
+
Sends a generic ASCII command to the stream.
|
|
1728
|
+
Keeps resending the command while the device rejects with AGAIN reason.
|
|
1729
|
+
|
|
1730
|
+
Args:
|
|
1731
|
+
command: Command and its parameters.
|
|
1732
|
+
"""
|
|
1733
|
+
request = dto.StreamGenericCommandRequest(
|
|
1734
|
+
interface_id=self.device.connection.interface_id,
|
|
1735
|
+
device=self.device.device_address,
|
|
1736
|
+
stream_id=self.stream_id,
|
|
1737
|
+
command=command,
|
|
1738
|
+
)
|
|
1739
|
+
call("device/stream_generic_command", request)
|
|
1740
|
+
|
|
1741
|
+
async def generic_command_async(
|
|
1742
|
+
self,
|
|
1743
|
+
command: str
|
|
1744
|
+
) -> None:
|
|
1745
|
+
"""
|
|
1746
|
+
Sends a generic ASCII command to the stream.
|
|
1747
|
+
Keeps resending the command while the device rejects with AGAIN reason.
|
|
1748
|
+
|
|
1749
|
+
Args:
|
|
1750
|
+
command: Command and its parameters.
|
|
1751
|
+
"""
|
|
1752
|
+
request = dto.StreamGenericCommandRequest(
|
|
1753
|
+
interface_id=self.device.connection.interface_id,
|
|
1754
|
+
device=self.device.device_address,
|
|
1755
|
+
stream_id=self.stream_id,
|
|
1756
|
+
command=command,
|
|
1757
|
+
)
|
|
1758
|
+
await call_async("device/stream_generic_command", request)
|
|
1759
|
+
|
|
1760
|
+
def generic_command_batch(
|
|
1761
|
+
self,
|
|
1762
|
+
batch: List[str]
|
|
1763
|
+
) -> None:
|
|
1764
|
+
"""
|
|
1765
|
+
Sends a batch of generic ASCII commands to the stream.
|
|
1766
|
+
Keeps resending command while the device rejects with AGAIN reason.
|
|
1767
|
+
The batch is atomic in terms of thread safety.
|
|
1768
|
+
|
|
1769
|
+
Args:
|
|
1770
|
+
batch: Array of commands.
|
|
1771
|
+
"""
|
|
1772
|
+
request = dto.StreamGenericCommandBatchRequest(
|
|
1773
|
+
interface_id=self.device.connection.interface_id,
|
|
1774
|
+
device=self.device.device_address,
|
|
1775
|
+
stream_id=self.stream_id,
|
|
1776
|
+
batch=batch,
|
|
1777
|
+
)
|
|
1778
|
+
call("device/stream_generic_command_batch", request)
|
|
1779
|
+
|
|
1780
|
+
async def generic_command_batch_async(
|
|
1781
|
+
self,
|
|
1782
|
+
batch: List[str]
|
|
1783
|
+
) -> None:
|
|
1784
|
+
"""
|
|
1785
|
+
Sends a batch of generic ASCII commands to the stream.
|
|
1786
|
+
Keeps resending command while the device rejects with AGAIN reason.
|
|
1787
|
+
The batch is atomic in terms of thread safety.
|
|
1788
|
+
|
|
1789
|
+
Args:
|
|
1790
|
+
batch: Array of commands.
|
|
1791
|
+
"""
|
|
1792
|
+
request = dto.StreamGenericCommandBatchRequest(
|
|
1793
|
+
interface_id=self.device.connection.interface_id,
|
|
1794
|
+
device=self.device.device_address,
|
|
1795
|
+
stream_id=self.stream_id,
|
|
1796
|
+
batch=batch,
|
|
1797
|
+
)
|
|
1798
|
+
await call_async("device/stream_generic_command_batch", request)
|
|
1799
|
+
|
|
1800
|
+
def check_disabled(
|
|
1801
|
+
self
|
|
1802
|
+
) -> bool:
|
|
1803
|
+
"""
|
|
1804
|
+
Queries the stream status from the device
|
|
1805
|
+
and returns boolean indicating whether the stream is disabled.
|
|
1806
|
+
Useful to determine if streaming was interrupted by other movements.
|
|
1807
|
+
|
|
1808
|
+
Returns:
|
|
1809
|
+
True if the stream is disabled.
|
|
1810
|
+
"""
|
|
1811
|
+
request = dto.StreamEmptyRequest(
|
|
1812
|
+
interface_id=self.device.connection.interface_id,
|
|
1813
|
+
device=self.device.device_address,
|
|
1814
|
+
stream_id=self.stream_id,
|
|
1815
|
+
)
|
|
1816
|
+
response = call(
|
|
1817
|
+
"device/stream_check_disabled",
|
|
1818
|
+
request,
|
|
1819
|
+
dto.BoolResponse.from_binary)
|
|
1820
|
+
return response.value
|
|
1821
|
+
|
|
1822
|
+
async def check_disabled_async(
|
|
1823
|
+
self
|
|
1824
|
+
) -> bool:
|
|
1825
|
+
"""
|
|
1826
|
+
Queries the stream status from the device
|
|
1827
|
+
and returns boolean indicating whether the stream is disabled.
|
|
1828
|
+
Useful to determine if streaming was interrupted by other movements.
|
|
1829
|
+
|
|
1830
|
+
Returns:
|
|
1831
|
+
True if the stream is disabled.
|
|
1832
|
+
"""
|
|
1833
|
+
request = dto.StreamEmptyRequest(
|
|
1834
|
+
interface_id=self.device.connection.interface_id,
|
|
1835
|
+
device=self.device.device_address,
|
|
1836
|
+
stream_id=self.stream_id,
|
|
1837
|
+
)
|
|
1838
|
+
response = await call_async(
|
|
1839
|
+
"device/stream_check_disabled",
|
|
1840
|
+
request,
|
|
1841
|
+
dto.BoolResponse.from_binary)
|
|
1842
|
+
return response.value
|
|
1843
|
+
|
|
1844
|
+
def treat_discontinuities_as_error(
|
|
1845
|
+
self
|
|
1846
|
+
) -> None:
|
|
1847
|
+
"""
|
|
1848
|
+
Makes the stream throw StreamDiscontinuityException when it encounters discontinuities (ND warning flag).
|
|
1849
|
+
"""
|
|
1850
|
+
request = dto.StreamEmptyRequest(
|
|
1851
|
+
interface_id=self.device.connection.interface_id,
|
|
1852
|
+
device=self.device.device_address,
|
|
1853
|
+
stream_id=self.stream_id,
|
|
1854
|
+
)
|
|
1855
|
+
call_sync("device/stream_treat_discontinuities", request)
|
|
1856
|
+
|
|
1857
|
+
def ignore_current_discontinuity(
|
|
1858
|
+
self
|
|
1859
|
+
) -> None:
|
|
1860
|
+
"""
|
|
1861
|
+
Prevents StreamDiscontinuityException as a result of expected discontinuity when resuming streaming.
|
|
1862
|
+
"""
|
|
1863
|
+
request = dto.StreamEmptyRequest(
|
|
1864
|
+
interface_id=self.device.connection.interface_id,
|
|
1865
|
+
device=self.device.device_address,
|
|
1866
|
+
stream_id=self.stream_id,
|
|
1867
|
+
)
|
|
1868
|
+
call_sync("device/stream_ignore_discontinuity", request)
|
|
1869
|
+
|
|
1870
|
+
def __retrieve_axes(
|
|
1871
|
+
self
|
|
1872
|
+
) -> List[StreamAxisDefinition]:
|
|
1873
|
+
"""
|
|
1874
|
+
Gets the axes of the stream.
|
|
1875
|
+
|
|
1876
|
+
Returns:
|
|
1877
|
+
An array of axis numbers of the axes the stream is set up to control.
|
|
1878
|
+
"""
|
|
1879
|
+
request = dto.StreamEmptyRequest(
|
|
1880
|
+
interface_id=self.device.connection.interface_id,
|
|
1881
|
+
device=self.device.device_address,
|
|
1882
|
+
stream_id=self.stream_id,
|
|
1883
|
+
)
|
|
1884
|
+
response = call_sync(
|
|
1885
|
+
"device/stream_get_axes",
|
|
1886
|
+
request,
|
|
1887
|
+
dto.StreamGetAxesResponse.from_binary)
|
|
1888
|
+
return response.axes
|
|
1889
|
+
|
|
1890
|
+
def __retrieve_mode(
|
|
1891
|
+
self
|
|
1892
|
+
) -> StreamMode:
|
|
1893
|
+
"""
|
|
1894
|
+
Get the mode of the stream.
|
|
1895
|
+
|
|
1896
|
+
Returns:
|
|
1897
|
+
Mode of the stream.
|
|
1898
|
+
"""
|
|
1899
|
+
request = dto.StreamEmptyRequest(
|
|
1900
|
+
interface_id=self.device.connection.interface_id,
|
|
1901
|
+
device=self.device.device_address,
|
|
1902
|
+
stream_id=self.stream_id,
|
|
1903
|
+
)
|
|
1904
|
+
response = call_sync(
|
|
1905
|
+
"device/stream_get_mode",
|
|
1906
|
+
request,
|
|
1907
|
+
dto.StreamModeResponse.from_binary)
|
|
1908
|
+
return response.stream_mode
|
|
1909
|
+
|
|
1910
|
+
def wait_digital_input(
|
|
1911
|
+
self,
|
|
1912
|
+
channel_number: int,
|
|
1913
|
+
value: bool
|
|
1914
|
+
) -> None:
|
|
1915
|
+
"""
|
|
1916
|
+
Deprecated: Use Stream.Io.WaitDigitalInput instead.
|
|
1917
|
+
|
|
1918
|
+
Wait for a digital input channel to reach a given value.
|
|
1919
|
+
|
|
1920
|
+
Args:
|
|
1921
|
+
channel_number: The number of the digital input channel.
|
|
1922
|
+
Channel numbers are numbered from one.
|
|
1923
|
+
value: The value that the stream should wait for.
|
|
1924
|
+
"""
|
|
1925
|
+
request = dto.StreamWaitDigitalInputRequest(
|
|
1926
|
+
interface_id=self.device.connection.interface_id,
|
|
1927
|
+
device=self.device.device_address,
|
|
1928
|
+
stream_id=self.stream_id,
|
|
1929
|
+
channel_number=channel_number,
|
|
1930
|
+
value=value,
|
|
1931
|
+
)
|
|
1932
|
+
call("device/stream_wait_digital_input", request)
|
|
1933
|
+
|
|
1934
|
+
async def wait_digital_input_async(
|
|
1935
|
+
self,
|
|
1936
|
+
channel_number: int,
|
|
1937
|
+
value: bool
|
|
1938
|
+
) -> None:
|
|
1939
|
+
"""
|
|
1940
|
+
Deprecated: Use Stream.Io.WaitDigitalInput instead.
|
|
1941
|
+
|
|
1942
|
+
Wait for a digital input channel to reach a given value.
|
|
1943
|
+
|
|
1944
|
+
Args:
|
|
1945
|
+
channel_number: The number of the digital input channel.
|
|
1946
|
+
Channel numbers are numbered from one.
|
|
1947
|
+
value: The value that the stream should wait for.
|
|
1948
|
+
"""
|
|
1949
|
+
request = dto.StreamWaitDigitalInputRequest(
|
|
1950
|
+
interface_id=self.device.connection.interface_id,
|
|
1951
|
+
device=self.device.device_address,
|
|
1952
|
+
stream_id=self.stream_id,
|
|
1953
|
+
channel_number=channel_number,
|
|
1954
|
+
value=value,
|
|
1955
|
+
)
|
|
1956
|
+
await call_async("device/stream_wait_digital_input", request)
|
|
1957
|
+
|
|
1958
|
+
def wait_analog_input(
|
|
1959
|
+
self,
|
|
1960
|
+
channel_number: int,
|
|
1961
|
+
condition: str,
|
|
1962
|
+
value: float
|
|
1963
|
+
) -> None:
|
|
1964
|
+
"""
|
|
1965
|
+
Deprecated: Use Stream.Io.WaitAnalogInput instead.
|
|
1966
|
+
|
|
1967
|
+
Wait for the value of a analog input channel to reach a condition concerning a given value.
|
|
1968
|
+
|
|
1969
|
+
Args:
|
|
1970
|
+
channel_number: The number of the analog input channel.
|
|
1971
|
+
Channel numbers are numbered from one.
|
|
1972
|
+
condition: A condition (e.g. <, <=, ==, !=).
|
|
1973
|
+
value: The value that the condition concerns, in Volts.
|
|
1974
|
+
"""
|
|
1975
|
+
request = dto.StreamWaitAnalogInputRequest(
|
|
1976
|
+
interface_id=self.device.connection.interface_id,
|
|
1977
|
+
device=self.device.device_address,
|
|
1978
|
+
stream_id=self.stream_id,
|
|
1979
|
+
channel_number=channel_number,
|
|
1980
|
+
condition=condition,
|
|
1981
|
+
value=value,
|
|
1982
|
+
)
|
|
1983
|
+
call("device/stream_wait_analog_input", request)
|
|
1984
|
+
|
|
1985
|
+
async def wait_analog_input_async(
|
|
1986
|
+
self,
|
|
1987
|
+
channel_number: int,
|
|
1988
|
+
condition: str,
|
|
1989
|
+
value: float
|
|
1990
|
+
) -> None:
|
|
1991
|
+
"""
|
|
1992
|
+
Deprecated: Use Stream.Io.WaitAnalogInput instead.
|
|
1993
|
+
|
|
1994
|
+
Wait for the value of a analog input channel to reach a condition concerning a given value.
|
|
1995
|
+
|
|
1996
|
+
Args:
|
|
1997
|
+
channel_number: The number of the analog input channel.
|
|
1998
|
+
Channel numbers are numbered from one.
|
|
1999
|
+
condition: A condition (e.g. <, <=, ==, !=).
|
|
2000
|
+
value: The value that the condition concerns, in Volts.
|
|
2001
|
+
"""
|
|
2002
|
+
request = dto.StreamWaitAnalogInputRequest(
|
|
2003
|
+
interface_id=self.device.connection.interface_id,
|
|
2004
|
+
device=self.device.device_address,
|
|
2005
|
+
stream_id=self.stream_id,
|
|
2006
|
+
channel_number=channel_number,
|
|
2007
|
+
condition=condition,
|
|
2008
|
+
value=value,
|
|
2009
|
+
)
|
|
2010
|
+
await call_async("device/stream_wait_analog_input", request)
|
|
2011
|
+
|
|
2012
|
+
def set_digital_output(
|
|
2013
|
+
self,
|
|
2014
|
+
channel_number: int,
|
|
2015
|
+
value: DigitalOutputAction
|
|
2016
|
+
) -> None:
|
|
2017
|
+
"""
|
|
2018
|
+
Deprecated: Use Stream.Io.SetDigitalOutput instead.
|
|
2019
|
+
|
|
2020
|
+
Sets value for the specified digital output channel.
|
|
2021
|
+
|
|
2022
|
+
Args:
|
|
2023
|
+
channel_number: Channel number starting at 1.
|
|
2024
|
+
value: The type of action to perform on the channel.
|
|
2025
|
+
"""
|
|
2026
|
+
request = dto.StreamSetDigitalOutputRequest(
|
|
2027
|
+
interface_id=self.device.connection.interface_id,
|
|
2028
|
+
device=self.device.device_address,
|
|
2029
|
+
stream_id=self.stream_id,
|
|
2030
|
+
channel_number=channel_number,
|
|
2031
|
+
value=value,
|
|
2032
|
+
)
|
|
2033
|
+
call("device/stream_set_digital_output", request)
|
|
2034
|
+
|
|
2035
|
+
async def set_digital_output_async(
|
|
2036
|
+
self,
|
|
2037
|
+
channel_number: int,
|
|
2038
|
+
value: DigitalOutputAction
|
|
2039
|
+
) -> None:
|
|
2040
|
+
"""
|
|
2041
|
+
Deprecated: Use Stream.Io.SetDigitalOutput instead.
|
|
2042
|
+
|
|
2043
|
+
Sets value for the specified digital output channel.
|
|
2044
|
+
|
|
2045
|
+
Args:
|
|
2046
|
+
channel_number: Channel number starting at 1.
|
|
2047
|
+
value: The type of action to perform on the channel.
|
|
2048
|
+
"""
|
|
2049
|
+
request = dto.StreamSetDigitalOutputRequest(
|
|
2050
|
+
interface_id=self.device.connection.interface_id,
|
|
2051
|
+
device=self.device.device_address,
|
|
2052
|
+
stream_id=self.stream_id,
|
|
2053
|
+
channel_number=channel_number,
|
|
2054
|
+
value=value,
|
|
2055
|
+
)
|
|
2056
|
+
await call_async("device/stream_set_digital_output", request)
|
|
2057
|
+
|
|
2058
|
+
def set_all_digital_outputs(
|
|
2059
|
+
self,
|
|
2060
|
+
values: List[DigitalOutputAction]
|
|
2061
|
+
) -> None:
|
|
2062
|
+
"""
|
|
2063
|
+
Deprecated: Use Stream.Io.SetAllDigitalOutputs instead.
|
|
2064
|
+
|
|
2065
|
+
Sets values for all digital output channels.
|
|
2066
|
+
|
|
2067
|
+
Args:
|
|
2068
|
+
values: The type of action to perform on the channel.
|
|
2069
|
+
"""
|
|
2070
|
+
request = dto.StreamSetAllDigitalOutputsRequest(
|
|
2071
|
+
interface_id=self.device.connection.interface_id,
|
|
2072
|
+
device=self.device.device_address,
|
|
2073
|
+
stream_id=self.stream_id,
|
|
2074
|
+
values=values,
|
|
2075
|
+
)
|
|
2076
|
+
call("device/stream_set_all_digital_outputs", request)
|
|
2077
|
+
|
|
2078
|
+
async def set_all_digital_outputs_async(
|
|
2079
|
+
self,
|
|
2080
|
+
values: List[DigitalOutputAction]
|
|
2081
|
+
) -> None:
|
|
2082
|
+
"""
|
|
2083
|
+
Deprecated: Use Stream.Io.SetAllDigitalOutputs instead.
|
|
2084
|
+
|
|
2085
|
+
Sets values for all digital output channels.
|
|
2086
|
+
|
|
2087
|
+
Args:
|
|
2088
|
+
values: The type of action to perform on the channel.
|
|
2089
|
+
"""
|
|
2090
|
+
request = dto.StreamSetAllDigitalOutputsRequest(
|
|
2091
|
+
interface_id=self.device.connection.interface_id,
|
|
2092
|
+
device=self.device.device_address,
|
|
2093
|
+
stream_id=self.stream_id,
|
|
2094
|
+
values=values,
|
|
2095
|
+
)
|
|
2096
|
+
await call_async("device/stream_set_all_digital_outputs", request)
|
|
2097
|
+
|
|
2098
|
+
def set_analog_output(
|
|
2099
|
+
self,
|
|
2100
|
+
channel_number: int,
|
|
2101
|
+
value: float
|
|
2102
|
+
) -> None:
|
|
2103
|
+
"""
|
|
2104
|
+
Deprecated: Use Stream.Io.setAnalogOutput instead.
|
|
2105
|
+
|
|
2106
|
+
Sets value for the specified analog output channel.
|
|
2107
|
+
|
|
2108
|
+
Args:
|
|
2109
|
+
channel_number: Channel number starting at 1.
|
|
2110
|
+
value: Value to set the output channel voltage to.
|
|
2111
|
+
"""
|
|
2112
|
+
request = dto.StreamSetAnalogOutputRequest(
|
|
2113
|
+
interface_id=self.device.connection.interface_id,
|
|
2114
|
+
device=self.device.device_address,
|
|
2115
|
+
stream_id=self.stream_id,
|
|
2116
|
+
channel_number=channel_number,
|
|
2117
|
+
value=value,
|
|
2118
|
+
)
|
|
2119
|
+
call("device/stream_set_analog_output", request)
|
|
2120
|
+
|
|
2121
|
+
async def set_analog_output_async(
|
|
2122
|
+
self,
|
|
2123
|
+
channel_number: int,
|
|
2124
|
+
value: float
|
|
2125
|
+
) -> None:
|
|
2126
|
+
"""
|
|
2127
|
+
Deprecated: Use Stream.Io.setAnalogOutput instead.
|
|
2128
|
+
|
|
2129
|
+
Sets value for the specified analog output channel.
|
|
2130
|
+
|
|
2131
|
+
Args:
|
|
2132
|
+
channel_number: Channel number starting at 1.
|
|
2133
|
+
value: Value to set the output channel voltage to.
|
|
2134
|
+
"""
|
|
2135
|
+
request = dto.StreamSetAnalogOutputRequest(
|
|
2136
|
+
interface_id=self.device.connection.interface_id,
|
|
2137
|
+
device=self.device.device_address,
|
|
2138
|
+
stream_id=self.stream_id,
|
|
2139
|
+
channel_number=channel_number,
|
|
2140
|
+
value=value,
|
|
2141
|
+
)
|
|
2142
|
+
await call_async("device/stream_set_analog_output", request)
|
|
2143
|
+
|
|
2144
|
+
def set_all_analog_outputs(
|
|
2145
|
+
self,
|
|
2146
|
+
values: List[float]
|
|
2147
|
+
) -> None:
|
|
2148
|
+
"""
|
|
2149
|
+
Deprecated: Use Stream.Io.setAllAnalogOutputs instead.
|
|
2150
|
+
|
|
2151
|
+
Sets values for all analog output channels.
|
|
2152
|
+
|
|
2153
|
+
Args:
|
|
2154
|
+
values: Voltage values to set the output channels to.
|
|
2155
|
+
"""
|
|
2156
|
+
request = dto.StreamSetAllAnalogOutputsRequest(
|
|
2157
|
+
interface_id=self.device.connection.interface_id,
|
|
2158
|
+
device=self.device.device_address,
|
|
2159
|
+
stream_id=self.stream_id,
|
|
2160
|
+
values=values,
|
|
2161
|
+
)
|
|
2162
|
+
call("device/stream_set_all_analog_outputs", request)
|
|
2163
|
+
|
|
2164
|
+
async def set_all_analog_outputs_async(
|
|
2165
|
+
self,
|
|
2166
|
+
values: List[float]
|
|
2167
|
+
) -> None:
|
|
2168
|
+
"""
|
|
2169
|
+
Deprecated: Use Stream.Io.setAllAnalogOutputs instead.
|
|
2170
|
+
|
|
2171
|
+
Sets values for all analog output channels.
|
|
2172
|
+
|
|
2173
|
+
Args:
|
|
2174
|
+
values: Voltage values to set the output channels to.
|
|
2175
|
+
"""
|
|
2176
|
+
request = dto.StreamSetAllAnalogOutputsRequest(
|
|
2177
|
+
interface_id=self.device.connection.interface_id,
|
|
2178
|
+
device=self.device.device_address,
|
|
2179
|
+
stream_id=self.stream_id,
|
|
2180
|
+
values=values,
|
|
2181
|
+
)
|
|
2182
|
+
await call_async("device/stream_set_all_analog_outputs", request)
|