Refactoring: removed device parameter from all start() methods in sample source plugins

pull/27/head
f4exb 2017-04-14 03:40:45 +02:00
rodzic 1e086fb303
commit b8623c90ce
24 zmienionych plików z 25 dodań i 40 usunięć

Wyświetl plik

@ -127,7 +127,7 @@ bool AirspyInput::openDevice()
return true;
}
bool AirspyInput::start(int device)
bool AirspyInput::start()
{
QMutexLocker mutexLocker(&m_mutex);

Wyświetl plik

@ -71,7 +71,7 @@ public:
AirspyInput(DeviceSourceAPI *deviceAPI);
virtual ~AirspyInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -113,7 +113,7 @@ bool BladerfInput::openDevice()
return true;
}
bool BladerfInput::start(int device)
bool BladerfInput::start()
{
// QMutexLocker mutexLocker(&m_mutex);

Wyświetl plik

@ -71,7 +71,7 @@ public:
BladerfInput(DeviceSourceAPI *deviceAPI);
virtual ~BladerfInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -73,7 +73,7 @@ bool FCDProInput::openDevice()
return true;
}
bool FCDProInput::start(int device)
bool FCDProInput::start()
{
qDebug() << "FCDProInput::start";
@ -85,19 +85,6 @@ bool FCDProInput::start(int device)
if (m_running) stop();
// if (m_FCDThread)
// {
// return false;
// }
// m_dev = fcdOpen(fcd_traits<Pro>::vendorId, fcd_traits<Pro>::productId, device);
//
// if (m_dev == 0)
// {
// qCritical("FCDProInput::start: could not open FCD");
// return false;
// }
/* Apply settings before streaming to avoid bus contention;
* there is very little spare bandwidth on a full speed USB device.
* Failure is harmless if no device is found
@ -147,8 +134,6 @@ void FCDProInput::stop()
}
m_running = false;
// fcdClose(m_dev);
// m_dev = 0;
}
const QString& FCDProInput::getDeviceDescription() const

Wyświetl plik

@ -58,7 +58,7 @@ public:
FCDProInput(DeviceSourceAPI *deviceAPI);
virtual ~FCDProInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -66,7 +66,7 @@ bool FCDProPlusInput::openDevice()
return true;
}
bool FCDProPlusInput::start(int device)
bool FCDProPlusInput::start()
{
// QMutexLocker mutexLocker(&m_mutex);

Wyświetl plik

@ -57,7 +57,7 @@ public:
FCDProPlusInput(DeviceSourceAPI *deviceAPI);
virtual ~FCDProPlusInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -140,7 +140,7 @@ void FileSourceInput::seekFileStream(int seekPercentage)
}
}
bool FileSourceInput::start(int device)
bool FileSourceInput::start()
{
QMutexLocker mutexLocker(&m_mutex);
qDebug() << "FileSourceInput::start";

Wyświetl plik

@ -212,7 +212,7 @@ public:
FileSourceInput(const QTimer& masterTimer);
virtual ~FileSourceInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -99,7 +99,7 @@ bool HackRFInput::openDevice()
return true;
}
bool HackRFInput::start(int device)
bool HackRFInput::start()
{
// QMutexLocker mutexLocker(&m_mutex);
if (!m_dev) {

Wyświetl plik

@ -71,7 +71,7 @@ public:
HackRFInput(DeviceSourceAPI *deviceAPI);
virtual ~HackRFInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -108,7 +108,7 @@ void LimeSDRInput::closeDevice()
m_deviceParams.m_dev = 0;
}
bool LimeSDRInput::start(int device)
bool LimeSDRInput::start()
{
QMutexLocker mutexLocker(&m_mutex);

Wyświetl plik

@ -32,7 +32,7 @@ public:
LimeSDRInput(DeviceSourceAPI *deviceAPI);
virtual ~LimeSDRInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -148,7 +148,7 @@ bool RTLSDRInput::openDevice()
return true;
}
bool RTLSDRInput::start(int device) // TODO: remove device parameter
bool RTLSDRInput::start()
{
QMutexLocker mutexLocker(&m_mutex);

Wyświetl plik

@ -87,7 +87,7 @@ public:
RTLSDRInput(DeviceSourceAPI *deviceAPI);
virtual ~RTLSDRInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -63,7 +63,7 @@ SDRdaemonInput::~SDRdaemonInput()
delete m_SDRdaemonUDPHandler;
}
bool SDRdaemonInput::start(int device)
bool SDRdaemonInput::start()
{
qDebug() << "SDRdaemonInput::start";
MsgConfigureSDRdaemonWork *command = MsgConfigureSDRdaemonWork::create(true);

Wyświetl plik

@ -277,7 +277,7 @@ public:
SDRdaemonInput(const QTimer& masterTimer, DeviceSourceAPI *deviceAPI);
virtual ~SDRdaemonInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -61,7 +61,7 @@ SDRdaemonFECInput::~SDRdaemonFECInput()
delete m_SDRdaemonUDPHandler;
}
bool SDRdaemonFECInput::start(int device)
bool SDRdaemonFECInput::start()
{
qDebug() << "SDRdaemonInput::start";
MsgConfigureSDRdaemonWork *command = MsgConfigureSDRdaemonWork::create(true);

Wyświetl plik

@ -261,7 +261,7 @@ public:
SDRdaemonFECInput(const QTimer& masterTimer, DeviceSourceAPI *deviceAPI);
virtual ~SDRdaemonFECInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -94,7 +94,7 @@ bool SDRPlayInput::openDevice()
return true;
}
bool SDRPlayInput::start(int device)
bool SDRPlayInput::start()
{
// QMutexLocker mutexLocker(&m_mutex);
int res;
@ -213,7 +213,7 @@ bool SDRPlayInput::handleMessage(const Message& message)
{
m_settings = settings;
stop();
start(m_devNumber);
start();
}
// standard changes
else

Wyświetl plik

@ -81,7 +81,7 @@ public:
SDRPlayInput(DeviceSourceAPI *deviceAPI);
virtual ~SDRPlayInput();
virtual bool start(int device);
virtual bool start();
virtual void stop();
virtual const QString& getDeviceDescription() const;

Wyświetl plik

@ -31,7 +31,7 @@ public:
DeviceSampleSource();
virtual ~DeviceSampleSource();
virtual bool start(int device) = 0;
virtual bool start() = 0;
virtual void stop() = 0;
virtual const QString& getDeviceDescription() const = 0;

Wyświetl plik

@ -449,7 +449,7 @@ DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoRunning()
// Start everything
if(!m_deviceSampleSource->start(m_sampleSourceSequence))
if(!m_deviceSampleSource->start())
{
return gotoError("Could not start sample source");
}