pyrcf.components.callback_handlers.base_callbacks ================================================= .. py:module:: pyrcf.components.callback_handlers.base_callbacks Classes ------- .. autoapisummary:: pyrcf.components.callback_handlers.base_callbacks.CustomCallbackBase pyrcf.components.callback_handlers.base_callbacks.RateTriggeredMultiCallbacks Module Contents --------------- .. py:class:: CustomCallbackBase Bases: :py:obj:`abc.ABC` Abstract base class for defining custom callbacks to be executed in the control loop. .. py:method:: run_once() -> None :abstractmethod: To be called in loop. .. py:method:: cleanup() -> None Override if custom cleaning up/shutting down is required. .. py:class:: RateTriggeredMultiCallbacks(gui_callbacks: List[CustomCallbackBase], rate: float = None, clock: pyrcf.utils.time_utils.ClockBase = PythonPerfClock()) Bases: :py:obj:`CustomCallbackBase` Execute multiple `CustomCallbackBase` callbacks at the same specified (max) frequency. .. py:attribute:: _callbacks :type: List[CustomCallbackBase] :value: [] .. py:method:: add_callback(gui_callback: CustomCallbackBase) Add an instance of PbGUISliderCallback or PbMultiGUISliderSingleCallback to the same rate trigger. :param gui_callback: The GUI callback instance to add. :type gui_callback: CustomCallbackBase .. py:method:: run_once() This method has to be called for the slider callbacks to be executed. Will only execute if the trigger rate is met. .. py:method:: cleanup() Override if custom cleaning up/shutting down is required.