
def version() -> str:
    ...

def init() -> None:
    ...

def timestamp() -> int:
    ...

def sleep_ms(ms: int):
    ...

def discover_devices(time: int) -> list[object]:
    ...

def connect(ip: str, simu: bool) -> Robot:
    ...

class Robot:
    def is_connected(self) -> bool:
        ...
    def wait_disconnect(self) -> str:
        ...
    def call(self, method: str, param: str | None) -> str:
        ...
    def subscribe(self, method: str, param:str | None) -> RobotSubscription:
        ...

    def measure_manipulation(self, p: list[float]) -> float:
        ...
    def kinematics_forward(self, p: list[float] | dict[str, float]) -> dict[str, float]:
        ...
    def kinematics_inverse(self, p: list[float] | dict[str, float], refer: list[float] | None) -> list[float]:
        ...
    def pose_trans(self, a: list[float] | dict[str, float], b: list[float] | dict[str, float]) -> dict[str, float]:
        ...
    def pose_add(self, pose: list[float] | dict[str, float], deta: dict[str, float], frame: dict[str, float] | None) -> dict[str, float]:
        ...
    def pose_inverse(self, p: list[float] | dict[str, float]) -> dict[str, float]:
        ...
    def save_pose(self, name: str, pose: list[float] | dict[str, float] | None, dir: str | None, refer: list[float] | None) -> None:
        ...
    def load_pose(self, name: str, dir: str | None, raw_pose: bool | None) -> list[float] | dict[str, float] | None:
        ...
    def load_frame(self, name: str, dir: str | None) -> dict[str, float]:
        ...

    def pause_move(self) -> None:
        ...
    def resume_move(self) -> None:
        ...
    def stop_move(self) -> None:
        ...
    def wait_move(self, id: int | None) -> None:
        ...
    def get_running_motion(self) -> int:
        ...
    def get_motion_state(self, id: int) -> str:
        ...
    def towardj(self, p: list[float] | dict[str, float], a: float, v: float, t: float|None, r: float|None) -> int:
        ...
    def movej(self, p: list[float] | dict[str, float], a: float, v: float, t: float|None, r: float|None) -> int:
        ...
    def movel(self, p: list[float] | dict[str, float], a: float, v: float, t: float|None, r: float|None) -> int:
        ...
    def movec(self, via: list[float] | dict[str, float], p: list[float] | dict[str, float], rad: float, a: float, v: float, t: float|None, r: float|None) -> int:
        ...
    def move_pvat(self, p: list[float], v: list[float], a: list[float], t: float) -> None:
        ...
    def move_pvt(self, p: list[float], v: list[float], t: float) -> None:
        ...
    def move_pt(self, p: list[float], t: float) -> None:
        ...
    def move_trajectory(self, name: str, dir: str | None) -> int:
        ...
    def speedj(self, a: float, v: list[float], t: float|None) -> int:
        ...
    def speedl(self, a: float, v: dict[str, float], t: float|None, frame: dict[str, float]|None) -> int:
        ...
    def teach_mode(self) -> None:
        ...
    def end_teach_mode(self) -> None:
        ...

    def set_dio_mode(self, device: str, pin: int, mode: str) -> None:
        ...
    def get_dio_mode(self, device: str, pin: int) -> str:
        ...
    def set_do(self, device: str, pin: int, value: int) -> None:
        ...
    def get_do(self, device: str, pin: int) -> int:
        ...
    def get_dos(self, device: str, pin: int, num: int) -> list[int]:
        ...
    def get_di(self, device: str, pin: int) -> int:
        ...
    def get_dis(self, device: str, pin: int, num: int) -> list[int]:
        ...
    def set_ao(self, device: str, pin: int, value: float) -> None:
        ...
    def get_ao(self, device: str, pin: int) -> float:
        ...
    def get_aos(self, device: str, pin: int, num: int) -> list[float]:
        ...
    def get_ai(self, device: str, pin: int) -> float:
        ...
    def get_ais(self, device: str, pin: int, num: int) -> list[float]:
        ...

    def set_signal(self, index: int, value: int) -> None:
        ...
    def set_signals(self, index: int, values: list[int]) -> None:
        ...
    def get_signal(self, index: int) -> int:
        ...
    def get_signals(self, index: int, num: int) -> list[int]:
        ...
    def add_signal(self, index: int, value: int) -> None:
        ...

    def set_item(self, key: str, value: str) -> None:
        ...
    def get_item(self, key: str) -> dict[str, str]:
        ...
    def get_items(self, prefix: str) -> list[dict[str, str]]:
        ...

    def run_plugin_cmd(self, name: str, params: list[str]|None) -> object:
        ...
    def start_task(self, scene: str, params: list[str]|None, dir: str|None, is_parallel: bool|None, loop_to:int|None) -> int:
        ...
    def get_task_list(self) -> list[int]:
        ...
    def get_main_task_id(self) -> int|None:
        ...
    def wait_task(self, id: int|None) -> str:
        ...
    def get_task_state(self, id: int|None) -> str:
        ...
    def cancel_task(self, id: int|None) -> None:
        ...
    def pause_task(self, id: int|None) -> None:
        ...
    def resume_task(self, id: int|None) -> None:
        ...

    def set_serial_timeout(self, device: str, timeout: int) -> None:
        ...
    def set_serial_baud_rate(self, device: str, baud_rate: int) -> None:
        ...
    def set_serial_parity(self, device: str, parity: str) -> None:
        ...
    def write_serial(self, device: str, data: list[int]) -> None:
        ...
    def read_serial(self, device: str, len: int) -> list[int]:
        ...

    def disconnect_modbus(self, device: str) -> None:
        ...
    def set_modbus_timeout(self, device: str, timeout: int) -> None:
        ...
    def set_modbus_retry(self, device: str, retry: int) -> None:
        ...
    def write_single_coil(self, device: str, pin: str, value: bool) -> None:
        ...
    def write_multiple_coils(self, device: str, pin: str, values: list[bool]) -> None:
        ...
    def read_coils(self, device: str, pin: str, count: int) -> list[bool]:
        ...
    def read_discrete_inputs(self, device: str, pin: str, count: int) -> list[bool]:
        ...
    def write_single_register(self, device: str, pin: str, value: int) -> None:
        ...
    def write_multiple_registers(self, device: str, pin: str, values: list[int]) -> None:
        ...
    def read_holding_registers(self, device: str, pin: str, count: int) -> list[int]:
        ...
    def read_input_registers(self, device: str, pin: str, count: int) -> list[int]:
        ...

    def init_claw(self, force: bool|None) -> None:
        ...
    def set_claw(self, force: float|None, amplitude: float|None) -> None:
        ...
    def get_claw(self) -> object:
        ...

    def set_flange_baud_rate(self, baud_rate: int) -> None:
        ...

    def load_led_style(self, name: str, dir: str|None) -> object:
        ...
    def set_led_style(self, style: object) -> None:
        ...
    def set_led(self, mode: int, speed: int, colors: list[int]) -> None:
        ...
    def set_voice(self, voice: int, volume: int) -> None:
        ...
    def set_fan(self, mode: int) -> None:
        ...

    def start_sys(self) -> None:
        ...
    def stop_sys(self) -> None:
        ...
    def powerdown(self) -> None:
        ...
    def reboot(self) -> None:
        ...
    def stop(self) -> None:
        ...
    def estop(self) -> None:
        ...

    def set_collision_detector_sensitivity(self, sensitivity: int) -> None:
        ...
    def disable_collision_detector(self) -> None:
        ...
    def enable_collision_detector(self) -> None:
        ...
    def disable_joint_limits(self) -> None:
        ...
    def enable_joint_limits(self) -> None:
        ...

    def find_zero(self) -> None:
        ...

    def load_tcp(self, name: str, dir: str|None) -> dict[str, float]:
        ...
    def set_tcp(self, tcp: dict[str, float]) -> None:
        ...
    def get_tcp(self) -> dict[str, float]:
        ...
    def set_velocity_factor(self, speed_factor: int) -> None:
        ...
    def get_velocity_factor(self) -> int:
        ...

    def get_estop_reason(self) -> str:
        ...
    def get_kin_data(self) -> object:
        ...
    def get_robot_state(self) -> str:
        ...
    def get_phy_data(self) -> object:
        ...

    def load_payload(self, name: str, dir: str|None) -> object:
        ...
    def set_payload(self, mass: float|None, cog: object|None) -> None:
        ...
    def get_payload(self) -> object:
        ...
    def set_gravity(self, pose: object) -> None:
        ...
    def get_gravity(self) -> object:
        ...

    def can_move(self, robot_state: str) -> bool:
        ...
    def in_pose(self, p: list[float] | dict[str, float]) -> bool:
        ...

class RobotSubscription:
    def next(self) -> str | None:
        ...
