pyrcf.components.callback_handlers ================================== .. py:module:: pyrcf.components.callback_handlers .. autoapi-nested-parse:: Defines custom callbacks that can be run in the control loop (pre-step and post-step). Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/pyrcf/components/callback_handlers/base_callbacks/index /autoapi/pyrcf/components/callback_handlers/pb_gui_callbacks/index /autoapi/pyrcf/components/callback_handlers/pb_gui_utils/index Classes ------- .. autoapisummary:: pyrcf.components.callback_handlers.CustomCallbackBase pyrcf.components.callback_handlers.RateTriggeredMultiCallbacks Package 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.