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-10-28 21:39:59 -04:00
|
|
|
#include "AppFrame.h"
|
|
|
|
|
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 {
|
|
|
|
EVENT_SDR_INPUT = wxID_HIGHEST+1
|
|
|
|
};
|
2014-10-27 20:05:40 -04:00
|
|
|
|
|
|
|
class SDRThread: public wxThread {
|
|
|
|
public:
|
|
|
|
rtlsdr_dev_t *dev;
|
|
|
|
|
2014-10-28 21:39:59 -04:00
|
|
|
SDRThread(AppFrame *appframe);
|
2014-10-27 20:05:40 -04:00
|
|
|
~SDRThread();
|
|
|
|
|
|
|
|
void enumerate_rtl();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ExitCode Entry();
|
2014-10-28 21:39:59 -04:00
|
|
|
AppFrame *frame;
|
2014-10-30 22:51:33 -04:00
|
|
|
uint32_t sample_rate;
|
2014-10-27 20:05:40 -04:00
|
|
|
};
|