concepts.dm.crow.interfaces.controller_interface.CrowSimulationControllerInterface#

class CrowSimulationControllerInterface[source]#

Bases: CrowControllerInterfaceBase

Methods

get_action_counter()

get_crow_state()

Get the state of the simulation interface.

increment_action_counter()

register_controller(name, function)

reset()

reset_action_counter()

restore_context([verbose])

restore_state(state_identifier, **kwargs)

save_state(**kwargs)

step(action, **kwargs)

step_internal(name, *args, **kwargs)

step_with_saved_state(action, **kwargs)

Step with saved state.

step_without_error(action, **kwargs)

Attributes

__init__(executor=None)[source]#
Parameters:

executor (CrowExecutor | None)

__new__(**kwargs)#
get_action_counter()[source]#
Return type:

int

get_crow_state()[source]#

Get the state of the simulation interface.

Return type:

CrowState

increment_action_counter()[source]#
register_controller(name, function)#
Parameters:
reset()#
reset_action_counter()[source]#
restore_context(verbose=False, **kwargs)[source]#
Parameters:

verbose (bool)

restore_state(state_identifier, **kwargs)[source]#
Parameters:

state_identifier (int)

save_state(**kwargs)[source]#
Return type:

int

step(action, **kwargs)#
Parameters:

action (CrowControllerApplier)

Return type:

None

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

name (str)

Return type:

None

step_with_saved_state(action, **kwargs)[source]#

Step with saved state. If the execution fails, return False and the state identifier.

Parameters:

action (CrowControllerApplier) – the action to take.

Returns:

whether the execution is successful. int: the state identifier.

Return type:

bool

step_without_error(action, **kwargs)#
Parameters:

action (CrowControllerApplier)

Return type:

bool

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