mirror of https://github.com/f4exb/sdrangel.git
RxTx semantic move: renamed DSPDeviceEngine to DSPDeviceSourceEngine
This commit is contained in:
parent
dce0ace4ef
commit
e204efe2b8
|
@ -100,7 +100,7 @@ set(sdrbase_SOURCES
|
||||||
sdrbase/dsp/ctcssdetector.cpp
|
sdrbase/dsp/ctcssdetector.cpp
|
||||||
sdrbase/dsp/dspcommands.cpp
|
sdrbase/dsp/dspcommands.cpp
|
||||||
sdrbase/dsp/dspengine.cpp
|
sdrbase/dsp/dspengine.cpp
|
||||||
sdrbase/dsp/dspdeviceengine.cpp
|
sdrbase/dsp/dspdevicesourceengine.cpp
|
||||||
sdrbase/dsp/fftengine.cpp
|
sdrbase/dsp/fftengine.cpp
|
||||||
sdrbase/dsp/fftfilt.cxx
|
sdrbase/dsp/fftfilt.cxx
|
||||||
sdrbase/dsp/fftwindow.cpp
|
sdrbase/dsp/fftwindow.cpp
|
||||||
|
@ -183,7 +183,7 @@ set(sdrbase_HEADERS
|
||||||
sdrbase/dsp/decimators.h
|
sdrbase/dsp/decimators.h
|
||||||
sdrbase/dsp/dspcommands.h
|
sdrbase/dsp/dspcommands.h
|
||||||
sdrbase/dsp/dspengine.h
|
sdrbase/dsp/dspengine.h
|
||||||
sdrbase/dsp/dspdeviceengine.h
|
sdrbase/dsp/dspdevicesourceengine.h
|
||||||
sdrbase/dsp/dsptypes.h
|
sdrbase/dsp/dsptypes.h
|
||||||
sdrbase/dsp/fftengine.h
|
sdrbase/dsp/fftengine.h
|
||||||
sdrbase/dsp/fftfilt.h
|
sdrbase/dsp/fftfilt.h
|
||||||
|
|
|
@ -1,49 +1,49 @@
|
||||||
#ifndef _FCDPRO_HID_CMD_H_
|
#ifndef _FCDPRO_HID_CMD_H_
|
||||||
#define _FCDPRO_HID_CMD_H_
|
#define _FCDPRO_HID_CMD_H_
|
||||||
|
|
||||||
#define FCDPRO_HID_CMD_GET_IF_RSSI 104 // Returns 1 byte unsigned IF RSSI, -35dBm ~=0, -10dBm ~=70.
|
#define FCDPRO_HID_CMD_GET_IF_RSSI 104 // Returns 1 byte unsigned IF RSSI, -35dBm ~=0, -10dBm ~=70.
|
||||||
#define FCDPRO_HID_CMD_GET_PLL_LOCK 105 // Returns 1 bit, true if locked
|
#define FCDPRO_HID_CMD_GET_PLL_LOCK 105 // Returns 1 bit, true if locked
|
||||||
|
|
||||||
#define FCDPRO_HID_CMD_SET_DC_CORR 106 // Send with 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
#define FCDPRO_HID_CMD_SET_DC_CORR 106 // Send with 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
||||||
#define FCDPRO_HID_CMD_GET_DC_CORR 107 // Returns 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
#define FCDPRO_HID_CMD_GET_DC_CORR 107 // Returns 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value.
|
||||||
#define FCDPRO_HID_CMD_SET_IQ_CORR 108 // Send with 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
#define FCDPRO_HID_CMD_SET_IQ_CORR 108 // Send with 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
||||||
#define FCDPRO_HID_CMD_GET_IQ_CORR 109 // Returns 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
#define FCDPRO_HID_CMD_GET_IQ_CORR 109 // Returns 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain.
|
||||||
|
|
||||||
#define FCDPRO_HID_CMD_SET_LNA_GAIN 110 // Send a 1 byte value, see enums for reference
|
#define FCDPRO_HID_CMD_SET_LNA_GAIN 110 // Send a 1 byte value, see enums for reference
|
||||||
#define FCDPRO_HID_CMD_SET_LNA_ENHANCE 111
|
#define FCDPRO_HID_CMD_SET_LNA_ENHANCE 111
|
||||||
#define FCDPRO_HID_CMD_SET_BAND 112
|
#define FCDPRO_HID_CMD_SET_BAND 112
|
||||||
#define FCDPRO_HID_CMD_SET_RF_FILTER 113
|
#define FCDPRO_HID_CMD_SET_RF_FILTER 113
|
||||||
#define FCDPRO_HID_CMD_SET_MIXER_GAIN 114
|
#define FCDPRO_HID_CMD_SET_MIXER_GAIN 114
|
||||||
#define FCDPRO_HID_CMD_SET_BIAS_CURRENT 115
|
#define FCDPRO_HID_CMD_SET_BIAS_CURRENT 115
|
||||||
#define FCDPRO_HID_CMD_SET_MIXER_FILTER 116
|
#define FCDPRO_HID_CMD_SET_MIXER_FILTER 116
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN1 117
|
#define FCDPRO_HID_CMD_SET_IF_GAIN1 117
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN_MODE 118
|
#define FCDPRO_HID_CMD_SET_IF_GAIN_MODE 118
|
||||||
#define FCDPRO_HID_CMD_SET_IF_RC_FILTER 119
|
#define FCDPRO_HID_CMD_SET_IF_RC_FILTER 119
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN2 120
|
#define FCDPRO_HID_CMD_SET_IF_GAIN2 120
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN3 121
|
#define FCDPRO_HID_CMD_SET_IF_GAIN3 121
|
||||||
#define FCDPRO_HID_CMD_SET_IF_FILTER 122
|
#define FCDPRO_HID_CMD_SET_IF_FILTER 122
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN4 123
|
#define FCDPRO_HID_CMD_SET_IF_GAIN4 123
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN5 124
|
#define FCDPRO_HID_CMD_SET_IF_GAIN5 124
|
||||||
#define FCDPRO_HID_CMD_SET_IF_GAIN6 125
|
#define FCDPRO_HID_CMD_SET_IF_GAIN6 125
|
||||||
|
|
||||||
#define FCDPRO_HID_CMD_GET_LNA_GAIN 150 // Retrieve a 1 byte value, see enums for reference
|
#define FCDPRO_HID_CMD_GET_LNA_GAIN 150 // Retrieve a 1 byte value, see enums for reference
|
||||||
#define FCDPRO_HID_CMD_GET_LNA_ENHANCE 151
|
#define FCDPRO_HID_CMD_GET_LNA_ENHANCE 151
|
||||||
#define FCDPRO_HID_CMD_GET_BAND 152
|
#define FCDPRO_HID_CMD_GET_BAND 152
|
||||||
#define FCDPRO_HID_CMD_GET_RF_FILTER 153
|
#define FCDPRO_HID_CMD_GET_RF_FILTER 153
|
||||||
#define FCDPRO_HID_CMD_GET_MIXER_GAIN 154
|
#define FCDPRO_HID_CMD_GET_MIXER_GAIN 154
|
||||||
#define FCDPRO_HID_CMD_GET_BIAS_CURRENT 155
|
#define FCDPRO_HID_CMD_GET_BIAS_CURRENT 155
|
||||||
#define FCDPRO_HID_CMD_GET_MIXER_FILTER 156
|
#define FCDPRO_HID_CMD_GET_MIXER_FILTER 156
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN1 157
|
#define FCDPRO_HID_CMD_GET_IF_GAIN1 157
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN_MODE 158
|
#define FCDPRO_HID_CMD_GET_IF_GAIN_MODE 158
|
||||||
#define FCDPRO_HID_CMD_GET_IF_RC_FILTER 159
|
#define FCDPRO_HID_CMD_GET_IF_RC_FILTER 159
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN2 160
|
#define FCDPRO_HID_CMD_GET_IF_GAIN2 160
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN3 161
|
#define FCDPRO_HID_CMD_GET_IF_GAIN3 161
|
||||||
#define FCDPRO_HID_CMD_GET_IF_FILTER 162
|
#define FCDPRO_HID_CMD_GET_IF_FILTER 162
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN4 163
|
#define FCDPRO_HID_CMD_GET_IF_GAIN4 163
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN5 164
|
#define FCDPRO_HID_CMD_GET_IF_GAIN5 164
|
||||||
#define FCDPRO_HID_CMD_GET_IF_GAIN6 165
|
#define FCDPRO_HID_CMD_GET_IF_GAIN6 165
|
||||||
|
|
||||||
#define FCDPRO_HID_CMD_I2C_SEND_BYTE 200
|
#define FCDPRO_HID_CMD_I2C_SEND_BYTE 200
|
||||||
#define FCDPRO_HID_CMD_I2C_RECEIVE_BYTE 201
|
#define FCDPRO_HID_CMD_I2C_RECEIVE_BYTE 201
|
||||||
|
|
||||||
#endif // _FCDPRO_HID_CMD_H_
|
#endif // _FCDPRO_HID_CMD_H_
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
#ifndef _FCD_PRO_PLUS_HID_CMD_H_
|
#ifndef _FCD_PRO_PLUS_HID_CMD_H_
|
||||||
#define _FCD_PRO_PLUS_HID_CMD_H_
|
#define _FCD_PRO_PLUS_HID_CMD_H_
|
||||||
|
|
||||||
#define FCDPROPLUS_HID_CMD_SET_LNA_GAIN 110 // Send one byte, 1 on, 0 off
|
#define FCDPROPLUS_HID_CMD_SET_LNA_GAIN 110 // Send one byte, 1 on, 0 off
|
||||||
#define FCDPROPLUS_HID_CMD_SET_RF_FILTER 113 // Send one byte enum, see TUNERRFFILTERENUM
|
#define FCDPROPLUS_HID_CMD_SET_RF_FILTER 113 // Send one byte enum, see TUNERRFFILTERENUM
|
||||||
#define FCDPROPLUS_HID_CMD_SET_MIXER_GAIN 114 // Send one byte, 1 on, 0 off
|
#define FCDPROPLUS_HID_CMD_SET_MIXER_GAIN 114 // Send one byte, 1 on, 0 off
|
||||||
#define FCDPROPLUS_HID_CMD_SET_IF_GAIN 117 // Send one byte value, valid value 0 to 59 (dB)
|
#define FCDPROPLUS_HID_CMD_SET_IF_GAIN 117 // Send one byte value, valid value 0 to 59 (dB)
|
||||||
#define FCDPROPLUS_HID_CMD_SET_IF_FILTER 122 // Send one byte enum, see TUNERIFFILTERENUM
|
#define FCDPROPLUS_HID_CMD_SET_IF_FILTER 122 // Send one byte enum, see TUNERIFFILTERENUM
|
||||||
#define FCDPROPLUS_HID_CMD_SET_BIAS_TEE 126 // Send one byte, 1 on, 0 off
|
#define FCDPROPLUS_HID_CMD_SET_BIAS_TEE 126 // Send one byte, 1 on, 0 off
|
||||||
|
|
||||||
#define FCDPROPLUS_HID_CMD_GET_LNA_GAIN 150 // Returns one byte, 1 on, 0 off
|
#define FCDPROPLUS_HID_CMD_GET_LNA_GAIN 150 // Returns one byte, 1 on, 0 off
|
||||||
#define FCDPROPLUS_HID_CMD_GET_RF_FILTER 153 // Returns one byte enum, see TUNERRFFILTERENUM
|
#define FCDPROPLUS_HID_CMD_GET_RF_FILTER 153 // Returns one byte enum, see TUNERRFFILTERENUM
|
||||||
#define FCDPROPLUS_HID_CMD_GET_MIXER_GAIN 154 // Returns one byte, 1 on, 0 off
|
#define FCDPROPLUS_HID_CMD_GET_MIXER_GAIN 154 // Returns one byte, 1 on, 0 off
|
||||||
#define FCDPROPLUS_HID_CMD_GET_IF_GAIN 157 // Returns one byte value, valid value 0 to 59 (dB)
|
#define FCDPROPLUS_HID_CMD_GET_IF_GAIN 157 // Returns one byte value, valid value 0 to 59 (dB)
|
||||||
#define FCDPROPLUS_HID_CMD_GET_IF_FILTER 162 // Returns one byte enum, see TUNERIFFILTERENUM
|
#define FCDPROPLUS_HID_CMD_GET_IF_FILTER 162 // Returns one byte enum, see TUNERIFFILTERENUM
|
||||||
#define FCDPROPLUS_HID_CMD_GET_BIAS_TEE 166 // Returns one byte, 1 on, 0 off
|
#define FCDPROPLUS_HID_CMD_GET_BIAS_TEE 166 // Returns one byte, 1 on, 0 off
|
||||||
|
|
||||||
#define FCD_RESET 255 // Reset to bootloader
|
#define FCD_RESET 255 // Reset to bootloader
|
||||||
|
|
||||||
#endif // _FCD_PRO_PLUS_HID_CMD_H_
|
#endif // _FCD_PRO_PLUS_HID_CMD_H_
|
||||||
|
|
|
@ -36,7 +36,7 @@ AirspyGui::AirspyGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(0),
|
m_sampleSource(0),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
@ -391,16 +391,16 @@ void AirspyGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -35,7 +35,7 @@ BladerfGui::BladerfGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(NULL),
|
m_sampleSource(NULL),
|
||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
@ -397,16 +397,16 @@ void BladerfGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -33,7 +33,7 @@ FCDProGui::FCDProGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(NULL),
|
m_sampleSource(NULL),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
@ -460,16 +460,16 @@ void FCDProGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -34,7 +34,7 @@ FCDProPlusGui::FCDProPlusGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(NULL),
|
m_sampleSource(NULL),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -220,16 +220,16 @@ void FCDProPlusGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -49,7 +49,7 @@ FileSourceGui::FileSourceGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_samplesCount(0),
|
m_samplesCount(0),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
m_enableNavTime(false),
|
m_enableNavTime(false),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
@ -239,16 +239,16 @@ void FileSourceGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -36,7 +36,7 @@ HackRFGui::HackRFGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(NULL),
|
m_sampleSource(NULL),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
@ -374,16 +374,16 @@ void HackRFGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -34,7 +34,7 @@ RTLSDRGui::RTLSDRGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(0),
|
m_sampleSource(0),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1)
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
@ -357,16 +357,16 @@ void RTLSDRGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -47,7 +47,7 @@ SDRdaemonGui::SDRdaemonGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_sampleSource(NULL),
|
m_sampleSource(NULL),
|
||||||
m_acquisition(false),
|
m_acquisition(false),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1),
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
|
||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_sampleRateStream(0),
|
m_sampleRateStream(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
|
@ -705,16 +705,16 @@ void SDRdaemonGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -47,7 +47,7 @@ SDRdaemonFECGui::SDRdaemonFECGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_sampleSource(NULL),
|
m_sampleSource(NULL),
|
||||||
m_acquisition(false),
|
m_acquisition(false),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1),
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
|
||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
m_framesDecodingStatus(0),
|
m_framesDecodingStatus(0),
|
||||||
|
@ -659,16 +659,16 @@ void SDRdaemonFECGui::updateStatus()
|
||||||
{
|
{
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DSPDeviceEngine::StNotStarted:
|
case DSPDeviceSourceEngine::StNotStarted:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StIdle:
|
case DSPDeviceSourceEngine::StIdle:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StRunning:
|
case DSPDeviceSourceEngine::StRunning:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
break;
|
break;
|
||||||
case DSPDeviceEngine::StError:
|
case DSPDeviceSourceEngine::StError:
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,49 +1,49 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
||||||
// written by Christian Daniel //
|
// written by Christian Daniel //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
// //
|
// //
|
||||||
// This program is distributed in the hope that it will be useful, //
|
// This program is distributed in the hope that it will be useful, //
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
// GNU General Public License V3 for more details. //
|
// GNU General Public License V3 for more details. //
|
||||||
// //
|
// //
|
||||||
// You should have received a copy of the GNU General Public License //
|
// You should have received a copy of the GNU General Public License //
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef INCLUDE_AUDIODEVICEINFO_H
|
#ifndef INCLUDE_AUDIODEVICEINFO_H
|
||||||
#define INCLUDE_AUDIODEVICEINFO_H
|
#define INCLUDE_AUDIODEVICEINFO_H
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
|
|
||||||
class SDRANGEL_API AudioDeviceInfo {
|
class SDRANGEL_API AudioDeviceInfo {
|
||||||
public:
|
public:
|
||||||
struct Device {
|
struct Device {
|
||||||
QString name;
|
QString name;
|
||||||
QString api;
|
QString api;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
Device(const QString& _name, const QString& _api, int _id) :
|
Device(const QString& _name, const QString& _api, int _id) :
|
||||||
name(_name),
|
name(_name),
|
||||||
api(_api),
|
api(_api),
|
||||||
id(_id)
|
id(_id)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
typedef QList<Device> Devices;
|
typedef QList<Device> Devices;
|
||||||
|
|
||||||
AudioDeviceInfo();
|
AudioDeviceInfo();
|
||||||
|
|
||||||
int match(const QString& api, const QString device) const;
|
int match(const QString& api, const QString device) const;
|
||||||
|
|
||||||
const Devices& getDevices() const { return m_devices; }
|
const Devices& getDevices() const { return m_devices; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Devices m_devices;
|
Devices m_devices;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_AUDIODEVICEINFO_H
|
#endif // INCLUDE_AUDIODEVICEINFO_H
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
DeviceAPI::DeviceAPI(MainWindow *mainWindow,
|
DeviceAPI::DeviceAPI(MainWindow *mainWindow,
|
||||||
int deviceTabIndex,
|
int deviceTabIndex,
|
||||||
DSPDeviceEngine *deviceEngine,
|
DSPDeviceSourceEngine *deviceEngine,
|
||||||
GLSpectrum *glSpectrum,
|
GLSpectrum *glSpectrum,
|
||||||
ChannelWindow *channelWindow) :
|
ChannelWindow *channelWindow) :
|
||||||
m_mainWindow(mainWindow),
|
m_mainWindow(mainWindow),
|
||||||
|
@ -82,7 +82,7 @@ void DeviceAPI::stopAcquisition()
|
||||||
m_deviceEngine->stopAcquistion();
|
m_deviceEngine->stopAcquistion();
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine::State DeviceAPI::state() const
|
DSPDeviceSourceEngine::State DeviceAPI::state() const
|
||||||
{
|
{
|
||||||
return m_deviceEngine->state();
|
return m_deviceEngine->state();
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include "../dsp/dspdevicesourceengine.h"
|
||||||
|
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
#include "dsp/dspdeviceengine.h"
|
|
||||||
|
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class DSPDeviceEngine;
|
class DSPDeviceSourceEngine;
|
||||||
class GLSpectrum;
|
class GLSpectrum;
|
||||||
class ChannelWindow;
|
class ChannelWindow;
|
||||||
class BasebandSampleSink;
|
class BasebandSampleSink;
|
||||||
|
@ -51,7 +51,7 @@ public:
|
||||||
bool initAcquisition(); //!< Initialize device engine acquisition sequence
|
bool initAcquisition(); //!< Initialize device engine acquisition sequence
|
||||||
bool startAcquisition(); //!< Start device engine acquisition sequence
|
bool startAcquisition(); //!< Start device engine acquisition sequence
|
||||||
void stopAcquisition(); //!< Stop device engine acquisition sequence
|
void stopAcquisition(); //!< Stop device engine acquisition sequence
|
||||||
DSPDeviceEngine::State state() const; //!< device engine state
|
DSPDeviceSourceEngine::State state() const; //!< device engine state
|
||||||
QString errorMessage(); //!< Return the current device engine error message
|
QString errorMessage(); //!< Return the current device engine error message
|
||||||
uint getDeviceUID() const; //!< Return the current device engine unique ID
|
uint getDeviceUID() const; //!< Return the current device engine unique ID
|
||||||
MessageQueue *getDeviceInputMessageQueue();
|
MessageQueue *getDeviceInputMessageQueue();
|
||||||
|
@ -105,7 +105,7 @@ protected:
|
||||||
|
|
||||||
DeviceAPI(MainWindow *mainWindow,
|
DeviceAPI(MainWindow *mainWindow,
|
||||||
int deviceTabIndex,
|
int deviceTabIndex,
|
||||||
DSPDeviceEngine *deviceEngine,
|
DSPDeviceSourceEngine *deviceEngine,
|
||||||
GLSpectrum *glSpectrum,
|
GLSpectrum *glSpectrum,
|
||||||
ChannelWindow *channelWindow);
|
ChannelWindow *channelWindow);
|
||||||
~DeviceAPI();
|
~DeviceAPI();
|
||||||
|
@ -114,7 +114,7 @@ protected:
|
||||||
|
|
||||||
MainWindow *m_mainWindow;
|
MainWindow *m_mainWindow;
|
||||||
int m_deviceTabIndex;
|
int m_deviceTabIndex;
|
||||||
DSPDeviceEngine *m_deviceEngine;
|
DSPDeviceSourceEngine *m_deviceEngine;
|
||||||
GLSpectrum *m_spectrum;
|
GLSpectrum *m_spectrum;
|
||||||
ChannelWindow *m_channelWindow;
|
ChannelWindow *m_channelWindow;
|
||||||
|
|
||||||
|
|
|
@ -15,17 +15,18 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "dspdevicesourceengine.h"
|
||||||
|
|
||||||
#include <dsp/basebandsamplesink.h>
|
#include <dsp/basebandsamplesink.h>
|
||||||
#include <dsp/devicesamplesource.h>
|
#include <dsp/devicesamplesource.h>
|
||||||
#include <dsp/downchannelizer.h>
|
#include <dsp/downchannelizer.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "dsp/dspdeviceengine.h"
|
|
||||||
#include "dsp/samplefifo.h"
|
#include "dsp/samplefifo.h"
|
||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
#include "threadedbasebandsamplesink.h"
|
#include "threadedbasebandsamplesink.h"
|
||||||
|
|
||||||
DSPDeviceEngine::DSPDeviceEngine(uint uid, QObject* parent) :
|
DSPDeviceSourceEngine::DSPDeviceSourceEngine(uint uid, QObject* parent) :
|
||||||
m_uid(uid),
|
m_uid(uid),
|
||||||
QThread(parent),
|
QThread(parent),
|
||||||
m_state(StNotStarted),
|
m_state(StNotStarted),
|
||||||
|
@ -48,12 +49,12 @@ DSPDeviceEngine::DSPDeviceEngine(uint uid, QObject* parent) :
|
||||||
moveToThread(this);
|
moveToThread(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine::~DSPDeviceEngine()
|
DSPDeviceSourceEngine::~DSPDeviceSourceEngine()
|
||||||
{
|
{
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::run()
|
void DSPDeviceSourceEngine::run()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::run";
|
qDebug() << "DSPDeviceEngine::run";
|
||||||
|
|
||||||
|
@ -63,20 +64,20 @@ void DSPDeviceEngine::run()
|
||||||
exec();
|
exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::start()
|
void DSPDeviceSourceEngine::start()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::start";
|
qDebug() << "DSPDeviceEngine::start";
|
||||||
QThread::start();
|
QThread::start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::stop()
|
void DSPDeviceSourceEngine::stop()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::stop";
|
qDebug() << "DSPDeviceEngine::stop";
|
||||||
DSPExit cmd;
|
DSPExit cmd;
|
||||||
m_syncMessenger.sendWait(cmd);
|
m_syncMessenger.sendWait(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DSPDeviceEngine::initAcquisition()
|
bool DSPDeviceSourceEngine::initAcquisition()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::initAcquisition";
|
qDebug() << "DSPDeviceEngine::initAcquisition";
|
||||||
DSPAcquisitionInit cmd;
|
DSPAcquisitionInit cmd;
|
||||||
|
@ -84,7 +85,7 @@ bool DSPDeviceEngine::initAcquisition()
|
||||||
return m_syncMessenger.sendWait(cmd) == StReady;
|
return m_syncMessenger.sendWait(cmd) == StReady;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DSPDeviceEngine::startAcquisition()
|
bool DSPDeviceSourceEngine::startAcquisition()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::startAcquisition";
|
qDebug() << "DSPDeviceEngine::startAcquisition";
|
||||||
DSPAcquisitionStart cmd;
|
DSPAcquisitionStart cmd;
|
||||||
|
@ -92,7 +93,7 @@ bool DSPDeviceEngine::startAcquisition()
|
||||||
return m_syncMessenger.sendWait(cmd) == StRunning;
|
return m_syncMessenger.sendWait(cmd) == StRunning;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::stopAcquistion()
|
void DSPDeviceSourceEngine::stopAcquistion()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::stopAcquistion";
|
qDebug() << "DSPDeviceEngine::stopAcquistion";
|
||||||
DSPAcquisitionStop cmd;
|
DSPAcquisitionStop cmd;
|
||||||
|
@ -105,55 +106,55 @@ void DSPDeviceEngine::stopAcquistion()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::setSource(DeviceSampleSource* source)
|
void DSPDeviceSourceEngine::setSource(DeviceSampleSource* source)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::setSource";
|
qDebug() << "DSPDeviceEngine::setSource";
|
||||||
DSPSetSource cmd(source);
|
DSPSetSource cmd(source);
|
||||||
m_syncMessenger.sendWait(cmd);
|
m_syncMessenger.sendWait(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::setSourceSequence(int sequence)
|
void DSPDeviceSourceEngine::setSourceSequence(int sequence)
|
||||||
{
|
{
|
||||||
qDebug("DSPDeviceEngine::setSourceSequence: seq: %d", sequence);
|
qDebug("DSPDeviceEngine::setSourceSequence: seq: %d", sequence);
|
||||||
m_sampleSourceSequence = sequence;
|
m_sampleSourceSequence = sequence;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::addSink(BasebandSampleSink* sink)
|
void DSPDeviceSourceEngine::addSink(BasebandSampleSink* sink)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::addSink: " << sink->objectName().toStdString().c_str();
|
qDebug() << "DSPDeviceEngine::addSink: " << sink->objectName().toStdString().c_str();
|
||||||
DSPAddSink cmd(sink);
|
DSPAddSink cmd(sink);
|
||||||
m_syncMessenger.sendWait(cmd);
|
m_syncMessenger.sendWait(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::removeSink(BasebandSampleSink* sink)
|
void DSPDeviceSourceEngine::removeSink(BasebandSampleSink* sink)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::removeSink: " << sink->objectName().toStdString().c_str();
|
qDebug() << "DSPDeviceEngine::removeSink: " << sink->objectName().toStdString().c_str();
|
||||||
DSPRemoveSink cmd(sink);
|
DSPRemoveSink cmd(sink);
|
||||||
m_syncMessenger.sendWait(cmd);
|
m_syncMessenger.sendWait(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::addThreadedSink(ThreadedBasebandSampleSink* sink)
|
void DSPDeviceSourceEngine::addThreadedSink(ThreadedBasebandSampleSink* sink)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::addThreadedSink: " << sink->objectName().toStdString().c_str();
|
qDebug() << "DSPDeviceEngine::addThreadedSink: " << sink->objectName().toStdString().c_str();
|
||||||
DSPAddThreadedSampleSink cmd(sink);
|
DSPAddThreadedSampleSink cmd(sink);
|
||||||
m_syncMessenger.sendWait(cmd);
|
m_syncMessenger.sendWait(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::removeThreadedSink(ThreadedBasebandSampleSink* sink)
|
void DSPDeviceSourceEngine::removeThreadedSink(ThreadedBasebandSampleSink* sink)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::removeThreadedSink: " << sink->objectName().toStdString().c_str();
|
qDebug() << "DSPDeviceEngine::removeThreadedSink: " << sink->objectName().toStdString().c_str();
|
||||||
DSPRemoveThreadedSampleSink cmd(sink);
|
DSPRemoveThreadedSampleSink cmd(sink);
|
||||||
m_syncMessenger.sendWait(cmd);
|
m_syncMessenger.sendWait(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection)
|
void DSPDeviceSourceEngine::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::configureCorrections";
|
qDebug() << "DSPDeviceEngine::configureCorrections";
|
||||||
DSPConfigureCorrection* cmd = new DSPConfigureCorrection(dcOffsetCorrection, iqImbalanceCorrection);
|
DSPConfigureCorrection* cmd = new DSPConfigureCorrection(dcOffsetCorrection, iqImbalanceCorrection);
|
||||||
m_inputMessageQueue.push(cmd);
|
m_inputMessageQueue.push(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DSPDeviceEngine::errorMessage()
|
QString DSPDeviceSourceEngine::errorMessage()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::errorMessage";
|
qDebug() << "DSPDeviceEngine::errorMessage";
|
||||||
DSPGetErrorMessage cmd;
|
DSPGetErrorMessage cmd;
|
||||||
|
@ -161,7 +162,7 @@ QString DSPDeviceEngine::errorMessage()
|
||||||
return cmd.getErrorMessage();
|
return cmd.getErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DSPDeviceEngine::sourceDeviceDescription()
|
QString DSPDeviceSourceEngine::sourceDeviceDescription()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::sourceDeviceDescription";
|
qDebug() << "DSPDeviceEngine::sourceDeviceDescription";
|
||||||
DSPGetSourceDeviceDescription cmd;
|
DSPGetSourceDeviceDescription cmd;
|
||||||
|
@ -169,7 +170,7 @@ QString DSPDeviceEngine::sourceDeviceDescription()
|
||||||
return cmd.getDeviceDescription();
|
return cmd.getDeviceDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::dcOffset(SampleVector::iterator begin, SampleVector::iterator end)
|
void DSPDeviceSourceEngine::dcOffset(SampleVector::iterator begin, SampleVector::iterator end)
|
||||||
{
|
{
|
||||||
double count;
|
double count;
|
||||||
int io = 0;
|
int io = 0;
|
||||||
|
@ -190,7 +191,7 @@ void DSPDeviceEngine::dcOffset(SampleVector::iterator begin, SampleVector::itera
|
||||||
m_qOffset = (15.0 * m_qOffset + (double)qo / count) / 16.0;
|
m_qOffset = (15.0 * m_qOffset + (double)qo / count) / 16.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::imbalance(SampleVector::iterator begin, SampleVector::iterator end)
|
void DSPDeviceSourceEngine::imbalance(SampleVector::iterator begin, SampleVector::iterator end)
|
||||||
{
|
{
|
||||||
int iMin = 0;
|
int iMin = 0;
|
||||||
int iMax = 0;
|
int iMax = 0;
|
||||||
|
@ -239,7 +240,7 @@ void DSPDeviceEngine::imbalance(SampleVector::iterator begin, SampleVector::iter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::work()
|
void DSPDeviceSourceEngine::work()
|
||||||
{
|
{
|
||||||
SampleFifo* sampleFifo = m_sampleSource->getSampleFifo();
|
SampleFifo* sampleFifo = m_sampleSource->getSampleFifo();
|
||||||
std::size_t samplesDone = 0;
|
std::size_t samplesDone = 0;
|
||||||
|
@ -318,7 +319,7 @@ void DSPDeviceEngine::work()
|
||||||
// ^ |
|
// ^ |
|
||||||
// +-----------------------+
|
// +-----------------------+
|
||||||
|
|
||||||
DSPDeviceEngine::State DSPDeviceEngine::gotoIdle()
|
DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoIdle()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::gotoIdle";
|
qDebug() << "DSPDeviceEngine::gotoIdle";
|
||||||
|
|
||||||
|
@ -354,7 +355,7 @@ DSPDeviceEngine::State DSPDeviceEngine::gotoIdle()
|
||||||
return StIdle;
|
return StIdle;
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine::State DSPDeviceEngine::gotoInit()
|
DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoInit()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::gotoInit";
|
qDebug() << "DSPDeviceEngine::gotoInit";
|
||||||
|
|
||||||
|
@ -415,7 +416,7 @@ DSPDeviceEngine::State DSPDeviceEngine::gotoInit()
|
||||||
return StReady;
|
return StReady;
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine::State DSPDeviceEngine::gotoRunning()
|
DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoRunning()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::gotoRunning";
|
qDebug() << "DSPDeviceEngine::gotoRunning";
|
||||||
|
|
||||||
|
@ -465,7 +466,7 @@ DSPDeviceEngine::State DSPDeviceEngine::gotoRunning()
|
||||||
return StRunning;
|
return StRunning;
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine::State DSPDeviceEngine::gotoError(const QString& errorMessage)
|
DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoError(const QString& errorMessage)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::gotoError";
|
qDebug() << "DSPDeviceEngine::gotoError";
|
||||||
|
|
||||||
|
@ -475,7 +476,7 @@ DSPDeviceEngine::State DSPDeviceEngine::gotoError(const QString& errorMessage)
|
||||||
return StError;
|
return StError;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::handleSetSource(DeviceSampleSource* source)
|
void DSPDeviceSourceEngine::handleSetSource(DeviceSampleSource* source)
|
||||||
{
|
{
|
||||||
gotoIdle();
|
gotoIdle();
|
||||||
|
|
||||||
|
@ -497,7 +498,7 @@ void DSPDeviceEngine::handleSetSource(DeviceSampleSource* source)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::handleData()
|
void DSPDeviceSourceEngine::handleData()
|
||||||
{
|
{
|
||||||
if(m_state == StRunning)
|
if(m_state == StRunning)
|
||||||
{
|
{
|
||||||
|
@ -505,7 +506,7 @@ void DSPDeviceEngine::handleData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::handleSynchronousMessages()
|
void DSPDeviceSourceEngine::handleSynchronousMessages()
|
||||||
{
|
{
|
||||||
Message *message = m_syncMessenger.getMessage();
|
Message *message = m_syncMessenger.getMessage();
|
||||||
qDebug() << "DSPDeviceEngine::handleSynchronousMessages: " << message->getIdentifier();
|
qDebug() << "DSPDeviceEngine::handleSynchronousMessages: " << message->getIdentifier();
|
||||||
|
@ -576,7 +577,7 @@ void DSPDeviceEngine::handleSynchronousMessages()
|
||||||
m_syncMessenger.done(m_state);
|
m_syncMessenger.done(m_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPDeviceEngine::handleInputMessages()
|
void DSPDeviceSourceEngine::handleInputMessages()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceEngine::handleInputMessages";
|
qDebug() << "DSPDeviceEngine::handleInputMessages";
|
||||||
|
|
|
@ -33,7 +33,7 @@ class DeviceSampleSource;
|
||||||
class BasebandSampleSink;
|
class BasebandSampleSink;
|
||||||
class ThreadedBasebandSampleSink;
|
class ThreadedBasebandSampleSink;
|
||||||
|
|
||||||
class SDRANGEL_API DSPDeviceEngine : public QThread {
|
class SDRANGEL_API DSPDeviceSourceEngine : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -45,8 +45,8 @@ public:
|
||||||
StError //!< engine is in error
|
StError //!< engine is in error
|
||||||
};
|
};
|
||||||
|
|
||||||
DSPDeviceEngine(uint uid, QObject* parent = NULL);
|
DSPDeviceSourceEngine(uint uid, QObject* parent = NULL);
|
||||||
~DSPDeviceEngine();
|
~DSPDeviceSourceEngine();
|
||||||
|
|
||||||
uint getUID() const { return m_uid; }
|
uint getUID() const { return m_uid; }
|
||||||
|
|
|
@ -28,7 +28,7 @@ DSPEngine::DSPEngine() :
|
||||||
|
|
||||||
DSPEngine::~DSPEngine()
|
DSPEngine::~DSPEngine()
|
||||||
{
|
{
|
||||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
std::vector<DSPDeviceSourceEngine*>::iterator it = m_deviceEngines.begin();
|
||||||
|
|
||||||
while (it != m_deviceEngines.end())
|
while (it != m_deviceEngines.end())
|
||||||
{
|
{
|
||||||
|
@ -43,9 +43,9 @@ DSPEngine *DSPEngine::instance()
|
||||||
return dspEngine;
|
return dspEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine *DSPEngine::addDeviceEngine()
|
DSPDeviceSourceEngine *DSPEngine::addDeviceEngine()
|
||||||
{
|
{
|
||||||
m_deviceEngines.push_back(new DSPDeviceEngine(m_deviceEnginesUIDSequence));
|
m_deviceEngines.push_back(new DSPDeviceSourceEngine(m_deviceEnginesUIDSequence));
|
||||||
m_deviceEnginesUIDSequence++;
|
m_deviceEnginesUIDSequence++;
|
||||||
return m_deviceEngines.back();
|
return m_deviceEngines.back();
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ void DSPEngine::removeLastDeviceEngine()
|
||||||
{
|
{
|
||||||
if (m_deviceEngines.size() > 0)
|
if (m_deviceEngines.size() > 0)
|
||||||
{
|
{
|
||||||
DSPDeviceEngine *lastDeviceEngine = m_deviceEngines.back();
|
DSPDeviceSourceEngine *lastDeviceEngine = m_deviceEngines.back();
|
||||||
delete lastDeviceEngine;
|
delete lastDeviceEngine;
|
||||||
m_deviceEngines.pop_back();
|
m_deviceEngines.pop_back();
|
||||||
m_deviceEnginesUIDSequence--;
|
m_deviceEnginesUIDSequence--;
|
||||||
|
@ -63,7 +63,7 @@ void DSPEngine::removeLastDeviceEngine()
|
||||||
|
|
||||||
void DSPEngine::stopAllAcquisitions()
|
void DSPEngine::stopAllAcquisitions()
|
||||||
{
|
{
|
||||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
std::vector<DSPDeviceSourceEngine*>::iterator it = m_deviceEngines.begin();
|
||||||
|
|
||||||
while (it != m_deviceEngines.end())
|
while (it != m_deviceEngines.end())
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ void DSPEngine::stopAllAcquisitions()
|
||||||
|
|
||||||
void DSPEngine::stopAllDeviceEngines()
|
void DSPEngine::stopAllDeviceEngines()
|
||||||
{
|
{
|
||||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
std::vector<DSPDeviceSourceEngine*>::iterator it = m_deviceEngines.begin();
|
||||||
|
|
||||||
while (it != m_deviceEngines.end())
|
while (it != m_deviceEngines.end())
|
||||||
{
|
{
|
||||||
|
@ -118,9 +118,9 @@ void DSPEngine::removeAudioSink(AudioFifo* audioFifo)
|
||||||
m_audioOutput.removeFifo(audioFifo);
|
m_audioOutput.removeFifo(audioFifo);
|
||||||
}
|
}
|
||||||
|
|
||||||
DSPDeviceEngine *DSPEngine::getDeviceEngineByUID(uint uid)
|
DSPDeviceSourceEngine *DSPEngine::getDeviceEngineByUID(uint uid)
|
||||||
{
|
{
|
||||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
std::vector<DSPDeviceSourceEngine*>::iterator it = m_deviceEngines.begin();
|
||||||
|
|
||||||
while (it != m_deviceEngines.end())
|
while (it != m_deviceEngines.end())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,97 +1,97 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2015 F4EXB //
|
// Copyright (C) 2015 F4EXB //
|
||||||
// written by Edouard Griffiths //
|
// written by Edouard Griffiths //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
// //
|
// //
|
||||||
// This program is distributed in the hope that it will be useful, //
|
// This program is distributed in the hope that it will be useful, //
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
// GNU General Public License V3 for more details. //
|
// GNU General Public License V3 for more details. //
|
||||||
// //
|
// //
|
||||||
// You should have received a copy of the GNU General Public License //
|
// You should have received a copy of the GNU General Public License //
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef INCLUDE_DSPENGINE_H
|
#ifndef INCLUDE_DSPENGINE_H
|
||||||
#define INCLUDE_DSPENGINE_H
|
#define INCLUDE_DSPENGINE_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "dsp/dspdeviceengine.h"
|
#include "audio/audiooutput.h"
|
||||||
#include "audio/audiooutput.h"
|
#include "dspdevicesourceengine.h"
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
#ifdef DSD_USE_SERIALDV
|
#ifdef DSD_USE_SERIALDV
|
||||||
#include "dsp/dvserialengine.h"
|
#include "dsp/dvserialengine.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class DSPDeviceEngine;
|
class DSPDeviceSourceEngine;
|
||||||
class ThreadedBasebandSampleSink;
|
class ThreadedBasebandSampleSink;
|
||||||
|
|
||||||
class SDRANGEL_API DSPEngine : public QObject {
|
class SDRANGEL_API DSPEngine : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DSPEngine();
|
DSPEngine();
|
||||||
~DSPEngine();
|
~DSPEngine();
|
||||||
|
|
||||||
static DSPEngine *instance();
|
static DSPEngine *instance();
|
||||||
|
|
||||||
uint getAudioSampleRate() const { return m_audioSampleRate; }
|
uint getAudioSampleRate() const { return m_audioSampleRate; }
|
||||||
|
|
||||||
DSPDeviceEngine *addDeviceEngine();
|
DSPDeviceSourceEngine *addDeviceEngine();
|
||||||
void removeLastDeviceEngine();
|
void removeLastDeviceEngine();
|
||||||
void stopAllAcquisitions();
|
void stopAllAcquisitions();
|
||||||
void stopAllDeviceEngines();
|
void stopAllDeviceEngines();
|
||||||
|
|
||||||
void startAudio();
|
void startAudio();
|
||||||
void stopAudio();
|
void stopAudio();
|
||||||
void startAudioImmediate();
|
void startAudioImmediate();
|
||||||
void stopAudioImmediate();
|
void stopAudioImmediate();
|
||||||
|
|
||||||
DSPDeviceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; }
|
DSPDeviceSourceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; }
|
||||||
DSPDeviceEngine *getDeviceEngineByUID(uint uid);
|
DSPDeviceSourceEngine *getDeviceEngineByUID(uint uid);
|
||||||
|
|
||||||
void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink
|
void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink
|
||||||
void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink
|
void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink
|
||||||
|
|
||||||
// Serial DV methods:
|
// Serial DV methods:
|
||||||
|
|
||||||
bool hasDVSerialSupport()
|
bool hasDVSerialSupport()
|
||||||
{
|
{
|
||||||
#ifdef DSD_USE_SERIALDV
|
#ifdef DSD_USE_SERIALDV
|
||||||
return m_dvSerialSupport;
|
return m_dvSerialSupport;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDVSerialSupport(bool support);
|
void setDVSerialSupport(bool support);
|
||||||
|
|
||||||
void getDVSerialNames(std::vector<std::string>& deviceNames)
|
void getDVSerialNames(std::vector<std::string>& deviceNames)
|
||||||
{
|
{
|
||||||
#ifdef DSD_USE_SERIALDV
|
#ifdef DSD_USE_SERIALDV
|
||||||
m_dvSerialEngine.getDevicesNames(deviceNames);
|
m_dvSerialEngine.getDevicesNames(deviceNames);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void pushMbeFrame(const unsigned char *mbeFrame, int mbeRateIndex, int mbeVolumeIndex, unsigned char channels, AudioFifo *audioFifo)
|
void pushMbeFrame(const unsigned char *mbeFrame, int mbeRateIndex, int mbeVolumeIndex, unsigned char channels, AudioFifo *audioFifo)
|
||||||
{
|
{
|
||||||
#ifdef DSD_USE_SERIALDV
|
#ifdef DSD_USE_SERIALDV
|
||||||
m_dvSerialEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, audioFifo);
|
m_dvSerialEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, audioFifo);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<DSPDeviceEngine*> m_deviceEngines;
|
std::vector<DSPDeviceSourceEngine*> m_deviceEngines;
|
||||||
uint m_deviceEnginesUIDSequence;
|
uint m_deviceEnginesUIDSequence;
|
||||||
AudioOutput m_audioOutput;
|
AudioOutput m_audioOutput;
|
||||||
uint m_audioSampleRate;
|
uint m_audioSampleRate;
|
||||||
bool m_dvSerialSupport;
|
bool m_dvSerialSupport;
|
||||||
#ifdef DSD_USE_SERIALDV
|
#ifdef DSD_USE_SERIALDV
|
||||||
DVSerialEngine m_dvSerialEngine;
|
DVSerialEngine m_dvSerialEngine;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_DSPENGINE_H
|
#endif // INCLUDE_DSPENGINE_H
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2016 F4EXB //
|
// Copyright (C) 2016 F4EXB //
|
||||||
// written by Edouard Griffiths //
|
// written by Edouard Griffiths //
|
||||||
// //
|
// //
|
||||||
// OpenGL interface modernization. //
|
// OpenGL interface modernization. //
|
||||||
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
// //
|
// //
|
||||||
// This program is distributed in the hope that it will be useful, //
|
// This program is distributed in the hope that it will be useful, //
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
// GNU General Public License V3 for more details. //
|
// GNU General Public License V3 for more details. //
|
||||||
// //
|
// //
|
||||||
// You should have received a copy of the GNU General Public License //
|
// You should have received a copy of the GNU General Public License //
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "gui/mypositiondialog.h"
|
#include "gui/mypositiondialog.h"
|
||||||
#include "ui_myposdialog.h"
|
#include "ui_myposdialog.h"
|
||||||
|
|
||||||
|
|
||||||
MyPositionDialog::MyPositionDialog(MainSettings& mainSettings, QWidget* parent) :
|
MyPositionDialog::MyPositionDialog(MainSettings& mainSettings, QWidget* parent) :
|
||||||
m_mainSettings(mainSettings),
|
m_mainSettings(mainSettings),
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::MyPositionDialog)
|
ui(new Ui::MyPositionDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->latitudeSpinBox->setValue(m_mainSettings.getLatitude());
|
ui->latitudeSpinBox->setValue(m_mainSettings.getLatitude());
|
||||||
ui->longitudeSpinBox->setValue(m_mainSettings.getLongitude());
|
ui->longitudeSpinBox->setValue(m_mainSettings.getLongitude());
|
||||||
}
|
}
|
||||||
|
|
||||||
MyPositionDialog::~MyPositionDialog()
|
MyPositionDialog::~MyPositionDialog()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyPositionDialog::accept()
|
void MyPositionDialog::accept()
|
||||||
{
|
{
|
||||||
m_mainSettings.setLatitude(ui->latitudeSpinBox->value());
|
m_mainSettings.setLatitude(ui->latitudeSpinBox->value());
|
||||||
m_mainSettings.setLongitude(ui->longitudeSpinBox->value());
|
m_mainSettings.setLongitude(ui->longitudeSpinBox->value());
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2016 F4EXB //
|
// Copyright (C) 2016 F4EXB //
|
||||||
// written by Edouard Griffiths //
|
// written by Edouard Griffiths //
|
||||||
// //
|
// //
|
||||||
// OpenGL interface modernization. //
|
// OpenGL interface modernization. //
|
||||||
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
// //
|
// //
|
||||||
// This program is distributed in the hope that it will be useful, //
|
// This program is distributed in the hope that it will be useful, //
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
// GNU General Public License V3 for more details. //
|
// GNU General Public License V3 for more details. //
|
||||||
// //
|
// //
|
||||||
// You should have received a copy of the GNU General Public License //
|
// You should have received a copy of the GNU General Public License //
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef SDRBASE_GUI_MYPOSITIONDIALOG_H_
|
#ifndef SDRBASE_GUI_MYPOSITIONDIALOG_H_
|
||||||
#define SDRBASE_GUI_MYPOSITIONDIALOG_H_
|
#define SDRBASE_GUI_MYPOSITIONDIALOG_H_
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "settings/mainsettings.h"
|
#include "settings/mainsettings.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MyPositionDialog;
|
class MyPositionDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyPositionDialog : public QDialog {
|
class MyPositionDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MyPositionDialog(MainSettings& mainSettings, QWidget* parent = 0);
|
explicit MyPositionDialog(MainSettings& mainSettings, QWidget* parent = 0);
|
||||||
~MyPositionDialog();
|
~MyPositionDialog();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MyPositionDialog* ui;
|
Ui::MyPositionDialog* ui;
|
||||||
MainSettings& m_mainSettings;
|
MainSettings& m_mainSettings;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void accept();
|
void accept();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SDRBASE_GUI_MYPOSITIONDIALOG_H_ */
|
#endif /* SDRBASE_GUI_MYPOSITIONDIALOG_H_ */
|
||||||
|
|
|
@ -1,90 +1,90 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
||||||
// written by Christian Daniel //
|
// written by Christian Daniel //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
// //
|
// //
|
||||||
// This program is distributed in the hope that it will be useful, //
|
// This program is distributed in the hope that it will be useful, //
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
// GNU General Public License V3 for more details. //
|
// GNU General Public License V3 for more details. //
|
||||||
// //
|
// //
|
||||||
// You should have received a copy of the GNU General Public License //
|
// You should have received a copy of the GNU General Public License //
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef INCLUDE_SCALEENGINE_H
|
#ifndef INCLUDE_SCALEENGINE_H
|
||||||
#define INCLUDE_SCALEENGINE_H
|
#define INCLUDE_SCALEENGINE_H
|
||||||
|
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include "physicalunit.h"
|
#include "physicalunit.h"
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
|
|
||||||
class SDRANGEL_API ScaleEngine {
|
class SDRANGEL_API ScaleEngine {
|
||||||
public:
|
public:
|
||||||
struct Tick {
|
struct Tick {
|
||||||
float pos;
|
float pos;
|
||||||
bool major;
|
bool major;
|
||||||
float textPos;
|
float textPos;
|
||||||
float textSize;
|
float textSize;
|
||||||
QString text;
|
QString text;
|
||||||
};
|
};
|
||||||
typedef QList<Tick> TickList;
|
typedef QList<Tick> TickList;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// base configuration
|
// base configuration
|
||||||
Qt::Orientation m_orientation;
|
Qt::Orientation m_orientation;
|
||||||
QFont m_font;
|
QFont m_font;
|
||||||
float m_charSize;
|
float m_charSize;
|
||||||
|
|
||||||
// graph configuration
|
// graph configuration
|
||||||
float m_size;
|
float m_size;
|
||||||
Unit::Physical m_physicalUnit;
|
Unit::Physical m_physicalUnit;
|
||||||
float m_rangeMin;
|
float m_rangeMin;
|
||||||
float m_rangeMax;
|
float m_rangeMax;
|
||||||
|
|
||||||
// calculated values
|
// calculated values
|
||||||
bool m_recalc;
|
bool m_recalc;
|
||||||
double m_scale;
|
double m_scale;
|
||||||
QString m_unitStr;
|
QString m_unitStr;
|
||||||
TickList m_tickList;
|
TickList m_tickList;
|
||||||
double m_majorTickValueDistance;
|
double m_majorTickValueDistance;
|
||||||
double m_firstMajorTickValue;
|
double m_firstMajorTickValue;
|
||||||
int m_numMinorTicks;
|
int m_numMinorTicks;
|
||||||
int m_decimalPlaces;
|
int m_decimalPlaces;
|
||||||
|
|
||||||
QString formatTick(double value, int decimalPlaces, bool fancyTime = true);
|
QString formatTick(double value, int decimalPlaces, bool fancyTime = true);
|
||||||
void calcCharSize();
|
void calcCharSize();
|
||||||
void calcScaleFactor();
|
void calcScaleFactor();
|
||||||
double calcMajorTickUnits(double distance, int* retDecimalPlaces);
|
double calcMajorTickUnits(double distance, int* retDecimalPlaces);
|
||||||
int calcTickTextSize();
|
int calcTickTextSize();
|
||||||
void forceTwoTicks();
|
void forceTwoTicks();
|
||||||
void reCalc();
|
void reCalc();
|
||||||
|
|
||||||
double majorTickValue(int tick);
|
double majorTickValue(int tick);
|
||||||
double minorTickValue(int tick);
|
double minorTickValue(int tick);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScaleEngine();
|
ScaleEngine();
|
||||||
|
|
||||||
void setOrientation(Qt::Orientation orientation);
|
void setOrientation(Qt::Orientation orientation);
|
||||||
void setFont(const QFont& font);
|
void setFont(const QFont& font);
|
||||||
void setSize(float size);
|
void setSize(float size);
|
||||||
float getSize() { return m_size; }
|
float getSize() { return m_size; }
|
||||||
void setRange(Unit::Physical physicalUnit, float rangeMin, float rangeMax);
|
void setRange(Unit::Physical physicalUnit, float rangeMin, float rangeMax);
|
||||||
|
|
||||||
float getPosFromValue(double value);
|
float getPosFromValue(double value);
|
||||||
float getValueFromPos(double pos);
|
float getValueFromPos(double pos);
|
||||||
const TickList& getTickList();
|
const TickList& getTickList();
|
||||||
|
|
||||||
QString getRangeMinStr();
|
QString getRangeMinStr();
|
||||||
QString getRangeMaxStr();
|
QString getRangeMaxStr();
|
||||||
|
|
||||||
float getScaleWidth();
|
float getScaleWidth();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_SCALEENGINE_H
|
#endif // INCLUDE_SCALEENGINE_H
|
||||||
|
|
|
@ -60,7 +60,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||||
m_masterTabIndex(0),
|
m_masterTabIndex(0),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_dspEngine(DSPEngine::instance()),
|
m_dspEngine(DSPEngine::instance()),
|
||||||
m_lastEngineState((DSPDeviceEngine::State)-1),
|
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
|
||||||
m_inputGUI(0),
|
m_inputGUI(0),
|
||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
|
@ -172,7 +172,7 @@ MainWindow::~MainWindow()
|
||||||
|
|
||||||
void MainWindow::addDevice()
|
void MainWindow::addDevice()
|
||||||
{
|
{
|
||||||
DSPDeviceEngine *dspDeviceEngine = m_dspEngine->addDeviceEngine();
|
DSPDeviceSourceEngine *dspDeviceEngine = m_dspEngine->addDeviceEngine();
|
||||||
dspDeviceEngine->start();
|
dspDeviceEngine->start();
|
||||||
|
|
||||||
uint dspDeviceEngineUID = dspDeviceEngine->getUID();
|
uint dspDeviceEngineUID = dspDeviceEngine->getUID();
|
||||||
|
@ -208,7 +208,7 @@ void MainWindow::addDevice()
|
||||||
|
|
||||||
void MainWindow::removeLastDevice()
|
void MainWindow::removeLastDevice()
|
||||||
{
|
{
|
||||||
DSPDeviceEngine *lastDeviceEngine = m_deviceUIs.back()->m_deviceEngine;
|
DSPDeviceSourceEngine *lastDeviceEngine = m_deviceUIs.back()->m_deviceEngine;
|
||||||
lastDeviceEngine->stopAcquistion();
|
lastDeviceEngine->stopAcquistion();
|
||||||
lastDeviceEngine->removeSink(m_deviceUIs.back()->m_spectrumVis);
|
lastDeviceEngine->removeSink(m_deviceUIs.back()->m_spectrumVis);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SamplingDeviceControl;
|
||||||
|
|
||||||
class AudioDeviceInfo;
|
class AudioDeviceInfo;
|
||||||
class DSPEngine;
|
class DSPEngine;
|
||||||
class DSPDeviceEngine;
|
class DSPDeviceSourceEngine;
|
||||||
class Indicator;
|
class Indicator;
|
||||||
class SpectrumVis;
|
class SpectrumVis;
|
||||||
class GLSpectrum;
|
class GLSpectrum;
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
GLSpectrumGUI *m_spectrumGUI;
|
GLSpectrumGUI *m_spectrumGUI;
|
||||||
ChannelWindow *m_channelWindow;
|
ChannelWindow *m_channelWindow;
|
||||||
SamplingDeviceControl *m_samplingDeviceControl;
|
SamplingDeviceControl *m_samplingDeviceControl;
|
||||||
DSPDeviceEngine *m_deviceEngine;
|
DSPDeviceSourceEngine *m_deviceEngine;
|
||||||
DeviceAPI *m_deviceAPI;
|
DeviceAPI *m_deviceAPI;
|
||||||
QByteArray m_mainWindowState;
|
QByteArray m_mainWindowState;
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
#include "settings/preset.h"
|
#include "settings/preset.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "gui/glspectrum.h"
|
#include "gui/glspectrum.h"
|
||||||
#include "dsp/dspdeviceengine.h"
|
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include "../dsp/dspdevicesourceengine.h"
|
||||||
|
|
||||||
const QString PluginManager::m_sdrDaemonDeviceTypeID = "sdrangel.samplesource.sdrdaemon";
|
const QString PluginManager::m_sdrDaemonDeviceTypeID = "sdrangel.samplesource.sdrdaemon";
|
||||||
const QString PluginManager::m_sdrDaemonFECDeviceTypeID = "sdrangel.samplesource.sdrdaemonfec";
|
const QString PluginManager::m_sdrDaemonFECDeviceTypeID = "sdrangel.samplesource.sdrdaemonfec";
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Preset;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class Message;
|
class Message;
|
||||||
class MessageQueue;
|
class MessageQueue;
|
||||||
class DSPDeviceEngine;
|
class DSPDeviceSourceEngine;
|
||||||
class DeviceAPI;
|
class DeviceAPI;
|
||||||
|
|
||||||
class SDRANGEL_API PluginManager : public QObject {
|
class SDRANGEL_API PluginManager : public QObject {
|
||||||
|
|
|
@ -38,7 +38,7 @@ SOURCES += mainwindow.cpp\
|
||||||
dsp/ctcssdetector.cpp\
|
dsp/ctcssdetector.cpp\
|
||||||
dsp/dspcommands.cpp\
|
dsp/dspcommands.cpp\
|
||||||
dsp/dspengine.cpp\
|
dsp/dspengine.cpp\
|
||||||
dsp/dspdeviceengine.cpp\
|
dsp/dspdevicesourceengine.cpp\
|
||||||
dsp/dvserialengine.cpp\
|
dsp/dvserialengine.cpp\
|
||||||
dsp/dvserialworker.cpp\
|
dsp/dvserialworker.cpp\
|
||||||
dsp/fftengine.cpp\
|
dsp/fftengine.cpp\
|
||||||
|
@ -112,7 +112,7 @@ HEADERS += mainwindow.h\
|
||||||
dsp/decimators.h\
|
dsp/decimators.h\
|
||||||
dsp/dspcommands.h\
|
dsp/dspcommands.h\
|
||||||
dsp/dspengine.h\
|
dsp/dspengine.h\
|
||||||
dsp/dspdeviceengine.h\
|
dsp/dspdevicesourceengine.h\
|
||||||
dsp/dvserialengine.h\
|
dsp/dvserialengine.h\
|
||||||
dsp/dvserialworker.h\
|
dsp/dvserialworker.h\
|
||||||
dsp/dsptypes.h\
|
dsp/dsptypes.h\
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2015 Edouard Griffiths, F4EXB. //
|
// Copyright (C) 2015 Edouard Griffiths, F4EXB. //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
// it under the terms of the GNU General Public License as published by //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
// //
|
// //
|
||||||
// This program is distributed in the hope that it will be useful, //
|
// This program is distributed in the hope that it will be useful, //
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
// GNU General Public License V3 for more details. //
|
// GNU General Public License V3 for more details. //
|
||||||
// //
|
// //
|
||||||
// You should have received a copy of the GNU General Public License //
|
// You should have received a copy of the GNU General Public License //
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __SDRANGEL_EXPORT_H
|
#ifndef __SDRANGEL_EXPORT_H
|
||||||
#define __SDRANGEL_EXPORT_H
|
#define __SDRANGEL_EXPORT_H
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
# if __GNUC__ >= 4
|
# if __GNUC__ >= 4
|
||||||
# define __SDR_EXPORT __attribute__((visibility("default")))
|
# define __SDR_EXPORT __attribute__((visibility("default")))
|
||||||
# define __SDR_IMPORT __attribute__((visibility("default")))
|
# define __SDR_IMPORT __attribute__((visibility("default")))
|
||||||
# else
|
# else
|
||||||
# define __SDR_EXPORT
|
# define __SDR_EXPORT
|
||||||
# define __SDR_IMPORT
|
# define __SDR_IMPORT
|
||||||
# endif
|
# endif
|
||||||
#elif _MSC_VER
|
#elif _MSC_VER
|
||||||
# define __SDR_EXPORT __declspec(dllexport)
|
# define __SDR_EXPORT __declspec(dllexport)
|
||||||
# define __SDR_IMPORT __declspec(dllimport)
|
# define __SDR_IMPORT __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
# define __SDR_EXPORT
|
# define __SDR_EXPORT
|
||||||
# define __SDR_IMPORT
|
# define __SDR_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef sdrangel_STATIC
|
#ifndef sdrangel_STATIC
|
||||||
# ifdef sdrangel_EXPORTS
|
# ifdef sdrangel_EXPORTS
|
||||||
# define SDRANGEL_API __SDR_EXPORT
|
# define SDRANGEL_API __SDR_EXPORT
|
||||||
# else
|
# else
|
||||||
# define SDRANGEL_API __SDR_IMPORT
|
# define SDRANGEL_API __SDR_IMPORT
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#define SDRANGEL_API
|
#define SDRANGEL_API
|
||||||
#endif
|
#endif
|
||||||
#endif /* __SDRANGEL_EXPORT_H */
|
#endif /* __SDRANGEL_EXPORT_H */
|
||||||
|
|
Loading…
Reference in New Issue