2#include "debugtrace.hpp"
9using std::placeholders::_1;
33 std::unique_ptr<SafeQueue> _queue;
35 mutable std::recursive_mutex _mtx;
37 std::atomic<bool> _thread_running{
false};
38 std::atomic<bool> _thread_can_safely_run{
false};
58 void _inCallbackFromInDataHandler(
const DaqData &daqdata);
95template <
typename Derived>
108 return static_cast<Derived*
>(
this)->reset(daq);
112 return static_cast<Derived*
>(
this)->inCallback(data);
Data coming from / going to DAQ. Non-interleaved format, which means data in buffer is ordered by cha...
Base cass for all DAQ (Data Acquisition) interfaces. A DAQ can be a custom device,...
Simple wrapper around BS::thread_pool that makes a BS::thread_pool a singleton, such that a thread po...
Threaded in data handler base. Buffers inCallback data and calls a callback with the same signature o...
void startThread()
This method should be called from the derived class' constructor, to start the thread and data is inc...
~ThreadedInDataHandlerBase()
void stopThread()
This method SHOULD be called from all classes that derive on ThreadedInDataHandler....
A bit of curiously recurring template pattern, to connect the specific handlers and connect the prope...
void _reset(const Daq *daq)
void _inCallback(const DaqData &data)
ThreadedInDataHandler(SmgrHandle mgr)
std::function< void(const Daq *)> InResetType
Function definition for the reset callback.
std::function< void(const DaqData &)> InCallbackType
The function definition of callbacks with incoming DAQ data.
std::shared_ptr< StreamMgr > SmgrHandle
size_t us
We often use boolean values.