fastcs.control_system#

Members

FastCS

Entrypoint for a FastCS application.

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

Entrypoint for a FastCS application.

This class takes one or more `Controller`s, creates asyncio tasks to run their update loops and builds their APIs to serve over the given `Transport`s.

Parameters:
  • controllers – The controller(s) to serve in the control system. Accepts either a single Controller or a sequence of them.

  • 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