# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405

import builtins
import enum
import typing
import typing_extensions
__all__ = [
    "Baudrate",
    "BaudrateCAN",
    "ControlMode",
    "DataCollector",
    "DetectedDevice",
    "DeviceContext",
    "DeviceInfo",
    "DfuCommandType",
    "DfuExitReason",
    "DfuState",
    "EcRevo3TouchSdoSubIdx",
    "EtherCATAddress",
    "EtherCATConfigIndex",
    "EtherCATFoeType",
    "FingerUnitMode",
    "FingertipPose",
    "HandType",
    "LogLevel",
    "ProtocolType",
    "OtaTarget",
    "RegAddrRevo3",
    "Revo3AutoDetector",
    "Revo3MotorStatusBuffer",
    "Revo3MotorStatusData",
    "Revo3SystemStatus",
    "Revo3TouchData",
    "Revo3TouchDataBuffer",
    "SerialPortCfg",
    "SkuType",
    "StarkError",
    "StarkHardwareType",
    "StarkProtocolType",
    "TouchDataMode",
    "TouchVendor",
    "ZqwlDeviceInfo",
    "available_usb_ports",
    "close_device_handler",
    "close_socketcan",
    "close_zqwl",
    "get_sdk_version",
    "init_device_handler",
    "init_from_detected",
    "init_logging",
    "init_socketcan_canfd",
    "init_zqwl_canfd",
    "is_socketcan_available",
    "list_available_ports",
    "list_zqwl_devices",
    "modbus_close",
    "modbus_open",
    "revo3_auto_detect",
    "revo3_auto_detect_device",
    "revo3_auto_detect_modbus",
    "revo3_set_skip_device_info_query",
    "scan_canfd_devices",
    "set_can_rx_callback",
    "set_can_tx_callback",
    "set_modbus_read_holding_callback",
    "set_modbus_read_input_callback",
    "set_modbus_write_callback",
]

@typing.final
class DataCollector:
    def get_motor_frequency(self) -> builtins.int: ...
    def get_touch_frequency(self) -> builtins.int: ...

    def is_running(self) -> builtins.bool: ...
    @staticmethod
    def new_revo3_basic(ctx: DeviceContext, motor_buffer: Revo3MotorStatusBuffer, slave_id: builtins.int = 1, motor_frequency: builtins.int = 60, enable_stats: builtins.bool = True) -> DataCollector: ...
    @staticmethod
    def new_revo3_full(ctx: DeviceContext, motor_buffer: Revo3MotorStatusBuffer, touch_buffer: Revo3TouchDataBuffer, slave_id: builtins.int = 1, motor_frequency: builtins.int = 60, touch_frequency: builtins.int = 5, enable_stats: builtins.bool = True) -> DataCollector: ...
    def start(self) -> builtins.bool: ...
    def stop(self) -> None: ...
    def update_motor_frequency(self, freq: builtins.int) -> None: ...
    def update_touch_frequency(self, freq: builtins.int) -> None: ...
    def wait(self) -> None: ...
@typing.final
class DetectedDevice:
    r"""
    Detected device information
    
    Contains information about a detected Stark device including protocol,
    port, slave ID, and optional device details.
    """
    @property
    def baudrate(self) -> Baudrate:
        r"""
        Baudrate (for Modbus/serial protocols, or CAN arbitration baudrate)
        """
    @property
    def data_baudrate(self) -> builtins.int:
        r"""
        Data baudrate (for CANFD only, 0 for other protocols)
        """
    @property
    def firmware_version(self) -> typing.Optional[builtins.str]:
        r"""
        Firmware version (if detected)
        """
    @property
    def hardware_type(self) -> typing.Optional[StarkHardwareType]:
        r"""
        Hardware type (if detected)
        """
    @property
    def hardware_version(self) -> typing.Optional[builtins.str]:
        r"""
        Hardware version (if detected)
        """

    @property
    def port_name(self) -> builtins.str:
        r"""
        Port name (serial port or CAN adapter port)
        """
    @property
    def protocol_type(self) -> StarkProtocolType:
        r"""
        Protocol type
        """
    @property
    def serial_number(self) -> typing.Optional[builtins.str]:
        r"""
        Serial number (if detected)
        """
    @property
    def sku_type(self) -> typing.Optional[SkuType]:
        r"""
        SKU type (if detected)
        """
    @property
    def slave_id(self) -> builtins.int:
        r"""
        Slave ID on the bus
        """
@typing.final
class DeviceContext:
    r"""
    Device context for Python API.
    
    This class wraps the internal device context and provides async methods
    for communicating with Stark devices. Create instances using:
    - `modbus_open()` for Modbus/RS485 connections
    - `init_device_handler()` for CAN/CANFD connections
    - `init_from_detected()` after auto-detection
    
    All methods are async and should be awaited.
    """
    def __new__(cls) -> DeviceContext: ...
    def close(self) -> typing.Any:
        r"""
        Close the device connection and release resources.
        
        For Modbus: closes the serial port.
        For CAN/CANFD: use `close_device_handler()` instead which also closes ZQWL.
        """

    def ec_reserve_master(self) -> typing.Any: ...
    def ec_setup_sdo(self, slave_id: builtins.int) -> typing.Any: ...
    def ec_start_dfu(self, slave_pos: builtins.int, dfu_type: EtherCATFoeType, file_path: builtins.str) -> typing.Any: ...
    def ec_start_loop(self, slave_positions: typing.Sequence[builtins.int], dc_assign_activate: builtins.int, sync0_cycle_time: builtins.int, sync0_shift_time: builtins.int, sync1_cycle_time: builtins.int, sync1_shift_time: builtins.int) -> typing.Any: ...
    def ec_stop_loop(self) -> typing.Any: ...
    def factory_set_device_sn(self, slave_id: builtins.int, sn: builtins.str) -> typing.Any:
        r"""
        Program the device serial number (requires factory_set_key first).
        """
    def factory_set_key(self, slave_id: builtins.int, operation_key: builtins.str) -> typing.Any:
        r"""
        Unlock factory-only write registers.
        """
    def revo3_abort_dfu(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Abort the current Revo3 DFU transfer.
        """
    def revo3_admittance_hand(self, slave_id: builtins.int, equilibrium_positions: typing.Sequence[builtins.float], mass: typing.Sequence[builtins.float], damping: typing.Sequence[builtins.float], stiffness: typing.Sequence[builtins.float], dt: builtins.float, duration: builtins.float) -> typing.Any:
        r"""
        [RESERVED] Full hand admittance control.
        
        Requires tactile sensor integration (not yet implemented).
        """
    def revo3_admittance_joint(self, slave_id: builtins.int, joint_id: builtins.int, equilibrium_pos: builtins.float, mass: builtins.float, damping: builtins.float, stiffness: builtins.float, dt: builtins.float, duration: builtins.float) -> typing.Any:
        r"""
        [RESERVED] Single joint admittance control.
        
        Requires tactile sensor integration (not yet implemented).
        """
    def revo3_calibrate_touch_zero(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Calibrate touch sensors zero drift (tare/zero calibration) for all modules.
        
        Args:
            slave_id: Slave device ID
        """
    def revo3_calibrate_touch_zero_single(self, slave_id: builtins.int, module_id: builtins.int) -> typing.Any:
        r"""
        Calibrate touch sensors zero drift (tare/zero calibration) for a single module.
        
        Args:
            slave_id: Slave device ID
            module_id: Touch module ID (0~10)
        """
    def revo3_clear_motor_errors(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Clear all Revo3 motor error states.
        """
    def revo3_factory_reset(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Factory reset (restore all factory settings).
        """
    def revo3_finger_control(self, slave_id: builtins.int, finger_index: builtins.int, mode: builtins.int, params: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Four-finger control (index/middle/ring/pinky).
        
        Args:
            finger_index: 1=index, 2=middle, 3=ring, 4=pinky
            mode: ControlMode (0=Position, 1=Speed, 2=Current)
            params: [Abd_MCP, MCP, PIP, DIP] — 4 float values (degrees/rpm/mA)
        """
    def revo3_finger_mit_control(self, slave_id: builtins.int, finger_index: builtins.int, params: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Four-finger MIT control.
        
        Args:
            finger_index: 1=index, 2=middle, 3=ring, 4=pinky
            params: 4 joints × 5 MIT params = 20 float values
        
        Recommended usage per joint:
            Speed control: set kp=0, use kd with target vel, and keep tau_ff=0.
            Position control: use kp and kd, set vel=0, and keep tau_ff=0.
            Current control: set kp=0 and kd=0, then use tau_ff as target current.
        """
    def revo3_get_all_joint_position_limits(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get position limits for all 21 joints.
        """
    def revo3_get_all_joint_protect_currents(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get per-joint protection current for all 21 joints.
        """
    def revo3_get_all_joint_speed_limits(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get speed limits for all 21 joints.
        """
    def revo3_get_all_motor_currents(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all Revo3 motor currents (mA).
        
        Returns:
            List of 21 float currents
        """
    def revo3_get_all_motor_errors(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get all Revo3 motor error codes.
        
        Returns:
            List of 21 u16 error codes
        """
    def revo3_get_all_motor_positions(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all Revo3 motor positions (degrees).
        
        Returns:
            List of 21 float positions
        """
    def revo3_get_all_motor_sns(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all 21 motor serial numbers.
        """
    def revo3_get_all_motor_status(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all Revo3 motor status codes.
        
        Returns:
            List of 21 u16 status codes
        """
    def revo3_get_all_motor_temperatures(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all 21 motor temperatures (°C).
        """
    def revo3_get_all_motor_velocities(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all Revo3 motor velocities.
        
        Returns:
            List of 21 float velocities
        """
    def revo3_get_all_touch_data(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all Revo3 touch data (summary + all 11 module arrays).
        
        Returns:
            Revo3TouchData struct containing summary (List[int]) and modules (List[List[int]])
        """
    def revo3_get_all_touch_modules_enabled(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read the enable state of all 11 touch modules.
        
        Returns a 16-bit mask where bits 0~10 map to modules 0~10. 1 = enabled, 0 = disabled.
        """
    def revo3_get_auto_calibration(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get auto calibration state on power-up.
        """
    def revo3_get_auto_clear_motor_error(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get auto clear motor errors state.
        """
    def revo3_get_buzzer_switch(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get buzzer switch state.
        """
    def revo3_get_canfd_baudrate(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get CANFD Baudrate (BaudrateCAN enum values use Mbps-style bps values: 1/2/4/5)
        """
    def revo3_get_device_fw_version(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get device firmware version.
        
        Args:
            slave_id: The slave ID of the device
        
        Returns:
            str: Firmware version string
        """
    def revo3_get_device_info(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get device information (serial number, firmware version, hardware type)
        
        IMPORTANT: This method should be called after connecting to the device.
        It automatically sets the hardware type (hw_type) internally based on the
        device's serial number. This is required for touch-related APIs to work
        correctly, especially for CAN/CANFD protocols.
        
        NOTE: If the SN is not recognized, manually set a Revo3 hardware type with
        `set_hardware_type()`.
        Use `set_hardware_type()` to manually override if needed.
        
        Args:
            slave_id: The slave ID of the device
        
        Returns:
            DeviceInfo object containing serial_number, firmware_version, hardware_type
        """
    def revo3_get_device_sn(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get device serial number.
        
        Args:
            slave_id: The slave ID of the device
        
        Returns:
            str: Device serial number
        """
    def revo3_get_global_protect_current(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get global motor protection current.
        """
    def revo3_get_hand_type(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get device hand type (Left/Right).
        
        Args:
            slave_id: The slave ID of the device
        
        Returns:
            int: Hand type mapped to SkuType (1: Right, 2: Left)
        """
    def revo3_get_hardware_version(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read hardware version string.
        """
    def revo3_get_max_continuous_current(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get max continuous current (mA).
        """
    def revo3_get_motor_fw_versions(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read all 21 motor firmware versions.
        """
    def revo3_get_motor_online_status(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read motor online status bitmask.
        """
    def revo3_get_motor_sn(self, slave_id: builtins.int, motor_id: builtins.int) -> typing.Any:
        r"""
        Read a motor's serial number string.
        
        Args:
            motor_id: 0~20
        """
    def revo3_get_motor_status_data(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read complete Revo3 motor status data.
        
        Returns:
            Revo3MotorStatusData with statuses, positions, velocities, currents, errors
        """
    def revo3_get_motor_temperature(self, slave_id: builtins.int, joint_id: builtins.int) -> typing.Any:
        r"""
        Read a single motor's temperature (°C).
        """
    def revo3_get_rs485_baudrate(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get RS485 Baudrate (Baudrate enum values use Mbps-style bps values: 1/2/3/5)
        """
    def revo3_get_servo_damping_omega(self) -> typing.Any:
        r"""
        Get the current natural frequency (omega) for the second-order filter.
        """
    def revo3_get_servo_filter_mode(self) -> typing.Any:
        r"""
        Get the current high-frequency real-time servo smoothing filter mode.
        
        Returns:
            0 = None, 1 = First-order LPF, 2 = Second-order Critically Damped system.
        """
    def revo3_get_servo_lpf_alpha(self) -> typing.Any:
        r"""
        Get the current first-order Low-Pass Filter (LPF) coefficient.
        """
    def revo3_get_slave_id(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get Slave ID
        """
    def revo3_get_software_e_stop(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get software e-stop state.
        """
    def revo3_get_system_current(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read system current (mA).
        """
    def revo3_get_system_power(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read system power (W).
        """
    def revo3_get_system_status(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read complete system status (state, error, current, voltage, power, temperature).
        
        Internal sampling rate: 5Hz. Host should poll at ≤5Hz.
        
        Returns:
            Revo3SystemStatus object
        """
    def revo3_get_system_temperature(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read system temperature (°C).
        """
    def revo3_get_system_voltage(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read system voltage (V).
        """
    def revo3_get_teaching_mode(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get teaching mode state.
        """
    def revo3_get_touch_data_type(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read the Revo3 touch data type configuration.
        """
    def revo3_get_touch_module_data(self, slave_id: builtins.int, module_id: builtins.int) -> typing.Any:
        r"""
        Read pressure array data for a single Revo3 touch module.
        """
    def revo3_get_touch_module_enabled(self, slave_id: builtins.int, module_id: builtins.int) -> typing.Any:
        r"""
        Read the enable state of a single touch module.
        
        Args:
            slave_id: Slave device ID
            module_id: 0~10
        
        Returns: True if enabled, False otherwise
        """
    def revo3_get_touch_screen(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get touch screen switch state.
        """
    def revo3_get_touch_summary(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Read Revo3 touch summary data.
        
        Returns 42 u16 values:
        [0] palm, [1] thumb tip 1, [2] thumb tip 2...
        """
    def revo3_get_use_broadcast_id(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get broadcast ID usage state.
        """
    def revo3_get_vibration_switch(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get vibration switch state.
        """
    def revo3_get_zero_position(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Get the zero position offsets (degrees) for all joints.
        """
    def revo3_hand_mit_control(self, slave_id: builtins.int, kp_values: typing.Sequence[builtins.float], kd_values: typing.Sequence[builtins.float], positions: typing.Sequence[builtins.float], velocities: typing.Sequence[builtins.float], torques: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        MIT control for all 21 joints using the interleaved hand register block.
        
        Recommended usage:
            Speed control: set kp_values to 0, use kd_values with target velocities, and keep torques at 0.
            Position control: use kp_values and kd_values, set velocities to 0, and keep torques at 0.
            Current control: set kp_values and kd_values to 0, then use torques as target currents.
        
        Args:
            kp_values: 21 Kp values
            kd_values: 21 Kd values
            positions: 21 target positions (degrees)
            velocities: 21 target velocities (rpm)
            torques: 21 feed-forward torques (mA)
        """
    def revo3_hand_mit_control_without_retry(self, slave_id: builtins.int, kp_values: typing.Sequence[builtins.float], kd_values: typing.Sequence[builtins.float], positions: typing.Sequence[builtins.float], velocities: typing.Sequence[builtins.float], torques: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Same as `revo3_hand_mit_control` but without retry.
        Use this for high-frequency real-time control (e.g. trajectories/VR mapping).
        
        Recommended usage follows `revo3_hand_mit_control`.
        """
    def revo3_joint_mit_control(self, slave_id: builtins.int, joint_id: builtins.int, kp: builtins.float, kd: builtins.float, pos: builtins.float, vel: builtins.float, torque_ff: builtins.float) -> typing.Any:
        r"""
        MIT control for a single joint.
        
        Recommended usage:
            Speed control: set kp=0, use kd with target vel, and keep torque_ff=0.
            Position control: use kp and kd, set vel=0, and keep torque_ff=0.
            Current control: set kp=0 and kd=0, then use torque_ff as target current.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0~20)
            kp: Position gain [0.0, 10.0]
            kd: Velocity gain [0.0, 10.0]
            pos: Target position (degrees)
            vel: Target velocity (rpm)
            torque_ff: Feed-forward torque/current (mA)
        """
    def revo3_manual_calibration(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Trigger manual zero calibration.
        """
    def revo3_move_finger(self, slave_id: builtins.int, finger_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float) -> None:
        r"""
        Move a specific finger using quintic polynomial trajectory.
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
        Move a specific finger using quintic polynomial trajectory (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
        """
    def revo3_move_finger_wait(self, slave_id: builtins.int, finger_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float) -> typing.Any:
        r"""
        Move a specific finger using quintic polynomial trajectory and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
        """
    def revo3_move_finger_with_gains(self, slave_id: builtins.int, finger_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> None:
        r"""
        Move a specific finger with custom Kp/Kd gains and quintic trajectory control (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_finger_with_gains_wait(self, slave_id: builtins.int, finger_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Move a specific finger with custom Kp/Kd gains and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_finger_with_joint_gains(self, slave_id: builtins.int, finger_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: typing.Sequence[builtins.float], kd: typing.Sequence[builtins.float]) -> None:
        r"""
        Move a specific finger with joint-specific Kp/Kd gains (4 joints) (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: List of 4 position gains
            kd: List of 4 velocity damping gains
        """
    def revo3_move_finger_with_joint_gains_wait(self, slave_id: builtins.int, finger_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: typing.Sequence[builtins.float], kd: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Move a specific finger with joint-specific Kp/Kd gains (4 joints) and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            finger_id: Finger index (1=index, 2=middle, 3=ring, 4=pinky)
            target_positions: List of 4 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: List of 4 position gains
            kd: List of 4 velocity damping gains
        """
    def revo3_move_hand(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float) -> None:
        r"""
        Move all joints using quintic polynomial trajectories.
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            duration: Total motion time in seconds
            dt: Control period in seconds
        Move all joints using quintic polynomial trajectories (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            duration: Total motion time in seconds
            dt: Control period in seconds
        """
    def revo3_move_hand_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float) -> typing.Any:
        r"""
        Move all joints using quintic polynomial trajectories and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            duration: Total motion time in seconds
            dt: Control period in seconds
        """
    def revo3_move_hand_with_gains(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> None:
        r"""
        Move all joints with custom Kp/Kd gains (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_hand_with_gains_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Move all joints with custom Kp/Kd gains and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_hand_with_speed(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], speed: builtins.float, dt: builtins.float) -> None:
        r"""
        Move all joints to target positions with uniform speed (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            speed: Target speed in rpm
            dt: Control period in seconds
        """
    def revo3_move_hand_with_speed_and_gains(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], speed: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> None:
        r"""
        Move all joints with speed and custom Kp/Kd gains (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            speed: Target speed in rpm
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_hand_with_speed_and_gains_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], speed: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Move all joints with speed and custom Kp/Kd gains and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            speed: Target speed in rpm
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_hand_with_speed_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], speed: builtins.float, dt: builtins.float) -> typing.Any:
        r"""
        Move all joints to target positions with uniform speed and wait for completion (Blocking).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of target positions in degrees (length = joint count)
            speed: Target speed in rpm
            dt: Control period in seconds
        """
    def revo3_move_joint(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, duration: builtins.float, dt: builtins.float) -> None:
        r"""
        Move a single joint using quintic polynomial trajectory.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            target_pos: Target position in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds (e.g., 0.01 for 100Hz)
        Move a single joint using quintic polynomial trajectory (Non-blocking).
        """
    def revo3_move_joint_wait(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, duration: builtins.float, dt: builtins.float) -> typing.Any:
        r"""
        Move a single joint and wait until completed (Blocking).
        """
    def revo3_move_joint_with_gains(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> None:
        r"""
        Move a single joint with custom Kp/Kd gains (Non-blocking).
        """
    def revo3_move_joint_with_gains_wait(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Move a single joint with custom Kp/Kd gains and wait until completed (Blocking).
        """
    def revo3_move_joint_with_speed(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, speed: builtins.float, dt: builtins.float) -> None:
        r"""
        Move a single joint to target position with specified speed.
        
        Move a single joint to target position with specified speed (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            target_pos: Target position in degrees
            speed: Target speed in rpm
            dt: Control period in seconds
        """
    def revo3_move_joint_with_speed_and_gains(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, speed: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> None:
        r"""
        Move a single joint to target position with specified speed and custom Kp/Kd gains (Non-blocking).
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            target_pos: Target position in degrees
            speed: Target speed in rpm
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_joint_with_speed_and_gains_wait(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, speed: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Move a single joint to target position with specified speed and custom Kp/Kd gains and wait until completed (Blocking).
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            target_pos: Target position in degrees
            speed: Target speed in rpm
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_joint_with_speed_wait(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, speed: builtins.float, dt: builtins.float) -> typing.Any:
        r"""
        Move a single joint to target position with specified speed and wait until completed (Blocking).
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            target_pos: Target position in degrees
            speed: Target speed in rpm
            dt: Control period in seconds
        """
    def revo3_move_thumb(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float) -> None:
        r"""
        Move thumb using quintic polynomial trajectory (Non-blocking / Background Spawn).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
        """
    def revo3_move_thumb_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float) -> typing.Any:
        r"""
        Move thumb using quintic polynomial trajectory and wait for completion (Blocking / Await).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
        """
    def revo3_move_thumb_with_gains(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> None:
        r"""
        Move thumb with custom Kp/Kd gains and quintic trajectory control (Non-blocking / Background Spawn).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_thumb_with_gains_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Move thumb with custom Kp/Kd gains and wait for completion (Blocking / Await).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_move_thumb_with_joint_gains(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: typing.Sequence[builtins.float], kd: typing.Sequence[builtins.float]) -> None:
        r"""
        Move thumb with joint-specific Kp/Kd gains (5 joints) and quintic trajectory control (Non-blocking / Background Spawn).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: List of 5 position gains
            kd: List of 5 velocity damping gains
        """
    def revo3_move_thumb_with_joint_gains_wait(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], duration: builtins.float, dt: builtins.float, kp: typing.Sequence[builtins.float], kd: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Move thumb with joint-specific Kp/Kd gains (5 joints) and wait for completion (Blocking / Await).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions in degrees
            duration: Total motion time in seconds
            dt: Control period in seconds
            kp: List of 5 position gains
            kd: List of 5 velocity damping gains
        """
    def revo3_multi_joint_control(self, slave_id: builtins.int, mode: builtins.int, params: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Multi-joint synchronous control.
        
        Args:
            slave_id: Slave device ID
            mode: ControlMode enum value
            params: List of 21 float control parameters (degrees, rpm, or mA)
        """
    def revo3_reboot(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Software reboot.
        """
    def revo3_replay_hand(self, slave_id: builtins.int, trajectory: typing.Sequence[typing.Sequence[builtins.float]], dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Replay a recorded full-hand trajectory.
        
        Args:
            slave_id: Slave device ID
            trajectory: List of position arrays
            dt: Playback interval in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_replay_joint(self, slave_id: builtins.int, joint_id: builtins.int, positions: typing.Sequence[builtins.float], dt: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Replay a recorded single-joint trajectory.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            positions: List of recorded positions
            dt: Playback interval in seconds
            kp: Position gain
            kd: Velocity damping gain
        """
    def revo3_reset_finger_defaults(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Reset finger parameters to defaults.
        """
    def revo3_servo_finger(self, slave_id: builtins.int, finger_index: builtins.int, target_positions: typing.Sequence[builtins.float], target_velocities: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        High-frequency real-time servo control for a single non-thumb finger using default gains.
        
        Args:
            slave_id: Slave device ID
            finger_index: 1=Index, 2=Middle, 3=Ring, 4=Pinky
            target_positions: List of 4 target positions (degrees)
            target_velocities: List of 4 target velocities (rpm)
        """
    def revo3_servo_finger_with_gains(self, slave_id: builtins.int, finger_index: builtins.int, target_positions: typing.Sequence[builtins.float], target_velocities: typing.Sequence[builtins.float], kp: typing.Sequence[builtins.float], kd: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        High-frequency real-time servo control for a single non-thumb finger using custom gains (4 joints).
        
        Args:
            slave_id: Slave device ID
            finger_index: 1=Index, 2=Middle, 3=Ring, 4=Pinky
            target_positions: List of 4 target positions (degrees)
            target_velocities: List of 4 target velocities (rpm)
            kp: List of 4 Kp stiffness gains
            kd: List of 4 Kd damping gains
        """
    def revo3_servo_hand(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], target_velocities: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        High-frequency real-time servo control for all 21 joints using default gains.
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 21 target positions (degrees)
            target_velocities: List of 21 target velocities (rpm)
        """
    def revo3_servo_hand_with_gains(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], target_velocities: typing.Sequence[builtins.float], kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        High-frequency real-time servo control for all 21 joints using custom gains.
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 21 target positions (degrees)
            target_velocities: List of 21 target velocities (rpm)
            kp: Position gain [0.0, 10.0]
            kd: Velocity gain [0.0, 10.0]
        """
    def revo3_servo_joint(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, target_vel: builtins.float) -> typing.Any:
        r"""
        High-frequency real-time servo control for a single joint using default gains.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0~20)
            target_pos: Target position (degrees)
            target_vel: Target velocity (rpm)
        """
    def revo3_servo_joint_with_gains(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, target_vel: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        High-frequency real-time servo control for a single joint using custom gains.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0~20)
            target_pos: Target position (degrees)
            target_vel: Target velocity (rpm)
            kp: Position gain [0.0, 10.0]
            kd: Velocity gain [0.0, 10.0]
        """
    def revo3_servo_thumb(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], target_velocities: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        High-frequency real-time servo control for the thumb using default gains (5 joints).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions (degrees)
            target_velocities: List of 5 target velocities (rpm)
        """
    def revo3_servo_thumb_with_gains(self, slave_id: builtins.int, target_positions: typing.Sequence[builtins.float], target_velocities: typing.Sequence[builtins.float], kp: typing.Sequence[builtins.float], kd: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        High-frequency real-time servo control for the thumb using custom gains (5 joints).
        
        Args:
            slave_id: Slave device ID
            target_positions: List of 5 target positions (degrees)
            target_velocities: List of 5 target velocities (rpm)
            kp: List of 5 Kp stiffness gains
            kd: List of 5 Kd damping gains
        """
    def revo3_set_all_mit_kd(self, slave_id: builtins.int, kd_values: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all 21 joint KD values at once.
        """
    def revo3_set_all_mit_kp(self, slave_id: builtins.int, kp_values: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all 21 joint KP values at once.
        """
    def revo3_set_all_mit_params(self, slave_id: builtins.int, kp_values: typing.Sequence[builtins.float], kd_values: typing.Sequence[builtins.float], positions: typing.Sequence[builtins.float], velocities: typing.Sequence[builtins.float], torques: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all 5 grouped MIT parameter arrays in a single write (105 registers).
        """
    def revo3_set_all_mit_params_without_retry(self, slave_id: builtins.int, kp_values: typing.Sequence[builtins.float], kd_values: typing.Sequence[builtins.float], positions: typing.Sequence[builtins.float], velocities: typing.Sequence[builtins.float], torques: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Same as `revo3_set_all_mit_params` but without retry.
        """
    def revo3_set_all_mit_positions(self, slave_id: builtins.int, positions: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all 21 joint target positions at once.
        """
    def revo3_set_all_mit_torques(self, slave_id: builtins.int, torques: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all 21 joint feed-forward torques at once.
        """
    def revo3_set_all_mit_velocities(self, slave_id: builtins.int, velocities: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all 21 joint target velocities at once.
        """
    def revo3_set_all_motor_currents(self, slave_id: builtins.int, currents: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all Revo3 motor currents at once (mA).
        
        Args:
            slave_id: Slave device ID
            currents: List of 21 float currents
        """
    def revo3_set_all_motor_positions(self, slave_id: builtins.int, positions: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all Revo3 motor positions at once (degrees).
        
        Args:
            slave_id: Slave device ID
            positions: List of 21 float positions in degrees
        """
    def revo3_set_all_motor_velocities(self, slave_id: builtins.int, velocities: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set all Revo3 motor velocities at once (RPM).
        
        Args:
            slave_id: Slave device ID
            velocities: List of 21 float velocities in RPM
        """
    def revo3_set_all_touch_modules_enabled(self, slave_id: builtins.int, bits: builtins.int) -> typing.Any:
        r"""
        Enable or disable all 11 touch modules at once.
        
        Args:
            slave_id: Slave device ID
            bits: A 16-bit mask where bits 0~10 map to modules 0~10. 1 = on, 0 = off.
        """
    def revo3_set_auto_calibration(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Enable or disable auto calibration on power-up.
        """
    def revo3_set_auto_clear_motor_error(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Enable or disable auto clear motor errors.
        """
    def revo3_set_buzzer_switch(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Set buzzer switch.
        """
    def revo3_set_calibration_current(self, slave_id: builtins.int, current: builtins.float) -> typing.Any:
        r"""
        Set Revo3 calibration current.
        """
    def revo3_set_canfd_baudrate(self, slave_id: builtins.int, baudrate: BaudrateCAN) -> typing.Any:
        r"""
        Set CANFD Baudrate (BaudrateCAN enum values use Mbps-style bps values: 1/2/4/5)
        """
    def revo3_set_current_position_as_zero(self, slave_id: builtins.int) -> typing.Any:
        r"""
        Set the current position as zero calibration.
        
        Recommended Calibration Workflow:
        1. Disable the motors to allow free manual movements of the fingers.
        2. Manually pose the hand into the desired zero-reference pose.
        3. Enable the motors to lock the pose.
        4. Call this API to register the current feedback positions as zero.
        """
    def revo3_set_global_protect_current(self, slave_id: builtins.int, current: builtins.float) -> typing.Any:
        r"""
        Set global motor protection current.
        """
    def revo3_set_joint_mit_params(self, slave_id: builtins.int, joint_id: builtins.int, kp: builtins.float, kd: builtins.float, pos: builtins.float, vel: builtins.float, torque_ff: builtins.float) -> typing.Any:
        r"""
        Set all 5 MIT parameters for a single joint in the interleaved register block.
        
        Recommended usage:
            Speed control: set kp=0, use kd with target vel, and keep torque_ff=0.
            Position control: use kp and kd, set vel=0, and keep torque_ff=0.
            Current control: set kp=0 and kd=0, then use torque_ff as target current.
        
        Args:
            joint_id: 0~20
            kp: Position gain [0, 10]
            kd: Velocity gain [0, 10]
            pos: Target position (degrees)
            vel: Target velocity (rpm)
            torque_ff: Feed-forward torque (mA)
        """
    def revo3_set_joint_position_limits(self, slave_id: builtins.int, joint_id: builtins.int, min_pos: builtins.float, max_pos: builtins.float) -> typing.Any:
        r"""
        Set joint position limits (min, max).
        """
    def revo3_set_joint_protect_current(self, slave_id: builtins.int, joint_id: builtins.int, current: builtins.float) -> typing.Any:
        r"""
        Set per-joint protection current.
        """
    def revo3_set_joint_speed_limits(self, slave_id: builtins.int, joint_id: builtins.int, min_speed: builtins.float, max_speed: builtins.float) -> typing.Any:
        r"""
        Set joint speed limits (min, max).
        """
    def revo3_set_max_continuous_current(self, slave_id: builtins.int, current: builtins.float) -> typing.Any:
        r"""
        Set Revo3 max continuous current.
        """
    def revo3_set_motor_current(self, slave_id: builtins.int, motor_id: builtins.int, current: builtins.float) -> typing.Any:
        r"""
        Set target current for a single Revo3 motor (mA).
        
        Args:
            slave_id: Slave device ID
            motor_id: Motor index (0~22)
            current: Target current in mA
        """
    def revo3_set_motor_mit(self, slave_id: builtins.int, motor_id: builtins.int, position_deg: builtins.float, velocity: builtins.float, current: builtins.float, kp: builtins.float, kd: builtins.float) -> typing.Any:
        r"""
        Full MIT mode control for a single Revo3 motor.
        τ = Kp * (P_des - P_actual) + Kd * (V_des - V_actual) + T_ff
        
        Args:
            slave_id: Slave device ID
            motor_id: Motor index (0~22)
            position_deg: Target position (degrees)
            velocity: Target velocity
            current: Feedforward current (mA)
            kp: Position stiffness (0~10)
            kd: Velocity damping (0~10)
        """
    def revo3_set_motor_position(self, slave_id: builtins.int, motor_id: builtins.int, position_deg: builtins.float) -> typing.Any:
        r"""
        Set target position for a single Revo3 motor (degrees).
        
        Args:
            slave_id: Slave device ID
            motor_id: Motor index (0~22)
            position_deg: Target position in degrees
        """
    def revo3_set_motor_velocity(self, slave_id: builtins.int, motor_id: builtins.int, velocity: builtins.float) -> typing.Any:
        r"""
        Set target velocity for a single Revo3 motor (RPM).
        
        Args:
            slave_id: Slave device ID
            motor_id: Motor index (0~22)
            velocity: Target velocity in RPM
        """
    def revo3_set_rs485_baudrate(self, slave_id: builtins.int, baudrate: Baudrate) -> typing.Any:
        r"""
        Set RS485 Baudrate (Baudrate enum values use Mbps-style bps values: 1/2/3/5)
        """
    def revo3_set_servo_damping_omega(self, omega: builtins.float) -> typing.Any:
        r"""
        Set the natural frequency (omega) for the second-order critically damped servo filter.
        
        Args:
            omega: Higher values mean faster tracking but less smoothing. Default is 20.0.
        """
    def revo3_set_servo_filter_mode(self, mode: builtins.int) -> typing.Any:
        r"""
        Set the high-frequency real-time servo smoothing filter mode.
        
        Args:
            mode: 0 = None, 1 = First-order LPF, 2 = Second-order Critically Damped system.
        """
    def revo3_set_servo_lpf_alpha(self, alpha: builtins.float) -> typing.Any:
        r"""
        Set the first-order Low-Pass Filter (LPF) coefficient for servo control.
        
        Args:
            alpha: Filter coefficient in range (0.0, 1.0]. Default is 1.0 (no filtering).
        """
    def revo3_set_slave_id(self, slave_id: builtins.int, new_slave_id: builtins.int) -> typing.Any:
        r"""
        Set Slave ID
        """
    def revo3_set_software_e_stop(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Enable or disable software e-stop.
        """
    def revo3_set_teaching_mode(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Enter or exit teaching mode.
        """
    def revo3_set_touch_data_type(self, slave_id: builtins.int, data_type: TouchDataMode) -> typing.Any:
        r"""
        Set the data type for Revo3 touch sensor reading.
        
        Args:
            data_type: `TouchDataMode` (PressureArray = 0, ForceSummary = 1)
        """
    def revo3_set_touch_module_enabled(self, slave_id: builtins.int, module_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Enable or disable a single touch module.
        
        Args:
            slave_id: Slave device ID
            module_id: 0~10
            enabled: True to enable, False to disable
        """
    def revo3_set_touch_screen(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Set touch screen switch.
        """
    def revo3_set_use_broadcast_id(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Enable or disable using broadcast ID.
        """
    def revo3_set_vibration_switch(self, slave_id: builtins.int, enabled: builtins.bool) -> typing.Any:
        r"""
        Set vibration switch.
        """
    def revo3_set_zero_position(self, slave_id: builtins.int, offsets_deg: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Set the zero position with explicit motor offsets (degrees).
        
        `offsets_deg` must contain the degree offset values for each motor
        up to 21 (matching the hand SKU DOF count, e.g. 13, 16, or 21).
        """
    def revo3_single_joint_control(self, slave_id: builtins.int, joint_id: builtins.int, mode: builtins.int, param: builtins.float) -> typing.Any:
        r"""
        Single joint control.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0~20)
            mode: ControlMode (0=Position, 1=Speed, 2=Current, 4=Impedance)
            param: Control parameter (float degrees, rpm, or mA depending on mode)
        """
    def revo3_start_dfu(self, slave_id: builtins.int, file_path: builtins.str, wait_secs: typing.Optional[builtins.int], on_dfu_state: typing.Optional[typing.Any], on_dfu_progress: typing.Optional[typing.Any]) -> typing.Any:
        r"""
        Start Revo3 firmware upgrade over Modbus RTU or CANFD.
        Note: Modbus OTA is only supported on Revo3 firmware >= 0.0.4.
        
        Args:
            slave_id: Device slave ID
            file_path: Firmware file path
            wait_secs: Reserved wait seconds parameter for compatibility
        
        Returns:
            None when the transfer completes successfully
        """
    def revo3_start_dfu_with_target(self, slave_id: builtins.int, file_path: builtins.str, target: typing.Any, wait_secs: typing.Optional[builtins.int], on_dfu_state: typing.Optional[typing.Any], on_dfu_progress: typing.Optional[typing.Any]) -> typing.Any:
        r"""
        Start Revo3 firmware or resource upgrade with target type (V1.1+).
        
        Args:
            slave_id: Device slave ID
            file_path: Firmware or resource file path
            target: OtaTarget enum or integer (0=MainFw, 1=Image, 2=MotorFw)
            wait_secs: Reserved wait seconds parameter for compatibility
        
        Returns:
            None when the transfer completes successfully
        """
    def revo3_start_image_dfu(self, slave_id: builtins.int, file_path: builtins.str, wait_secs: typing.Optional[builtins.int], on_dfu_state: typing.Optional[typing.Any], on_dfu_progress: typing.Optional[typing.Any]) -> typing.Any:
        r"""
        Start Revo3 Image resource pack upgrade (V1.1+).
        """
    def revo3_start_mcu_dfu(self, slave_id: builtins.int, file_path: builtins.str, wait_secs: typing.Optional[builtins.int], on_dfu_state: typing.Optional[typing.Any], on_dfu_progress: typing.Optional[typing.Any]) -> typing.Any:
        r"""
        Start Revo3 Main Board MCU firmware upgrade (V1.1+).
        """
    def revo3_start_motor_dfu(self, slave_id: builtins.int, file_path: builtins.str, wait_secs: typing.Optional[builtins.int], on_dfu_state: typing.Optional[typing.Any], on_dfu_progress: typing.Optional[typing.Any]) -> typing.Any:
        r"""
        Start Revo3 Motor board firmware upgrade (V1.1+).
        """
    def revo3_start_servo_drag(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float, kp: builtins.float, kd: builtins.float, vel_cap_rpm: builtins.float, interval_ms: builtins.int, idle_timeout_ms: builtins.int, filter_mode: builtins.int, omega: builtins.float) -> typing.Any:
        r"""
        Start SDK-managed servo drag streaming for one joint.
        
        Intended for GUI sliders, joysticks, and other event-driven target streams.
        The caller sends `start` on press/engage, `update` when the target changes,
        and `stop` on release. The SDK keeps one background stream, keeps the latest
        target, and sends position-mode MIT commands with zero target velocity.
        The stream remains active until `stop` is called, even if the target is idle.
        
        Parameters:
        - vel_cap_rpm: reserved for future velocity feed-forward; position-mode drag
          currently keeps target velocity at zero.
        - interval_ms: background write period. For Modbus GUI use, 15 ms is a
          conservative starting point when DataCollector is also running.
        - idle_timeout_ms: refresh interval for an unchanged target; it does not
          stop the stream while the user is still holding the slider/joystick.
        - filter_mode: 0=None, 1=FirstOrderLpf, 2=SecondOrderCriticallyDamped.
        - omega: second-order filter natural frequency when filter_mode=2.
        """
    def revo3_stop_servo_drag(self, slave_id: builtins.int, joint_id: builtins.int, final_pos: builtins.float) -> typing.Any:
        r"""
        Stop servo drag streaming and hold the final target with zero velocity.
        
        Safe to call on slider release or when leaving position mode. If no stream
        is active, the SDK still sends one final zero-velocity hold command using
        default servo gains.
        """
    def revo3_teach_hand(self, slave_id: builtins.int, dt: builtins.float, duration: builtins.float) -> typing.Any:
        r"""
        Enter teaching (backdrive) mode for all joints.
        
        Sets Kp=0, Kd=0, τ_ff=0 on all joints for free manual movement.
        Records all joint positions at each dt interval.
        
        Args:
            slave_id: Slave device ID
            dt: Recording interval in seconds
            duration: Total recording time in seconds
        
        Returns:
            List of position arrays (each of length = joint count)
        """
    def revo3_teach_joint(self, slave_id: builtins.int, joint_id: builtins.int, dt: builtins.float, duration: builtins.float) -> typing.Any:
        r"""
        Enter teaching (backdrive) mode for a single joint.
        
        Sets Kp=0, Kd=0, τ_ff=0 for free manual movement.
        Records joint position at each dt interval.
        
        Args:
            slave_id: Slave device ID
            joint_id: Joint index (0-based)
            dt: Recording interval in seconds
            duration: Total recording time in seconds
        
        Returns:
            List of recorded positions (one per dt sample)
        """
    def revo3_thumb_control(self, slave_id: builtins.int, mode: builtins.int, params: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Thumb control.
        
        Args:
            mode: ControlMode (0=Position, 1=Speed, 2=Current)
            params: [CMC_rotation, MCP, IP, CMC_abd, CMC_flex] — 5 float values (degrees/rpm/mA)
        """
    def revo3_thumb_mit_control(self, slave_id: builtins.int, params: typing.Sequence[builtins.float]) -> typing.Any:
        r"""
        Thumb MIT control.
        
        Args:
            params: 5 joints × 5 MIT params = 25 float values
        
        Recommended usage per joint:
            Speed control: set kp=0, use kd with target vel, and keep tau_ff=0.
            Position control: use kp and kd, set vel=0, and keep tau_ff=0.
            Current control: set kp=0 and kd=0, then use tau_ff as target current.
        """
    def revo3_update_servo_drag(self, slave_id: builtins.int, joint_id: builtins.int, target_pos: builtins.float) -> typing.Any:
        r"""
        Update the latest target for an active servo drag stream.
        
        This is a lightweight target refresh. It does not perform a direct hardware
        write; the background worker sends the latest target on its next tick.
        """
    def revo3_uses_motor_api(self, slave_id: builtins.int) -> builtins.bool:
        r"""
        Check if device uses Revo3 Motor API (Revo3 protocol, MIT control).
        
        Returns:
            True if uses Revo3 Motor API.
        """
    def set_hardware_type(self, slave_id: builtins.int, hw_type: StarkHardwareType) -> typing.Any:
        r"""
        Set hardware type for a specific slave.
        
        Use this to manually override the hardware type when SN-based auto-detection
        in `revo3_get_device_info()` fails or returns an incorrect result.
        
        Call this after `revo3_get_device_info()` if the detected `hardware_type` is wrong.
        This is also needed for CAN protocol where hardware type may not be auto-detected.
        
        Args:
            slave_id: The slave ID
            hw_type: StarkHardwareType enum value
        
        Example:
            # Override hardware type after get_device_info
            info = await ctx.revo3_get_device_info(slave_id)
            if info.hardware_type != expected_type:
                await ctx.set_hardware_type(slave_id, StarkHardwareType.Revo3Ultra)
        """
    def start_dfu(self, slave_id: builtins.int, file_path: builtins.str, wait_secs: typing.Optional[builtins.int], on_dfu_state: typing.Optional[typing.Any], on_dfu_progress: typing.Optional[typing.Any]) -> typing.Any:
        r"""
        Compatibility alias for older examples.
        """
@typing.final
class DeviceInfo:
    def __new__(cls, sku_type: SkuType, hand_type: HandType, hardware_type: StarkHardwareType, serial_number: builtins.str, firmware_version: builtins.str, hardware_version: builtins.str) -> DeviceInfo: ...
    def desc(self) -> builtins.str: ...

    @property
    def description(self) -> builtins.str: ...
    @property
    def firmware_version(self) -> builtins.str:
        r"""
        Firmware version
        """
    def get_hardware_type(self) -> StarkHardwareType: ...
    @property
    def hand_type(self) -> HandType:
        r"""
        Hand type (Left/Right)
        """
    @property
    def hardware_type(self) -> StarkHardwareType:
        r"""
        Hardware type
        """
    @property
    def hardware_version(self) -> builtins.str:
        r"""
        Hardware version.
        """
    def is_touch(self) -> builtins.bool:
        r"""
        Check if device has any touch sensor.
        """
    def new(self, sku_type: SkuType, hand_type: HandType, hardware_type: StarkHardwareType, serial_number: builtins.str, firmware_version: builtins.str, hardware_version: builtins.str) -> DeviceInfo: ...
    def revo3_uses_motor_api(self) -> builtins.bool:
        r"""
        Check if device uses Revo3 Motor API (Revo3 protocol, MIT control).
        """
    @property
    def serial_number(self) -> builtins.str:
        r"""
        Serial number
        """
    @typing_extensions.deprecated("Use hand_type instead")
    @property
    def sku_type(self) -> SkuType:
        r"""
        Hand SKU (Deprecated, use hand_type instead)
        """
@typing.final
class FingertipPose:
    r"""
    Fingertip 6-DoF pose in cartesian space
    """
    def __new__(cls, x: builtins.float, y: builtins.float, z: builtins.float, rx: builtins.float, ry: builtins.float, rz: builtins.float) -> FingertipPose: ...
    def desc(self) -> builtins.str: ...

    @property
    def description(self) -> builtins.str: ...
    def new(self, x: builtins.float, y: builtins.float, z: builtins.float, rx: builtins.float, ry: builtins.float, rz: builtins.float) -> FingertipPose: ...
    @property
    def rx(self) -> builtins.float: ...
    @property
    def ry(self) -> builtins.float: ...
    @property
    def rz(self) -> builtins.float: ...
    @property
    def x(self) -> builtins.float: ...
    @property
    def y(self) -> builtins.float: ...
    @property
    def z(self) -> builtins.float: ...
@typing.final
class Revo3AutoDetector:
    r"""
    Streaming Revo3 auto-detector.
    
    Use as an async iterator to receive devices as soon as each device is found.
    Calling `stop()` or breaking out of the async loop stops the background scan.
    
    Args:
        stop_on_first: If True, stop after the first detected device. Default False.
        port: Optional port name to scan. If None, scans all available ports.
        protocol: Optional protocol to use (ProtocolType enum).
        slave_id: Optional slave ID to probe. If None, probes Revo3 default IDs.
        modbus_baudrate: Optional Modbus baudrate to probe. If None, probes default Revo3 baudrates.
        broadcast: If True, probe broadcast slave ID 0 first before default IDs (Modbus only). Default True.
    
    Examples:
        scanner = sdk.Revo3AutoDetector(stop_on_first=False, protocol=sdk.ProtocolType.Auto)
        async for device in scanner:
            print(device)
            await scanner.stop()
            break
    """
    def __aiter__(self) -> Revo3AutoDetector: ...
    def __anext__(self) -> typing.Any: ...
    def __new__(cls, stop_on_first: builtins.bool = False, port: typing.Optional[builtins.str] = None, protocol: typing.Optional[StarkProtocolType] = None, slave_id: typing.Optional[builtins.int] = None, modbus_baudrate: typing.Optional[Baudrate] = None, broadcast: builtins.bool = True) -> Revo3AutoDetector: ...
    def stop(self) -> typing.Any: ...

@typing.final
class Revo3MotorStatusBuffer:
    def __new__(cls, max_size: builtins.int) -> Revo3MotorStatusBuffer: ...
    def clear(self) -> None: ...

    def is_empty(self) -> builtins.bool: ...
    def len(self) -> builtins.int: ...
    def peek_latest(self) -> typing.Optional[Revo3MotorStatusData]: ...
    def pop_all(self) -> builtins.list[Revo3MotorStatusData]: ...
    def pop_latest(self, count: builtins.int) -> builtins.list[Revo3MotorStatusData]: ...
@typing.final
class Revo3MotorStatusData:
    r"""
    Revo3 motor status data for all 21 motors
    """
    def __new__(cls, statuses: typing.Sequence[builtins.int], velocities: typing.Sequence[builtins.float], positions: typing.Sequence[builtins.float], currents: typing.Sequence[builtins.float], errors: typing.Sequence[builtins.int]) -> Revo3MotorStatusData: ...
    @property
    def currents(self) -> builtins.list[builtins.float]:
        r"""
        Motor currents in float (21 values)
        """
    def desc(self) -> builtins.str: ...

    @property
    def description(self) -> builtins.str: ...
    @property
    def errors(self) -> builtins.list[builtins.int]:
        r"""
        Motor error codes (21 values)
        """
    def new(self, statuses: typing.Sequence[builtins.int], velocities: typing.Sequence[builtins.float], positions: typing.Sequence[builtins.float], currents: typing.Sequence[builtins.float], errors: typing.Sequence[builtins.int]) -> Revo3MotorStatusData: ...
    @property
    def positions(self) -> builtins.list[builtins.float]:
        r"""
        Motor positions in float (21 values)
        """
    @property
    def statuses(self) -> builtins.list[builtins.int]:
        r"""
        Motor status codes (21 values)
        """
    @property
    def velocities(self) -> builtins.list[builtins.float]:
        r"""
        Motor velocities in float (21 values)
        """
@typing.final
class Revo3SystemStatus:
    r"""
    Revo3 system status data from registers 1800–1804.
    
    Internal sampling rate: 5Hz. Host should poll at ≤5Hz.
    """
    def __new__(cls, system_state: builtins.int, error_code: builtins.int, current_ma: builtins.int, voltage_v: builtins.int, power_w: builtins.int, temperature_c: builtins.int) -> Revo3SystemStatus: ...
    @property
    def current_ma(self) -> builtins.int:
        r"""
        System current (mA)
        """
    def desc(self) -> builtins.str: ...
    @property
    def description(self) -> builtins.str: ...
    @property
    def error_code(self) -> builtins.int:
        r"""
        System error code: 0=Normal, 1=CommError, 2=NoCalibration, 3=TempAbnormal (low 8-bit of register 1800)
        """
    def is_normal(self) -> builtins.bool:
        r"""
        Check if system is in normal state
        """

    def new(self, system_state: builtins.int, error_code: builtins.int, current_ma: builtins.int, voltage_v: builtins.int, power_w: builtins.int, temperature_c: builtins.int) -> Revo3SystemStatus: ...
    @property
    def power_w(self) -> builtins.int:
        r"""
        System power (W)
        """
    @property
    def system_state(self) -> builtins.int:
        r"""
        System state: 0=Normal, 1=Fault (high 8-bit of register 1800)
        """
    @property
    def temperature_c(self) -> builtins.int:
        r"""
        System temperature (°C)
        """
    @property
    def voltage_v(self) -> builtins.int:
        r"""
        System voltage (V)
        """
@typing.final
class Revo3TouchData:
    r"""
    Revo3 touch data for all 11 modules
    """
    def desc(self) -> builtins.str: ...

    @property
    def description(self) -> builtins.str: ...
    @property
    def modules(self) -> builtins.list[builtins.list[builtins.int]]:
        r"""
        Per-module pressure array data (11 modules, varying point counts)
        """
    @property
    def summary(self) -> builtins.list[builtins.int]:
        r"""
        Summary force values (42 values exactly mapping to 4100~4141)
        """
@typing.final
class Revo3TouchDataBuffer:
    def __new__(cls, max_size: builtins.int) -> Revo3TouchDataBuffer: ...
    def clear(self) -> None: ...

    def is_empty(self) -> builtins.bool: ...
    def len(self) -> builtins.int: ...
    def peek_latest(self) -> typing.Optional[Revo3TouchData]: ...
    def pop_all(self) -> builtins.list[Revo3TouchData]: ...
@typing.final
class SerialPortCfg:
    def __new__(cls, slave_id: builtins.int, baudrate: Baudrate) -> SerialPortCfg: ...
    @property
    def baudrate(self) -> Baudrate:
        r"""
        Baud rate for the serial communication
        """
    def desc(self) -> builtins.str: ...

    @property
    def description(self) -> builtins.str: ...
    def new(self, slave_id: builtins.int, baudrate: Baudrate) -> SerialPortCfg: ...
    @property
    def slave_id(self) -> builtins.int:
        r"""
        Slave ID for the Revo3 transport.
        For Modbus/CANFD, range is 1~247 and common defaults are 126/127.
        """
@typing.final
class ZqwlDeviceInfo:
    r"""
    ZQWL Device Information
    """
    @property
    def channel_count(self) -> builtins.int:
        r"""
        Number of channels
        """
    @property
    def description(self) -> builtins.str:
        r"""
        Device description
        """

    @property
    def pid(self) -> builtins.int:
        r"""
        USB PID
        """
    @property
    def port_name(self) -> builtins.str:
        r"""
        Serial port name
        """
    @property
    def supports_canfd(self) -> builtins.bool:
        r"""
        Whether CANFD is supported
        """
    @property
    def vid(self) -> builtins.int:
        r"""
        USB VID
        """
@typing.final
class Baudrate(enum.Enum):
    Baud1Mbps = ...
    Baud2Mbps = ...
    Baud3Mbps = ...
    Baud5Mbps = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> Baudrate: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class BaudrateCAN(enum.Enum):
    Baud1Mbps = ...
    Baud2Mbps = ...
    Baud4Mbps = ...
    Baud5Mbps = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> BaudrateCAN: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class ControlMode(enum.Enum):
    Position = ...
    Speed = ...
    Current = ...
    Impedance = ...
    Damping = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> ControlMode: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class DfuCommandType(enum.Enum):
    RequestDeviceInfo = ...
    StartUpgrade = ...
    TransferData = ...
    TransferDone = ...
    ExitUpgrade = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> DfuCommandType: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class DfuExitReason(enum.Enum):
    FirmwareVersionMismatch = ...
    HardwareVersionMismatch = ...
    FirmwareFileCorrupted = ...
    Unknown = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> DfuExitReason: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class DfuState(enum.Enum):
    Idle = ...
    Starting = ...
    Started = ...
    Transfer = ...
    Completed = ...
    Aborted = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> DfuState: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class EcRevo3TouchSdoSubIdx(enum.Enum):
    SwitchBase = ...
    FwVersionBase = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> EcRevo3TouchSdoSubIdx: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class EtherCATAddress(enum.Enum):
    TX = ...
    RX = ...
    Config = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> EtherCATAddress: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class EtherCATConfigIndex(enum.Enum):
    SkuType = ...
    LedSwitch = ...
    BuzzerSwitch = ...
    VibrationSwitch = ...
    UnitMode = ...
    ManualCalibration = ...
    AutoCalibration = ...
    CtrlFirmwareVersion = ...
    CtrlSerialNumber = ...
    FoeFileType = ...
    FoeAuthCode = ...
    HardwareVersion = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> EtherCATConfigIndex: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class EtherCATFoeType(enum.Enum):
    Wrist = ...
    Control = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> EtherCATFoeType: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class FingerUnitMode(enum.Enum):
    Normalized = ...
    Physical = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> FingerUnitMode: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class HandType(enum.Enum):
    Left = ...
    Right = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> HandType: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class LogLevel(enum.Enum):
    Error = ...
    Warn = ...
    Info = ...
    Debug = ...
    Trace = ...

@typing.final
class OtaTarget(enum.Enum):
    MainFw = ...
    Image = ...
    MotorFw = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> OtaTarget: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class RegAddrRevo3(enum.Enum):
    MotorZeroOffsetBase = ...
    SetCurrentPositionAsZero = ...
    FactoryKey = ...
    EnterOta = ...
    HandType = ...
    ResetFingerDefaults = ...
    FactoryReset = ...
    BuzzerSwitch = ...
    VibrationSwitch = ...
    TouchScreenSwitch = ...
    SlaveId = ...
    Rs485Baudrate = ...
    CanFdBaudrate = ...
    SoftwareReboot = ...
    AutoCalibration = ...
    ManualCalibration = ...
    CalibrationCurrent = ...
    MaxContinuousCurrent = ...
    ClearMotorError = ...
    TeachingMode = ...
    SoftwareEStop = ...
    UseBroadcastId = ...
    SetSerialNumber = ...
    AutoClearMotorError = ...
    GlobalProtectCurrent = ...
    JointProtectCurrentBase = ...
    JointMinPositionBase = ...
    JointMaxPositionBase = ...
    JointMinSpeedBase = ...
    JointMaxSpeedBase = ...
    OtaCmd = ...
    OtaStatus = ...
    OtaTotalSizeH = ...
    OtaTotalSizeL = ...
    OtaOffsetH = ...
    OtaOffsetL = ...
    OtaPacketSize = ...
    OtaErrorCode = ...
    OtaTarget = ...
    OtaDataBase = ...
    SingleJointId = ...
    SingleJointCtrlMode = ...
    SingleJointCtrlParam = ...
    MultiJointCtrlMode = ...
    MultiJointParamBase = ...
    MitJointId = ...
    MitKp = ...
    MitKd = ...
    MitPos = ...
    MitVel = ...
    MitTorqueFf = ...
    MultiMitBase = ...
    MitBatchKpBase = ...
    MitBatchKdBase = ...
    MitBatchPosBase = ...
    MitBatchVelBase = ...
    MitBatchTorqueBase = ...
    FingerIndex = ...
    FingerCtrlMode = ...
    FingerParamBase = ...
    ThumbCtrlMode = ...
    ThumbParamBase = ...
    FingerMitIndex = ...
    FingerMitParamBase = ...
    ThumbMitParamBase = ...
    SystemStatus = ...
    SystemCurrent = ...
    SystemVoltage = ...
    SystemPower = ...
    SystemTemperature = ...
    MotorSpeedBase = ...
    MotorPositionBase = ...
    MotorCurrentBase = ...
    MotorErrorCodeBase = ...
    MotorTemperatureBase = ...
    MotorOnlineBase = ...
    FirmwareVersion = ...
    HardwareVersion = ...
    SerialNumber = ...
    Motor0Sn = ...
    Motor1Sn = ...
    Motor2Sn = ...
    Motor3Sn = ...
    Motor4Sn = ...
    Motor5Sn = ...
    Motor6Sn = ...
    Motor7Sn = ...
    Motor8Sn = ...
    Motor9Sn = ...
    Motor10Sn = ...
    Motor11Sn = ...
    Motor12Sn = ...
    Motor13Sn = ...
    Motor14Sn = ...
    Motor15Sn = ...
    Motor16Sn = ...
    Motor17Sn = ...
    Motor18Sn = ...
    Motor19Sn = ...
    Motor20Sn = ...
    MotorFwVersionBase = ...
    TouchEnableBase = ...
    TouchClearAll = ...
    TouchClearBase = ...
    TouchDataType = ...
    TouchSummaryBase = ...
    TouchPalmArray = ...
    TouchThumbTipArray = ...
    TouchThumbPadArray = ...
    TouchIndexTipArray = ...
    TouchIndexPadArray = ...
    TouchMiddleTipArray = ...
    TouchMiddlePadArray = ...
    TouchRingTipArray = ...
    TouchRingPadArray = ...
    TouchPinkyTipArray = ...
    TouchPinkyPadArray = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> RegAddrRevo3: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class SkuType(enum.Enum):
    MediumRight = ...
    MediumLeft = ...
    SmallRight = ...
    SmallLeft = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> SkuType: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class StarkError(enum.Enum):
    Success = ...
    Unknown = ...
    InvalidParams = ...
    InvalidData = ...
    ParseFailed = ...
    AllocFailed = ...
    ReadFailed = ...
    OperationFailed = ...
    SystemIsBusy = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> StarkError: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class StarkHardwareType(enum.Enum):
    Revo3Ultra = ...
    Revo3UltraTouch = ...
    Revo3UltraVisionTouch = ...
    Revo3Pro = ...
    Revo3ProTouch = ...
    Revo3Basic = ...
    Revo3BasicTouch = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> StarkHardwareType: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class StarkProtocolType(enum.Enum):
    Auto = ...
    Modbus = ...
    CanFd = ...
    EtherCAT = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> StarkProtocolType: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
ProtocolType = StarkProtocolType
@typing.final
class TouchDataMode(enum.Enum):
    PressureArray = ...
    ForceSummary = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> TouchDataMode: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
@typing.final
class TouchVendor(enum.Enum):
    Unknown = ...
    Pressure = ...

    def __int__(self) -> builtins.int:
        r"""
        Support int(enum) conversion
        """

    def __new__(cls, value: builtins.int) -> TouchVendor: ...
    @property
    def int_value(self) -> builtins.int:
        r"""
        Get the integer value of the enum
        """
def available_usb_ports(vid: builtins.int, pid: builtins.int) -> typing.Any: ...

def close_device_handler(client: DeviceContext) -> typing.Any:
    r"""
    Close device handler and release resources.
    
    This is the counterpart to init_from_detected() and init_device_handler().
    It automatically handles cleanup based on the protocol type:
    - For CANFD: Closes CANFD adapters
    - For Modbus: Closes serial port
    
    Args:
        client: PyDeviceContext to close
    
    Examples:
        ctx = await sdk.init_from_detected(device)
        # ... use ctx ...
        await sdk.close_device_handler(ctx)
    """

def close_socketcan() -> None:
    r"""
    Close SocketCAN device (Linux only)
    """

def close_zqwl() -> None:
    r"""
    Close ZQWL CANFD device
    """

def get_sdk_version() -> builtins.str: ...

def init_device_handler(protocol_type: StarkProtocolType, master_id: builtins.int = 0, slave_id: typing.Optional[builtins.int] = None, hw_type: typing.Optional[StarkHardwareType] = None) -> DeviceContext:
    r"""
    Initialize a new device context with a specified protocol type.
    
    Note: To fully initialize the context, retrieve device details, and synchronize
    the actual joint position limits from the physical device, you should call
    `revo3_get_device_info(slave_id)` on the returned context after connecting.
    
    Args:
        protocol_type: The protocol to use (StarkProtocolType enum)
        master_id: Master ID (default 0)
        slave_id: Optional slave ID
        hw_type: Optional hardware type (avoids calling get_device_info if set)
    
    Returns:
        PyDeviceContext: A new device context object
    """

def init_from_detected(device: DetectedDevice) -> typing.Any:
    r"""
    Initialize device handler from detected device info.
    
    This function initializes the appropriate transport (Modbus, CAN, CANFD)
    based on the detected device's protocol and returns a ready-to-use handler.
    
    This is the recommended way to initialize after `revo3_auto_detect()` as it:
    - Automatically initializes the correct transport (BrainCo/ZQWL/SocketCAN or Modbus)
    - Sets hardware type from detected device info
    - Simplifies the initialization process
    
    Note: Although this function sets the hardware type from the detected info,
    the newly initialized context starts with default joint position limits.
    To synchronize the actual joint position limits from the physical device,
    you should call `revo3_get_device_info(slave_id)` on the returned context.
    
    Args:
        device: DetectedDevice from revo3_auto_detect()
    
    Returns:
        PyDeviceContext: Ready-to-use device context
    
    Raises:
        RuntimeError: If initialization fails
    
    Examples:
        devices = await sdk.revo3_auto_detect()
        if devices:
            ctx = await sdk.init_from_detected(devices[0])
            # Synchronize actual joint position limits from the device
            await ctx.revo3_get_device_info(devices[0].slave_id)
    """

def init_logging(level: typing.Optional[LogLevel] = LogLevel.Info) -> None: ...

def init_socketcan_canfd(iface: typing.Optional[builtins.str] = None) -> None:
    r"""
    Initialize SocketCAN CANFD device (Linux only)
    
    Args:
        iface: Interface name (e.g. "can0"). If None, uses STARK_SOCKETCAN_IFACE env var or "can0"
    
    Raises:
        RuntimeError: Initialization failed or not on Linux
    """

def init_zqwl_canfd(port_name: builtins.str, arb_baudrate: builtins.int = 1000000, data_baudrate: builtins.int = 5000000) -> None:
    r"""
    Initialize ZQWL CANFD device
    
    Revo3 default arbitration baudrate is 1Mbps; data baudrate is 5Mbps.
    
    Args:
        port_name: Serial port name
        arb_baudrate: Arbitration baudrate (bps), default 1000000
        data_baudrate: Data baudrate (bps), default 5000000
    
    Raises:
        RuntimeError: Initialization failed
    """

def is_socketcan_available(iface: builtins.str) -> builtins.bool:
    r"""
    Check if SocketCAN interface is available (Linux only)
    
    Args:
        iface: Interface name (e.g. "can0")
    
    Returns:
        bool: True if interface exists and is up
    """

def list_available_ports() -> typing.Any: ...

def list_zqwl_devices() -> builtins.list[ZqwlDeviceInfo]:
    r"""
    List all ZQWL USB CANFD-capable devices
    
    Returns:
        List[ZqwlDeviceInfo]: List of devices
    """

def modbus_close(client: DeviceContext) -> typing.Any: ...

def modbus_open(port_name: builtins.str, baudrate: Baudrate) -> typing.Any:
    r"""
    Open a Modbus connection to the Stark/Revo3 device.
    
    After successfully opening the connection, it is highly recommended to call
    `revo3_get_device_info(slave_id)` on the returned context. This will read the
    device's serial number, firmware version, and automatically query and cache the
    actual joint position limits from the physical device. Without calling it,
    the context will use the default hardcoded joint limits.
    
    Args:
        port_name: The port name of the serial interface (e.g. "COM3" or "/dev/ttyUSB0")
        baudrate: The communication baudrate (Baudrate enum)
    
    Returns:
        PyDeviceContext: A new device context object
    """

def revo3_auto_detect(scan_all: builtins.bool = False, port: typing.Optional[builtins.str] = None, protocol: typing.Optional[StarkProtocolType] = None, slave_id: typing.Optional[builtins.int] = None, modbus_baudrate: typing.Optional[Baudrate] = None, broadcast: builtins.bool = True) -> typing.Any:
    r"""
    Auto-detect Revo3 devices
    
    Scans for devices across all supported protocols in priority order:
    1. Modbus/RS485 (5/1/2/3 Mbps; IDs 0x7E and 0x7F)
    2. CANFD adapters (BrainCo/ZQWL/SocketCAN)
    
    Args:
        scan_all: If True, scan for all devices. If False, stop at first found. Default False.
        port: Optional port name to scan. If None, scans all available ports.
        protocol: Optional protocol to use (ProtocolType enum). If None, tries all.
        slave_id: Optional slave ID to probe. If None, probes Revo3 default IDs.
        modbus_baudrate: Optional Modbus baudrate to probe. If None, probes default Revo3 baudrates.
        broadcast: If True, probe broadcast slave ID 0 first before default IDs (Modbus only). Default True.
    
    Returns:
        List[DetectedDevice]: List of detected devices (empty if none found)
    
    Examples:
        # Auto-detect (simplest)
        devices = await sdk.revo3_auto_detect()
    
        # Scan all devices
        devices = await sdk.revo3_auto_detect(scan_all=True)
    
        # Scan specific port
        devices = await sdk.revo3_auto_detect(port="/dev/ttyUSB0")
    
        # Scan specific protocol
        devices = await sdk.revo3_auto_detect(protocol=sdk.ProtocolType.CanFd)
    
        # Reconnect by probing one known device
        devices = await sdk.revo3_auto_detect(
            port="/dev/ttyUSB0",
            protocol=sdk.ProtocolType.Modbus,
            slave_id=0x7E,
            modbus_baudrate=sdk.Baudrate.Baud5Mbps,
        )
    """

def revo3_auto_detect_device(port_name: typing.Optional[builtins.str] = None, quick: typing.Optional[builtins.bool] = True) -> typing.Any: ...

def revo3_auto_detect_modbus(port_name: typing.Optional[builtins.str] = None, quick: typing.Optional[builtins.bool] = True) -> typing.Any: ...

def revo3_set_skip_device_info_query(skip: builtins.bool) -> None:
    r"""
    Configure whether to skip querying detailed device info during auto-detection.
    When set to True, a fast probe is performed, directly returning a minimal device structure.
    """

def scan_canfd_devices(ctx: DeviceContext, candidate_ids: typing.Optional[typing.Sequence[builtins.int]] = None, timeout_ms: builtins.int = 500) -> typing.Any:
    r"""
    Scan CANFD bus for devices
    
    Uses Revo3 device-info registers to detect devices.
    
    Args:
        ctx: PyDeviceContext
        candidate_ids: Candidate device ID list, default [1, 2, 0x7E, 0x7F]
        timeout_ms: Timeout in milliseconds, default 500
    
    Returns:
        Optional[int]: Found device ID, None if not found
    """

def set_can_rx_callback(func: typing.Any) -> None:
    r"""
    Set callback for receiving CAN FD frames.
    
    Args:
        func: Callback function to receive CAN FD frames.
    
    Returns:
        None
    """

def set_can_tx_callback(func: typing.Any) -> None:
    r"""
    Set callback for transmitting CAN FD frames.
    
    Args:
        func: Callback function to transmit CAN FD frames.
    
    Returns:
        None
    """

def set_modbus_read_holding_callback(func: typing.Any) -> None:
    r"""
    Set callback for reading Modbus holding registers (FC03).
    
    Args:
        func: Callback function for reading holding registers.
    
    Returns:
        None
    """

def set_modbus_read_input_callback(func: typing.Any) -> None:
    r"""
    Set callback for reading Modbus input registers (FC04).
    
    Args:
        func: Callback function for reading input registers.
    
    Returns:
        None
    """

def set_modbus_write_callback(func: typing.Any) -> None:
    r"""
    Set callback for writing Modbus holding registers (FC16).
    
    Args:
        func: Callback function for writing holding registers.
    
    Returns:
        None
    """

