# Generated by sila2.code_generator; sila2.__version__: 0.10.3
# -----
# 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, Optional

    from sila2.client import ClientMetadataInstance, ClientUnobservableProperty
    from simulationcontroller_types import StartRealMode_Responses, StartSimulationMode_Responses


class SimulationControllerClient:
    """
    This Feature provides control over the simulation behaviour of a SiLA Server.

    A SiLA Server can run in two modes:
    (a) Real Mode - with real activities, e.g. addressing or controlling real hardware, e.g. through serial/CANBus commands,
        writing to real databases, moving real objects etc.
    (b) Simulation Mode - where every command is only simulated and responses are just example returns.

    Note that certain commands and properties might not be affected by this feature if they
    do not interact with the real world.
    """

    SimulationMode: ClientUnobservableProperty[bool]
    """
    Indication whether SiLA Server is in Simulation Mode or not.
    """

    def StartSimulationMode(
        self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None
    ) -> StartSimulationMode_Responses:
        """
          Sets the SiLA Server to run in Simulation Mode, i.e. all following commands are executed in simulation mode.

        The Simulation Mode can only be entered, if all hardware operations have been safely terminated
        or are in a controlled, safe state.

        The simulation mode can be stopped by issuing the 'Start Real Mode' command.
        """
        ...

    def StartRealMode(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> StartRealMode_Responses:
        """
          Sets the SiLA Server to run in real mode, i.e. all following commands are executed with real-world
        interactions, like serial port/CAN communication, motor actions etc.

        If the server is in Simulation Mode it can be interrupted at any time. A re-initialization of
        the hardware might be required. The Real Mode can be stopped by issuing the 'Start Simulation Mode' command.
        """
        ...
