diff --git a/pyobs/interfaces/IMode.py b/pyobs/interfaces/IMode.py index 5739e292..bded942a 100644 --- a/pyobs/interfaces/IMode.py +++ b/pyobs/interfaces/IMode.py @@ -9,21 +9,34 @@ class IMode(Interface, metaclass=ABCMeta): __module__ = "pyobs.interfaces" + async def list_mode_groups(self) -> List[str]: + """List names of mode groups that can be set. The index is used as the `group` parameter in the individual + methods. + + Returns: + List of names of mode groups. + """ + return [] + @abstractmethod - async def list_modes(self, **kwargs: Any) -> List[str]: + async def list_modes(self, group: int = 0, **kwargs: Any) -> List[str]: """List available modes. + Args: + group: Group number + Returns: List of available modes. """ ... @abstractmethod - async def set_mode(self, mode: str, **kwargs: Any) -> None: + async def set_mode(self, mode: str, group: int = 0, **kwargs: Any) -> None: """Set the current mode. Args: mode: Name of mode to set. + group: Group number Raises: ValueError: If an invalid mode was given. @@ -32,9 +45,12 @@ async def set_mode(self, mode: str, **kwargs: Any) -> None: ... @abstractmethod - async def get_mode(self, **kwargs: Any) -> str: + async def get_mode(self, group: int = 0, **kwargs: Any) -> str: """Get currently set mode. + Args: + group: Group number + Returns: Name of currently set mode. """ diff --git a/pyproject.toml b/pyproject.toml index d3411096..8c9aa145 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "pyobs-core" packages = [{ include = "pyobs" }] -version = "1.14.0" +version = "1.15.0" description = "robotic telescope software" authors = ["Tim-Oliver Husser "] license = "MIT"