205 changed files with 3842 additions and 493 deletions
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "testmi.h" |
||||
#include "testmiwebapiadapter.h" |
||||
|
||||
TestMIWebAPIAdapter::TestMIWebAPIAdapter() |
||||
{} |
||||
|
||||
TestMIWebAPIAdapter::~TestMIWebAPIAdapter() |
||||
{} |
||||
|
||||
int TestMIWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
TestMI::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int TestMIWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
TestMI::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "testmisettings.h" |
||||
|
||||
class TestMIWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
TestMIWebAPIAdapter(); |
||||
virtual ~TestMIWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
TestMISettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "bladerf1output.h" |
||||
#include "bladerf1outputwebapiadapter.h" |
||||
|
||||
BladeRF1OutputWebAPIAdapter::BladeRF1OutputWebAPIAdapter() |
||||
{} |
||||
|
||||
BladeRF1OutputWebAPIAdapter::~BladeRF1OutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int BladeRF1OutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
Bladerf1Output::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int BladeRF1OutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
Bladerf1Output::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "bladerf1outputsettings.h" |
||||
|
||||
class BladeRF1OutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
BladeRF1OutputWebAPIAdapter(); |
||||
virtual ~BladeRF1OutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
BladeRF1OutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "bladerf2output.h" |
||||
#include "bladerf2outputwebapiadapter.h" |
||||
|
||||
BladeRF2OutputWebAPIAdapter::BladeRF2OutputWebAPIAdapter() |
||||
{} |
||||
|
||||
BladeRF2OutputWebAPIAdapter::~BladeRF2OutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int BladeRF2OutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
BladeRF2Output::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int BladeRF2OutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
BladeRF2Output::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "bladerf2outputsettings.h" |
||||
|
||||
class BladeRF2OutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
BladeRF2OutputWebAPIAdapter(); |
||||
virtual ~BladeRF2OutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
BladeRF2OutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "hackrfoutput.h" |
||||
#include "hackrfoutputwebapiadapter.h" |
||||
|
||||
HackRFOutputWebAPIAdapter::HackRFOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
HackRFOutputWebAPIAdapter::~HackRFOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int HackRFOutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
HackRFOutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int HackRFOutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
HackRFOutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "hackrfoutputsettings.h" |
||||
|
||||
class HackRFOutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
HackRFOutputWebAPIAdapter(); |
||||
virtual ~HackRFOutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
HackRFOutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "limesdroutput.h" |
||||
#include "limesdroutputwebapiadapter.h" |
||||
|
||||
LimeSDROutputWebAPIAdapter::LimeSDROutputWebAPIAdapter() |
||||
{} |
||||
|
||||
LimeSDROutputWebAPIAdapter::~LimeSDROutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int LimeSDROutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
LimeSDROutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int LimeSDROutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
LimeSDROutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "limesdroutputsettings.h" |
||||
|
||||
class LimeSDROutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
LimeSDROutputWebAPIAdapter(); |
||||
virtual ~LimeSDROutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
LimeSDROutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "localoutput.h" |
||||
#include "localoutputwebapiadapter.h" |
||||
|
||||
LocalOutputWebAPIAdapter::LocalOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
LocalOutputWebAPIAdapter::~LocalOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int LocalOutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
LocalOutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int LocalOutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
LocalOutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "localoutputsettings.h" |
||||
|
||||
class LocalOutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
LocalOutputWebAPIAdapter(); |
||||
virtual ~LocalOutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
LocalOutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "plutosdroutput.h" |
||||
#include "plutosdroutputwebapiadapter.h" |
||||
|
||||
PlutoSDROutputWebAPIAdapter::PlutoSDROutputWebAPIAdapter() |
||||
{} |
||||
|
||||
PlutoSDROutputWebAPIAdapter::~PlutoSDROutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int PlutoSDROutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
PlutoSDROutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int PlutoSDROutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
PlutoSDROutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "plutosdroutputsettings.h" |
||||
|
||||
class PlutoSDROutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
PlutoSDROutputWebAPIAdapter(); |
||||
virtual ~PlutoSDROutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
PlutoSDROutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "remoteoutput.h" |
||||
#include "remoteoutputwebapiadapter.h" |
||||
|
||||
RemoteOutputWebAPIAdapter::RemoteOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
RemoteOutputWebAPIAdapter::~RemoteOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int RemoteOutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
RemoteOutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int RemoteOutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
RemoteOutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "remoteoutputsettings.h" |
||||
|
||||
class RemoteOutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
RemoteOutputWebAPIAdapter(); |
||||
virtual ~RemoteOutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
RemoteOutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "soapysdroutput.h" |
||||
#include "soapysdroutputwebapiadapter.h" |
||||
|
||||
SoapySDROutputWebAPIAdapter::SoapySDROutputWebAPIAdapter() |
||||
{} |
||||
|
||||
SoapySDROutputWebAPIAdapter::~SoapySDROutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int SoapySDROutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
SoapySDROutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int SoapySDROutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
SoapySDROutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "soapysdroutputsettings.h" |
||||
|
||||
class SoapySDROutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
SoapySDROutputWebAPIAdapter(); |
||||
virtual ~SoapySDROutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
SoapySDROutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "xtrxoutput.h" |
||||
#include "xtrxoutputwebapiadapter.h" |
||||
|
||||
XTRXOutputWebAPIAdapter::XTRXOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
XTRXOutputWebAPIAdapter::~XTRXOutputWebAPIAdapter() |
||||
{} |
||||
|
||||
int XTRXOutputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
XTRXOutput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int XTRXOutputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
XTRXOutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "xtrxoutputsettings.h" |
||||
|
||||
class XTRXOutputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
XTRXOutputWebAPIAdapter(); |
||||
virtual ~XTRXOutputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
XTRXOutputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "airspyhfinput.h" |
||||
#include "airspyhfwebapiadapter.h" |
||||
|
||||
AirspyHFWebAPIAdapter::AirspyHFWebAPIAdapter() |
||||
{} |
||||
|
||||
AirspyHFWebAPIAdapter::~AirspyHFWebAPIAdapter() |
||||
{} |
||||
|
||||
int AirspyHFWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
AirspyHFInput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int AirspyHFWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
AirspyHFInput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "airspyhfsettings.h" |
||||
|
||||
class AirspyHFWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
AirspyHFWebAPIAdapter(); |
||||
virtual ~AirspyHFWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
AirspyHFSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "bladerf1input.h" |
||||
#include "bladerf1inputwebapiadapter.h" |
||||
|
||||
BladeRF1InputWebAPIAdapter::BladeRF1InputWebAPIAdapter() |
||||
{} |
||||
|
||||
BladeRF1InputWebAPIAdapter::~BladeRF1InputWebAPIAdapter() |
||||
{} |
||||
|
||||
int BladeRF1InputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
Bladerf1Input::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int BladeRF1InputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
Bladerf1Input::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "bladerf1inputsettings.h" |
||||
|
||||
class BladeRF1InputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
BladeRF1InputWebAPIAdapter(); |
||||
virtual ~BladeRF1InputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
BladeRF1InputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "bladerf2input.h" |
||||
#include "bladerf2inputwebapiadapter.h" |
||||
|
||||
BladeRF2InputWebAPIAdapter::BladeRF2InputWebAPIAdapter() |
||||
{} |
||||
|
||||
BladeRF2InputWebAPIAdapter::~BladeRF2InputWebAPIAdapter() |
||||
{} |
||||
|
||||
int BladeRF2InputWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
BladeRF2Input::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int BladeRF2InputWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
BladeRF2Input::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "bladerf2inputsettings.h" |
||||
|
||||
class BladeRF2InputWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
BladeRF2InputWebAPIAdapter(); |
||||
virtual ~BladeRF2InputWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
BladeRF2InputSettings m_settings; |
||||
}; |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "SWGDeviceSettings.h" |
||||
#include "fcdproinput.h" |
||||
#include "fcdprowebapiadapter.h" |
||||
|
||||
FCDProWebAPIAdapter::FCDProWebAPIAdapter() |
||||
{} |
||||
|
||||
FCDProWebAPIAdapter::~FCDProWebAPIAdapter() |
||||
{} |
||||
|
||||
int FCDProWebAPIAdapter::webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
response.setAirspyHfSettings(new SWGSDRangel::SWGAirspyHFSettings()); |
||||
response.getAirspyHfSettings()->init(); |
||||
FCDProInput::webapiFormatDeviceSettings(response, m_settings); |
||||
return 200; |
||||
} |
||||
|
||||
int FCDProWebAPIAdapter::webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage) |
||||
{ |
||||
(void) errorMessage; |
||||
FCDProInput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response); |
||||
return 200; |
||||
} |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Implementation of static web API adapters used for preset serialization and //
|
||||
// deserialization //
|
||||
// //
|
||||
// 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 //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// 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 "device/devicewebapiadapter.h" |
||||
#include "fcdprosettings.h" |
||||
|
||||
class FCDProWebAPIAdapter : public DeviceWebAPIAdapter |
||||
{ |
||||
public: |
||||
FCDProWebAPIAdapter(); |
||||
virtual ~FCDProWebAPIAdapter(); |
||||
virtual QByteArray serialize() { return m_settings.serialize(); } |
||||
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); } |
||||
|
||||
virtual int webapiSettingsGet( |
||||
SWGSDRangel::SWGDeviceSettings& response, |
||||
QString& errorMessage); |
||||
|
||||
virtual int webapiSettingsPutPatch( |
||||
bool force, |
||||
const QStringList& deviceSettingsKeys, |
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage); |
||||
|
||||
private: |
||||
FCDProSettings m_settings; |
||||
}; |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue