mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-02 00:20:13 -04:00
PlutoSDR input: implemeted WEB API
This commit is contained in:
parent
c424ce10e4
commit
3f303a0c0d
@ -18,6 +18,8 @@
|
||||
|
||||
#include "SWGDeviceSettings.h"
|
||||
#include "SWGDeviceState.h"
|
||||
#include "SWGDeviceReport.h"
|
||||
#include "SWGPlutoSdrInputReport.h"
|
||||
|
||||
#include "dsp/filerecord.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
@ -624,3 +626,144 @@ int PlutoSDRInput::webapiRun(
|
||||
return 200;
|
||||
}
|
||||
|
||||
int PlutoSDRInput::webapiSettingsGet(
|
||||
SWGSDRangel::SWGDeviceSettings& response,
|
||||
QString& errorMessage __attribute__((unused)))
|
||||
{
|
||||
response.setPlutoSdrInputSettings(new SWGSDRangel::SWGPlutoSdrInputSettings());
|
||||
response.getPlutoSdrInputSettings()->init();
|
||||
webapiFormatDeviceSettings(response, m_settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
int PlutoSDRInput::webapiSettingsPutPatch(
|
||||
bool force,
|
||||
const QStringList& deviceSettingsKeys,
|
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage __attribute__((unused)))
|
||||
{
|
||||
PlutoSDRInputSettings settings = m_settings;
|
||||
|
||||
if (deviceSettingsKeys.contains("centerFrequency")) {
|
||||
settings.m_centerFrequency = response.getPlutoSdrInputSettings()->getCenterFrequency();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("devSampleRate")) {
|
||||
settings.m_devSampleRate = response.getPlutoSdrInputSettings()->getDevSampleRate();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("LOppmTenths")) {
|
||||
settings.m_LOppmTenths = response.getPlutoSdrInputSettings()->getLOppmTenths();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("lpfFIREnable")) {
|
||||
settings.m_lpfFIREnable = response.getPlutoSdrInputSettings()->getLpfFirEnable() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("lpfFIRBW")) {
|
||||
settings.m_lpfFIRBW = response.getPlutoSdrInputSettings()->getLpfFirbw();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("lpfFIRlog2Decim")) {
|
||||
settings.m_lpfFIRlog2Decim = response.getPlutoSdrInputSettings()->getLpfFiRlog2Decim();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("lpfFIRGain")) {
|
||||
settings.m_lpfFIRGain = response.getPlutoSdrInputSettings()->getLpfFirGain();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fcPos")) {
|
||||
int fcPos = response.getPlutoSdrInputSettings()->getFcPos();
|
||||
fcPos = fcPos < 0 ? 0 : fcPos > 2 ? 2 : fcPos;
|
||||
settings.m_fcPos = (PlutoSDRInputSettings::fcPos_t) fcPos;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dcBlock")) {
|
||||
settings.m_dcBlock = response.getPlutoSdrInputSettings()->getDcBlock() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("iqCorrection")) {
|
||||
settings.m_iqCorrection = response.getPlutoSdrInputSettings()->getIqCorrection() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("log2Decim")) {
|
||||
settings.m_log2Decim = response.getPlutoSdrInputSettings()->getLog2Decim();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("lpfBW")) {
|
||||
settings.m_lpfBW = response.getPlutoSdrInputSettings()->getLpfBw();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("gain")) {
|
||||
settings.m_gain = response.getPlutoSdrInputSettings()->getGain();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("antennaPath")) {
|
||||
int antennaPath = response.getPlutoSdrInputSettings()->getAntennaPath();
|
||||
antennaPath = antennaPath < 0 ? 0 : antennaPath >= PlutoSDRInputSettings::RFPATH_END ? PlutoSDRInputSettings::RFPATH_END-1 : antennaPath;
|
||||
settings.m_antennaPath = (PlutoSDRInputSettings::RFPath) antennaPath;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("gainMode")) {
|
||||
int gainMode = response.getPlutoSdrInputSettings()->getGainMode();
|
||||
gainMode = gainMode < 0 ? 0 : gainMode >= PlutoSDRInputSettings::GAIN_END ? PlutoSDRInputSettings::GAIN_END-1 : gainMode;
|
||||
settings.m_gainMode = (PlutoSDRInputSettings::GainMode) gainMode;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("transverterDeltaFrequency")) {
|
||||
settings.m_transverterDeltaFrequency = response.getPlutoSdrInputSettings()->getTransverterDeltaFrequency();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("transverterMode")) {
|
||||
settings.m_transverterMode = response.getPlutoSdrInputSettings()->getTransverterMode() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||
settings.m_fileRecordName = *response.getPlutoSdrInputSettings()->getFileRecordName();
|
||||
}
|
||||
|
||||
MsgConfigurePlutoSDR *msg = MsgConfigurePlutoSDR::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigurePlutoSDR *msgToGUI = MsgConfigurePlutoSDR::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
webapiFormatDeviceSettings(response, settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
int PlutoSDRInput::webapiReportGet(
|
||||
SWGSDRangel::SWGDeviceReport& response,
|
||||
QString& errorMessage __attribute__((unused)))
|
||||
{
|
||||
response.setPlutoSdrInputReport(new SWGSDRangel::SWGPlutoSdrInputReport());
|
||||
response.getPlutoSdrInputReport()->init();
|
||||
webapiFormatDeviceReport(response);
|
||||
return 200;
|
||||
}
|
||||
|
||||
void PlutoSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const PlutoSDRInputSettings& settings)
|
||||
{
|
||||
response.getPlutoSdrInputSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||
response.getPlutoSdrInputSettings()->setDevSampleRate(settings.m_devSampleRate);
|
||||
response.getPlutoSdrInputSettings()->setLOppmTenths(settings.m_LOppmTenths);
|
||||
response.getPlutoSdrInputSettings()->setLpfFirEnable(settings.m_lpfFIREnable ? 1 : 0);
|
||||
response.getPlutoSdrInputSettings()->setLpfFirbw(settings.m_lpfFIRBW);
|
||||
response.getPlutoSdrInputSettings()->setLpfFiRlog2Decim(settings.m_lpfFIRlog2Decim);
|
||||
response.getPlutoSdrInputSettings()->setLpfFirGain(settings.m_lpfFIRGain);
|
||||
response.getPlutoSdrInputSettings()->setFcPos((int) settings.m_fcPos);
|
||||
response.getPlutoSdrInputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
response.getPlutoSdrInputSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
|
||||
response.getPlutoSdrInputSettings()->setLog2Decim(settings.m_log2Decim);
|
||||
response.getPlutoSdrInputSettings()->setLpfBw(settings.m_lpfBW);
|
||||
response.getPlutoSdrInputSettings()->setGain(settings.m_gain);
|
||||
response.getPlutoSdrInputSettings()->setAntennaPath((int) m_settings.m_antennaPath);
|
||||
response.getPlutoSdrInputSettings()->setGainMode((int) settings.m_gainMode);
|
||||
response.getPlutoSdrInputSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
|
||||
response.getPlutoSdrInputSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
||||
|
||||
if (response.getPlutoSdrInputSettings()->getFileRecordName()) {
|
||||
*response.getPlutoSdrInputSettings()->getFileRecordName() = settings.m_fileRecordName;
|
||||
} else {
|
||||
response.getPlutoSdrInputSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
}
|
||||
|
||||
void PlutoSDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getPlutoSdrInputReport()->setAdcRate(getADCSampleRate());
|
||||
std::string rssiStr;
|
||||
getRSSI(rssiStr);
|
||||
response.getPlutoSdrInputReport()->setRssi(new QString(rssiStr.c_str()));
|
||||
int gainDB;
|
||||
getGain(gainDB);
|
||||
response.getPlutoSdrInputReport()->setGainDb(gainDB);
|
||||
fetchTemperature();
|
||||
response.getPlutoSdrInputReport()->setTemperature(getTemperature());
|
||||
}
|
||||
|
@ -121,6 +121,20 @@ public:
|
||||
SWGSDRangel::SWGDeviceState& response,
|
||||
QString& errorMessage);
|
||||
|
||||
virtual int webapiSettingsGet(
|
||||
SWGSDRangel::SWGDeviceSettings& response,
|
||||
QString& errorMessage);
|
||||
|
||||
virtual int webapiSettingsPutPatch(
|
||||
bool force,
|
||||
const QStringList& deviceSettingsKeys,
|
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage);
|
||||
|
||||
virtual int webapiReportGet(
|
||||
SWGSDRangel::SWGDeviceReport& response,
|
||||
QString& errorMessage);
|
||||
|
||||
uint32_t getADCSampleRate() const { return m_deviceSampleRates.m_addaConnvRate; }
|
||||
uint32_t getFIRSampleRate() const { return m_deviceSampleRates.m_hb1Rate; }
|
||||
void getRSSI(std::string& rssiStr);
|
||||
@ -145,6 +159,8 @@ public:
|
||||
void suspendBuddies();
|
||||
void resumeBuddies();
|
||||
bool applySettings(const PlutoSDRInputSettings& settings, bool force = false);
|
||||
void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const PlutoSDRInputSettings& settings);
|
||||
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
|
||||
};
|
||||
|
||||
|
||||
|
@ -311,6 +311,7 @@ void PlutoSDRInputGui::displaySettings()
|
||||
ui->loPPMText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1)));
|
||||
|
||||
ui->swDecim->setCurrentIndex(m_settings.m_log2Decim);
|
||||
ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos);
|
||||
|
||||
ui->lpf->setValue(m_settings.m_lpfBW / 1000);
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
<file>webapi/doc/swagger/include/NFMDemod.yaml</file>
|
||||
<file>webapi/doc/swagger/include/NFMMod.yaml</file>
|
||||
<file>webapi/doc/swagger/include/Perseus.yaml</file>
|
||||
<file>webapi/doc/swagger/include/PlutoSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SSBDemod.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SSBMod.yaml</file>
|
||||
|
@ -1724,11 +1724,17 @@ margin-bottom: 20px;
|
||||
"perseusReport" : {
|
||||
"$ref" : "#/definitions/PerseusReport"
|
||||
},
|
||||
"plutoSdrInputReport" : {
|
||||
"$ref" : "#/definitions/PlutoSdrInputReport"
|
||||
},
|
||||
"plutoSdrOutputReport" : {
|
||||
"$ref" : "#/definitions/PlutoSdrOutputReport"
|
||||
},
|
||||
"rtlSdrReport" : {
|
||||
"$ref" : "#/definitions/RtlSdrReport"
|
||||
}
|
||||
},
|
||||
"description" : "Base device report. The specific device report present depeds on deviceHwType"
|
||||
"description" : "Base device report. The specific device report present depends on deviceHwType"
|
||||
};
|
||||
defs.DeviceSet = {
|
||||
"required" : [ "channelcount", "samplingDevice" ],
|
||||
@ -1818,6 +1824,12 @@ margin-bottom: 20px;
|
||||
"perseusSettings" : {
|
||||
"$ref" : "#/definitions/PerseusSettings"
|
||||
},
|
||||
"plutoSdrInputSettings" : {
|
||||
"$ref" : "#/definitions/PlutoSdrInputSettings"
|
||||
},
|
||||
"plutoSdrOutputSettings" : {
|
||||
"$ref" : "#/definitions/PlutoSdrOutputSettings"
|
||||
},
|
||||
"rtlSdrSettings" : {
|
||||
"$ref" : "#/definitions/RtlSdrSettings"
|
||||
}
|
||||
@ -2533,6 +2545,144 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "Perseus"
|
||||
};
|
||||
defs.PlutoSdrInputReport = {
|
||||
"properties" : {
|
||||
"adcRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rssi" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"gainDB" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"temperature" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PlutoSdrInputSettings = {
|
||||
"properties" : {
|
||||
"centerFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"devSampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"LOppmTenths" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfFIREnable" : {
|
||||
"type" : "integer",
|
||||
"description" : "Low pass FIR filter enable (1 if enabled else 0)"
|
||||
},
|
||||
"lpfFIRBW" : {
|
||||
"type" : "integer",
|
||||
"description" : "digital lowpass FIR filter bandwidth (Hz)"
|
||||
},
|
||||
"lpfFIRlog2Decim" : {
|
||||
"type" : "integer",
|
||||
"description" : "digital lowpass FIR filter log2 of decimation factor (0..2)"
|
||||
},
|
||||
"lpfFIRGain" : {
|
||||
"type" : "integer",
|
||||
"description" : "digital lowpass FIR filter gain (dB)"
|
||||
},
|
||||
"fcPos" : {
|
||||
"type" : "integer",
|
||||
"description" : "0=Infra 1=Supra 2=Center"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"iqCorrection" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2Decim" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfBW" : {
|
||||
"type" : "integer",
|
||||
"description" : "Analog lowpass filter bandwidth (Hz)"
|
||||
},
|
||||
"gain" : {
|
||||
"type" : "integer",
|
||||
"description" : "Hardware gain"
|
||||
},
|
||||
"antennaPath" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"gainMode" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterMode" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterDeltaFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"fileRecordName" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PlutoSdrOutputReport = {
|
||||
"properties" : {
|
||||
"dacRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rssi" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"temperature" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PlutoSdrOutputSettings = {
|
||||
"properties" : {
|
||||
"centerFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"devSampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2HardInterp" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2SoftInterp" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfBW" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfFIREnable" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfFIRBW" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"gain" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterMode" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterDeltaFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PresetExport = {
|
||||
"properties" : {
|
||||
@ -22039,7 +22189,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-05-26T14:52:58.621+02:00
|
||||
Generated 2018-05-26T16:46:01.765+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
98
sdrbase/resources/webapi/doc/swagger/include/PlutoSdr.yaml
Normal file
98
sdrbase/resources/webapi/doc/swagger/include/PlutoSdr.yaml
Normal file
@ -0,0 +1,98 @@
|
||||
PlutoSdrInputSettings:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
devSampleRate:
|
||||
type: integer
|
||||
LOppmTenths:
|
||||
type: integer
|
||||
lpfFIREnable:
|
||||
description: Low pass FIR filter enable (1 if enabled else 0)
|
||||
type: integer
|
||||
lpfFIRBW:
|
||||
description: digital lowpass FIR filter bandwidth (Hz)
|
||||
type: integer
|
||||
lpfFIRlog2Decim:
|
||||
description: digital lowpass FIR filter log2 of decimation factor (0..2)
|
||||
type: integer
|
||||
lpfFIRGain:
|
||||
description: digital lowpass FIR filter gain (dB)
|
||||
type: integer
|
||||
fcPos:
|
||||
description: 0=Infra 1=Supra 2=Center
|
||||
type: integer
|
||||
dcBlock:
|
||||
type: integer
|
||||
iqCorrection:
|
||||
type: integer
|
||||
log2Decim:
|
||||
type: integer
|
||||
lpfBW:
|
||||
description: Analog lowpass filter bandwidth (Hz)
|
||||
type: integer
|
||||
gain:
|
||||
description: Hardware gain
|
||||
type: integer
|
||||
antennaPath:
|
||||
type: integer
|
||||
gainMode:
|
||||
type: integer
|
||||
transverterMode:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
fileRecordName:
|
||||
type: string
|
||||
|
||||
PlutoSdrOutputSettings:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
devSampleRate:
|
||||
type: integer
|
||||
log2HardInterp:
|
||||
type: integer
|
||||
log2SoftInterp:
|
||||
type: integer
|
||||
lpfBW:
|
||||
type: integer
|
||||
lpfFIREnable:
|
||||
type: integer
|
||||
lpfFIRBW:
|
||||
type: integer
|
||||
gain:
|
||||
type: integer
|
||||
transverterMode:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
PlutoSdrInputReport:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
adcRate:
|
||||
type: integer
|
||||
rssi:
|
||||
type: string
|
||||
gainDB:
|
||||
type: integer
|
||||
temperature:
|
||||
type: number
|
||||
format: float
|
||||
|
||||
PlutoSdrOutputReport:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
dacRate:
|
||||
type: integer
|
||||
rssi:
|
||||
type: string
|
||||
temperature:
|
||||
type: number
|
||||
format: float
|
@ -1769,11 +1769,15 @@ definitions:
|
||||
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrOutputSettings"
|
||||
perseusSettings:
|
||||
$ref: "/doc/swagger/include/Perseus.yaml#/PerseusSettings"
|
||||
plutoSdrInputSettings:
|
||||
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrInputSettings"
|
||||
plutoSdrOutputSettings:
|
||||
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputSettings"
|
||||
rtlSdrSettings:
|
||||
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
||||
|
||||
DeviceReport:
|
||||
description: Base device report. The specific device report present depeds on deviceHwType
|
||||
description: Base device report. The specific device report present depends on deviceHwType
|
||||
discriminator: deviceHwType
|
||||
required:
|
||||
- deviceHwType
|
||||
@ -1793,6 +1797,10 @@ definitions:
|
||||
$ref: "/doc/swagger/include/FileSource.yaml#/FileSourceReport"
|
||||
perseusReport:
|
||||
$ref: "/doc/swagger/include/Perseus.yaml#/PerseusReport"
|
||||
plutoSdrInputReport:
|
||||
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrInputReport"
|
||||
plutoSdrOutputReport:
|
||||
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
|
||||
rtlSdrReport:
|
||||
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
||||
|
||||
|
@ -1886,6 +1886,21 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((*deviceHwType == "PlutoSDR") && (deviceSettings.getTx() == 0))
|
||||
{
|
||||
if (jsonObject.contains("plutoSdrInputSettings") && jsonObject["plutoSdrInputSettings"].isObject())
|
||||
{
|
||||
QJsonObject plutoSdrInputSettingsJsonObject = jsonObject["plutoSdrInputSettings"].toObject();
|
||||
deviceSettingsKeys = plutoSdrInputSettingsJsonObject.keys();
|
||||
deviceSettings.setPlutoSdrInputSettings(new SWGSDRangel::SWGPlutoSdrInputSettings());
|
||||
deviceSettings.getPlutoSdrInputSettings()->fromJsonObject(plutoSdrInputSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (*deviceHwType == "RTLSDR")
|
||||
{
|
||||
if (jsonObject.contains("rtlSdrSettings") && jsonObject["rtlSdrSettings"].isObject())
|
||||
|
98
swagger/sdrangel/api/swagger/include/PlutoSdr.yaml
Normal file
98
swagger/sdrangel/api/swagger/include/PlutoSdr.yaml
Normal file
@ -0,0 +1,98 @@
|
||||
PlutoSdrInputSettings:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
devSampleRate:
|
||||
type: integer
|
||||
LOppmTenths:
|
||||
type: integer
|
||||
lpfFIREnable:
|
||||
description: Low pass FIR filter enable (1 if enabled else 0)
|
||||
type: integer
|
||||
lpfFIRBW:
|
||||
description: digital lowpass FIR filter bandwidth (Hz)
|
||||
type: integer
|
||||
lpfFIRlog2Decim:
|
||||
description: digital lowpass FIR filter log2 of decimation factor (0..2)
|
||||
type: integer
|
||||
lpfFIRGain:
|
||||
description: digital lowpass FIR filter gain (dB)
|
||||
type: integer
|
||||
fcPos:
|
||||
description: 0=Infra 1=Supra 2=Center
|
||||
type: integer
|
||||
dcBlock:
|
||||
type: integer
|
||||
iqCorrection:
|
||||
type: integer
|
||||
log2Decim:
|
||||
type: integer
|
||||
lpfBW:
|
||||
description: Analog lowpass filter bandwidth (Hz)
|
||||
type: integer
|
||||
gain:
|
||||
description: Hardware gain
|
||||
type: integer
|
||||
antennaPath:
|
||||
type: integer
|
||||
gainMode:
|
||||
type: integer
|
||||
transverterMode:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
fileRecordName:
|
||||
type: string
|
||||
|
||||
PlutoSdrOutputSettings:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
devSampleRate:
|
||||
type: integer
|
||||
log2HardInterp:
|
||||
type: integer
|
||||
log2SoftInterp:
|
||||
type: integer
|
||||
lpfBW:
|
||||
type: integer
|
||||
lpfFIREnable:
|
||||
type: integer
|
||||
lpfFIRBW:
|
||||
type: integer
|
||||
gain:
|
||||
type: integer
|
||||
transverterMode:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
PlutoSdrInputReport:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
adcRate:
|
||||
type: integer
|
||||
rssi:
|
||||
type: string
|
||||
gainDB:
|
||||
type: integer
|
||||
temperature:
|
||||
type: number
|
||||
format: float
|
||||
|
||||
PlutoSdrOutputReport:
|
||||
description: PlutoSDR
|
||||
properties:
|
||||
dacRate:
|
||||
type: integer
|
||||
rssi:
|
||||
type: string
|
||||
temperature:
|
||||
type: number
|
||||
format: float
|
@ -1769,11 +1769,15 @@ definitions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrOutputSettings"
|
||||
perseusSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/Perseus.yaml#/PerseusSettings"
|
||||
plutoSdrInputSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrInputSettings"
|
||||
plutoSdrOutputSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputSettings"
|
||||
rtlSdrSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
||||
|
||||
DeviceReport:
|
||||
description: Base device report. The specific device report present depeds on deviceHwType
|
||||
description: Base device report. The specific device report present depends on deviceHwType
|
||||
discriminator: deviceHwType
|
||||
required:
|
||||
- deviceHwType
|
||||
@ -1793,6 +1797,10 @@ definitions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/FileSource.yaml#/FileSourceReport"
|
||||
perseusReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/Perseus.yaml#/PerseusReport"
|
||||
plutoSdrInputReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrInputReport"
|
||||
plutoSdrOutputReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
|
||||
rtlSdrReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
||||
|
||||
|
@ -1724,11 +1724,17 @@ margin-bottom: 20px;
|
||||
"perseusReport" : {
|
||||
"$ref" : "#/definitions/PerseusReport"
|
||||
},
|
||||
"plutoSdrInputReport" : {
|
||||
"$ref" : "#/definitions/PlutoSdrInputReport"
|
||||
},
|
||||
"plutoSdrOutputReport" : {
|
||||
"$ref" : "#/definitions/PlutoSdrOutputReport"
|
||||
},
|
||||
"rtlSdrReport" : {
|
||||
"$ref" : "#/definitions/RtlSdrReport"
|
||||
}
|
||||
},
|
||||
"description" : "Base device report. The specific device report present depeds on deviceHwType"
|
||||
"description" : "Base device report. The specific device report present depends on deviceHwType"
|
||||
};
|
||||
defs.DeviceSet = {
|
||||
"required" : [ "channelcount", "samplingDevice" ],
|
||||
@ -1818,6 +1824,12 @@ margin-bottom: 20px;
|
||||
"perseusSettings" : {
|
||||
"$ref" : "#/definitions/PerseusSettings"
|
||||
},
|
||||
"plutoSdrInputSettings" : {
|
||||
"$ref" : "#/definitions/PlutoSdrInputSettings"
|
||||
},
|
||||
"plutoSdrOutputSettings" : {
|
||||
"$ref" : "#/definitions/PlutoSdrOutputSettings"
|
||||
},
|
||||
"rtlSdrSettings" : {
|
||||
"$ref" : "#/definitions/RtlSdrSettings"
|
||||
}
|
||||
@ -2533,6 +2545,144 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "Perseus"
|
||||
};
|
||||
defs.PlutoSdrInputReport = {
|
||||
"properties" : {
|
||||
"adcRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rssi" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"gainDB" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"temperature" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PlutoSdrInputSettings = {
|
||||
"properties" : {
|
||||
"centerFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"devSampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"LOppmTenths" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfFIREnable" : {
|
||||
"type" : "integer",
|
||||
"description" : "Low pass FIR filter enable (1 if enabled else 0)"
|
||||
},
|
||||
"lpfFIRBW" : {
|
||||
"type" : "integer",
|
||||
"description" : "digital lowpass FIR filter bandwidth (Hz)"
|
||||
},
|
||||
"lpfFIRlog2Decim" : {
|
||||
"type" : "integer",
|
||||
"description" : "digital lowpass FIR filter log2 of decimation factor (0..2)"
|
||||
},
|
||||
"lpfFIRGain" : {
|
||||
"type" : "integer",
|
||||
"description" : "digital lowpass FIR filter gain (dB)"
|
||||
},
|
||||
"fcPos" : {
|
||||
"type" : "integer",
|
||||
"description" : "0=Infra 1=Supra 2=Center"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"iqCorrection" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2Decim" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfBW" : {
|
||||
"type" : "integer",
|
||||
"description" : "Analog lowpass filter bandwidth (Hz)"
|
||||
},
|
||||
"gain" : {
|
||||
"type" : "integer",
|
||||
"description" : "Hardware gain"
|
||||
},
|
||||
"antennaPath" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"gainMode" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterMode" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterDeltaFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"fileRecordName" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PlutoSdrOutputReport = {
|
||||
"properties" : {
|
||||
"dacRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rssi" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"temperature" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PlutoSdrOutputSettings = {
|
||||
"properties" : {
|
||||
"centerFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"devSampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2HardInterp" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2SoftInterp" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfBW" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfFIREnable" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"lpfFIRBW" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"gain" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterMode" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"transverterDeltaFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
}
|
||||
},
|
||||
"description" : "PlutoSDR"
|
||||
};
|
||||
defs.PresetExport = {
|
||||
"properties" : {
|
||||
@ -22039,7 +22189,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-05-26T14:52:58.621+02:00
|
||||
Generated 2018-05-26T16:46:01.765+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,6 +40,10 @@ SWGDeviceReport::SWGDeviceReport() {
|
||||
m_file_source_report_isSet = false;
|
||||
perseus_report = nullptr;
|
||||
m_perseus_report_isSet = false;
|
||||
pluto_sdr_input_report = nullptr;
|
||||
m_pluto_sdr_input_report_isSet = false;
|
||||
pluto_sdr_output_report = nullptr;
|
||||
m_pluto_sdr_output_report_isSet = false;
|
||||
rtl_sdr_report = nullptr;
|
||||
m_rtl_sdr_report_isSet = false;
|
||||
}
|
||||
@ -62,6 +66,10 @@ SWGDeviceReport::init() {
|
||||
m_file_source_report_isSet = false;
|
||||
perseus_report = new SWGPerseusReport();
|
||||
m_perseus_report_isSet = false;
|
||||
pluto_sdr_input_report = new SWGPlutoSdrInputReport();
|
||||
m_pluto_sdr_input_report_isSet = false;
|
||||
pluto_sdr_output_report = new SWGPlutoSdrOutputReport();
|
||||
m_pluto_sdr_output_report_isSet = false;
|
||||
rtl_sdr_report = new SWGRtlSdrReport();
|
||||
m_rtl_sdr_report_isSet = false;
|
||||
}
|
||||
@ -84,6 +92,12 @@ SWGDeviceReport::cleanup() {
|
||||
if(perseus_report != nullptr) {
|
||||
delete perseus_report;
|
||||
}
|
||||
if(pluto_sdr_input_report != nullptr) {
|
||||
delete pluto_sdr_input_report;
|
||||
}
|
||||
if(pluto_sdr_output_report != nullptr) {
|
||||
delete pluto_sdr_output_report;
|
||||
}
|
||||
if(rtl_sdr_report != nullptr) {
|
||||
delete rtl_sdr_report;
|
||||
}
|
||||
@ -112,6 +126,10 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&perseus_report, pJson["perseusReport"], "SWGPerseusReport", "SWGPerseusReport");
|
||||
|
||||
::SWGSDRangel::setValue(&pluto_sdr_input_report, pJson["plutoSdrInputReport"], "SWGPlutoSdrInputReport", "SWGPlutoSdrInputReport");
|
||||
|
||||
::SWGSDRangel::setValue(&pluto_sdr_output_report, pJson["plutoSdrOutputReport"], "SWGPlutoSdrOutputReport", "SWGPlutoSdrOutputReport");
|
||||
|
||||
::SWGSDRangel::setValue(&rtl_sdr_report, pJson["rtlSdrReport"], "SWGRtlSdrReport", "SWGRtlSdrReport");
|
||||
|
||||
}
|
||||
@ -148,6 +166,12 @@ SWGDeviceReport::asJsonObject() {
|
||||
if((perseus_report != nullptr) && (perseus_report->isSet())){
|
||||
toJsonValue(QString("perseusReport"), perseus_report, obj, QString("SWGPerseusReport"));
|
||||
}
|
||||
if((pluto_sdr_input_report != nullptr) && (pluto_sdr_input_report->isSet())){
|
||||
toJsonValue(QString("plutoSdrInputReport"), pluto_sdr_input_report, obj, QString("SWGPlutoSdrInputReport"));
|
||||
}
|
||||
if((pluto_sdr_output_report != nullptr) && (pluto_sdr_output_report->isSet())){
|
||||
toJsonValue(QString("plutoSdrOutputReport"), pluto_sdr_output_report, obj, QString("SWGPlutoSdrOutputReport"));
|
||||
}
|
||||
if((rtl_sdr_report != nullptr) && (rtl_sdr_report->isSet())){
|
||||
toJsonValue(QString("rtlSdrReport"), rtl_sdr_report, obj, QString("SWGRtlSdrReport"));
|
||||
}
|
||||
@ -215,6 +239,26 @@ SWGDeviceReport::setPerseusReport(SWGPerseusReport* perseus_report) {
|
||||
this->m_perseus_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputReport*
|
||||
SWGDeviceReport::getPlutoSdrInputReport() {
|
||||
return pluto_sdr_input_report;
|
||||
}
|
||||
void
|
||||
SWGDeviceReport::setPlutoSdrInputReport(SWGPlutoSdrInputReport* pluto_sdr_input_report) {
|
||||
this->pluto_sdr_input_report = pluto_sdr_input_report;
|
||||
this->m_pluto_sdr_input_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputReport*
|
||||
SWGDeviceReport::getPlutoSdrOutputReport() {
|
||||
return pluto_sdr_output_report;
|
||||
}
|
||||
void
|
||||
SWGDeviceReport::setPlutoSdrOutputReport(SWGPlutoSdrOutputReport* pluto_sdr_output_report) {
|
||||
this->pluto_sdr_output_report = pluto_sdr_output_report;
|
||||
this->m_pluto_sdr_output_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGRtlSdrReport*
|
||||
SWGDeviceReport::getRtlSdrReport() {
|
||||
return rtl_sdr_report;
|
||||
@ -236,6 +280,8 @@ SWGDeviceReport::isSet(){
|
||||
if(airspy_hf_report != nullptr && airspy_hf_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(file_source_report != nullptr && file_source_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(perseus_report != nullptr && perseus_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(pluto_sdr_input_report != nullptr && pluto_sdr_input_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(pluto_sdr_output_report != nullptr && pluto_sdr_output_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(rtl_sdr_report != nullptr && rtl_sdr_report->isSet()){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
|
@ -13,7 +13,7 @@
|
||||
/*
|
||||
* SWGDeviceReport.h
|
||||
*
|
||||
* Base device report. The specific device report present depeds on deviceHwType
|
||||
* Base device report. The specific device report present depends on deviceHwType
|
||||
*/
|
||||
|
||||
#ifndef SWGDeviceReport_H_
|
||||
@ -26,6 +26,8 @@
|
||||
#include "SWGAirspyReport.h"
|
||||
#include "SWGFileSourceReport.h"
|
||||
#include "SWGPerseusReport.h"
|
||||
#include "SWGPlutoSdrInputReport.h"
|
||||
#include "SWGPlutoSdrOutputReport.h"
|
||||
#include "SWGRtlSdrReport.h"
|
||||
#include <QString>
|
||||
|
||||
@ -65,6 +67,12 @@ public:
|
||||
SWGPerseusReport* getPerseusReport();
|
||||
void setPerseusReport(SWGPerseusReport* perseus_report);
|
||||
|
||||
SWGPlutoSdrInputReport* getPlutoSdrInputReport();
|
||||
void setPlutoSdrInputReport(SWGPlutoSdrInputReport* pluto_sdr_input_report);
|
||||
|
||||
SWGPlutoSdrOutputReport* getPlutoSdrOutputReport();
|
||||
void setPlutoSdrOutputReport(SWGPlutoSdrOutputReport* pluto_sdr_output_report);
|
||||
|
||||
SWGRtlSdrReport* getRtlSdrReport();
|
||||
void setRtlSdrReport(SWGRtlSdrReport* rtl_sdr_report);
|
||||
|
||||
@ -90,6 +98,12 @@ private:
|
||||
SWGPerseusReport* perseus_report;
|
||||
bool m_perseus_report_isSet;
|
||||
|
||||
SWGPlutoSdrInputReport* pluto_sdr_input_report;
|
||||
bool m_pluto_sdr_input_report_isSet;
|
||||
|
||||
SWGPlutoSdrOutputReport* pluto_sdr_output_report;
|
||||
bool m_pluto_sdr_output_report_isSet;
|
||||
|
||||
SWGRtlSdrReport* rtl_sdr_report;
|
||||
bool m_rtl_sdr_report_isSet;
|
||||
|
||||
|
@ -56,6 +56,10 @@ SWGDeviceSettings::SWGDeviceSettings() {
|
||||
m_lime_sdr_output_settings_isSet = false;
|
||||
perseus_settings = nullptr;
|
||||
m_perseus_settings_isSet = false;
|
||||
pluto_sdr_input_settings = nullptr;
|
||||
m_pluto_sdr_input_settings_isSet = false;
|
||||
pluto_sdr_output_settings = nullptr;
|
||||
m_pluto_sdr_output_settings_isSet = false;
|
||||
rtl_sdr_settings = nullptr;
|
||||
m_rtl_sdr_settings_isSet = false;
|
||||
}
|
||||
@ -94,6 +98,10 @@ SWGDeviceSettings::init() {
|
||||
m_lime_sdr_output_settings_isSet = false;
|
||||
perseus_settings = new SWGPerseusSettings();
|
||||
m_perseus_settings_isSet = false;
|
||||
pluto_sdr_input_settings = new SWGPlutoSdrInputSettings();
|
||||
m_pluto_sdr_input_settings_isSet = false;
|
||||
pluto_sdr_output_settings = new SWGPlutoSdrOutputSettings();
|
||||
m_pluto_sdr_output_settings_isSet = false;
|
||||
rtl_sdr_settings = new SWGRtlSdrSettings();
|
||||
m_rtl_sdr_settings_isSet = false;
|
||||
}
|
||||
@ -140,6 +148,12 @@ SWGDeviceSettings::cleanup() {
|
||||
if(perseus_settings != nullptr) {
|
||||
delete perseus_settings;
|
||||
}
|
||||
if(pluto_sdr_input_settings != nullptr) {
|
||||
delete pluto_sdr_input_settings;
|
||||
}
|
||||
if(pluto_sdr_output_settings != nullptr) {
|
||||
delete pluto_sdr_output_settings;
|
||||
}
|
||||
if(rtl_sdr_settings != nullptr) {
|
||||
delete rtl_sdr_settings;
|
||||
}
|
||||
@ -184,6 +198,10 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&perseus_settings, pJson["perseusSettings"], "SWGPerseusSettings", "SWGPerseusSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&pluto_sdr_input_settings, pJson["plutoSdrInputSettings"], "SWGPlutoSdrInputSettings", "SWGPlutoSdrInputSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&pluto_sdr_output_settings, pJson["plutoSdrOutputSettings"], "SWGPlutoSdrOutputSettings", "SWGPlutoSdrOutputSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&rtl_sdr_settings, pJson["rtlSdrSettings"], "SWGRtlSdrSettings", "SWGRtlSdrSettings");
|
||||
|
||||
}
|
||||
@ -244,6 +262,12 @@ SWGDeviceSettings::asJsonObject() {
|
||||
if((perseus_settings != nullptr) && (perseus_settings->isSet())){
|
||||
toJsonValue(QString("perseusSettings"), perseus_settings, obj, QString("SWGPerseusSettings"));
|
||||
}
|
||||
if((pluto_sdr_input_settings != nullptr) && (pluto_sdr_input_settings->isSet())){
|
||||
toJsonValue(QString("plutoSdrInputSettings"), pluto_sdr_input_settings, obj, QString("SWGPlutoSdrInputSettings"));
|
||||
}
|
||||
if((pluto_sdr_output_settings != nullptr) && (pluto_sdr_output_settings->isSet())){
|
||||
toJsonValue(QString("plutoSdrOutputSettings"), pluto_sdr_output_settings, obj, QString("SWGPlutoSdrOutputSettings"));
|
||||
}
|
||||
if((rtl_sdr_settings != nullptr) && (rtl_sdr_settings->isSet())){
|
||||
toJsonValue(QString("rtlSdrSettings"), rtl_sdr_settings, obj, QString("SWGRtlSdrSettings"));
|
||||
}
|
||||
@ -391,6 +415,26 @@ SWGDeviceSettings::setPerseusSettings(SWGPerseusSettings* perseus_settings) {
|
||||
this->m_perseus_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputSettings*
|
||||
SWGDeviceSettings::getPlutoSdrInputSettings() {
|
||||
return pluto_sdr_input_settings;
|
||||
}
|
||||
void
|
||||
SWGDeviceSettings::setPlutoSdrInputSettings(SWGPlutoSdrInputSettings* pluto_sdr_input_settings) {
|
||||
this->pluto_sdr_input_settings = pluto_sdr_input_settings;
|
||||
this->m_pluto_sdr_input_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputSettings*
|
||||
SWGDeviceSettings::getPlutoSdrOutputSettings() {
|
||||
return pluto_sdr_output_settings;
|
||||
}
|
||||
void
|
||||
SWGDeviceSettings::setPlutoSdrOutputSettings(SWGPlutoSdrOutputSettings* pluto_sdr_output_settings) {
|
||||
this->pluto_sdr_output_settings = pluto_sdr_output_settings;
|
||||
this->m_pluto_sdr_output_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGRtlSdrSettings*
|
||||
SWGDeviceSettings::getRtlSdrSettings() {
|
||||
return rtl_sdr_settings;
|
||||
@ -420,6 +464,8 @@ SWGDeviceSettings::isSet(){
|
||||
if(lime_sdr_input_settings != nullptr && lime_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(lime_sdr_output_settings != nullptr && lime_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(perseus_settings != nullptr && perseus_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(pluto_sdr_input_settings != nullptr && pluto_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(pluto_sdr_output_settings != nullptr && pluto_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(rtl_sdr_settings != nullptr && rtl_sdr_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include "SWGLimeSdrInputSettings.h"
|
||||
#include "SWGLimeSdrOutputSettings.h"
|
||||
#include "SWGPerseusSettings.h"
|
||||
#include "SWGPlutoSdrInputSettings.h"
|
||||
#include "SWGPlutoSdrOutputSettings.h"
|
||||
#include "SWGRtlSdrSettings.h"
|
||||
#include <QString>
|
||||
|
||||
@ -97,6 +99,12 @@ public:
|
||||
SWGPerseusSettings* getPerseusSettings();
|
||||
void setPerseusSettings(SWGPerseusSettings* perseus_settings);
|
||||
|
||||
SWGPlutoSdrInputSettings* getPlutoSdrInputSettings();
|
||||
void setPlutoSdrInputSettings(SWGPlutoSdrInputSettings* pluto_sdr_input_settings);
|
||||
|
||||
SWGPlutoSdrOutputSettings* getPlutoSdrOutputSettings();
|
||||
void setPlutoSdrOutputSettings(SWGPlutoSdrOutputSettings* pluto_sdr_output_settings);
|
||||
|
||||
SWGRtlSdrSettings* getRtlSdrSettings();
|
||||
void setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings);
|
||||
|
||||
@ -146,6 +154,12 @@ private:
|
||||
SWGPerseusSettings* perseus_settings;
|
||||
bool m_perseus_settings_isSet;
|
||||
|
||||
SWGPlutoSdrInputSettings* pluto_sdr_input_settings;
|
||||
bool m_pluto_sdr_input_settings_isSet;
|
||||
|
||||
SWGPlutoSdrOutputSettings* pluto_sdr_output_settings;
|
||||
bool m_pluto_sdr_output_settings_isSet;
|
||||
|
||||
SWGRtlSdrSettings* rtl_sdr_settings;
|
||||
bool m_rtl_sdr_settings_isSet;
|
||||
|
||||
|
@ -68,6 +68,10 @@
|
||||
#include "SWGNFMModSettings.h"
|
||||
#include "SWGPerseusReport.h"
|
||||
#include "SWGPerseusSettings.h"
|
||||
#include "SWGPlutoSdrInputReport.h"
|
||||
#include "SWGPlutoSdrInputSettings.h"
|
||||
#include "SWGPlutoSdrOutputReport.h"
|
||||
#include "SWGPlutoSdrOutputSettings.h"
|
||||
#include "SWGPresetExport.h"
|
||||
#include "SWGPresetGroup.h"
|
||||
#include "SWGPresetIdentifier.h"
|
||||
@ -260,6 +264,18 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGPerseusSettings").compare(type) == 0) {
|
||||
return new SWGPerseusSettings();
|
||||
}
|
||||
if(QString("SWGPlutoSdrInputReport").compare(type) == 0) {
|
||||
return new SWGPlutoSdrInputReport();
|
||||
}
|
||||
if(QString("SWGPlutoSdrInputSettings").compare(type) == 0) {
|
||||
return new SWGPlutoSdrInputSettings();
|
||||
}
|
||||
if(QString("SWGPlutoSdrOutputReport").compare(type) == 0) {
|
||||
return new SWGPlutoSdrOutputReport();
|
||||
}
|
||||
if(QString("SWGPlutoSdrOutputSettings").compare(type) == 0) {
|
||||
return new SWGPlutoSdrOutputSettings();
|
||||
}
|
||||
if(QString("SWGPresetExport").compare(type) == 0) {
|
||||
return new SWGPresetExport();
|
||||
}
|
||||
|
171
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputReport.cpp
Normal file
171
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputReport.cpp
Normal file
@ -0,0 +1,171 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGPlutoSdrInputReport.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGPlutoSdrInputReport::SWGPlutoSdrInputReport(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputReport::SWGPlutoSdrInputReport() {
|
||||
adc_rate = 0;
|
||||
m_adc_rate_isSet = false;
|
||||
rssi = nullptr;
|
||||
m_rssi_isSet = false;
|
||||
gain_db = 0;
|
||||
m_gain_db_isSet = false;
|
||||
temperature = 0.0f;
|
||||
m_temperature_isSet = false;
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputReport::~SWGPlutoSdrInputReport() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrInputReport::init() {
|
||||
adc_rate = 0;
|
||||
m_adc_rate_isSet = false;
|
||||
rssi = new QString("");
|
||||
m_rssi_isSet = false;
|
||||
gain_db = 0;
|
||||
m_gain_db_isSet = false;
|
||||
temperature = 0.0f;
|
||||
m_temperature_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrInputReport::cleanup() {
|
||||
|
||||
if(rssi != nullptr) {
|
||||
delete rssi;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputReport*
|
||||
SWGPlutoSdrInputReport::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrInputReport::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&adc_rate, pJson["adcRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rssi, pJson["rssi"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&gain_db, pJson["gainDB"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&temperature, pJson["temperature"], "float", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGPlutoSdrInputReport::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGPlutoSdrInputReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_adc_rate_isSet){
|
||||
obj->insert("adcRate", QJsonValue(adc_rate));
|
||||
}
|
||||
if(rssi != nullptr && *rssi != QString("")){
|
||||
toJsonValue(QString("rssi"), rssi, obj, QString("QString"));
|
||||
}
|
||||
if(m_gain_db_isSet){
|
||||
obj->insert("gainDB", QJsonValue(gain_db));
|
||||
}
|
||||
if(m_temperature_isSet){
|
||||
obj->insert("temperature", QJsonValue(temperature));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputReport::getAdcRate() {
|
||||
return adc_rate;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputReport::setAdcRate(qint32 adc_rate) {
|
||||
this->adc_rate = adc_rate;
|
||||
this->m_adc_rate_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGPlutoSdrInputReport::getRssi() {
|
||||
return rssi;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputReport::setRssi(QString* rssi) {
|
||||
this->rssi = rssi;
|
||||
this->m_rssi_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputReport::getGainDb() {
|
||||
return gain_db;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputReport::setGainDb(qint32 gain_db) {
|
||||
this->gain_db = gain_db;
|
||||
this->m_gain_db_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGPlutoSdrInputReport::getTemperature() {
|
||||
return temperature;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputReport::setTemperature(float temperature) {
|
||||
this->temperature = temperature;
|
||||
this->m_temperature_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGPlutoSdrInputReport::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_adc_rate_isSet){ isObjectUpdated = true; break;}
|
||||
if(rssi != nullptr && *rssi != QString("")){ isObjectUpdated = true; break;}
|
||||
if(m_gain_db_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_temperature_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
77
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputReport.h
Normal file
77
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputReport.h
Normal file
@ -0,0 +1,77 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGPlutoSdrInputReport.h
|
||||
*
|
||||
* PlutoSDR
|
||||
*/
|
||||
|
||||
#ifndef SWGPlutoSdrInputReport_H_
|
||||
#define SWGPlutoSdrInputReport_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGPlutoSdrInputReport: public SWGObject {
|
||||
public:
|
||||
SWGPlutoSdrInputReport();
|
||||
SWGPlutoSdrInputReport(QString* json);
|
||||
virtual ~SWGPlutoSdrInputReport();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGPlutoSdrInputReport* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getAdcRate();
|
||||
void setAdcRate(qint32 adc_rate);
|
||||
|
||||
QString* getRssi();
|
||||
void setRssi(QString* rssi);
|
||||
|
||||
qint32 getGainDb();
|
||||
void setGainDb(qint32 gain_db);
|
||||
|
||||
float getTemperature();
|
||||
void setTemperature(float temperature);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 adc_rate;
|
||||
bool m_adc_rate_isSet;
|
||||
|
||||
QString* rssi;
|
||||
bool m_rssi_isSet;
|
||||
|
||||
qint32 gain_db;
|
||||
bool m_gain_db_isSet;
|
||||
|
||||
float temperature;
|
||||
bool m_temperature_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGPlutoSdrInputReport_H_ */
|
465
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputSettings.cpp
Normal file
465
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputSettings.cpp
Normal file
@ -0,0 +1,465 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGPlutoSdrInputSettings.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGPlutoSdrInputSettings::SWGPlutoSdrInputSettings(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputSettings::SWGPlutoSdrInputSettings() {
|
||||
center_frequency = 0L;
|
||||
m_center_frequency_isSet = false;
|
||||
dev_sample_rate = 0;
|
||||
m_dev_sample_rate_isSet = false;
|
||||
l_oppm_tenths = 0;
|
||||
m_l_oppm_tenths_isSet = false;
|
||||
lpf_fir_enable = 0;
|
||||
m_lpf_fir_enable_isSet = false;
|
||||
lpf_firbw = 0;
|
||||
m_lpf_firbw_isSet = false;
|
||||
lpf_fi_rlog2_decim = 0;
|
||||
m_lpf_fi_rlog2_decim_isSet = false;
|
||||
lpf_fir_gain = 0;
|
||||
m_lpf_fir_gain_isSet = false;
|
||||
fc_pos = 0;
|
||||
m_fc_pos_isSet = false;
|
||||
dc_block = 0;
|
||||
m_dc_block_isSet = false;
|
||||
iq_correction = 0;
|
||||
m_iq_correction_isSet = false;
|
||||
log2_decim = 0;
|
||||
m_log2_decim_isSet = false;
|
||||
lpf_bw = 0;
|
||||
m_lpf_bw_isSet = false;
|
||||
gain = 0;
|
||||
m_gain_isSet = false;
|
||||
antenna_path = 0;
|
||||
m_antenna_path_isSet = false;
|
||||
gain_mode = 0;
|
||||
m_gain_mode_isSet = false;
|
||||
transverter_mode = 0;
|
||||
m_transverter_mode_isSet = false;
|
||||
transverter_delta_frequency = 0L;
|
||||
m_transverter_delta_frequency_isSet = false;
|
||||
file_record_name = nullptr;
|
||||
m_file_record_name_isSet = false;
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputSettings::~SWGPlutoSdrInputSettings() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrInputSettings::init() {
|
||||
center_frequency = 0L;
|
||||
m_center_frequency_isSet = false;
|
||||
dev_sample_rate = 0;
|
||||
m_dev_sample_rate_isSet = false;
|
||||
l_oppm_tenths = 0;
|
||||
m_l_oppm_tenths_isSet = false;
|
||||
lpf_fir_enable = 0;
|
||||
m_lpf_fir_enable_isSet = false;
|
||||
lpf_firbw = 0;
|
||||
m_lpf_firbw_isSet = false;
|
||||
lpf_fi_rlog2_decim = 0;
|
||||
m_lpf_fi_rlog2_decim_isSet = false;
|
||||
lpf_fir_gain = 0;
|
||||
m_lpf_fir_gain_isSet = false;
|
||||
fc_pos = 0;
|
||||
m_fc_pos_isSet = false;
|
||||
dc_block = 0;
|
||||
m_dc_block_isSet = false;
|
||||
iq_correction = 0;
|
||||
m_iq_correction_isSet = false;
|
||||
log2_decim = 0;
|
||||
m_log2_decim_isSet = false;
|
||||
lpf_bw = 0;
|
||||
m_lpf_bw_isSet = false;
|
||||
gain = 0;
|
||||
m_gain_isSet = false;
|
||||
antenna_path = 0;
|
||||
m_antenna_path_isSet = false;
|
||||
gain_mode = 0;
|
||||
m_gain_mode_isSet = false;
|
||||
transverter_mode = 0;
|
||||
m_transverter_mode_isSet = false;
|
||||
transverter_delta_frequency = 0L;
|
||||
m_transverter_delta_frequency_isSet = false;
|
||||
file_record_name = new QString("");
|
||||
m_file_record_name_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrInputSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(file_record_name != nullptr) {
|
||||
delete file_record_name;
|
||||
}
|
||||
}
|
||||
|
||||
SWGPlutoSdrInputSettings*
|
||||
SWGPlutoSdrInputSettings::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrInputSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
||||
|
||||
::SWGSDRangel::setValue(&dev_sample_rate, pJson["devSampleRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&l_oppm_tenths, pJson["LOppmTenths"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_fir_enable, pJson["lpfFIREnable"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_firbw, pJson["lpfFIRBW"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_fi_rlog2_decim, pJson["lpfFIRlog2Decim"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_fir_gain, pJson["lpfFIRGain"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_bw, pJson["lpfBW"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&gain, pJson["gain"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&antenna_path, pJson["antennaPath"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&gain_mode, pJson["gainMode"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", "");
|
||||
|
||||
::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGPlutoSdrInputSettings::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGPlutoSdrInputSettings::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_center_frequency_isSet){
|
||||
obj->insert("centerFrequency", QJsonValue(center_frequency));
|
||||
}
|
||||
if(m_dev_sample_rate_isSet){
|
||||
obj->insert("devSampleRate", QJsonValue(dev_sample_rate));
|
||||
}
|
||||
if(m_l_oppm_tenths_isSet){
|
||||
obj->insert("LOppmTenths", QJsonValue(l_oppm_tenths));
|
||||
}
|
||||
if(m_lpf_fir_enable_isSet){
|
||||
obj->insert("lpfFIREnable", QJsonValue(lpf_fir_enable));
|
||||
}
|
||||
if(m_lpf_firbw_isSet){
|
||||
obj->insert("lpfFIRBW", QJsonValue(lpf_firbw));
|
||||
}
|
||||
if(m_lpf_fi_rlog2_decim_isSet){
|
||||
obj->insert("lpfFIRlog2Decim", QJsonValue(lpf_fi_rlog2_decim));
|
||||
}
|
||||
if(m_lpf_fir_gain_isSet){
|
||||
obj->insert("lpfFIRGain", QJsonValue(lpf_fir_gain));
|
||||
}
|
||||
if(m_fc_pos_isSet){
|
||||
obj->insert("fcPos", QJsonValue(fc_pos));
|
||||
}
|
||||
if(m_dc_block_isSet){
|
||||
obj->insert("dcBlock", QJsonValue(dc_block));
|
||||
}
|
||||
if(m_iq_correction_isSet){
|
||||
obj->insert("iqCorrection", QJsonValue(iq_correction));
|
||||
}
|
||||
if(m_log2_decim_isSet){
|
||||
obj->insert("log2Decim", QJsonValue(log2_decim));
|
||||
}
|
||||
if(m_lpf_bw_isSet){
|
||||
obj->insert("lpfBW", QJsonValue(lpf_bw));
|
||||
}
|
||||
if(m_gain_isSet){
|
||||
obj->insert("gain", QJsonValue(gain));
|
||||
}
|
||||
if(m_antenna_path_isSet){
|
||||
obj->insert("antennaPath", QJsonValue(antenna_path));
|
||||
}
|
||||
if(m_gain_mode_isSet){
|
||||
obj->insert("gainMode", QJsonValue(gain_mode));
|
||||
}
|
||||
if(m_transverter_mode_isSet){
|
||||
obj->insert("transverterMode", QJsonValue(transverter_mode));
|
||||
}
|
||||
if(m_transverter_delta_frequency_isSet){
|
||||
obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency));
|
||||
}
|
||||
if(file_record_name != nullptr && *file_record_name != QString("")){
|
||||
toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString"));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint64
|
||||
SWGPlutoSdrInputSettings::getCenterFrequency() {
|
||||
return center_frequency;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setCenterFrequency(qint64 center_frequency) {
|
||||
this->center_frequency = center_frequency;
|
||||
this->m_center_frequency_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getDevSampleRate() {
|
||||
return dev_sample_rate;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setDevSampleRate(qint32 dev_sample_rate) {
|
||||
this->dev_sample_rate = dev_sample_rate;
|
||||
this->m_dev_sample_rate_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLOppmTenths() {
|
||||
return l_oppm_tenths;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLOppmTenths(qint32 l_oppm_tenths) {
|
||||
this->l_oppm_tenths = l_oppm_tenths;
|
||||
this->m_l_oppm_tenths_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLpfFirEnable() {
|
||||
return lpf_fir_enable;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLpfFirEnable(qint32 lpf_fir_enable) {
|
||||
this->lpf_fir_enable = lpf_fir_enable;
|
||||
this->m_lpf_fir_enable_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLpfFirbw() {
|
||||
return lpf_firbw;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLpfFirbw(qint32 lpf_firbw) {
|
||||
this->lpf_firbw = lpf_firbw;
|
||||
this->m_lpf_firbw_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLpfFiRlog2Decim() {
|
||||
return lpf_fi_rlog2_decim;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLpfFiRlog2Decim(qint32 lpf_fi_rlog2_decim) {
|
||||
this->lpf_fi_rlog2_decim = lpf_fi_rlog2_decim;
|
||||
this->m_lpf_fi_rlog2_decim_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLpfFirGain() {
|
||||
return lpf_fir_gain;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLpfFirGain(qint32 lpf_fir_gain) {
|
||||
this->lpf_fir_gain = lpf_fir_gain;
|
||||
this->m_lpf_fir_gain_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getFcPos() {
|
||||
return fc_pos;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setFcPos(qint32 fc_pos) {
|
||||
this->fc_pos = fc_pos;
|
||||
this->m_fc_pos_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getDcBlock() {
|
||||
return dc_block;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setDcBlock(qint32 dc_block) {
|
||||
this->dc_block = dc_block;
|
||||
this->m_dc_block_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getIqCorrection() {
|
||||
return iq_correction;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setIqCorrection(qint32 iq_correction) {
|
||||
this->iq_correction = iq_correction;
|
||||
this->m_iq_correction_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLog2Decim() {
|
||||
return log2_decim;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLog2Decim(qint32 log2_decim) {
|
||||
this->log2_decim = log2_decim;
|
||||
this->m_log2_decim_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getLpfBw() {
|
||||
return lpf_bw;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setLpfBw(qint32 lpf_bw) {
|
||||
this->lpf_bw = lpf_bw;
|
||||
this->m_lpf_bw_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getGain() {
|
||||
return gain;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setGain(qint32 gain) {
|
||||
this->gain = gain;
|
||||
this->m_gain_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getAntennaPath() {
|
||||
return antenna_path;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setAntennaPath(qint32 antenna_path) {
|
||||
this->antenna_path = antenna_path;
|
||||
this->m_antenna_path_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getGainMode() {
|
||||
return gain_mode;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setGainMode(qint32 gain_mode) {
|
||||
this->gain_mode = gain_mode;
|
||||
this->m_gain_mode_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrInputSettings::getTransverterMode() {
|
||||
return transverter_mode;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setTransverterMode(qint32 transverter_mode) {
|
||||
this->transverter_mode = transverter_mode;
|
||||
this->m_transverter_mode_isSet = true;
|
||||
}
|
||||
|
||||
qint64
|
||||
SWGPlutoSdrInputSettings::getTransverterDeltaFrequency() {
|
||||
return transverter_delta_frequency;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequency) {
|
||||
this->transverter_delta_frequency = transverter_delta_frequency;
|
||||
this->m_transverter_delta_frequency_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGPlutoSdrInputSettings::getFileRecordName() {
|
||||
return file_record_name;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrInputSettings::setFileRecordName(QString* file_record_name) {
|
||||
this->file_record_name = file_record_name;
|
||||
this->m_file_record_name_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGPlutoSdrInputSettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_dev_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_l_oppm_tenths_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_fir_enable_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_firbw_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_fi_rlog2_decim_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_fir_gain_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_fc_pos_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_dc_block_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_iq_correction_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_log2_decim_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_bw_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_gain_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_antenna_path_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_gain_mode_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_transverter_mode_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;}
|
||||
if(file_record_name != nullptr && *file_record_name != QString("")){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
161
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputSettings.h
Normal file
161
swagger/sdrangel/code/qt5/client/SWGPlutoSdrInputSettings.h
Normal file
@ -0,0 +1,161 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGPlutoSdrInputSettings.h
|
||||
*
|
||||
* PlutoSDR
|
||||
*/
|
||||
|
||||
#ifndef SWGPlutoSdrInputSettings_H_
|
||||
#define SWGPlutoSdrInputSettings_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGPlutoSdrInputSettings: public SWGObject {
|
||||
public:
|
||||
SWGPlutoSdrInputSettings();
|
||||
SWGPlutoSdrInputSettings(QString* json);
|
||||
virtual ~SWGPlutoSdrInputSettings();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGPlutoSdrInputSettings* fromJson(QString &jsonString) override;
|
||||
|
||||
qint64 getCenterFrequency();
|
||||
void setCenterFrequency(qint64 center_frequency);
|
||||
|
||||
qint32 getDevSampleRate();
|
||||
void setDevSampleRate(qint32 dev_sample_rate);
|
||||
|
||||
qint32 getLOppmTenths();
|
||||
void setLOppmTenths(qint32 l_oppm_tenths);
|
||||
|
||||
qint32 getLpfFirEnable();
|
||||
void setLpfFirEnable(qint32 lpf_fir_enable);
|
||||
|
||||
qint32 getLpfFirbw();
|
||||
void setLpfFirbw(qint32 lpf_firbw);
|
||||
|
||||
qint32 getLpfFiRlog2Decim();
|
||||
void setLpfFiRlog2Decim(qint32 lpf_fi_rlog2_decim);
|
||||
|
||||
qint32 getLpfFirGain();
|
||||
void setLpfFirGain(qint32 lpf_fir_gain);
|
||||
|
||||
qint32 getFcPos();
|
||||
void setFcPos(qint32 fc_pos);
|
||||
|
||||
qint32 getDcBlock();
|
||||
void setDcBlock(qint32 dc_block);
|
||||
|
||||
qint32 getIqCorrection();
|
||||
void setIqCorrection(qint32 iq_correction);
|
||||
|
||||
qint32 getLog2Decim();
|
||||
void setLog2Decim(qint32 log2_decim);
|
||||
|
||||
qint32 getLpfBw();
|
||||
void setLpfBw(qint32 lpf_bw);
|
||||
|
||||
qint32 getGain();
|
||||
void setGain(qint32 gain);
|
||||
|
||||
qint32 getAntennaPath();
|
||||
void setAntennaPath(qint32 antenna_path);
|
||||
|
||||
qint32 getGainMode();
|
||||
void setGainMode(qint32 gain_mode);
|
||||
|
||||
qint32 getTransverterMode();
|
||||
void setTransverterMode(qint32 transverter_mode);
|
||||
|
||||
qint64 getTransverterDeltaFrequency();
|
||||
void setTransverterDeltaFrequency(qint64 transverter_delta_frequency);
|
||||
|
||||
QString* getFileRecordName();
|
||||
void setFileRecordName(QString* file_record_name);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint64 center_frequency;
|
||||
bool m_center_frequency_isSet;
|
||||
|
||||
qint32 dev_sample_rate;
|
||||
bool m_dev_sample_rate_isSet;
|
||||
|
||||
qint32 l_oppm_tenths;
|
||||
bool m_l_oppm_tenths_isSet;
|
||||
|
||||
qint32 lpf_fir_enable;
|
||||
bool m_lpf_fir_enable_isSet;
|
||||
|
||||
qint32 lpf_firbw;
|
||||
bool m_lpf_firbw_isSet;
|
||||
|
||||
qint32 lpf_fi_rlog2_decim;
|
||||
bool m_lpf_fi_rlog2_decim_isSet;
|
||||
|
||||
qint32 lpf_fir_gain;
|
||||
bool m_lpf_fir_gain_isSet;
|
||||
|
||||
qint32 fc_pos;
|
||||
bool m_fc_pos_isSet;
|
||||
|
||||
qint32 dc_block;
|
||||
bool m_dc_block_isSet;
|
||||
|
||||
qint32 iq_correction;
|
||||
bool m_iq_correction_isSet;
|
||||
|
||||
qint32 log2_decim;
|
||||
bool m_log2_decim_isSet;
|
||||
|
||||
qint32 lpf_bw;
|
||||
bool m_lpf_bw_isSet;
|
||||
|
||||
qint32 gain;
|
||||
bool m_gain_isSet;
|
||||
|
||||
qint32 antenna_path;
|
||||
bool m_antenna_path_isSet;
|
||||
|
||||
qint32 gain_mode;
|
||||
bool m_gain_mode_isSet;
|
||||
|
||||
qint32 transverter_mode;
|
||||
bool m_transverter_mode_isSet;
|
||||
|
||||
qint64 transverter_delta_frequency;
|
||||
bool m_transverter_delta_frequency_isSet;
|
||||
|
||||
QString* file_record_name;
|
||||
bool m_file_record_name_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGPlutoSdrInputSettings_H_ */
|
150
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputReport.cpp
Normal file
150
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputReport.cpp
Normal file
@ -0,0 +1,150 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGPlutoSdrOutputReport.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGPlutoSdrOutputReport::SWGPlutoSdrOutputReport(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputReport::SWGPlutoSdrOutputReport() {
|
||||
dac_rate = 0;
|
||||
m_dac_rate_isSet = false;
|
||||
rssi = nullptr;
|
||||
m_rssi_isSet = false;
|
||||
temperature = 0.0f;
|
||||
m_temperature_isSet = false;
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputReport::~SWGPlutoSdrOutputReport() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrOutputReport::init() {
|
||||
dac_rate = 0;
|
||||
m_dac_rate_isSet = false;
|
||||
rssi = new QString("");
|
||||
m_rssi_isSet = false;
|
||||
temperature = 0.0f;
|
||||
m_temperature_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrOutputReport::cleanup() {
|
||||
|
||||
if(rssi != nullptr) {
|
||||
delete rssi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputReport*
|
||||
SWGPlutoSdrOutputReport::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrOutputReport::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&dac_rate, pJson["dacRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rssi, pJson["rssi"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&temperature, pJson["temperature"], "float", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGPlutoSdrOutputReport::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGPlutoSdrOutputReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_dac_rate_isSet){
|
||||
obj->insert("dacRate", QJsonValue(dac_rate));
|
||||
}
|
||||
if(rssi != nullptr && *rssi != QString("")){
|
||||
toJsonValue(QString("rssi"), rssi, obj, QString("QString"));
|
||||
}
|
||||
if(m_temperature_isSet){
|
||||
obj->insert("temperature", QJsonValue(temperature));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputReport::getDacRate() {
|
||||
return dac_rate;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputReport::setDacRate(qint32 dac_rate) {
|
||||
this->dac_rate = dac_rate;
|
||||
this->m_dac_rate_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGPlutoSdrOutputReport::getRssi() {
|
||||
return rssi;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputReport::setRssi(QString* rssi) {
|
||||
this->rssi = rssi;
|
||||
this->m_rssi_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGPlutoSdrOutputReport::getTemperature() {
|
||||
return temperature;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputReport::setTemperature(float temperature) {
|
||||
this->temperature = temperature;
|
||||
this->m_temperature_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGPlutoSdrOutputReport::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_dac_rate_isSet){ isObjectUpdated = true; break;}
|
||||
if(rssi != nullptr && *rssi != QString("")){ isObjectUpdated = true; break;}
|
||||
if(m_temperature_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
71
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputReport.h
Normal file
71
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputReport.h
Normal file
@ -0,0 +1,71 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGPlutoSdrOutputReport.h
|
||||
*
|
||||
* PlutoSDR
|
||||
*/
|
||||
|
||||
#ifndef SWGPlutoSdrOutputReport_H_
|
||||
#define SWGPlutoSdrOutputReport_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGPlutoSdrOutputReport: public SWGObject {
|
||||
public:
|
||||
SWGPlutoSdrOutputReport();
|
||||
SWGPlutoSdrOutputReport(QString* json);
|
||||
virtual ~SWGPlutoSdrOutputReport();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGPlutoSdrOutputReport* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getDacRate();
|
||||
void setDacRate(qint32 dac_rate);
|
||||
|
||||
QString* getRssi();
|
||||
void setRssi(QString* rssi);
|
||||
|
||||
float getTemperature();
|
||||
void setTemperature(float temperature);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 dac_rate;
|
||||
bool m_dac_rate_isSet;
|
||||
|
||||
QString* rssi;
|
||||
bool m_rssi_isSet;
|
||||
|
||||
float temperature;
|
||||
bool m_temperature_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGPlutoSdrOutputReport_H_ */
|
295
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputSettings.cpp
Normal file
295
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputSettings.cpp
Normal file
@ -0,0 +1,295 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGPlutoSdrOutputSettings.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGPlutoSdrOutputSettings::SWGPlutoSdrOutputSettings(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputSettings::SWGPlutoSdrOutputSettings() {
|
||||
center_frequency = 0L;
|
||||
m_center_frequency_isSet = false;
|
||||
dev_sample_rate = 0;
|
||||
m_dev_sample_rate_isSet = false;
|
||||
log2_hard_interp = 0;
|
||||
m_log2_hard_interp_isSet = false;
|
||||
log2_soft_interp = 0;
|
||||
m_log2_soft_interp_isSet = false;
|
||||
lpf_bw = 0;
|
||||
m_lpf_bw_isSet = false;
|
||||
lpf_fir_enable = 0;
|
||||
m_lpf_fir_enable_isSet = false;
|
||||
lpf_firbw = 0;
|
||||
m_lpf_firbw_isSet = false;
|
||||
gain = 0;
|
||||
m_gain_isSet = false;
|
||||
transverter_mode = 0;
|
||||
m_transverter_mode_isSet = false;
|
||||
transverter_delta_frequency = 0L;
|
||||
m_transverter_delta_frequency_isSet = false;
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputSettings::~SWGPlutoSdrOutputSettings() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::init() {
|
||||
center_frequency = 0L;
|
||||
m_center_frequency_isSet = false;
|
||||
dev_sample_rate = 0;
|
||||
m_dev_sample_rate_isSet = false;
|
||||
log2_hard_interp = 0;
|
||||
m_log2_hard_interp_isSet = false;
|
||||
log2_soft_interp = 0;
|
||||
m_log2_soft_interp_isSet = false;
|
||||
lpf_bw = 0;
|
||||
m_lpf_bw_isSet = false;
|
||||
lpf_fir_enable = 0;
|
||||
m_lpf_fir_enable_isSet = false;
|
||||
lpf_firbw = 0;
|
||||
m_lpf_firbw_isSet = false;
|
||||
gain = 0;
|
||||
m_gain_isSet = false;
|
||||
transverter_mode = 0;
|
||||
m_transverter_mode_isSet = false;
|
||||
transverter_delta_frequency = 0L;
|
||||
m_transverter_delta_frequency_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGPlutoSdrOutputSettings*
|
||||
SWGPlutoSdrOutputSettings::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
||||
|
||||
::SWGSDRangel::setValue(&dev_sample_rate, pJson["devSampleRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&log2_hard_interp, pJson["log2HardInterp"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&log2_soft_interp, pJson["log2SoftInterp"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_bw, pJson["lpfBW"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_fir_enable, pJson["lpfFIREnable"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lpf_firbw, pJson["lpfFIRBW"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&gain, pJson["gain"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGPlutoSdrOutputSettings::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGPlutoSdrOutputSettings::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_center_frequency_isSet){
|
||||
obj->insert("centerFrequency", QJsonValue(center_frequency));
|
||||
}
|
||||
if(m_dev_sample_rate_isSet){
|
||||
obj->insert("devSampleRate", QJsonValue(dev_sample_rate));
|
||||
}
|
||||
if(m_log2_hard_interp_isSet){
|
||||
obj->insert("log2HardInterp", QJsonValue(log2_hard_interp));
|
||||
}
|
||||
if(m_log2_soft_interp_isSet){
|
||||
obj->insert("log2SoftInterp", QJsonValue(log2_soft_interp));
|
||||
}
|
||||
if(m_lpf_bw_isSet){
|
||||
obj->insert("lpfBW", QJsonValue(lpf_bw));
|
||||
}
|
||||
if(m_lpf_fir_enable_isSet){
|
||||
obj->insert("lpfFIREnable", QJsonValue(lpf_fir_enable));
|
||||
}
|
||||
if(m_lpf_firbw_isSet){
|
||||
obj->insert("lpfFIRBW", QJsonValue(lpf_firbw));
|
||||
}
|
||||
if(m_gain_isSet){
|
||||
obj->insert("gain", QJsonValue(gain));
|
||||
}
|
||||
if(m_transverter_mode_isSet){
|
||||
obj->insert("transverterMode", QJsonValue(transverter_mode));
|
||||
}
|
||||
if(m_transverter_delta_frequency_isSet){
|
||||
obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint64
|
||||
SWGPlutoSdrOutputSettings::getCenterFrequency() {
|
||||
return center_frequency;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setCenterFrequency(qint64 center_frequency) {
|
||||
this->center_frequency = center_frequency;
|
||||
this->m_center_frequency_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getDevSampleRate() {
|
||||
return dev_sample_rate;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setDevSampleRate(qint32 dev_sample_rate) {
|
||||
this->dev_sample_rate = dev_sample_rate;
|
||||
this->m_dev_sample_rate_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getLog2HardInterp() {
|
||||
return log2_hard_interp;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setLog2HardInterp(qint32 log2_hard_interp) {
|
||||
this->log2_hard_interp = log2_hard_interp;
|
||||
this->m_log2_hard_interp_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getLog2SoftInterp() {
|
||||
return log2_soft_interp;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setLog2SoftInterp(qint32 log2_soft_interp) {
|
||||
this->log2_soft_interp = log2_soft_interp;
|
||||
this->m_log2_soft_interp_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getLpfBw() {
|
||||
return lpf_bw;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setLpfBw(qint32 lpf_bw) {
|
||||
this->lpf_bw = lpf_bw;
|
||||
this->m_lpf_bw_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getLpfFirEnable() {
|
||||
return lpf_fir_enable;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setLpfFirEnable(qint32 lpf_fir_enable) {
|
||||
this->lpf_fir_enable = lpf_fir_enable;
|
||||
this->m_lpf_fir_enable_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getLpfFirbw() {
|
||||
return lpf_firbw;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setLpfFirbw(qint32 lpf_firbw) {
|
||||
this->lpf_firbw = lpf_firbw;
|
||||
this->m_lpf_firbw_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getGain() {
|
||||
return gain;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setGain(qint32 gain) {
|
||||
this->gain = gain;
|
||||
this->m_gain_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGPlutoSdrOutputSettings::getTransverterMode() {
|
||||
return transverter_mode;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setTransverterMode(qint32 transverter_mode) {
|
||||
this->transverter_mode = transverter_mode;
|
||||
this->m_transverter_mode_isSet = true;
|
||||
}
|
||||
|
||||
qint64
|
||||
SWGPlutoSdrOutputSettings::getTransverterDeltaFrequency() {
|
||||
return transverter_delta_frequency;
|
||||
}
|
||||
void
|
||||
SWGPlutoSdrOutputSettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequency) {
|
||||
this->transverter_delta_frequency = transverter_delta_frequency;
|
||||
this->m_transverter_delta_frequency_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGPlutoSdrOutputSettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_dev_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_log2_hard_interp_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_log2_soft_interp_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_bw_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_fir_enable_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lpf_firbw_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_gain_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_transverter_mode_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
112
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputSettings.h
Normal file
112
swagger/sdrangel/code/qt5/client/SWGPlutoSdrOutputSettings.h
Normal file
@ -0,0 +1,112 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* 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 and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * 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 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGPlutoSdrOutputSettings.h
|
||||
*
|
||||
* PlutoSDR
|
||||
*/
|
||||
|
||||
#ifndef SWGPlutoSdrOutputSettings_H_
|
||||
#define SWGPlutoSdrOutputSettings_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGPlutoSdrOutputSettings: public SWGObject {
|
||||
public:
|
||||
SWGPlutoSdrOutputSettings();
|
||||
SWGPlutoSdrOutputSettings(QString* json);
|
||||
virtual ~SWGPlutoSdrOutputSettings();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGPlutoSdrOutputSettings* fromJson(QString &jsonString) override;
|
||||
|
||||
qint64 getCenterFrequency();
|
||||
void setCenterFrequency(qint64 center_frequency);
|
||||
|
||||
qint32 getDevSampleRate();
|
||||
void setDevSampleRate(qint32 dev_sample_rate);
|
||||
|
||||
qint32 getLog2HardInterp();
|
||||
void setLog2HardInterp(qint32 log2_hard_interp);
|
||||
|
||||
qint32 getLog2SoftInterp();
|
||||
void setLog2SoftInterp(qint32 log2_soft_interp);
|
||||
|
||||
qint32 getLpfBw();
|
||||
void setLpfBw(qint32 lpf_bw);
|
||||
|
||||
qint32 getLpfFirEnable();
|
||||
void setLpfFirEnable(qint32 lpf_fir_enable);
|
||||
|
||||
qint32 getLpfFirbw();
|
||||
void setLpfFirbw(qint32 lpf_firbw);
|
||||
|
||||
qint32 getGain();
|
||||
void setGain(qint32 gain);
|
||||
|
||||
qint32 getTransverterMode();
|
||||
void setTransverterMode(qint32 transverter_mode);
|
||||
|
||||
qint64 getTransverterDeltaFrequency();
|
||||
void setTransverterDeltaFrequency(qint64 transverter_delta_frequency);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint64 center_frequency;
|
||||
bool m_center_frequency_isSet;
|
||||
|
||||
qint32 dev_sample_rate;
|
||||
bool m_dev_sample_rate_isSet;
|
||||
|
||||
qint32 log2_hard_interp;
|
||||
bool m_log2_hard_interp_isSet;
|
||||
|
||||
qint32 log2_soft_interp;
|
||||
bool m_log2_soft_interp_isSet;
|
||||
|
||||
qint32 lpf_bw;
|
||||
bool m_lpf_bw_isSet;
|
||||
|
||||
qint32 lpf_fir_enable;
|
||||
bool m_lpf_fir_enable_isSet;
|
||||
|
||||
qint32 lpf_firbw;
|
||||
bool m_lpf_firbw_isSet;
|
||||
|
||||
qint32 gain;
|
||||
bool m_gain_isSet;
|
||||
|
||||
qint32 transverter_mode;
|
||||
bool m_transverter_mode_isSet;
|
||||
|
||||
qint64 transverter_delta_frequency;
|
||||
bool m_transverter_delta_frequency_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGPlutoSdrOutputSettings_H_ */
|
@ -97,6 +97,20 @@ def setupDevice(deviceset_url, options):
|
||||
if settings is None:
|
||||
exit(-1)
|
||||
|
||||
# calculate RF analog and FIR optimal bandpass filters bandwidths
|
||||
lpFIRBW = options.sample_rate*1000 / (1<<options.log2_decim)
|
||||
if options.fc_pos == 2: # center of passband
|
||||
lpfBW = options.sample_rate*1000 / (1<<options.log2_decim)
|
||||
else: # side of passband
|
||||
if options.log2_decim == 0:
|
||||
lpfBW = options.sample_rate*1000
|
||||
elif options.log2_decim == 1:
|
||||
lpfBW = options.sample_rate*1000
|
||||
elif options.log2_decim == 2:
|
||||
lpfBW = options.sample_rate*500
|
||||
else:
|
||||
lpfBW = options.sample_rate*750
|
||||
|
||||
if options.device_hwid == "Airspy":
|
||||
settings['airspySettings']['LOppmTenths'] = int(options.lo_ppm * 10) # in tenths of PPM
|
||||
settings["airspySettings"]["centerFrequency"] = options.device_freq*1000
|
||||
@ -127,10 +141,22 @@ def setupDevice(deviceset_url, options):
|
||||
settings["limeSdrInputSettings"]["centerFrequency"] = options.device_freq*1000 + 500000
|
||||
settings["limeSdrInputSettings"]["ncoEnable"] = 1
|
||||
settings["limeSdrInputSettings"]["ncoFrequency"] = -500000
|
||||
settings["limeSdrInputSettings"]["lpfBW"] = 1450000
|
||||
settings["limeSdrInputSettings"]["lpfFIRBW"] = 100000
|
||||
settings["limeSdrInputSettings"]["lpfBW"] = lpfBW
|
||||
settings["limeSdrInputSettings"]["lpfFIRBW"] = lpFIRBW
|
||||
settings["limeSdrInputSettings"]["lpfFIREnable"] = 1
|
||||
settings['limeSdrInputSettings']['dcBlock'] = 1
|
||||
elif options.device_hwid == "PlutoSDR":
|
||||
settings["plutoSdrInputSettings"]["antennaPath"] = options.antenna_path
|
||||
settings["plutoSdrInputSettings"]["devSampleRate"] = options.sample_rate*1000
|
||||
settings["plutoSdrInputSettings"]["lpfFIRlog2Decim"] = 1
|
||||
settings["plutoSdrInputSettings"]["log2Decim"] = options.log2_decim
|
||||
settings["plutoSdrInputSettings"]["centerFrequency"] = options.device_freq*1000
|
||||
settings["plutoSdrInputSettings"]["lpfBW"] = lpfBW
|
||||
settings["plutoSdrInputSettings"]["lpfFIRBW"] = lpFIRBW
|
||||
settings["plutoSdrInputSettings"]["lpfFIREnable"] = 1
|
||||
settings['plutoSdrInputSettings']['fcPos'] = options.fc_pos
|
||||
settings['plutoSdrInputSettings']['dcBlock'] = options.fc_pos == 2
|
||||
settings['plutoSdrInputSettings']['iqImbalance'] = options.fc_pos == 2
|
||||
elif options.device_hwid == "RTLSDR":
|
||||
settings['rtlSdrSettings']['devSampleRate'] = options.sample_rate*1000
|
||||
settings['rtlSdrSettings']['centerFrequency'] = options.device_freq*1000
|
||||
|
Loading…
Reference in New Issue
Block a user