Skip to content

[WIP] DataProcessor feedback

Alex Toldaiev requested to merge (removed):devel_DataFeedback into devel

Added a new FeedbackClipboardMap that corresponds to DataProcessors. It allows to aggregate the feedback about from all processing threads to the main loop thread, and decide whether to proceed with the scan iterations based on the received data (number of events processed or trigger tags in them).

  • added the optional void connect(FeedbackClipboard *status_feedback) {} to DataProcessors
  • the scanHelper::buildRawDataProcs takes a FeedbackClipboardMap *fbDataProc, if the Map is not nullptr, it initializes FeedbackClipboards in the Map, and connects them to each processor and connects them to the processors
  • added the optional FeedbackClipboardMap* feedback_dataproc to ScanFactory
  • the (ScanBase) ScanFactory::loadConfig connects the Map pointer to LoopActions, if it is not nullptr, and if the LoopAction inherits the DataProcFeedbackReceiver
  • in the FeedbackBase, added the corresponding struct DataProcFeedbackParams and exteneded struct FeedbackParams with it
  • there are new classes DataProcFeedbackReceiver and DataProcFeedbackSender, which are similar to the Global and Pixel feedback classes

  • the method names/signatures of these classes are different from Global and Pixels feedbacks. The idea is to leave an option for a LoopAction to inherit DataFeedback and others at the same time.

I tested it in a separate branch, but modifying StdDataLoop and StarDataProcessor.

We can also add a feedback Sendar to the trigger thread, that is launched by the NetioTX in the StarTriggerLoop. It will let the StdDataLoop to not join the trigger thread before processing the RX data.

modified:   src/libYarr/FeedbackBase.cpp
modified:   src/libYarr/ScanFactory.cpp
modified:   src/libYarr/ScanHelper.cpp
modified:   src/libYarr/include/DataProcessor.h
modified:   src/libYarr/include/FeedbackBase.h
modified:   src/libYarr/include/ScanFactory.h
modified:   src/libYarr/include/ScanHelper.h
modified:   src/tools/scanConsole.cpp

Merge request reports