Controller Module#
SPDX-FileCopyrightText: 2024 DESY and the Constellation authors SPDX-License-Identifier: EUPL-1.2
- class core.controller.BaseController(group: str, **kwargs: Any)#
Bases:
CHIRPBroadcaster
,HeartbeatChecker
Simple controller class to send commands to a Constellation.
- await_state(target: SatelliteState, timeout: int = 60) None #
Blocks until the desired global SatelliteState of the controller satellites is reached.
- command(payload: Any = None, sat: str = '', satcls: str = '', cmd: str = '') Any #
Wrapper for _command_satellite function. Handle sending commands to all hosts
- property constellation: SatelliteArray#
Returns the currently active SatelliteArray of controlled Satellites.
- property state: ControllerState#
Return the global state of all connected Satellite’s state.
Based on heartbeat information.
- property states: dict[str, SatelliteState]#
Return an up-to-date dictionary of connected Satellite’s state.
Based on heartbeat information.
- class core.controller.CommandWrapper(handler: Callable[[str, str, str, Any], Tuple[str, Any, dict[str, Any] | None]], sat: str, satcls: str, cmd: str)#
Bases:
object
Class to wrap command calls.
Allows to mimic the signature of the Satellite command being wrapped.
- class core.controller.ControllerState(*values)#
Bases:
Enum
Global Controller state.
- ERROR = 240#
- INIT = 32#
- NEW = 16#
- ORBIT = 48#
- RUN = 64#
- TRANSITIONING = 85#
- class core.controller.SatelliteArray(group: str, handler: Callable[[str, str, str, Any], Tuple[str, Any, dict[str, Any] | None]])#
Bases:
object
Provide object-oriented control of connected Satellites.
- get_satellite(sat_class: str, sat_name: str) SatelliteCommLink #
Return a link to a Satellite given by its class and name.
- property satellites: dict[str, SatelliteCommLink]#
Return the dict of Satellites names and their SatelliteCommLink.
- class core.controller.SatelliteCommLink(name: str, cls: str)#
Bases:
SatelliteClassCommLink
A link to a Satellite.
- class core.controller.SatelliteResponse#
Bases:
object
Class to hold the response of a Satellite to a CSCP command.