mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-03 13:47:53 -04:00
Modem factory init
This commit is contained in:
parent
a1a6a467e8
commit
e33b8952d4
@ -164,6 +164,14 @@ bool CubicSDR::OnInit() {
|
|||||||
|
|
||||||
wxApp::SetAppName("CubicSDR");
|
wxApp::SetAppName("CubicSDR");
|
||||||
|
|
||||||
|
Modem::addModemFactory("FM", new ModemFM);
|
||||||
|
Modem::addModemFactory("WBFM", new ModemFMStereo);
|
||||||
|
Modem::addModemFactory("AM", new ModemAM);
|
||||||
|
Modem::addModemFactory("LSB", new ModemLSB);
|
||||||
|
Modem::addModemFactory("USB", new ModemUSB);
|
||||||
|
Modem::addModemFactory("DSB", new ModemDSB);
|
||||||
|
Modem::addModemFactory("I/Q", new ModemIQ);
|
||||||
|
|
||||||
frequency = wxGetApp().getConfig()->getCenterFreq();
|
frequency = wxGetApp().getConfig()->getCenterFreq();
|
||||||
offset = 0;
|
offset = 0;
|
||||||
ppm = 0;
|
ppm = 0;
|
||||||
|
@ -27,6 +27,14 @@
|
|||||||
#include "SpectrumVisualProcessor.h"
|
#include "SpectrumVisualProcessor.h"
|
||||||
#include "SpectrumVisualDataThread.h"
|
#include "SpectrumVisualDataThread.h"
|
||||||
#include "SDRDevices.h"
|
#include "SDRDevices.h"
|
||||||
|
#include "Modem.h"
|
||||||
|
#include "ModemFM.h"
|
||||||
|
#include "ModemFMStereo.h"
|
||||||
|
#include "ModemAM.h"
|
||||||
|
#include "ModemUSB.h"
|
||||||
|
#include "ModemLSB.h"
|
||||||
|
#include "ModemDSB.h"
|
||||||
|
#include "ModemIQ.h"
|
||||||
|
|
||||||
#include <wx/cmdline.h>
|
#include <wx/cmdline.h>
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
ModemFactoryList Modem::modemFactories;
|
ModemFactoryList Modem::modemFactories;
|
||||||
|
|
||||||
void Modem::addModemFactory(std::string modemName, ModemFactoryFunc *factoryFunc) {
|
void Modem::addModemFactory(std::string modemName, Modem *factorySingle) {
|
||||||
modemFactories[modemName] = factoryFunc;
|
modemFactories[modemName] = factorySingle;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModemFactoryList Modem::getFactories() {
|
ModemFactoryList Modem::getFactories() {
|
||||||
|
@ -30,12 +30,11 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Modem;
|
class Modem;
|
||||||
typedef Modem *(Modem::*ModemFactoryFunc)();
|
typedef std::map<std::string,Modem *> ModemFactoryList;
|
||||||
typedef std::map<std::string,ModemFactoryFunc *> ModemFactoryList;
|
|
||||||
|
|
||||||
class Modem {
|
class Modem {
|
||||||
public:
|
public:
|
||||||
static void addModemFactory(std::string modemName, ModemFactoryFunc *factoryFunc);
|
static void addModemFactory(std::string modemName, Modem *factorySingle);
|
||||||
static ModemFactoryList getFactories();
|
static ModemFactoryList getFactories();
|
||||||
|
|
||||||
virtual Modem *factory();
|
virtual Modem *factory();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user