1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Server: changes to support DeviceSet

This commit is contained in:
f4exb 2017-12-17 23:15:42 +01:00
parent 200bd2ee21
commit 6d12443100
160 changed files with 4880 additions and 2795 deletions

View File

@ -109,6 +109,7 @@ public:
ChannelAnalyzer(DeviceSourceAPI *deviceAPI);
virtual ~ChannelAnalyzer();
virtual void destroy() { delete this; }
void setSampleSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
void configure(MessageQueue* messageQueue,
@ -128,6 +129,12 @@ public:
virtual int getDeltaFrequency() const { return m_frequency; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = objectName(); }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_frequency; }
virtual QByteArray serialize() const { return QByteArray(); }
virtual bool deserialize(const QByteArray& data __attribute__((unused))) { return false; }
static const QString m_channelIdURI;
static const QString m_channelId;

View File

@ -45,7 +45,6 @@ PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(const QString& chan
}
}
BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ChannelAnalyzer::m_channelIdURI)
@ -56,3 +55,12 @@ BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannel(const QString& channe
return 0;
}
}
void ChannelAnalyzerPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ChannelAnalyzer::m_channelIdURI) {
*channelSinkAPI = new ChannelAnalyzer(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -6,6 +6,7 @@
class DeviceUISet;
class BasebandSampleSink;
class ChannelSinkAPI;
class ChannelAnalyzerPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -20,6 +21,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -125,6 +125,7 @@ public:
ChannelAnalyzerNG(DeviceSourceAPI *deviceAPI);
virtual ~ChannelAnalyzerNG();
virtual void destroy() { delete this; }
void setSampleSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
void configure(MessageQueue* messageQueue,
@ -147,6 +148,12 @@ public:
virtual int getDeltaFrequency() const { return m_running.m_frequency; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = objectName(); }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_running.m_frequency; }
virtual QByteArray serialize() const { return QByteArray(); }
virtual bool deserialize(const QByteArray& data __attribute__((unused))) { return false; }
static const QString m_channelIdURI;
static const QString m_channelId;

View File

@ -71,3 +71,12 @@ BasebandSampleSink* ChannelAnalyzerNGPlugin::createRxChannel(const QString& chan
}
}
void ChannelAnalyzerNGPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ChannelAnalyzerNG::m_channelIdURI) {
*channelSinkAPI = new ChannelAnalyzerNG(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -37,6 +37,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -239,3 +239,26 @@ void AMDemod::applySettings(const AMDemodSettings& settings, bool force)
m_settings = settings;
}
QByteArray AMDemod::serialize() const
{
return m_settings.serialize();
}
bool AMDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureAMDemod *msg = MsgConfigureAMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureAMDemod *msg = MsgConfigureAMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -86,6 +86,7 @@ public:
AMDemod(DeviceSourceAPI *deviceAPI);
~AMDemod();
virtual void destroy() { delete this; }
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
virtual void start();
@ -95,6 +96,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }
bool getSquelchOpen() const { return m_squelchOpen; }

View File

@ -55,3 +55,13 @@ BasebandSampleSink* AMDemodPlugin::createRxChannel(const QString& channelName, D
return 0;
}
}
void AMDemodPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == AMDemod::m_channelIdURI) {
*channelSinkAPI = new AMDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -36,6 +36,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -192,6 +192,7 @@ public:
ATVDemod(DeviceSourceAPI *deviceAPI);
~ATVDemod();
virtual void destroy() { delete this; }
void setScopeSink(BasebandSampleSink* scopeSink) { m_scopeSink = scopeSink; }
void configure(MessageQueue* objMessageQueue,
@ -226,6 +227,12 @@ public:
virtual int getDeltaFrequency() const { return m_rfRunning.m_intFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = objectName(); }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_rfRunning.m_intFrequencyOffset; }
virtual QByteArray serialize() const { return QByteArray(); }
virtual bool deserialize(const QByteArray& data __attribute__((unused))) { return false; }
void setATVScreen(ATVScreenInterface *objScreen);
int getSampleRate();

View File

@ -78,3 +78,12 @@ BasebandSampleSink* ATVDemodPlugin::createRxChannel(const QString& channelName,
}
}
void ATVDemodPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == ATVDemod::m_channelIdURI) {
*channelSinkAPI = new ATVDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -38,6 +38,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& strChannelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_ptrPluginDescriptor;

View File

@ -469,3 +469,26 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force)
m_settings = settings;
}
QByteArray BFMDemod::serialize() const
{
return m_settings.serialize();
}
bool BFMDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureBFMDemod *msg = MsgConfigureBFMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureBFMDemod *msg = MsgConfigureBFMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -114,6 +114,7 @@ public:
BFMDemod(DeviceSourceAPI *deviceAPI);
virtual ~BFMDemod();
virtual void destroy() { delete this; }
void setSampleSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
int getSampleRate() const { return m_settings.m_inputSampleRate; }
@ -125,6 +126,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }

View File

@ -73,3 +73,13 @@ BasebandSampleSink* BFMPlugin::createRxChannel(const QString& channelName, Devic
return 0;
}
}
void BFMPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == BFMDemod::m_channelIdURI) {
*channelSinkAPI = new BFMDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -36,6 +36,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -468,3 +468,25 @@ void DSDDemod::applySettings(DSDDemodSettings& settings, bool force)
m_settings = settings;
}
QByteArray DSDDemod::serialize() const
{
return m_settings.serialize();
}
bool DSDDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureDSDDemod *msg = MsgConfigureDSDDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureDSDDemod *msg = MsgConfigureDSDDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -92,6 +92,7 @@ public:
DSDDemod(DeviceSourceAPI *deviceAPI);
~DSDDemod();
virtual void destroy() { delete this; }
void setScopeSink(BasebandSampleSink* sampleSink) { m_scope = sampleSink; }
void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude);
@ -104,6 +105,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() { return m_magsq; }
bool getSquelchOpen() const { return m_squelchOpen; }

View File

@ -72,3 +72,13 @@ BasebandSampleSink* DSDDemodPlugin::createRxChannel(const QString& channelName,
return 0;
}
}
void DSDDemodPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == DSDDemod::m_channelIdURI) {
*channelSinkAPI = new DSDDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -37,6 +37,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -358,3 +358,26 @@ bool LoRaDemod::handleMessage(const Message& cmd)
}
}
}
QByteArray LoRaDemod::serialize() const
{
return m_settings.serialize();
}
bool LoRaDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureLoRaDemod *msg = MsgConfigureLoRaDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureLoRaDemod *msg = MsgConfigureLoRaDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -90,6 +90,7 @@ public:
LoRaDemod(DeviceSourceAPI* deviceAPI);
virtual ~LoRaDemod();
virtual void destroy() { delete this; }
void setSpectrumSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool pO);
@ -100,6 +101,12 @@ public:
virtual int getDeltaFrequency() const { return 0; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return 0; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
static const QString m_channelIdURI;
static const QString m_channelId;

View File

@ -54,3 +54,13 @@ BasebandSampleSink* LoRaPlugin::createRxChannel(const QString& channelName, Devi
return 0;
}
}
void LoRaPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == LoRaDemod::m_channelIdURI) {
*channelSinkAPI = new LoRaDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -20,6 +20,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -458,6 +458,28 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force)
m_settings = settings;
}
QByteArray NFMDemod::serialize() const
{
return m_settings.serialize();
}
bool NFMDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureNFMDemod *msg = MsgConfigureNFMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureNFMDemod *msg = MsgConfigureNFMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}
int NFMDemod::webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage __attribute__((unused)))

View File

@ -111,6 +111,7 @@ public:
NFMDemod(DeviceSourceAPI *deviceAPI);
~NFMDemod();
virtual void destroy() { delete this; }
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
virtual void start();
@ -120,6 +121,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,

View File

@ -63,3 +63,13 @@ BasebandSampleSink* NFMPlugin::createRxChannel(const QString& channelName, Devic
return 0;
}
}
void NFMPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == NFMDemod::m_channelIdURI) {
*channelSinkAPI = new NFMDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -20,6 +20,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -479,3 +479,24 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
m_settings = settings;
}
QByteArray SSBDemod::serialize() const
{
return m_settings.serialize();
}
bool SSBDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureSSBDemod *msg = MsgConfigureSSBDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureSSBDemod *msg = MsgConfigureSSBDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -89,6 +89,7 @@ public:
SSBDemod(DeviceSourceAPI *deviceAPI);
virtual ~SSBDemod();
virtual void destroy() { delete this; }
void setSampleSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
void configure(MessageQueue* messageQueue,
@ -114,6 +115,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }
bool getAudioActive() const { return m_audioActive; }

View File

@ -55,3 +55,13 @@ BasebandSampleSink* SSBPlugin::createRxChannel(const QString& channelName, Devic
return 0;
}
}
void SSBPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == SSBDemod::m_channelIdURI) {
*channelSinkAPI = new SSBDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -20,6 +20,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -320,3 +320,26 @@ void WFMDemod::applySettings(const WFMDemodSettings& settings, bool force)
m_settings = settings;
}
QByteArray WFMDemod::serialize() const
{
return m_settings.serialize();
}
bool WFMDemod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureWFMDemod *msg = MsgConfigureWFMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureWFMDemod *msg = MsgConfigureWFMDemod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -90,6 +90,7 @@ public:
WFMDemod(DeviceSourceAPI *deviceAPI);
virtual ~WFMDemod();
virtual void destroy() { delete this; }
void setSampleSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
@ -100,6 +101,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_movingAverage.average(); }
bool getSquelchOpen() const { return m_squelchOpen; }

View File

@ -55,3 +55,13 @@ BasebandSampleSink* WFMPlugin::createRxChannel(const QString& channelName, Devic
return 0;
}
}
void WFMPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == WFMDemod::m_channelIdURI) {
*channelSinkAPI = new WFMDemod(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -20,6 +20,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -459,3 +459,26 @@ void TCPSrc::onTcpServerError(QAbstractSocket::SocketError socketError __attribu
{
qDebug("TCPSrc::onTcpServerError: %s", qPrintable(m_tcpServer->errorString()));
}
QByteArray TCPSrc::serialize() const
{
return m_settings.serialize();
}
bool TCPSrc::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureTCPSrc *msg = MsgConfigureTCPSrc::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureTCPSrc *msg = MsgConfigureTCPSrc::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -104,6 +104,7 @@ public:
TCPSrc(DeviceSourceAPI* m_deviceAPI);
virtual ~TCPSrc();
virtual void destroy() { delete this; }
void setSpectrum(BasebandSampleSink* spectrum) { m_spectrum = spectrum; }
void setSpectrum(MessageQueue* messageQueue, bool enabled);
@ -117,6 +118,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
static const QString m_channelIdURI;
static const QString m_channelId;

View File

@ -57,3 +57,13 @@ BasebandSampleSink* TCPSrcPlugin::createRxChannel(const QString& channelName, De
return 0;
}
}
void TCPSrcPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == TCPSrc::m_channelIdURI) {
*channelSinkAPI = new TCPSrc(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -20,6 +20,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -592,3 +592,25 @@ void UDPSrc::applySettings(const UDPSrcSettings& settings, bool force)
m_settings = settings;
}
QByteArray UDPSrc::serialize() const
{
return m_settings.serialize();
}
bool UDPSrc::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureUDPSrc *msg = MsgConfigureUDPSrc::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureUDPSrc *msg = MsgConfigureUDPSrc::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -94,6 +94,7 @@ public:
UDPSrc(DeviceSourceAPI *deviceAPI);
virtual ~UDPSrc();
virtual void destroy() { delete this; }
void setSpectrum(BasebandSampleSink* spectrum) { m_spectrum = spectrum; }
void setSpectrum(MessageQueue* messageQueue, bool enabled);
@ -109,6 +110,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
static const QString m_channelIdURI;
static const QString m_channelId;

View File

@ -74,3 +74,13 @@ BasebandSampleSink* UDPSrcPlugin::createRxChannel(const QString& channelName, De
return 0;
}
}
void UDPSrcPlugin::createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == UDPSrc::m_channelIdURI) {
*channelSinkAPI = new UDPSrc(deviceAPI);
} else {
*channelSinkAPI = 0;
}
}

View File

@ -37,6 +37,7 @@ public:
PluginInstanceGUI* createRxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
BasebandSampleSink* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
void createRxChannel(ChannelSinkAPI **channelSinkAPI, const QString& channelName, DeviceSourceAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -436,3 +436,25 @@ void AMMod::applySettings(const AMModSettings& settings, bool force)
m_settings = settings;
}
QByteArray AMMod::serialize() const
{
return m_settings.serialize();
}
bool AMMod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureAMMod *msg = MsgConfigureAMMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureAMMod *msg = MsgConfigureAMMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -228,6 +228,7 @@ public:
AMMod(DeviceSinkAPI *deviceAPI);
~AMMod();
virtual void destroy() { delete this; }
virtual void pull(Sample& sample);
virtual void pullAudio(int nbSamples);
@ -238,6 +239,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }

View File

@ -71,3 +71,13 @@ BasebandSampleSource* AMModPlugin::createTxChannel(const QString& channelName, D
return 0;
}
}
void AMModPlugin::createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI)
{
if(channelName == AMMod::m_channelIdURI) {
*channelSourceAPI = new AMMod(deviceAPI);
} else {
*channelSourceAPI = 0;
}
}

View File

@ -36,6 +36,7 @@ public:
PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel);
BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
void createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -1121,3 +1121,25 @@ void ATVMod::applySettings(const ATVModSettings& settings, bool force)
m_settings = settings;
}
QByteArray ATVMod::serialize() const
{
return m_settings.serialize();
}
bool ATVMod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureATVMod *msg = MsgConfigureATVMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureATVMod *msg = MsgConfigureATVMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -394,6 +394,7 @@ public:
ATVMod(DeviceSinkAPI *deviceAPI);
~ATVMod();
virtual void destroy() { delete this; }
virtual void pull(Sample& sample);
virtual void pullAudio(int nbSamples); // this is used for video signal actually
@ -404,6 +405,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
int getEffectiveSampleRate() const { return m_tvSampleRate; };
double getMagSq() const { return m_movingAverage.average(); }

View File

@ -72,4 +72,14 @@ BasebandSampleSource* ATVModPlugin::createTxChannel(const QString& channelName,
}
}
void ATVModPlugin::createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI)
{
if(channelName == ATVMod::m_channelIdURI) {
*channelSourceAPI = new ATVMod(deviceAPI);
} else {
*channelSourceAPI = 0;
}
}

View File

@ -36,6 +36,7 @@ public:
PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel);
BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
void createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -476,6 +476,28 @@ void NFMMod::applySettings(const NFMModSettings& settings, bool force)
m_settings = settings;
}
QByteArray NFMMod::serialize() const
{
return m_settings.serialize();
}
bool NFMMod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureNFMMod *msg = MsgConfigureNFMMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureNFMMod *msg = MsgConfigureNFMMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}
int NFMMod::webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage __attribute__((unused)))
@ -555,4 +577,3 @@ int NFMMod::webapiSettingsPutPatch(
return 200;
}

View File

@ -230,6 +230,7 @@ public:
NFMMod(DeviceSinkAPI *deviceAPI);
~NFMMod();
virtual void destroy() { delete this; }
virtual void pull(Sample& sample);
virtual void pullAudio(int nbSamples);
@ -240,6 +241,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,

View File

@ -80,3 +80,14 @@ BasebandSampleSource* NFMModPlugin::createTxChannel(const QString& channelName,
return 0;
}
}
void NFMModPlugin::createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI)
{
if(channelName == NFMMod::m_channelIdURI) {
*channelSourceAPI = new NFMMod(deviceAPI);
} else {
*channelSourceAPI = 0;
}
}

View File

@ -36,6 +36,7 @@ public:
PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel);
BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
void createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -799,3 +799,25 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force)
m_settings = settings;
}
QByteArray SSBMod::serialize() const
{
return m_settings.serialize();
}
bool SSBMod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureSSBMod *msg = MsgConfigureSSBMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureSSBMod *msg = MsgConfigureSSBMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -229,6 +229,7 @@ public:
SSBMod(DeviceSinkAPI *deviceAPI);
~SSBMod();
virtual void destroy() { delete this; }
void setSpectrumSampleSink(BasebandSampleSink* sampleSink) { m_sampleSink = sampleSink; }
@ -241,6 +242,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }

View File

@ -71,3 +71,14 @@ BasebandSampleSource* SSBModPlugin::createTxChannel(const QString& channelName,
return 0;
}
}
void SSBModPlugin::createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI)
{
if(channelName == SSBMod::m_channelIdURI) {
*channelSourceAPI = new SSBMod(deviceAPI);
} else {
*channelSourceAPI = 0;
}
}

View File

@ -36,6 +36,7 @@ public:
PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel);
BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
void createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -479,3 +479,25 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force)
m_settings = settings;
}
QByteArray WFMMod::serialize() const
{
return m_settings.serialize();
}
bool WFMMod::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureWFMMod *msg = MsgConfigureWFMMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureWFMMod *msg = MsgConfigureWFMMod::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -229,6 +229,7 @@ public:
WFMMod(DeviceSinkAPI *deviceAPI);
~WFMMod();
virtual void destroy() { delete this; }
virtual void pull(Sample& sample);
virtual void pullAudio(int nbSamples);
@ -239,6 +240,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }

View File

@ -71,3 +71,14 @@ BasebandSampleSource* WFMModPlugin::createTxChannel(const QString& channelName,
return 0;
}
}
void WFMModPlugin::createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI)
{
if(channelName == WFMMod::m_channelIdURI) {
*channelSourceAPI = new WFMMod(deviceAPI);
} else {
*channelSourceAPI = 0;
}
}

View File

@ -35,6 +35,7 @@ public:
PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel);
BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
void createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -553,3 +553,25 @@ void UDPSink::applySettings(const UDPSinkSettings& settings, bool force)
m_settings = settings;
}
QByteArray UDPSink::serialize() const
{
return m_settings.serialize();
}
bool UDPSink::deserialize(const QByteArray& data)
{
if (m_settings.deserialize(data))
{
MsgConfigureUDPSink *msg = MsgConfigureUDPSink::create(m_settings, true);
m_inputMessageQueue.push(msg);
return true;
}
else
{
m_settings.resetToDefaults();
MsgConfigureUDPSink *msg = MsgConfigureUDPSink::create(m_settings, true);
m_inputMessageQueue.push(msg);
return false;
}
}

View File

@ -88,6 +88,7 @@ public:
UDPSink(DeviceSinkAPI *deviceAPI);
virtual ~UDPSink();
virtual void destroy() { delete this; }
void setSpectrumSink(BasebandSampleSink* spectrum) { m_spectrum = spectrum; }
@ -99,6 +100,12 @@ public:
virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual void setName(const QString& name) { setObjectName(name); }
virtual QString getName() const { return objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
double getMagSq() const { return m_magsq; }
double getInMagSq() const { return m_inMagsq; }

View File

@ -73,3 +73,14 @@ BasebandSampleSource* UDPSinkPlugin::createTxChannel(const QString& channelName,
return 0;
}
}
void UDPSinkPlugin::createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI)
{
if(channelName == UDPSink::m_channelIdURI) {
*channelSourceAPI = new UDPSink(deviceAPI);
} else {
*channelSourceAPI = 0;
}
}

View File

@ -37,6 +37,7 @@ public:
PluginInstanceGUI* createTxChannelGUI(const QString& channelName, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel);
BasebandSampleSource* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
void createTxChannel(ChannelSourceAPI **channelSourceAPI, const QString& channelName, DeviceSinkAPI *deviceAPI);
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -20,6 +20,7 @@
#define SDRBASE_CHANNEL_CHANNELSINKAPI_H_
#include <QString>
#include <QByteArray>
#include <stdint.h>
#include "util/export.h"
@ -33,10 +34,17 @@ class SDRANGEL_API ChannelSinkAPI {
public:
ChannelSinkAPI();
virtual ~ChannelSinkAPI() {}
virtual void destroy() = 0;
virtual int getDeltaFrequency() const = 0;
virtual void getIdentifier(QString& id) = 0;
virtual void getTitle(QString& title) = 0;
virtual void setName(const QString& name) = 0;
virtual QString getName() const = 0;
virtual qint64 getCenterFrequency() const = 0;
virtual QByteArray serialize() const = 0;
virtual bool deserialize(const QByteArray& data) = 0;
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response __attribute__((unused)),

View File

@ -33,10 +33,17 @@ class SDRANGEL_API ChannelSourceAPI {
public:
ChannelSourceAPI();
virtual ~ChannelSourceAPI() {}
virtual void destroy() = 0;
virtual int getDeltaFrequency() const = 0;
virtual void getIdentifier(QString& id) = 0;
virtual void getTitle(QString& title) = 0;
virtual void setName(const QString& name) = 0;
virtual QString getName() const = 0;
virtual qint64 getCenterFrequency() const = 0;
virtual QByteArray serialize() const = 0;
virtual bool deserialize(const QByteArray& data) = 0;
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response __attribute__((unused)),

View File

@ -24,6 +24,8 @@ class DeviceSampleSource;
class DeviceSampleSink;
class BasebandSampleSink;
class BasebandSampleSource;
class ChannelSinkAPI;
class ChannelSourceAPI;
class PluginInterface {
public:
@ -87,6 +89,12 @@ public:
DeviceSourceAPI *deviceAPI __attribute__((unused)) )
{ return 0; }
virtual void createRxChannel(
ChannelSinkAPI **channelSinkAPI,
const QString& channelName __attribute__((unused)),
DeviceSourceAPI *deviceAPI __attribute__((unused)) )
{ *channelSinkAPI = 0; }
// channel Tx plugins
virtual PluginInstanceGUI* createTxChannelGUI(
@ -100,7 +108,13 @@ public:
DeviceSinkAPI *deviceAPI __attribute__((unused)) )
{ return 0; }
// device source plugins only
virtual void createTxChannel(
ChannelSourceAPI **channelSourceAPI,
const QString& channelName __attribute__((unused)),
DeviceSourceAPI *deviceAPI __attribute__((unused)) )
{ *channelSourceAPI = 0; }
// device source plugins only
virtual SamplingDevices enumSampleSources() { return SamplingDevices(); }

File diff suppressed because it is too large Load Diff

View File

@ -58,6 +58,15 @@ public:
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
{ return 501; }
/**
* Handler of /sdrangel (DELETE) swagger/sdrangel/code/html2/index.html#api-Default-instanceSummary
* returns the Http status code (default 501: not implemented)
*/
virtual int instanceDelete(
SWGSDRangel::SWGInstanceSummaryResponse& response __attribute__((unused)),
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
{ return 501; }
/**
* Handler of /sdrangel/devices (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceDevices
* returns the Http status code (default 501: not implemented)

View File

@ -124,6 +124,7 @@ void WebAPIRequestMapper::instanceSummaryService(qtwebapp::HttpRequest& request,
{
SWGSDRangel::SWGErrorResponse errorResponse;
response.setHeader("Content-Type", "application/json");
qDebug("WebAPIRequestMapper::instanceSummaryService");
if (request.getMethod() == "GET")
{
@ -138,6 +139,19 @@ void WebAPIRequestMapper::instanceSummaryService(qtwebapp::HttpRequest& request,
response.write(errorResponse.asJson().toUtf8());
}
}
else if (request.getMethod() == "DELETE")
{
SWGSDRangel::SWGInstanceSummaryResponse normalResponse;
int status = m_adapter->instanceDelete(normalResponse, errorResponse);
response.setStatus(status);
if (status == 200) {
response.write(normalResponse.asJson().toUtf8());
} else {
response.write(errorResponse.asJson().toUtf8());
}
}
else
{
response.setStatus(405,"Invalid HTTP method");

View File

@ -83,7 +83,7 @@ void DeviceUISet::registerRxChannelInstance(const QString& channelName, PluginIn
void DeviceUISet::registerTxChannelInstance(const QString& channelName, PluginInstanceGUI* pluginGUI)
{
m_txChannelInstanceRegistrations.append(ChannelInstanceRegistration(channelName, pluginGUI));
renameRxChannelInstances();
renameTxChannelInstances();
}
void DeviceUISet::removeRxChannelInstance(PluginInstanceGUI* pluginGUI)
@ -111,7 +111,7 @@ void DeviceUISet::removeTxChannelInstance(PluginInstanceGUI* pluginGUI)
}
}
renameRxChannelInstances();
renameTxChannelInstances();
}
void DeviceUISet::freeRxChannels()
@ -223,7 +223,7 @@ void DeviceUISet::saveRxChannelSettings(Preset *preset)
}
else
{
qDebug("DeviceSourceAPI::saveChannelSettings: not a source preset");
qDebug("DeviceUISet::saveChannelSettings: not a source preset");
}
}

View File

@ -1,12 +1,14 @@
project (sdrsrv)
set(sdrsrv_SOURCES
maincore.cpp
maincore.cpp
device/deviceset.cpp
webapi/webapiadaptersrv.cpp
)
set(sdrsrv_HEADERS
maincore.h
device/deviceset.h
webapi/webapiadaptersrv.h
)

336
sdrsrv/device/deviceset.cpp Normal file
View File

@ -0,0 +1,336 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2017 Edouard Griffiths, F4EXB //
// //
// 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 //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "dsp/dspdevicesourceengine.h"
#include "dsp/dspdevicesinkengine.h"
#include "device/devicesourceapi.h"
#include "device/devicesinkapi.h"
#include "plugin/pluginapi.h"
#include "plugin/plugininterface.h"
#include "settings/preset.h"
#include "channel/channelsinkapi.h"
#include "channel/channelsourceapi.h"
#include "settings/preset.h"
#include "deviceset.h"
DeviceSet::DeviceSet(int tabIndex)
{
m_deviceSourceEngine = 0;
m_deviceSourceAPI = 0;
m_deviceSinkEngine = 0;
m_deviceSinkAPI = 0;
m_deviceTabIndex = tabIndex;
}
DeviceSet::~DeviceSet()
{
}
void DeviceSet::registerRxChannelInstance(const QString& channelName, ChannelSinkAPI* channelAPI)
{
m_rxChannelInstanceRegistrations.append(ChannelInstanceRegistration(channelName, channelAPI));
renameRxChannelInstances();
}
void DeviceSet::registerTxChannelInstance(const QString& channelName, ChannelSourceAPI* channelAPI)
{
m_txChannelInstanceRegistrations.append(ChannelInstanceRegistration(channelName, channelAPI));
renameTxChannelInstances();
}
void DeviceSet::removeRxChannelInstance(ChannelSinkAPI* channelAPI)
{
for(ChannelInstanceRegistrations::iterator it = m_rxChannelInstanceRegistrations.begin(); it != m_rxChannelInstanceRegistrations.end(); ++it)
{
if(it->m_channelSinkAPI == channelAPI)
{
m_rxChannelInstanceRegistrations.erase(it);
break;
}
}
renameRxChannelInstances();
}
void DeviceSet::removeTxChannelInstance(ChannelSourceAPI* channelAPI)
{
for(ChannelInstanceRegistrations::iterator it = m_txChannelInstanceRegistrations.begin(); it != m_txChannelInstanceRegistrations.end(); ++it)
{
if(it->m_channelSourceAPI == channelAPI)
{
m_txChannelInstanceRegistrations.erase(it);
break;
}
}
renameTxChannelInstances();
}
void DeviceSet::freeRxChannels()
{
for(int i = 0; i < m_rxChannelInstanceRegistrations.count(); i++)
{
qDebug("DeviceSet::freeAll: destroying channel [%s]", qPrintable(m_rxChannelInstanceRegistrations[i].m_channelName));
m_rxChannelInstanceRegistrations[i].m_channelSinkAPI->destroy();
}
}
void DeviceSet::freeTxChannels()
{
for(int i = 0; i < m_txChannelInstanceRegistrations.count(); i++)
{
qDebug("DeviceSet::freeAll: destroying channel [%s]", qPrintable(m_txChannelInstanceRegistrations[i].m_channelName));
m_txChannelInstanceRegistrations[i].m_channelSourceAPI->destroy();
}
}
void DeviceSet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginAPI)
{
if (preset->isSourcePreset())
{
qDebug("DeviceSet::loadChannelSettings: Loading preset [%s | %s]", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
// Available channel plugins
PluginAPI::ChannelRegistrations *channelRegistrations = pluginAPI->getRxChannelRegistrations();
// copy currently open channels and clear list
ChannelInstanceRegistrations openChannels = m_rxChannelInstanceRegistrations;
m_rxChannelInstanceRegistrations.clear();
qDebug("DeviceSet::loadChannelSettings: %d channel(s) in preset", preset->getChannelCount());
for(int i = 0; i < preset->getChannelCount(); i++)
{
const Preset::ChannelConfig& channelConfig = preset->getChannelConfig(i);
ChannelInstanceRegistration reg;
// if we have one instance available already, use it
for(int i = 0; i < openChannels.count(); i++)
{
qDebug("DeviceSet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[i].m_channelName), qPrintable(channelConfig.m_channelIdURI));
if(openChannels[i].m_channelName == channelConfig.m_channelIdURI)
{
qDebug("DeviceSet::loadChannelSettings: channel [%s] found", qPrintable(openChannels[i].m_channelName));
reg = openChannels.takeAt(i);
m_rxChannelInstanceRegistrations.append(reg);
break;
}
}
// if we haven't one already, create one
if(reg.m_channelSinkAPI == 0)
{
for(int i = 0; i < channelRegistrations->count(); i++)
{
if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
{
qDebug("DeviceSet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI));
ChannelSinkAPI *rxChannel;
(*channelRegistrations)[i].m_plugin->createRxChannel(
&rxChannel, channelConfig.m_channelIdURI, m_deviceSourceAPI);
reg = ChannelInstanceRegistration(
channelConfig.m_channelIdURI, rxChannel);
break;
}
}
}
if(reg.m_channelSinkAPI != 0)
{
qDebug("DeviceSet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channelIdURI));
reg.m_channelSinkAPI->deserialize(channelConfig.m_config);
}
}
// everything, that is still "available" is not needed anymore
for(int i = 0; i < openChannels.count(); i++)
{
qDebug("DeviceSet::loadChannelSettings: destroying spare channel [%s]", qPrintable(openChannels[i].m_channelName));
openChannels[i].m_channelSinkAPI->destroy();
}
renameRxChannelInstances();
}
else
{
qDebug("DeviceSet::loadChannelSettings: Loading preset [%s | %s] not a source preset", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
}
}
void DeviceSet::saveRxChannelSettings(Preset *preset)
{
if (preset->isSourcePreset())
{
qSort(m_rxChannelInstanceRegistrations.begin(), m_rxChannelInstanceRegistrations.end()); // sort by increasing delta frequency and type
for(int i = 0; i < m_rxChannelInstanceRegistrations.count(); i++)
{
qDebug("DeviceSet::saveChannelSettings: channel [%s] saved", qPrintable(m_rxChannelInstanceRegistrations[i].m_channelName));
preset->addChannel(m_rxChannelInstanceRegistrations[i].m_channelName, m_rxChannelInstanceRegistrations[i].m_channelSinkAPI->serialize());
}
}
else
{
qDebug("DeviceSet::saveChannelSettings: not a source preset");
}
}
void DeviceSet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginAPI)
{
if (preset->isSourcePreset())
{
qDebug("DeviceSet::loadChannelSettings: Loading preset [%s | %s] not a sink preset", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
}
else
{
qDebug("DeviceSet::loadChannelSettings: Loading preset [%s | %s]", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
// Available channel plugins
PluginAPI::ChannelRegistrations *channelRegistrations = pluginAPI->getTxChannelRegistrations();
// copy currently open channels and clear list
ChannelInstanceRegistrations openChannels = m_txChannelInstanceRegistrations;
m_txChannelInstanceRegistrations.clear();
qDebug("DeviceSet::loadChannelSettings: %d channel(s) in preset", preset->getChannelCount());
for(int i = 0; i < preset->getChannelCount(); i++)
{
const Preset::ChannelConfig& channelConfig = preset->getChannelConfig(i);
ChannelInstanceRegistration reg;
// if we have one instance available already, use it
for(int i = 0; i < openChannels.count(); i++)
{
qDebug("DeviceSet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[i].m_channelName), qPrintable(channelConfig.m_channelIdURI));
if(openChannels[i].m_channelName == channelConfig.m_channelIdURI)
{
qDebug("DeviceSet::loadChannelSettings: channel [%s] found", qPrintable(openChannels[i].m_channelName));
reg = openChannels.takeAt(i);
m_txChannelInstanceRegistrations.append(reg);
break;
}
}
// if we haven't one already, create one
if(reg.m_channelSourceAPI == 0)
{
for(int i = 0; i < channelRegistrations->count(); i++)
{
if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
{
qDebug("DeviceSet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channelIdURI));
ChannelSourceAPI *txChannel;
(*channelRegistrations)[i].m_plugin->createTxChannel(
&txChannel, channelConfig.m_channelIdURI, m_deviceSourceAPI);
reg = ChannelInstanceRegistration(
channelConfig.m_channelIdURI, txChannel);
break;
}
}
}
if(reg.m_channelSourceAPI != 0)
{
qDebug("DeviceSet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channelIdURI));
reg.m_channelSourceAPI->deserialize(channelConfig.m_config);
}
}
// everything, that is still "available" is not needed anymore
for(int i = 0; i < openChannels.count(); i++)
{
qDebug("DeviceUISet::loadChannelSettings: destroying spare channel [%s]", qPrintable(openChannels[i].m_channelName));
openChannels[i].m_channelSourceAPI->destroy();
}
renameTxChannelInstances();
}
}
void DeviceSet::saveTxChannelSettings(Preset *preset)
{
if (preset->isSourcePreset())
{
qDebug("DeviceSet::saveChannelSettings: not a sink preset");
}
else
{
qSort(m_txChannelInstanceRegistrations.begin(), m_txChannelInstanceRegistrations.end()); // sort by increasing delta frequency and type
for(int i = 0; i < m_txChannelInstanceRegistrations.count(); i++)
{
qDebug("DeviceSet::saveChannelSettings: channel [%s] saved", qPrintable(m_txChannelInstanceRegistrations[i].m_channelName));
preset->addChannel(m_txChannelInstanceRegistrations[i].m_channelName, m_txChannelInstanceRegistrations[i].m_channelSourceAPI->serialize());
}
}
}
void DeviceSet::renameRxChannelInstances()
{
for(int i = 0; i < m_rxChannelInstanceRegistrations.count(); i++)
{
m_rxChannelInstanceRegistrations[i].m_channelSinkAPI->setName(QString("%1:%2").arg(m_rxChannelInstanceRegistrations[i].m_channelName).arg(i));
}
}
void DeviceSet::renameTxChannelInstances()
{
for(int i = 0; i < m_txChannelInstanceRegistrations.count(); i++)
{
m_txChannelInstanceRegistrations[i].m_channelSourceAPI->setName(QString("%1:%2").arg(m_txChannelInstanceRegistrations[i].m_channelName).arg(i));
}
}
// sort by increasing delta frequency and type (i.e. name)
bool DeviceSet::ChannelInstanceRegistration::operator<(const ChannelInstanceRegistration& other) const
{
if (m_channelSinkAPI && other.m_channelSinkAPI)
{
if (m_channelSinkAPI->getCenterFrequency() == other.m_channelSinkAPI->getCenterFrequency())
{
return m_channelSinkAPI->getName() < other.m_channelSinkAPI->getName();
}
else
{
return m_channelSinkAPI->getCenterFrequency() < other.m_channelSinkAPI->getCenterFrequency();
}
}
else if (m_channelSourceAPI && other.m_channelSourceAPI)
{
if (m_channelSourceAPI->getCenterFrequency() == other.m_channelSourceAPI->getCenterFrequency())
{
return m_channelSourceAPI->getName() < other.m_channelSourceAPI->getName();
}
else
{
return m_channelSourceAPI->getCenterFrequency() < other.m_channelSourceAPI->getCenterFrequency();
}
}
else
{
return false;
}
}

90
sdrsrv/device/deviceset.h Normal file
View File

@ -0,0 +1,90 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2017 Edouard Griffiths, F4EXB //
// //
// 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 //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef SDRSRV_DEVICE_DEVICESET_H_
#define SDRSRV_DEVICE_DEVICESET_H_
#include <QTimer>
class DSPDeviceSourceEngine;
class DeviceSourceAPI;
class DSPDeviceSinkEngine;
class DeviceSinkAPI;
class PluginAPI;
class ChannelSinkAPI;
class ChannelSourceAPI;
class Preset;
struct DeviceSet
{
DSPDeviceSourceEngine *m_deviceSourceEngine;
DeviceSourceAPI *m_deviceSourceAPI;
DSPDeviceSinkEngine *m_deviceSinkEngine;
DeviceSinkAPI *m_deviceSinkAPI;
DeviceSet(int tabIndex);
~DeviceSet();
void registerRxChannelInstance(const QString& channelName, ChannelSinkAPI* channelAPI);
void registerTxChannelInstance(const QString& channelName, ChannelSourceAPI* channelAPI);
void removeRxChannelInstance(ChannelSinkAPI* channelAPI);
void removeTxChannelInstance(ChannelSourceAPI* channelAPI);
void freeRxChannels();
void freeTxChannels();
void loadRxChannelSettings(const Preset* preset, PluginAPI *pluginAPI);
void saveRxChannelSettings(Preset* preset);
void loadTxChannelSettings(const Preset* preset, PluginAPI *pluginAPI);
void saveTxChannelSettings(Preset* preset);
private:
struct ChannelInstanceRegistration
{
QString m_channelName;
ChannelSinkAPI *m_channelSinkAPI;
ChannelSourceAPI *m_channelSourceAPI;
ChannelInstanceRegistration() :
m_channelName(),
m_channelSinkAPI(0),
m_channelSourceAPI(0)
{ }
ChannelInstanceRegistration(const QString& channelName, ChannelSinkAPI* channelAPI) :
m_channelName(channelName),
m_channelSinkAPI(channelAPI),
m_channelSourceAPI(0)
{ }
ChannelInstanceRegistration(const QString& channelName, ChannelSourceAPI* channelAPI) :
m_channelName(channelName),
m_channelSinkAPI(0),
m_channelSourceAPI(channelAPI)
{ }
bool operator<(const ChannelInstanceRegistration& other) const;
};
typedef QList<ChannelInstanceRegistration> ChannelInstanceRegistrations;
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations;
ChannelInstanceRegistrations m_txChannelInstanceRegistrations;
int m_deviceTabIndex;
void renameRxChannelInstances();
void renameTxChannelInstances();
};
#endif /* SDRSRV_DEVICE_DEVICESET_H_ */

View File

@ -17,6 +17,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QDebug>
#include <unistd.h>
#include "dsp/dspengine.h"
#include "dsp/dspdevicesourceengine.h"
@ -28,6 +29,8 @@
#include "maincore.h"
MESSAGE_CLASS_DEFINITION(MainCore::MsgDeleteInstance, Message)
MainCore *MainCore::m_instance = 0;
MainCore::MainCore(qtwebapp::LoggerWithFile *logger, const MainParser& parser, QObject *parent) :
@ -36,7 +39,8 @@ MainCore::MainCore(qtwebapp::LoggerWithFile *logger, const MainParser& parser, Q
m_masterTabIndex(-1),
m_dspEngine(DSPEngine::instance()),
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
m_logger(logger)
m_logger(logger),
m_running(true)
{
qDebug() << "MainCore::MainCore: start";
@ -74,7 +78,37 @@ MainCore::~MainCore()
void MainCore::run()
{
qDebug() << "MainCore::run: start";
// TODO: the main loop is here
while (m_running) {
sleep(1);
}
qDebug() << "MainCore::run: end";
emit finished();
}
bool MainCore::handleMessage(const Message& cmd)
{
if (MsgDeleteInstance::match(cmd))
{
m_running = false;
return true;
}
else
{
return false;
}
}
void MainCore::handleMessages()
{
Message* message;
while ((message = m_inputMessageQueue.pop()) != 0)
{
qDebug("MainCore::handleMessages: message: %s", message->getIdentifier());
handleMessage(*message);
delete message;
}
}

View File

@ -38,10 +38,10 @@ class PluginAPI;
class PluginInterface;
class PluginManager;
class ChannelMarker;
class DeviceSet; // TODO: create this class
class DeviceSet;
class WebAPIRequestMapper;
class WebAPIServer;
class WebAPIAdapterSrv; // TODO: create this class
class WebAPIAdapterSrv;
namespace qtwebapp {
class LoggerWithFile;
@ -69,21 +69,43 @@ signals:
void finished();
private:
class MsgDeleteInstance : public Message {
MESSAGE_CLASS_DECLARATION
public:
static MsgDeleteInstance* create()
{
return new MsgDeleteInstance();
}
private:
MsgDeleteInstance() :
Message()
{ }
};
static MainCore *m_instance;
MessageQueue m_inputMessageQueue;
QTimer m_masterTimer;
MainSettings m_settings;
int m_masterTabIndex;
DSPEngine* m_dspEngine;
PluginManager* m_pluginManager;
int m_lastEngineState;
AudioDeviceInfo m_audioDeviceInfo;
qtwebapp::LoggerWithFile *m_logger;
bool m_running;
MessageQueue m_inputMessageQueue;
QTimer m_masterTimer;
std::vector<DeviceSet*> m_deviceSets;
PluginManager* m_pluginManager;
AudioDeviceInfo m_audioDeviceInfo;
WebAPIRequestMapper *m_requestMapper;
WebAPIServer *m_apiServer;
WebAPIAdapterSrv *m_apiAdapter;
bool handleMessage(const Message& cmd);
private slots:
void handleMessages();
};

View File

@ -21,8 +21,18 @@
#include <unistd.h>
#include "maincore.h"
#include "SWGInstanceSummaryResponse.h"
#include "SWGErrorResponse.h"
#include "maincore.h"
#include "loggerwithfile.h"
#include "device/deviceset.h"
#include "device/devicesinkapi.h"
#include "device/devicesourceapi.h"
#include "dsp/devicesamplesink.h"
#include "dsp/devicesamplesource.h"
#include "channel/channelsourceapi.h"
#include "channel/channelsinkapi.h"
#include "webapiadaptersrv.h"
WebAPIAdapterSrv::WebAPIAdapterSrv(MainCore& mainCore) :
@ -34,5 +44,122 @@ WebAPIAdapterSrv::~WebAPIAdapterSrv()
{
}
int WebAPIAdapterSrv::instanceSummary(
SWGSDRangel::SWGInstanceSummaryResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
{
*response.getVersion() = QCoreApplication::instance()->applicationVersion();
SWGSDRangel::SWGLoggingInfo *logging = response.getLogging();
logging->init();
logging->setDumpToFile(m_mainCore.m_logger->getUseFileLogger() ? 1 : 0);
if (logging->getDumpToFile()) {
m_mainCore.m_logger->getLogFileName(*logging->getFileName());
m_mainCore.m_logger->getFileMinMessageLevelStr(*logging->getFileLevel());
}
m_mainCore.m_logger->getConsoleMinMessageLevelStr(*logging->getConsoleLevel());
SWGSDRangel::SWGDeviceSetList *deviceSetList = response.getDevicesetlist();
getDeviceSetList(deviceSetList);
return 200;
}
int WebAPIAdapterSrv::instanceDelete(
SWGSDRangel::SWGInstanceSummaryResponse& response,
SWGSDRangel::SWGErrorResponse& error)
{
instanceSummary(response, error);
MainCore::MsgDeleteInstance *msg = MainCore::MsgDeleteInstance::create();
m_mainCore.getInputMessageQueue()->push(msg);
return 200;
}
void WebAPIAdapterSrv::getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList)
{
deviceSetList->init();
deviceSetList->setDevicesetcount((int) m_mainCore.m_deviceSets.size());
std::vector<DeviceSet*>::const_iterator it = m_mainCore.m_deviceSets.begin();
for (int i = 0; it != m_mainCore.m_deviceSets.end(); ++it, i++)
{
QList<SWGSDRangel::SWGDeviceSet*> *deviceSets = deviceSetList->getDeviceSets();
deviceSets->append(new SWGSDRangel::SWGDeviceSet());
getDeviceSet(deviceSets->back(), *it, i);
}
}
void WebAPIAdapterSrv::getDeviceSet(SWGSDRangel::SWGDeviceSet *swgDeviceSet, const DeviceSet* deviceSet, int deviceUISetIndex)
{
SWGSDRangel::SWGSamplingDevice *samplingDevice = swgDeviceSet->getSamplingDevice();
samplingDevice->init();
samplingDevice->setIndex(deviceUISetIndex);
samplingDevice->setTx(deviceSet->m_deviceSinkEngine != 0);
if (deviceSet->m_deviceSinkEngine) // Tx data
{
*samplingDevice->getHwType() = deviceSet->m_deviceSinkAPI->getHardwareId();
*samplingDevice->getSerial() = deviceSet->m_deviceSinkAPI->getSampleSinkSerial();
samplingDevice->setSequence(deviceSet->m_deviceSinkAPI->getSampleSinkSequence());
samplingDevice->setNbStreams(deviceSet->m_deviceSinkAPI->getNbItems());
samplingDevice->setStreamIndex(deviceSet->m_deviceSinkAPI->getItemIndex());
deviceSet->m_deviceSinkAPI->getDeviceEngineStateStr(*samplingDevice->getState());
DeviceSampleSink *sampleSink = deviceSet->m_deviceSinkEngine->getSink();
if (sampleSink) {
samplingDevice->setCenterFrequency(sampleSink->getCenterFrequency());
samplingDevice->setBandwidth(sampleSink->getSampleRate());
}
swgDeviceSet->setChannelcount(deviceSet->m_deviceSinkAPI->getNbChannels());
QList<SWGSDRangel::SWGChannel*> *channels = swgDeviceSet->getChannels();
for (int i = 0; i < swgDeviceSet->getChannelcount(); i++)
{
channels->append(new SWGSDRangel::SWGChannel);
ChannelSourceAPI *channel = deviceSet->m_deviceSinkAPI->getChanelAPIAt(i);
channels->back()->setDeltaFrequency(channel->getDeltaFrequency());
channels->back()->setIndex(channel->getIndexInDeviceSet());
channels->back()->setUid(channel->getUID());
channel->getIdentifier(*channels->back()->getId());
channel->getTitle(*channels->back()->getTitle());
}
}
if (deviceSet->m_deviceSourceEngine) // Rx data
{
*samplingDevice->getHwType() = deviceSet->m_deviceSourceAPI->getHardwareId();
*samplingDevice->getSerial() = deviceSet->m_deviceSourceAPI->getSampleSourceSerial();
samplingDevice->setSequence(deviceSet->m_deviceSourceAPI->getSampleSourceSequence());
samplingDevice->setNbStreams(deviceSet->m_deviceSourceAPI->getNbItems());
samplingDevice->setStreamIndex(deviceSet->m_deviceSourceAPI->getItemIndex());
deviceSet->m_deviceSourceAPI->getDeviceEngineStateStr(*samplingDevice->getState());
DeviceSampleSource *sampleSource = deviceSet->m_deviceSourceEngine->getSource();
if (sampleSource) {
samplingDevice->setCenterFrequency(sampleSource->getCenterFrequency());
samplingDevice->setBandwidth(sampleSource->getSampleRate());
}
swgDeviceSet->setChannelcount(deviceSet->m_deviceSourceAPI->getNbChannels());
QList<SWGSDRangel::SWGChannel*> *channels = swgDeviceSet->getChannels();
for (int i = 0; i < swgDeviceSet->getChannelcount(); i++)
{
channels->append(new SWGSDRangel::SWGChannel);
ChannelSinkAPI *channel = deviceSet->m_deviceSourceAPI->getChanelAPIAt(i);
channels->back()->setDeltaFrequency(channel->getDeltaFrequency());
channels->back()->setIndex(channel->getIndexInDeviceSet());
channels->back()->setUid(channel->getUID());
channel->getIdentifier(*channels->back()->getId());
channel->getTitle(*channels->back()->getTitle());
}
}
}

View File

@ -24,6 +24,7 @@
#include "webapi/webapiadapterinterface.h"
class MainCore;
class DeviceSet;
class WebAPIAdapterSrv: public WebAPIAdapterInterface
{
@ -31,8 +32,19 @@ public:
WebAPIAdapterSrv(MainCore& mainCore);
virtual ~WebAPIAdapterSrv();
virtual int instanceSummary(
SWGSDRangel::SWGInstanceSummaryResponse& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int instanceDelete(
SWGSDRangel::SWGInstanceSummaryResponse& response,
SWGSDRangel::SWGErrorResponse& error);
private:
MainCore& m_mainCore;
void getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList);
void getDeviceSet(SWGSDRangel::SWGDeviceSet *swgDeviceSet, const DeviceSet* deviceSet, int deviceUISetIndex);
};
#endif /* SDRSRV_WEBAPI_WEBAPIADAPTERSRV_H_ */

View File

@ -7,6 +7,7 @@ info:
Limitations:
* In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented)
* Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely.
* The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source
* The content type returned is always application/json except in the following cases:
* An incorrect URL was specified: this document is returned as text/html with a status 400
@ -56,6 +57,25 @@ paths:
$ref: "#/definitions/ErrorResponse"
"501":
description: Function not implemented
delete:
description: Stop SDRangel instance (server only)
# used as the method name of the controller
operationId: instanceDelete
tags:
- Instance
responses:
"200":
description: On success returns instance summary before it was closed
schema:
# a pointer to a definition
$ref: "#/definitions/InstanceSummaryResponse"
# responses may fall through to errors
"500":
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
"501":
description: Function not implemented
/sdrangel/devices:
x-swagger-router-controller: instance
get:

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

View File

@ -1,6 +1,6 @@
/**
* SDRangel
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations: * In SDRangel GUI version there is no support for channel deletion. As a consequence the call to the API /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex} returns with a status code of 501 (not implemented) * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 * There is no API adapter in the targeted instance: message \"Service not available\" as text/plain is returned with a status 500. This should not happen with released code. ---
*
* OpenAPI spec version: 4.0.0
* Contact: f4exb06@gmail.com

Some files were not shown because too many files have changed in this diff Show More