mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-26 13:26:24 -04:00
REST API: implement reverse API settings (1). Bump version
This commit is contained in:
@@ -704,6 +704,18 @@ int AirspyInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||
settings.m_fileRecordName = *response.getAirspySettings()->getFileRecordName();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getTestSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.getTestSourceSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.getTestSourceSettings()->getReverseApiPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getTestSourceSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureAirspy *msg = MsgConfigureAirspy::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
@@ -752,6 +764,17 @@ void AirspyInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
|
||||
} else {
|
||||
response.getAirspySettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getTestSourceSettings()->getReverseApiAddress()) {
|
||||
*response.getTestSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.getTestSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getTestSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
}
|
||||
|
||||
void AirspyInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
|
||||
@@ -32,7 +32,7 @@ const int AirspyPlugin::m_maxDevices = 32;
|
||||
|
||||
const PluginDescriptor AirspyPlugin::m_pluginDescriptor = {
|
||||
QString("Airspy Input"),
|
||||
QString("4.3.2"),
|
||||
QString("4.4.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
@@ -572,6 +572,18 @@ int AirspyHFInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||
settings.m_fileRecordName = *response.getAirspyHfSettings()->getFileRecordName();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getTestSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.getTestSourceSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.getTestSourceSettings()->getReverseApiPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getTestSourceSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureAirspyHF *msg = MsgConfigureAirspyHF::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
@@ -601,6 +613,17 @@ void AirspyHFInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
} else {
|
||||
response.getAirspyHfSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getTestSourceSettings()->getReverseApiAddress()) {
|
||||
*response.getTestSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.getTestSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getTestSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
}
|
||||
|
||||
void AirspyHFInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
const PluginDescriptor AirspyHFPlugin::m_pluginDescriptor = {
|
||||
QString("AirspyHF Input"),
|
||||
QString("4.3.2"),
|
||||
QString("4.4.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
@@ -641,6 +641,17 @@ void Bladerf1Input::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
} else {
|
||||
response.getBladeRf1InputSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getTestSourceSettings()->getReverseApiAddress()) {
|
||||
*response.getTestSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.getTestSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getTestSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
}
|
||||
|
||||
int Bladerf1Input::webapiSettingsPutPatch(
|
||||
@@ -694,6 +705,18 @@ int Bladerf1Input::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||
settings.m_fileRecordName = *response.getBladeRf1InputSettings()->getFileRecordName();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getTestSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.getTestSourceSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.getTestSourceSettings()->getReverseApiPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getTestSourceSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureBladerf1 *msg = MsgConfigureBladerf1::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
const PluginDescriptor Blderf1InputPlugin::m_pluginDescriptor = {
|
||||
QString("BladeRF1 Input"),
|
||||
QString("4.3.2"),
|
||||
QString("4.4.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
@@ -1094,6 +1094,18 @@ int BladeRF2Input::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||
settings.m_fileRecordName = *response.getBladeRf1InputSettings()->getFileRecordName();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getTestSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.getTestSourceSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.getTestSourceSettings()->getReverseApiPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getTestSourceSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureBladeRF2 *msg = MsgConfigureBladeRF2::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
@@ -1138,6 +1150,17 @@ void BladeRF2Input::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
} else {
|
||||
response.getBladeRf2InputSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getTestSourceSettings()->getReverseApiAddress()) {
|
||||
*response.getTestSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.getTestSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.getTestSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getTestSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
}
|
||||
|
||||
void BladeRF2Input::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
const PluginDescriptor Blderf2InputPlugin::m_pluginDescriptor = {
|
||||
QString("BladeRF2 Input"),
|
||||
QString("4.3.2"),
|
||||
QString("4.4.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
const PluginDescriptor TestSourcePlugin::m_pluginDescriptor = {
|
||||
QString("Test Source input"),
|
||||
QString("4.3.2"),
|
||||
QString("4.4.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user