2014-10-27 20:05:40 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/wxprec.h"
|
|
|
|
#include "rtl-sdr.h"
|
|
|
|
|
|
|
|
#ifndef WX_PRECOMP
|
|
|
|
#include "wx/wx.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/thread.h"
|
|
|
|
|
2014-11-04 18:39:08 -05:00
|
|
|
#include "SDRThread.h"
|
|
|
|
#include "IQBufferThread.h"
|
2014-11-04 17:25:04 -05:00
|
|
|
#include "SDRThreadQueue.h"
|
2014-10-28 21:39:59 -04:00
|
|
|
|
2014-10-27 20:05:40 -04:00
|
|
|
// declare a new type of event, to be used by our SDRThread class:
|
2014-10-28 21:39:59 -04:00
|
|
|
//wxDECLARE_EVENT(wxEVT_COMMAND_SDRThread_COMPLETED, wxThreadEvent);
|
|
|
|
//wxDECLARE_EVENT(wxEVT_COMMAND_SDRThread_UPDATE, wxThreadEvent);
|
|
|
|
//wxDECLARE_EVENT(wxEVT_COMMAND_SDRThread_INPUT, wxThreadEvent);
|
2014-10-27 20:05:40 -04:00
|
|
|
|
2014-10-28 21:39:59 -04:00
|
|
|
enum {
|
2014-11-04 18:39:08 -05:00
|
|
|
EVENT_SDR_INPUT = wxID_HIGHEST + 1
|
2014-10-28 21:39:59 -04:00
|
|
|
};
|
2014-10-27 20:05:40 -04:00
|
|
|
|
|
|
|
class SDRThread: public wxThread {
|
|
|
|
public:
|
2014-11-04 18:39:08 -05:00
|
|
|
rtlsdr_dev_t *dev;
|
2014-10-27 20:05:40 -04:00
|
|
|
|
2014-11-04 18:39:08 -05:00
|
|
|
SDRThread(SDRThreadQueue* pQueue, int id = 0);
|
|
|
|
~SDRThread();
|
2014-10-27 20:05:40 -04:00
|
|
|
|
2014-11-04 18:39:08 -05:00
|
|
|
void enumerate_rtl();
|
2014-10-27 20:05:40 -04:00
|
|
|
|
|
|
|
protected:
|
2014-11-04 18:39:08 -05:00
|
|
|
virtual ExitCode Entry();
|
|
|
|
uint32_t sample_rate;
|
|
|
|
SDRThreadQueue* m_pQueue;
|
|
|
|
int m_ID;
|
2014-10-27 20:05:40 -04:00
|
|
|
};
|