fastcs.controllers.controller#
Members
Controller containing Attributes and named sub Controllers |
- class fastcs.controllers.controller.Controller(description: str | None = None, ios: Sequence[AttributeIO[Any, AttributeIORef]] | None = None)[source]#
Controller containing Attributes and named sub Controllers
- async connect() None[source]#
Hook to perform initial connection to device
This should set
_connectedtoTrueif the connection was successful to enable scan tasks.
- async reconnect()[source]#
Hook to reconnect to device after an error
This should set
_connectedtoTrueif the connection was successful to enable scan tasks.If the connection cannot be re-established it should log an error with the reason. It should not raise an exception.
- create_api_and_tasks() tuple[ControllerAPI, list[Callable[[], Coroutine[None, None, None]]], list[Callable[[], Coroutine[None, None, None]]]][source]#
Create api for transports tasks for FastCS backend
- Creates a tuple of
The
ControllerAPIfor this controllerInitial coroutines to be run once on startup
Periodic coroutines to run as background tasks
- Returns:
tuple[ControllerAPI, list[ScanCallback], list[ScanCallback]]