2014-11-29 13:58:20 -05:00
|
|
|
#pragma once
|
|
|
|
|
2015-09-13 22:18:29 -04:00
|
|
|
#if USE_RTL_SDR
|
2014-11-29 13:58:20 -05:00
|
|
|
#include "SDRThread.h"
|
2015-09-13 22:18:29 -04:00
|
|
|
#else
|
|
|
|
#include "SoapySDRThread.h"
|
|
|
|
#endif
|
2014-12-10 21:22:13 -05:00
|
|
|
#include <algorithm>
|
2014-11-29 13:58:20 -05:00
|
|
|
|
2015-07-29 20:57:02 -04:00
|
|
|
class SDRPostThread : public IOThread {
|
2014-11-29 13:58:20 -05:00
|
|
|
public:
|
|
|
|
SDRPostThread();
|
|
|
|
~SDRPostThread();
|
|
|
|
|
2014-12-11 19:07:21 -05:00
|
|
|
void bindDemodulator(DemodulatorInstance *demod);
|
|
|
|
void removeDemodulator(DemodulatorInstance *demod);
|
2014-12-10 21:22:13 -05:00
|
|
|
|
2015-05-31 22:13:14 -04:00
|
|
|
void setSwapIQ(bool swapIQ);
|
|
|
|
bool getSwapIQ();
|
|
|
|
|
2015-07-29 20:57:02 -04:00
|
|
|
void run();
|
2014-11-29 13:58:20 -05:00
|
|
|
void terminate();
|
|
|
|
|
2014-12-11 19:07:21 -05:00
|
|
|
protected:
|
2015-07-30 19:30:46 -04:00
|
|
|
SDRThreadIQDataQueue *iqDataInQueue;
|
|
|
|
DemodulatorThreadInputQueue *iqDataOutQueue;
|
|
|
|
DemodulatorThreadInputQueue *iqVisualQueue;
|
2015-05-31 12:05:45 -04:00
|
|
|
|
|
|
|
std::mutex busy_demod;
|
2014-11-29 13:58:20 -05:00
|
|
|
std::vector<DemodulatorInstance *> demodulators;
|
|
|
|
iirfilt_crcf dcFilter;
|
2015-07-19 23:19:10 -04:00
|
|
|
std::atomic_bool swapIQ;
|
2015-08-11 21:49:42 -04:00
|
|
|
ReBuffer<DemodulatorThreadIQData> visualDataBuffers;
|
|
|
|
|
2015-05-31 22:13:14 -04:00
|
|
|
|
2015-02-03 12:42:44 -05:00
|
|
|
private:
|
|
|
|
std::vector<liquid_float_complex> _lut;
|
2015-05-31 22:13:14 -04:00
|
|
|
std::vector<liquid_float_complex> _lut_swap;
|
2014-11-29 13:58:20 -05:00
|
|
|
};
|