concepts.dm.crow.interfaces.controller_interface.CrowControllerInterfaceBase#

class CrowControllerInterfaceBase[source]#

Bases: object

The base class for all controller interfaces.

The convention of the controller interface is that it takes a controller name and a list of arguments, and then calls the corresponding controller function with the arguments. If the execution fails, it should raise an exception.

Methods

reflex(controller_name[, reflex_name])

register_controller(name, function)

register_reflex(controller_name, ...[, priority])

reset()

step(action, **kwargs)

step_internal(name, *args, **kwargs)

step_without_error(action, **kwargs)

Attributes

__init__(executor=None, mock=False)[source]#
Parameters:
__new__(**kwargs)#
reflex(controller_name, reflex_name=None)[source]#
Parameters:
register_controller(name, function)[source]#
Parameters:
register_reflex(controller_name, reflex_name, function, priority=10)[source]#
Parameters:
reset()[source]#
step(action, **kwargs)[source]#
Parameters:

action (CrowControllerApplier)

Return type:

bool | None

step_internal(name, *args, **kwargs)[source]#
Parameters:

name (str)

Return type:

bool | None

step_without_error(action, **kwargs)[source]#
Parameters:

action (CrowControllerApplier)

Return type:

bool

property controller_reflexes: Dict[Tuple[str, str], CrowControllerReflex]#
property controllers: Dict[str, Callable]#
property executor: CrowExecutor | None#