fastcs.controllers.controller_api#

Members

ControllerAPI

Attributes, Methods and sub APIs of a Controller to expose in a Transport

class fastcs.controllers.controller_api.ControllerAPI(path: list[str] = <factory>, attributes: dict[str, ~fastcs.attributes.attribute.Attribute] = <factory>, command_methods: dict[str, ~fastcs.methods.command.Command] = <factory>, scan_methods: dict[str, ~fastcs.methods.scan.Scan] = <factory>, sub_apis: dict[str, ~fastcs.controllers.controller_api.ControllerAPI] = <factory>, description: str | None = None)[source]#

Attributes, Methods and sub APIs of a Controller to expose in a Transport

This provides a view of the Attribute s, Method s of a Controller - and its sub controllers - to the Transport layer, without direct access to its internal state.

path: list[str]#

Path within controller tree (empty if this is the root)

attributes: dict[str, Attribute]#

The Attribute s from the Controller

command_methods: dict[str, Command]#

The Command s from the Controller

scan_methods: dict[str, Scan]#

The Scan s from the Controller

sub_apis: dict[str, ControllerAPI]#

The ControllerAPI s of the sub controllers of the Controller

description: str | None = None#

A description to display in the Transport layer

walk_api() Iterator[ControllerAPI][source]#

Walk through all the nested ControllerAPI s of this ControllerAPI.

Yields the ControllerAPI s from a depth-first traversal of the tree, including self.