Skip to content

ClipBoard method to wait for data with timeout

Alex Toldaiev requested to merge (removed):devel_ClipBoardWaitTimeout into devel
bool ClipBoard::waitNotEmptyOrDoneOrTimeout(unsigned n_usec)
  • input: number of microseconds for the timeout
  • output: false if it timed out

It waits just like void waitNotEmptyOrDone() or times out if nothing shows up on the ClipBoard.

The data processing feedback mechanism needs the option to time out on feedback ClipBoard, because it does not know how many events are contained in a given RawDataContainer that is pushed for processing:

The container is accumulated from everything that is currently available from the HwController's RxCore. It may be a random number up to the number of expected triggers. I.e. StdDataLoop has no info how many events it pushed for processing. Hence, no info how many times it needs to pop the feedback ClipBoard.

In current tests of the feedback mechanism on strips in SR1:

When StdDataLoop times out on a feedback ClipBoard, it considers that this channel DataProcessor has no more feedback, and continues to other channels. When all available feedback from all channels is received, StdDataLoop makes a decision whether to try another round of polling the RxCore, pushing to DataProcessors and waiting for feedback, or end the scan iteration because all expected triggers have been received or the overall timeout has passed.

modified:   src/libYarr/include/ClipBoard.h
Edited by Alex Toldaiev

Merge request reports