fastcs.launch#

Members

FastCS

For launching a controller with given transport(s).

get_controller_schema

Gets schema for a give controller for serialisation.

launch

Serves as an entry point for starting FastCS applications.

class fastcs.launch.FastCS(controller: Controller, transport_options: list[EpicsPVAOptions | EpicsCAOptions | TangoOptions | RestOptions | GraphQLOptions])[source]#

For launching a controller with given transport(s).

fastcs.launch.launch(controller_class: type[Controller], version: str | None = None) None[source]#

Serves as an entry point for starting FastCS applications.

By utilizing type hints in a Controller’s __init__ method, this function provides a command-line interface to describe and gather the required configuration before instantiating the application.

Parameters:
  • controller_class (type[Controller]) – The FastCS Controller to instantiate. It must have a type-hinted __init__ method and no more than 2 arguments.

  • version (Optional[str]) – The version of the FastCS Controller. Optional

Raises:

LaunchError – If the class’s __init__ is not as expected

Example of the expected Controller implementation:
class MyController(Controller):
def __init__(self, my_arg: MyControllerOptions) -> None:

Typical usage:
if __name__ == “__main__”:

launch(MyController)

fastcs.launch.get_controller_schema(target: type[Controller]) dict[str, Any][source]#

Gets schema for a give controller for serialisation.