mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-02 05:07:53 -04:00
digital modem wrap-up and re-connect
- Compiles but untested
This commit is contained in:
parent
001f4ee23b
commit
dfd7496175
@ -164,24 +164,24 @@ bool CubicSDR::OnInit() {
|
|||||||
|
|
||||||
wxApp::SetAppName("CubicSDR");
|
wxApp::SetAppName("CubicSDR");
|
||||||
|
|
||||||
Modem::addModemFactory("FM", new ModemFM);
|
Modem::addModemFactory(new ModemFM);
|
||||||
Modem::addModemFactory("FMS", new ModemFMStereo);
|
Modem::addModemFactory(new ModemFMStereo);
|
||||||
Modem::addModemFactory("AM", new ModemAM);
|
Modem::addModemFactory(new ModemAM);
|
||||||
Modem::addModemFactory("LSB", new ModemLSB);
|
Modem::addModemFactory(new ModemLSB);
|
||||||
Modem::addModemFactory("USB", new ModemUSB);
|
Modem::addModemFactory(new ModemUSB);
|
||||||
Modem::addModemFactory("DSB", new ModemDSB);
|
Modem::addModemFactory(new ModemDSB);
|
||||||
Modem::addModemFactory("I/Q", new ModemIQ);
|
Modem::addModemFactory(new ModemIQ);
|
||||||
|
|
||||||
Modem::addModemFactory("APSK", new ModemAPSK);
|
Modem::addModemFactory(new ModemAPSK);
|
||||||
Modem::addModemFactory("ASK", new ModemASK);
|
Modem::addModemFactory(new ModemASK);
|
||||||
Modem::addModemFactory("BPSK", new ModemBPSK);
|
Modem::addModemFactory(new ModemBPSK);
|
||||||
Modem::addModemFactory("DPSK", new ModemDPSK);
|
Modem::addModemFactory(new ModemDPSK);
|
||||||
Modem::addModemFactory("OOK", new ModemOOK);
|
Modem::addModemFactory(new ModemOOK);
|
||||||
Modem::addModemFactory("PSK", new ModemPSK);
|
Modem::addModemFactory(new ModemPSK);
|
||||||
Modem::addModemFactory("QAM", new ModemQAM);
|
Modem::addModemFactory(new ModemQAM);
|
||||||
Modem::addModemFactory("QPSK", new ModemQPSK);
|
Modem::addModemFactory(new ModemQPSK);
|
||||||
Modem::addModemFactory("SQAM", new ModemSQAM);
|
Modem::addModemFactory(new ModemSQAM);
|
||||||
Modem::addModemFactory("ST", new ModemST);
|
Modem::addModemFactory(new ModemST);
|
||||||
|
|
||||||
frequency = wxGetApp().getConfig()->getCenterFreq();
|
frequency = wxGetApp().getConfig()->getCenterFreq();
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
@ -45,7 +45,6 @@ DemodulatorInstance::DemodulatorInstance() :
|
|||||||
audioThread->setOutputQueue("NotifyQueue", pipeDemodNotify);
|
audioThread->setOutputQueue("NotifyQueue", pipeDemodNotify);
|
||||||
|
|
||||||
currentDemodType = demodulatorPreThread->getParams().demodType;
|
currentDemodType = demodulatorPreThread->getParams().demodType;
|
||||||
currentDemodCons = demodulatorThread->getDemodulatorCons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorInstance::~DemodulatorInstance() {
|
DemodulatorInstance::~DemodulatorInstance() {
|
||||||
@ -75,7 +74,6 @@ void DemodulatorInstance::run() {
|
|||||||
|
|
||||||
currentFrequency = demodulatorPreThread->getParams().frequency;
|
currentFrequency = demodulatorPreThread->getParams().frequency;
|
||||||
currentDemodType = demodulatorPreThread->getParams().demodType;
|
currentDemodType = demodulatorPreThread->getParams().demodType;
|
||||||
currentDemodCons = demodulatorThread->getDemodulatorCons();
|
|
||||||
currentAudioSampleRate = AudioThread::deviceSampleRate[getOutputDevice()];
|
currentAudioSampleRate = AudioThread::deviceSampleRate[getOutputDevice()];
|
||||||
demodulatorPreThread->getParams().audioSampleRate = currentAudioSampleRate;
|
demodulatorPreThread->getParams().audioSampleRate = currentAudioSampleRate;
|
||||||
|
|
||||||
@ -300,19 +298,35 @@ std::string DemodulatorInstance::getDemodulatorType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DemodulatorInstance::setDemodulatorLock(bool demod_lock_in) {
|
void DemodulatorInstance::setDemodulatorLock(bool demod_lock_in) {
|
||||||
demodulatorThread->setDemodulatorLock(demod_lock_in);
|
Modem *cModem = demodulatorPreThread->getModem();
|
||||||
|
if (cModem && cModem->getType() == "digital") {
|
||||||
|
((ModemDigital *)cModem)->setDemodulatorLock(demod_lock_in);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DemodulatorInstance::getDemodulatorLock() {
|
int DemodulatorInstance::getDemodulatorLock() {
|
||||||
return demodulatorThread->getDemodulatorLock();
|
Modem *cModem = demodulatorPreThread->getModem();
|
||||||
|
|
||||||
|
if (cModem && cModem->getType() == "digital") {
|
||||||
|
return ((ModemDigital *)cModem)->getDemodulatorLock();
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DemodulatorInstance::setDemodulatorCons(int demod_cons_in) {
|
void DemodulatorInstance::setDemodulatorCons(int demod_cons_in) {
|
||||||
demodulatorThread->setDemodulatorCons(demod_cons_in);
|
Modem *cModem = demodulatorPreThread->getModem();
|
||||||
|
if (cModem && cModem->getType() == "digital") {
|
||||||
|
((ModemDigital *)cModem)->setDemodulatorCons(demod_cons_in);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DemodulatorInstance::getDemodulatorCons() {
|
int DemodulatorInstance::getDemodulatorCons() {
|
||||||
return demodulatorThread->getDemodulatorCons();
|
Modem *cModem = demodulatorPreThread->getModem();
|
||||||
|
if (cModem && cModem->getType() == "digital") {
|
||||||
|
return ((ModemDigital *)cModem)->getDemodulatorCons();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DemodulatorInstance::setBandwidth(int bw) {
|
void DemodulatorInstance::setBandwidth(int bw) {
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
#include "DemodulatorThread.h"
|
#include "DemodulatorThread.h"
|
||||||
#include "DemodulatorPreThread.h"
|
#include "DemodulatorPreThread.h"
|
||||||
|
|
||||||
|
#include "ModemDigital.h"
|
||||||
|
#include "ModemAnalog.h"
|
||||||
|
|
||||||
class DemodulatorInstance {
|
class DemodulatorInstance {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -112,7 +115,6 @@ private:
|
|||||||
std::atomic_llong currentFrequency;
|
std::atomic_llong currentFrequency;
|
||||||
std::atomic_int currentBandwidth;
|
std::atomic_int currentBandwidth;
|
||||||
std::string currentDemodType;
|
std::string currentDemodType;
|
||||||
std::atomic_int currentDemodCons;
|
|
||||||
std::atomic_int currentOutputDevice;
|
std::atomic_int currentOutputDevice;
|
||||||
std::atomic_int currentAudioSampleRate;
|
std::atomic_int currentAudioSampleRate;
|
||||||
std::atomic<float> currentAudioGain;
|
std::atomic<float> currentAudioGain;
|
||||||
|
@ -284,3 +284,12 @@ void DemodulatorPreThread::terminate() {
|
|||||||
delete workerResults;
|
delete workerResults;
|
||||||
delete workerQueue;
|
delete workerQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Modem *DemodulatorPreThread::getModem() {
|
||||||
|
return cModem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemKit *DemodulatorPreThread::getModemKit() {
|
||||||
|
return cModemKit;
|
||||||
|
}
|
||||||
|
@ -24,12 +24,9 @@ public:
|
|||||||
void initialize();
|
void initialize();
|
||||||
void terminate();
|
void terminate();
|
||||||
|
|
||||||
#ifdef __APPLE__
|
Modem *getModem();
|
||||||
static void *pthread_helper(void *context) {
|
ModemKit *getModemKit();
|
||||||
return ((DemodulatorPreThread *) context)->threadMain();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
msresamp_crcf iqResampler;
|
msresamp_crcf iqResampler;
|
||||||
double iqResampleRatio;
|
double iqResampleRatio;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
ModemFactoryList Modem::modemFactories;
|
ModemFactoryList Modem::modemFactories;
|
||||||
|
|
||||||
void Modem::addModemFactory(std::string modemName, Modem *factorySingle) {
|
void Modem::addModemFactory(Modem *factorySingle) {
|
||||||
modemFactories[modemName] = factorySingle;
|
modemFactories[factorySingle->getName()] = factorySingle;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModemFactoryList Modem::getFactories() {
|
ModemFactoryList Modem::getFactories() {
|
||||||
|
@ -14,7 +14,6 @@ public:
|
|||||||
int audioSampleRate;
|
int audioSampleRate;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class ModemIQData: public ReferenceCounter {
|
class ModemIQData: public ReferenceCounter {
|
||||||
public:
|
public:
|
||||||
std::vector<liquid_float_complex> data;
|
std::vector<liquid_float_complex> data;
|
||||||
@ -34,10 +33,11 @@ typedef std::map<std::string,Modem *> ModemFactoryList;
|
|||||||
|
|
||||||
class Modem {
|
class Modem {
|
||||||
public:
|
public:
|
||||||
static void addModemFactory(std::string modemName, Modem *factorySingle);
|
static void addModemFactory(Modem *factorySingle);
|
||||||
static ModemFactoryList getFactories();
|
static ModemFactoryList getFactories();
|
||||||
static Modem *makeModem(std::string modemType);
|
static Modem *makeModem(std::string modemType);
|
||||||
|
virtual std::string getType() = 0;
|
||||||
|
virtual std::string getName() = 0;
|
||||||
virtual Modem *factory() = 0;
|
virtual Modem *factory() = 0;
|
||||||
|
|
||||||
Modem();
|
Modem();
|
||||||
|
@ -4,6 +4,10 @@ ModemAnalog::ModemAnalog() : aOutputCeil(1), aOutputCeilMA(1), aOutputCeilMAA(1)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemAnalog::getType() {
|
||||||
|
return "analog";
|
||||||
|
}
|
||||||
|
|
||||||
ModemKit *ModemAnalog::buildKit(long long sampleRate, int audioSampleRate) {
|
ModemKit *ModemAnalog::buildKit(long long sampleRate, int audioSampleRate) {
|
||||||
ModemKitAnalog *akit = new ModemKitAnalog;
|
ModemKitAnalog *akit = new ModemKitAnalog;
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ public:
|
|||||||
class ModemAnalog : public Modem {
|
class ModemAnalog : public Modem {
|
||||||
public:
|
public:
|
||||||
ModemAnalog();
|
ModemAnalog();
|
||||||
|
std::string getType();
|
||||||
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
||||||
void disposeKit(ModemKit *kit);
|
void disposeKit(ModemKit *kit);
|
||||||
void initOutputBuffers(ModemKitAnalog *akit, ModemIQData *input);
|
void initOutputBuffers(ModemKitAnalog *akit, ModemIQData *input);
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#include "ModemDigital.h"
|
#include "ModemDigital.h"
|
||||||
|
|
||||||
ModemDigital::ModemDigital() {
|
ModemDigital::ModemDigital() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ModemDigital::getType() {
|
||||||
|
return "digital";
|
||||||
}
|
}
|
||||||
|
|
||||||
ModemKit *ModemDigital::buildKit(long long sampleRate, int audioSampleRate) {
|
ModemKit *ModemDigital::buildKit(long long sampleRate, int audioSampleRate) {
|
||||||
|
@ -12,6 +12,7 @@ public:
|
|||||||
class ModemDigital : public Modem {
|
class ModemDigital : public Modem {
|
||||||
public:
|
public:
|
||||||
ModemDigital();
|
ModemDigital();
|
||||||
|
std::string getType();
|
||||||
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
||||||
void disposeKit(ModemKit *kit);
|
void disposeKit(ModemKit *kit);
|
||||||
void digitalStart(ModemKitDigital *kit, modem mod, ModemIQData *input);
|
void digitalStart(ModemKitDigital *kit, modem mod, ModemIQData *input);
|
||||||
|
@ -8,6 +8,10 @@ Modem *ModemAM::factory() {
|
|||||||
return new ModemAM;
|
return new ModemAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemAM::getName() {
|
||||||
|
return "AM";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemAM::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
void ModemAM::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
||||||
ModemKitAnalog *amkit = (ModemKitAnalog *)kit;
|
ModemKitAnalog *amkit = (ModemKitAnalog *)kit;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
class ModemAM : public ModemAnalog {
|
class ModemAM : public ModemAnalog {
|
||||||
public:
|
public:
|
||||||
ModemAM();
|
ModemAM();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ Modem *ModemDSB::factory() {
|
|||||||
return new ModemDSB;
|
return new ModemDSB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemDSB::getName() {
|
||||||
|
return "DSB";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemDSB::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
void ModemDSB::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
||||||
ModemKitAnalog *amkit = (ModemKitAnalog *)kit;
|
ModemKitAnalog *amkit = (ModemKitAnalog *)kit;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
class ModemDSB : public ModemAnalog {
|
class ModemDSB : public ModemAnalog {
|
||||||
public:
|
public:
|
||||||
ModemDSB();
|
ModemDSB();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ Modem *ModemFM::factory() {
|
|||||||
return new ModemFM;
|
return new ModemFM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemFM::getName() {
|
||||||
|
return "FM";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemFM::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
void ModemFM::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
||||||
ModemKitAnalog *fmkit = (ModemKitAnalog *)kit;
|
ModemKitAnalog *fmkit = (ModemKitAnalog *)kit;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
class ModemFM : public ModemAnalog {
|
class ModemFM : public ModemAnalog {
|
||||||
public:
|
public:
|
||||||
ModemFM();
|
ModemFM();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
|
||||||
|
@ -18,6 +18,14 @@ ModemFMStereo::~ModemFMStereo() {
|
|||||||
nco_crcf_destroy(stereoPilot);
|
nco_crcf_destroy(stereoPilot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemFMStereo::getType() {
|
||||||
|
return "analog";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ModemFMStereo::getName() {
|
||||||
|
return "FMS";
|
||||||
|
}
|
||||||
|
|
||||||
Modem *ModemFMStereo::factory() {
|
Modem *ModemFMStereo::factory() {
|
||||||
return new ModemFMStereo;
|
return new ModemFMStereo;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@ class ModemFMStereo : public Modem {
|
|||||||
public:
|
public:
|
||||||
ModemFMStereo();
|
ModemFMStereo();
|
||||||
~ModemFMStereo();
|
~ModemFMStereo();
|
||||||
|
std::string getType();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
||||||
void disposeKit(ModemKit *kit);
|
void disposeKit(ModemKit *kit);
|
||||||
|
@ -13,6 +13,14 @@ ModemKit *ModemIQ::buildKit(long long sampleRate, int audioSampleRate) {
|
|||||||
return kit;
|
return kit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemIQ::getType() {
|
||||||
|
return "analog";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ModemIQ::getName() {
|
||||||
|
return "I/Q";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemIQ::disposeKit(ModemKit *kit) {
|
void ModemIQ::disposeKit(ModemKit *kit) {
|
||||||
delete kit;
|
delete kit;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
class ModemIQ : public Modem {
|
class ModemIQ : public Modem {
|
||||||
public:
|
public:
|
||||||
ModemIQ();
|
ModemIQ();
|
||||||
|
std::string getType();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
||||||
void disposeKit(ModemKit *kit);
|
void disposeKit(ModemKit *kit);
|
||||||
|
@ -10,6 +10,10 @@ Modem *ModemLSB::factory() {
|
|||||||
return new ModemLSB;
|
return new ModemLSB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemLSB::getName() {
|
||||||
|
return "LSB";
|
||||||
|
}
|
||||||
|
|
||||||
ModemLSB::~ModemLSB() {
|
ModemLSB::~ModemLSB() {
|
||||||
resamp2_crcf_destroy(ssbFilt);
|
resamp2_crcf_destroy(ssbFilt);
|
||||||
ampmodem_destroy(demodAM_LSB);
|
ampmodem_destroy(demodAM_LSB);
|
||||||
|
@ -6,6 +6,7 @@ class ModemLSB : public ModemAnalog {
|
|||||||
public:
|
public:
|
||||||
ModemLSB();
|
ModemLSB();
|
||||||
~ModemLSB();
|
~ModemLSB();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
|
||||||
|
@ -10,6 +10,10 @@ Modem *ModemUSB::factory() {
|
|||||||
return new ModemUSB;
|
return new ModemUSB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemUSB::getName() {
|
||||||
|
return "USB";
|
||||||
|
}
|
||||||
|
|
||||||
ModemUSB::~ModemUSB() {
|
ModemUSB::~ModemUSB() {
|
||||||
resamp2_crcf_destroy(ssbFilt);
|
resamp2_crcf_destroy(ssbFilt);
|
||||||
ampmodem_destroy(demodAM_USB);
|
ampmodem_destroy(demodAM_USB);
|
||||||
|
@ -5,6 +5,7 @@ class ModemUSB : public ModemAnalog {
|
|||||||
public:
|
public:
|
||||||
ModemUSB();
|
ModemUSB();
|
||||||
~ModemUSB();
|
~ModemUSB();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
|
||||||
|
@ -27,6 +27,10 @@ ModemAPSK::~ModemAPSK() {
|
|||||||
modem_destroy(demodAPSK256);
|
modem_destroy(demodAPSK256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemAPSK::getName() {
|
||||||
|
return "APSK";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemAPSK::updateDemodulatorCons(int cons) {
|
void ModemAPSK::updateDemodulatorCons(int cons) {
|
||||||
if (currentDemodCons.load() != cons) {
|
if (currentDemodCons.load() != cons) {
|
||||||
currentDemodCons = cons;
|
currentDemodCons = cons;
|
||||||
|
@ -5,6 +5,7 @@ class ModemAPSK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemAPSK();
|
ModemAPSK();
|
||||||
~ModemAPSK();
|
~ModemAPSK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -29,10 +29,13 @@ ModemASK::~ModemASK() {
|
|||||||
modem_destroy(demodASK256);
|
modem_destroy(demodASK256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemASK::getName() {
|
||||||
|
return "ASK";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemASK::updateDemodulatorCons(int cons) {
|
void ModemASK::updateDemodulatorCons(int cons) {
|
||||||
if (currentDemodCons.load() != cons) {
|
if (currentDemodCons.load() != cons) {
|
||||||
currentDemodCons = cons;
|
currentDemodCons = cons;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ class ModemASK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemASK();
|
ModemASK();
|
||||||
~ModemASK();
|
~ModemASK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -12,6 +12,10 @@ ModemBPSK::~ModemBPSK() {
|
|||||||
modem_destroy(demodBPSK);
|
modem_destroy(demodBPSK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemBPSK::getName() {
|
||||||
|
return "BPSK";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemBPSK::updateDemodulatorCons(int cons) {
|
void ModemBPSK::updateDemodulatorCons(int cons) {
|
||||||
if (currentDemodCons.load() != cons) {
|
if (currentDemodCons.load() != cons) {
|
||||||
currentDemodCons = cons;
|
currentDemodCons = cons;
|
||||||
|
@ -5,6 +5,7 @@ class ModemBPSK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemBPSK();
|
ModemBPSK();
|
||||||
~ModemBPSK();
|
~ModemBPSK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -18,6 +18,10 @@ Modem *ModemDPSK::factory() {
|
|||||||
return new ModemDPSK;
|
return new ModemDPSK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemDPSK::getName() {
|
||||||
|
return "DPSK";
|
||||||
|
}
|
||||||
|
|
||||||
ModemDPSK::~ModemDPSK() {
|
ModemDPSK::~ModemDPSK() {
|
||||||
modem_destroy(demodDPSK2);
|
modem_destroy(demodDPSK2);
|
||||||
modem_destroy(demodDPSK4);
|
modem_destroy(demodDPSK4);
|
||||||
|
@ -5,6 +5,7 @@ class ModemDPSK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemDPSK();
|
ModemDPSK();
|
||||||
~ModemDPSK();
|
~ModemDPSK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -12,6 +12,9 @@ ModemOOK::~ModemOOK() {
|
|||||||
modem_destroy(demodOOK);
|
modem_destroy(demodOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemOOK::getName() {
|
||||||
|
return "OOK";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemOOK::updateDemodulatorCons(int cons) {
|
void ModemOOK::updateDemodulatorCons(int cons) {
|
||||||
if (currentDemodCons.load() != cons) {
|
if (currentDemodCons.load() != cons) {
|
||||||
|
@ -5,6 +5,7 @@ class ModemOOK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemOOK();
|
ModemOOK();
|
||||||
~ModemOOK();
|
~ModemOOK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -18,6 +18,10 @@ Modem *ModemPSK::factory() {
|
|||||||
return new ModemPSK;
|
return new ModemPSK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemPSK::getName() {
|
||||||
|
return "PSK";
|
||||||
|
}
|
||||||
|
|
||||||
ModemPSK::~ModemPSK() {
|
ModemPSK::~ModemPSK() {
|
||||||
modem_destroy(demodPSK2);
|
modem_destroy(demodPSK2);
|
||||||
modem_destroy(demodPSK4);
|
modem_destroy(demodPSK4);
|
||||||
|
@ -5,6 +5,7 @@ class ModemPSK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemPSK();
|
ModemPSK();
|
||||||
~ModemPSK();
|
~ModemPSK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -17,6 +17,10 @@ Modem *ModemQAM::factory() {
|
|||||||
return new ModemQAM;
|
return new ModemQAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemQAM::getName() {
|
||||||
|
return "QAM";
|
||||||
|
}
|
||||||
|
|
||||||
ModemQAM::~ModemQAM() {
|
ModemQAM::~ModemQAM() {
|
||||||
modem_destroy(demodQAM4);
|
modem_destroy(demodQAM4);
|
||||||
modem_destroy(demodQAM8);
|
modem_destroy(demodQAM8);
|
||||||
|
@ -5,6 +5,7 @@ class ModemQAM : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemQAM();
|
ModemQAM();
|
||||||
~ModemQAM();
|
~ModemQAM();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -12,6 +12,10 @@ ModemQPSK::~ModemQPSK() {
|
|||||||
modem_destroy(demodQPSK);
|
modem_destroy(demodQPSK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemQPSK::getName() {
|
||||||
|
return "QPSK";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemQPSK::updateDemodulatorCons(int cons) {
|
void ModemQPSK::updateDemodulatorCons(int cons) {
|
||||||
if (currentDemodCons.load() != cons) {
|
if (currentDemodCons.load() != cons) {
|
||||||
currentDemodCons = cons;
|
currentDemodCons = cons;
|
||||||
|
@ -5,6 +5,7 @@ class ModemQPSK : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemQPSK();
|
ModemQPSK();
|
||||||
~ModemQPSK();
|
~ModemQPSK();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -17,6 +17,10 @@ ModemSQAM::~ModemSQAM() {
|
|||||||
modem_destroy(demodSQAM128);
|
modem_destroy(demodSQAM128);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemSQAM::getName() {
|
||||||
|
return "SQAM";
|
||||||
|
}
|
||||||
|
|
||||||
void ModemSQAM::updateDemodulatorCons(int cons) {
|
void ModemSQAM::updateDemodulatorCons(int cons) {
|
||||||
if (currentDemodCons.load() != cons) {
|
if (currentDemodCons.load() != cons) {
|
||||||
currentDemodCons = cons;
|
currentDemodCons = cons;
|
||||||
|
@ -5,6 +5,7 @@ class ModemSQAM : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemSQAM();
|
ModemSQAM();
|
||||||
~ModemSQAM();
|
~ModemSQAM();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
@ -8,6 +8,10 @@ Modem *ModemST::factory() {
|
|||||||
return new ModemST;
|
return new ModemST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ModemST::getName() {
|
||||||
|
return "ST";
|
||||||
|
}
|
||||||
|
|
||||||
ModemST::~ModemST() {
|
ModemST::~ModemST() {
|
||||||
modem_destroy(demodST);
|
modem_destroy(demodST);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ class ModemST : public ModemDigital {
|
|||||||
public:
|
public:
|
||||||
ModemST();
|
ModemST();
|
||||||
~ModemST();
|
~ModemST();
|
||||||
|
std::string getName();
|
||||||
Modem *factory();
|
Modem *factory();
|
||||||
void updateDemodulatorCons(int cons);
|
void updateDemodulatorCons(int cons);
|
||||||
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user