pyrcf.components.callback_handlers.base_callbacks

Classes

CustomCallbackBase

Abstract base class for defining custom callbacks to be executed in the control loop.

RateTriggeredMultiCallbacks

Execute multiple CustomCallbackBase callbacks at the same specified (max) frequency.

Module Contents

class pyrcf.components.callback_handlers.base_callbacks.CustomCallbackBase

Bases: abc.ABC

Abstract base class for defining custom callbacks to be executed in the control loop.

abstract run_once() None

To be called in loop.

cleanup() None

Override if custom cleaning up/shutting down is required.

class pyrcf.components.callback_handlers.base_callbacks.RateTriggeredMultiCallbacks(gui_callbacks: List[CustomCallbackBase], rate: float = None, clock: pyrcf.utils.time_utils.ClockBase = PythonPerfClock())

Bases: CustomCallbackBase

Execute multiple CustomCallbackBase callbacks at the same specified (max) frequency.

_callbacks: List[CustomCallbackBase] = []
add_callback(gui_callback: CustomCallbackBase)

Add an instance of PbGUISliderCallback or PbMultiGUISliderSingleCallback to the same rate trigger.

Parameters:

gui_callback (CustomCallbackBase) – The GUI callback instance to add.

run_once()

This method has to be called for the slider callbacks to be executed. Will only execute if the trigger rate is met.

cleanup()

Override if custom cleaning up/shutting down is required.