fastcs.control_system#

Members

FastCS

Entrypoint for a FastCS application.

class fastcs.control_system.FastCS(controller: Controller, transports: Sequence[Transport], loop: AbstractEventLoop | None = None)[source]#

Entrypoint for a FastCS application.

This class takes a Controller, creates asyncio tasks to run its update loops and builds its API to serve over the given `Transport`s.

Parameters:
  • controller – The controller to serve in the control system

  • transports – A list of transports to serve the API over

  • loop – Optional event loop to run the control system in

run(interactive: bool = True)[source]#

Run the application

This is a convenience method to call serve in a synchronous context.

Parameters:

interactive – Whether to create an interactive IPython shell

async serve(interactive: bool = True) None[source]#

Serve the control system over the given transports on the current event loop

This is the main entrypoint for a FastCS application. It can be awaited directly, which will block until stopped, or to allow further logic or interaction with the system it can be run as a background task. If doing the latter, generally it should be called with interactive=False for more reliable stdout capture.

To call from a synchronous context, use the run method.

Parameters:

interactive – Whether to create an interactive IPython shell