# Generated by sila2.code_generator; sila2.__version__: 0.12.2
# -----
# This class does not do anything useful at runtime. Its only purpose is to provide type annotations.
# Since sphinx does not support .pyi files (yet?), this is a .py file.
# -----

from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:

    from typing import Iterable, List, Optional

    from sila2.client import ClientMetadataInstance, ClientObservableProperty, ClientUnobservableProperty
    from ufcontroller_types import (
        CloseArm_Responses,
        CloseGripper_Responses,
        InitializeArm_Responses,
        MoveJoints_Responses,
        MoveToStoredPosition_Responses,
        OpenGripper_Responses,
        ResetArm_Responses,
        SetManualMode_Responses,
        StorePosition_Responses,
    )


class UFControllerClient:
    """
    This controller is intended to be a SiLA2 compliant controller for Ufactory robot arms.
    """

    ArmIPAddress: ClientUnobservableProperty[str]
    """
    The IP Address of the connected robotic arm.
    """

    JointAngles: ClientObservableProperty[List[float]]
    """
    Return the joint positions to the client.
    """

    GripperPosition: ClientObservableProperty[float]
    """
    Returns the current gripper position.
    """

    JointVelocities: ClientObservableProperty[List[float]]
    """
    Returns the velocities of each joint in real-time.
    """

    def OpenGripper(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> OpenGripper_Responses:
        """
        Open the gripper as far as possible.
        """
        ...

    def CloseGripper(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> CloseGripper_Responses:
        """
        Close the gripper until it encounters a counter force.
        """
        ...

    def InitializeArm(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> InitializeArm_Responses:
        """
        Initialize the robotic arm and set it in a ready state.
        """
        ...

    def CloseArm(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> CloseArm_Responses:
        """
        Safely shut down and disconnect the robotic arm.
        """
        ...

    def ResetArm(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> ResetArm_Responses:
        """
        Resets the arm by closing and reopening the connection.
        """
        ...

    def SetManualMode(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> SetManualMode_Responses:
        """
        Switches the robotic arm to manual control mode.
        """
        ...

    def MoveJoints(
        self, JointAngles: List[float], *, metadata: Optional[Iterable[ClientMetadataInstance]] = None
    ) -> MoveJoints_Responses:
        """
        Move the robot arm to a new position
        """
        ...

    def StorePosition(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> StorePosition_Responses:
        """
        Add the current position to the list of stored positions. Will return the number.
        """
        ...

    def MoveToStoredPosition(
        self, PositionIdentifier: int, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None
    ) -> MoveToStoredPosition_Responses:
        """
        Move the robot arm to a previously stored position
        """
        ...
