Skip to content

Base Processor

BaseProcessor

Base class for data processors.

_worker(self) private

Processor worker function: handles the incoming dataframe and sends the new processed frame to the observers

Source code in multisensor_pipeline/modules/base/base.py
def _worker(self):
    """
    Processor worker function: handles the incoming dataframe and sends the new processed frame to the observers
    """
    while self._active:
        # get incoming frame
        frame = self._queue.get()
        if self._handle_control_message(frame):
            continue
        if self._profiling:
            self._stats.add_frame(frame, MSPModuleStats.Direction.IN)

        new_frame = self.on_update(frame)

        # send processed frame
        self._notify(new_frame)

on_update(self, frame)

Custom update routine.

Source code in multisensor_pipeline/modules/base/base.py
def on_update(self, frame: MSPDataFrame) -> Optional[MSPDataFrame]:
    """ Custom update routine. """
    raise NotImplementedError()