mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 11:12:27 -04:00
SDRdaemon input: implemeted WEB API
This commit is contained in:
parent
f7b2220d1c
commit
6e828066e0
@ -633,7 +633,7 @@ void SDRdaemonSourceGui::updateStatus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSourceGui::tick()
|
void SDRdaemonSourceGui::tick() // FIXME: needed?
|
||||||
{
|
{
|
||||||
if ((++m_tickCount & 0xf) == 0) {
|
if ((++m_tickCount & 0xf) == 0) {
|
||||||
SDRdaemonSourceInput::MsgConfigureSDRdaemonStreamTiming* message = SDRdaemonSourceInput::MsgConfigureSDRdaemonStreamTiming::create();
|
SDRdaemonSourceInput::MsgConfigureSDRdaemonStreamTiming* message = SDRdaemonSourceInput::MsgConfigureSDRdaemonStreamTiming::create();
|
||||||
|
@ -16,8 +16,10 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <nn.h>
|
#include <nn.h>
|
||||||
#include <pair.h>
|
#include <pair.h>
|
||||||
@ -28,6 +30,8 @@
|
|||||||
|
|
||||||
#include "SWGDeviceSettings.h"
|
#include "SWGDeviceSettings.h"
|
||||||
#include "SWGDeviceState.h"
|
#include "SWGDeviceState.h"
|
||||||
|
#include "SWGDeviceReport.h"
|
||||||
|
#include "SWGSDRdaemonSourceReport.h"
|
||||||
|
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
@ -228,11 +232,11 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
|||||||
applySettings(conf.getSettings(), conf.getForce());
|
applySettings(conf.getSettings(), conf.getForce());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureSDRdaemonStreamTiming::match(message))
|
else if (MsgConfigureSDRdaemonStreamTiming::match(message)) // FIXME: really needed? UDP handler is connected to timer
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgReportSDRdaemonSourceStreamData::match(message))
|
else if (MsgReportSDRdaemonSourceStreamData::match(message)) // FIXME: really needed? UDP handler sends it to GUI already
|
||||||
{
|
{
|
||||||
// Forward message to the GUI if it is present
|
// Forward message to the GUI if it is present
|
||||||
if (getMessageQueueToGUI()) {
|
if (getMessageQueueToGUI()) {
|
||||||
@ -242,7 +246,7 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
|||||||
return true; // delete the unused message
|
return true; // delete the unused message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (MsgReportSDRdaemonSourceStreamTiming::match(message))
|
else if (MsgReportSDRdaemonSourceStreamTiming::match(message)) // FIXME: really needed? UDP handler sends it to GUI already
|
||||||
{
|
{
|
||||||
// Forward message to the GUI if it is present
|
// Forward message to the GUI if it is present
|
||||||
if (getMessageQueueToGUI()) {
|
if (getMessageQueueToGUI()) {
|
||||||
@ -432,3 +436,120 @@ int SDRdaemonSourceInput::webapiRun(
|
|||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SDRdaemonSourceInput::webapiSettingsGet(
|
||||||
|
SWGSDRangel::SWGDeviceSettings& response,
|
||||||
|
QString& errorMessage __attribute__((unused)))
|
||||||
|
{
|
||||||
|
response.setSdrDaemonSourceSettings(new SWGSDRangel::SWGSDRdaemonSourceSettings());
|
||||||
|
response.getSdrDaemonSourceSettings()->init();
|
||||||
|
webapiFormatDeviceSettings(response, m_settings);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SDRdaemonSourceInput::webapiSettingsPutPatch(
|
||||||
|
bool force,
|
||||||
|
const QStringList& deviceSettingsKeys,
|
||||||
|
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||||
|
QString& errorMessage __attribute__((unused)))
|
||||||
|
{
|
||||||
|
SDRdaemonSourceSettings settings = m_settings;
|
||||||
|
|
||||||
|
if (deviceSettingsKeys.contains("centerFrequency")) {
|
||||||
|
settings.m_centerFrequency = response.getSdrDaemonSourceSettings()->getCenterFrequency();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("sampleRate")) {
|
||||||
|
settings.m_sampleRate = response.getSdrDaemonSourceSettings()->getSampleRate();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("log2Decim")) {
|
||||||
|
settings.m_log2Decim = response.getSdrDaemonSourceSettings()->getLog2Decim();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("txDelay")) {
|
||||||
|
settings.m_txDelay = response.getSdrDaemonSourceSettings()->getTxDelay();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("nbFECBlocks")) {
|
||||||
|
settings.m_txDelay = response.getSdrDaemonSourceSettings()->getNbFecBlocks();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("address")) {
|
||||||
|
settings.m_address = *response.getSdrDaemonSourceSettings()->getAddress();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("dataPort")) {
|
||||||
|
settings.m_dataPort = response.getSdrDaemonSourceSettings()->getDataPort();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("controlPort")) {
|
||||||
|
settings.m_controlPort = response.getSdrDaemonSourceSettings()->getControlPort();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("specificParameters")) {
|
||||||
|
settings.m_specificParameters = *response.getSdrDaemonSourceSettings()->getSpecificParameters();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("dcBlock")) {
|
||||||
|
settings.m_dcBlock = response.getSdrDaemonSourceSettings()->getDcBlock() != 0;
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("iqCorrection")) {
|
||||||
|
settings.m_iqCorrection = response.getSdrDaemonSourceSettings()->getIqCorrection() != 0;
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("fcPos")) {
|
||||||
|
int fcPos = response.getSdrDaemonSourceSettings()->getFcPos();
|
||||||
|
settings.m_fcPos = fcPos < 0 ? 0 : fcPos > 2 ? 2 : fcPos;
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||||
|
settings.m_fileRecordName = *response.getSdrDaemonSourceSettings()->getFileRecordName();
|
||||||
|
}
|
||||||
|
|
||||||
|
MsgConfigureSDRdaemonSource *msg = MsgConfigureSDRdaemonSource::create(settings, force);
|
||||||
|
m_inputMessageQueue.push(msg);
|
||||||
|
|
||||||
|
if (m_guiMessageQueue) // forward to GUI if any
|
||||||
|
{
|
||||||
|
MsgConfigureSDRdaemonSource *msgToGUI = MsgConfigureSDRdaemonSource::create(settings, force);
|
||||||
|
m_guiMessageQueue->push(msgToGUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
webapiFormatDeviceSettings(response, settings);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDRdaemonSourceInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const SDRdaemonSourceSettings& settings)
|
||||||
|
{
|
||||||
|
response.getSdrDaemonSourceSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||||
|
response.getSdrDaemonSourceSettings()->setSampleRate(settings.m_sampleRate);
|
||||||
|
response.getSdrDaemonSourceSettings()->setLog2Decim(settings.m_log2Decim);
|
||||||
|
response.getSdrDaemonSourceSettings()->setTxDelay(settings.m_txDelay);
|
||||||
|
response.getSdrDaemonSourceSettings()->setNbFecBlocks(settings.m_nbFECBlocks);
|
||||||
|
response.getSdrDaemonSourceSettings()->setAddress(new QString(settings.m_address));
|
||||||
|
response.getSdrDaemonSourceSettings()->setDataPort(settings.m_dataPort);
|
||||||
|
response.getSdrDaemonSourceSettings()->setControlPort(settings.m_controlPort);
|
||||||
|
response.getSdrDaemonSourceSettings()->setSpecificParameters(new QString(settings.m_specificParameters));
|
||||||
|
response.getSdrDaemonSourceSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||||
|
response.getSdrDaemonSourceSettings()->setIqCorrection(settings.m_iqCorrection);
|
||||||
|
response.getSdrDaemonSourceSettings()->setFcPos((int) settings.m_fcPos);
|
||||||
|
|
||||||
|
if (response.getSdrDaemonSourceSettings()->getFileRecordName()) {
|
||||||
|
*response.getSdrDaemonSourceSettings()->getFileRecordName() = settings.m_fileRecordName;
|
||||||
|
} else {
|
||||||
|
response.getSdrDaemonSourceSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int SDRdaemonSourceInput::webapiReportGet(
|
||||||
|
SWGSDRangel::SWGDeviceReport& response,
|
||||||
|
QString& errorMessage __attribute__((unused)))
|
||||||
|
{
|
||||||
|
response.setSdrDaemonSourceReport(new SWGSDRangel::SWGSDRdaemonSourceReport());
|
||||||
|
response.getSdrDaemonSourceReport()->init();
|
||||||
|
webapiFormatDeviceReport(response);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDRdaemonSourceInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||||
|
{
|
||||||
|
response.getSdrDaemonSourceReport()->setCenterFrequency(m_SDRdaemonUDPHandler->getCenterFrequency());
|
||||||
|
response.getSdrDaemonSourceReport()->setSampleRate(m_SDRdaemonUDPHandler->getSampleRate());
|
||||||
|
response.getSdrDaemonSourceReport()->setBufferRwBalance(m_SDRdaemonUDPHandler->getBufferGauge());
|
||||||
|
|
||||||
|
quint64 startingTimeStampMsec = ((quint64) m_SDRdaemonUDPHandler->getTVSec() * 1000LL) + ((quint64) m_SDRdaemonUDPHandler->getTVuSec() / 1000LL);
|
||||||
|
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
|
||||||
|
response.getSdrDaemonSourceReport()->setDaemonTimestamp(new QString(dt.toString("yyyy-MM-dd HH:mm:ss.zzz")));
|
||||||
|
|
||||||
|
response.getSdrDaemonSourceReport()->setMinNbBlocks(m_SDRdaemonUDPHandler->getMinNbBlocks());
|
||||||
|
response.getSdrDaemonSourceReport()->setMaxNbRecovery(m_SDRdaemonUDPHandler->getMaxNbRecovery());
|
||||||
|
}
|
||||||
|
@ -279,6 +279,20 @@ public:
|
|||||||
|
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
virtual int webapiRunGet(
|
virtual int webapiRunGet(
|
||||||
SWGSDRangel::SWGDeviceState& response,
|
SWGSDRangel::SWGDeviceState& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage);
|
||||||
@ -300,6 +314,8 @@ private:
|
|||||||
FileRecord *m_fileSink; //!< File sink to record device I/Q output
|
FileRecord *m_fileSink; //!< File sink to record device I/Q output
|
||||||
|
|
||||||
void applySettings(const SDRdaemonSourceSettings& settings, bool force = false);
|
void applySettings(const SDRdaemonSourceSettings& settings, bool force = false);
|
||||||
|
void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const SDRdaemonSourceSettings& settings);
|
||||||
|
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_SDRDAEMONSOURCEINPUT_H
|
#endif // INCLUDE_SDRDAEMONSOURCEINPUT_H
|
||||||
|
@ -47,6 +47,11 @@ public:
|
|||||||
bool isStreaming() const { return m_masterTimerConnected; }
|
bool isStreaming() const { return m_masterTimerConnected; }
|
||||||
int getSampleRate() const { return m_samplerate; }
|
int getSampleRate() const { return m_samplerate; }
|
||||||
int getCenterFrequency() const { return m_centerFrequency * 1000; }
|
int getCenterFrequency() const { return m_centerFrequency * 1000; }
|
||||||
|
int getBufferGauge() const { return m_sdrDaemonBuffer.getBufferGauge(); }
|
||||||
|
uint32_t getTVSec() const { return m_tv_sec; }
|
||||||
|
uint32_t getTVuSec() const { return m_tv_usec; }
|
||||||
|
int getMinNbBlocks() { return m_sdrDaemonBuffer.getMinNbBlocks(); }
|
||||||
|
int getMaxNbRecovery() { return m_sdrDaemonBuffer.getMaxNbRecovery(); }
|
||||||
public slots:
|
public slots:
|
||||||
void dataReadyRead();
|
void dataReadyRead();
|
||||||
|
|
||||||
|
@ -1738,6 +1738,9 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"rtlSdrReport" : {
|
"rtlSdrReport" : {
|
||||||
"$ref" : "#/definitions/RtlSdrReport"
|
"$ref" : "#/definitions/RtlSdrReport"
|
||||||
|
},
|
||||||
|
"sdrDaemonSourceReport" : {
|
||||||
|
"$ref" : "#/definitions/SDRdaemonSourceReport"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Base device report. The specific device report present depends on deviceHwType"
|
"description" : "Base device report. The specific device report present depends on deviceHwType"
|
||||||
@ -1838,6 +1841,9 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"rtlSdrSettings" : {
|
"rtlSdrSettings" : {
|
||||||
"$ref" : "#/definitions/RtlSdrSettings"
|
"$ref" : "#/definitions/RtlSdrSettings"
|
||||||
|
},
|
||||||
|
"sdrDaemonSourceSettings" : {
|
||||||
|
"$ref" : "#/definitions/SDRdaemonSourceSettings"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Base device settings. The specific device settings present depends on deviceHwType."
|
"description" : "Base device settings. The specific device settings present depends on deviceHwType."
|
||||||
@ -3047,6 +3053,82 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "RTLSDR"
|
"description" : "RTLSDR"
|
||||||
|
};
|
||||||
|
defs.SDRdaemonSourceReport = {
|
||||||
|
"properties" : {
|
||||||
|
"centerFrequency" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"format" : "uint64"
|
||||||
|
},
|
||||||
|
"sampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"bufferRWBalance" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "percentage off the mid buffer (positive read leads)"
|
||||||
|
},
|
||||||
|
"daemonTimestamp" : {
|
||||||
|
"type" : "string",
|
||||||
|
"description" : "string representation of timestamp as sent by the SDRdaemon instance"
|
||||||
|
},
|
||||||
|
"minNbBlocks" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Minimum number of blocks retrieved per frame"
|
||||||
|
},
|
||||||
|
"maxNbRecovery" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Maximum number of recovery blocks used per frame"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "SDRdaemonSource"
|
||||||
|
};
|
||||||
|
defs.SDRdaemonSourceSettings = {
|
||||||
|
"properties" : {
|
||||||
|
"centerFrequency" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"format" : "uint64"
|
||||||
|
},
|
||||||
|
"sampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"log2Decim" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"txDelay" : {
|
||||||
|
"type" : "number",
|
||||||
|
"format" : "float",
|
||||||
|
"description" : "minimum delay in ms between two consecutive packets sending"
|
||||||
|
},
|
||||||
|
"nbFECBlocks" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"address" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"dataPort" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"controlPort" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"specificParameters" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"dcBlock" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"iqCorrection" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"fcPos" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "0=Infra 1=Supra 2=Center"
|
||||||
|
},
|
||||||
|
"fileRecordName" : {
|
||||||
|
"type" : "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "SDRdaemonSource"
|
||||||
};
|
};
|
||||||
defs.SSBDemodReport = {
|
defs.SSBDemodReport = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -22292,7 +22374,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2018-05-26T22:09:48.356+02:00
|
Generated 2018-05-26T23:41:15.758+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -0,0 +1,55 @@
|
|||||||
|
SDRdaemonSourceSettings:
|
||||||
|
description: SDRdaemonSource
|
||||||
|
properties:
|
||||||
|
centerFrequency:
|
||||||
|
type: integer
|
||||||
|
format: uint64
|
||||||
|
sampleRate:
|
||||||
|
type: integer
|
||||||
|
log2Decim:
|
||||||
|
type: integer
|
||||||
|
txDelay:
|
||||||
|
description: minimum delay in ms between two consecutive packets sending
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
nbFECBlocks:
|
||||||
|
type: integer
|
||||||
|
address:
|
||||||
|
type: string
|
||||||
|
dataPort:
|
||||||
|
type: integer
|
||||||
|
controlPort:
|
||||||
|
type: integer
|
||||||
|
specificParameters:
|
||||||
|
type: string
|
||||||
|
dcBlock:
|
||||||
|
type: integer
|
||||||
|
iqCorrection:
|
||||||
|
type: integer
|
||||||
|
fcPos:
|
||||||
|
description: 0=Infra 1=Supra 2=Center
|
||||||
|
type: integer
|
||||||
|
fileRecordName:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
SDRdaemonSourceReport:
|
||||||
|
description: SDRdaemonSource
|
||||||
|
properties:
|
||||||
|
centerFrequency:
|
||||||
|
type: integer
|
||||||
|
format: uint64
|
||||||
|
sampleRate:
|
||||||
|
type: integer
|
||||||
|
bufferRWBalance:
|
||||||
|
description: percentage off the mid buffer (positive read leads)
|
||||||
|
type: integer
|
||||||
|
daemonTimestamp:
|
||||||
|
description: string representation of timestamp as sent by the SDRdaemon instance
|
||||||
|
type: string
|
||||||
|
minNbBlocks:
|
||||||
|
description: Minimum number of blocks retrieved per frame
|
||||||
|
type: integer
|
||||||
|
maxNbRecovery:
|
||||||
|
description: Maximum number of recovery blocks used per frame
|
||||||
|
type: integer
|
||||||
|
|
@ -1775,6 +1775,8 @@ definitions:
|
|||||||
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputSettings"
|
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputSettings"
|
||||||
rtlSdrSettings:
|
rtlSdrSettings:
|
||||||
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
||||||
|
sdrDaemonSourceSettings:
|
||||||
|
$ref: "/doc/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceSettings"
|
||||||
|
|
||||||
DeviceReport:
|
DeviceReport:
|
||||||
description: Base device report. The specific device report present depends on deviceHwType
|
description: Base device report. The specific device report present depends on deviceHwType
|
||||||
@ -1807,6 +1809,8 @@ definitions:
|
|||||||
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
|
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
|
||||||
rtlSdrReport:
|
rtlSdrReport:
|
||||||
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
||||||
|
sdrDaemonSourceReport:
|
||||||
|
$ref: "/doc/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceReport"
|
||||||
|
|
||||||
ChannelSettings:
|
ChannelSettings:
|
||||||
description: Base channel settings. The specific channel settings present depends on channelType.
|
description: Base channel settings. The specific channel settings present depends on channelType.
|
||||||
|
55
swagger/sdrangel/api/swagger/include/SDRDaemonSource.yaml
Normal file
55
swagger/sdrangel/api/swagger/include/SDRDaemonSource.yaml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
SDRdaemonSourceSettings:
|
||||||
|
description: SDRdaemonSource
|
||||||
|
properties:
|
||||||
|
centerFrequency:
|
||||||
|
type: integer
|
||||||
|
format: uint64
|
||||||
|
sampleRate:
|
||||||
|
type: integer
|
||||||
|
log2Decim:
|
||||||
|
type: integer
|
||||||
|
txDelay:
|
||||||
|
description: minimum delay in ms between two consecutive packets sending
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
nbFECBlocks:
|
||||||
|
type: integer
|
||||||
|
address:
|
||||||
|
type: string
|
||||||
|
dataPort:
|
||||||
|
type: integer
|
||||||
|
controlPort:
|
||||||
|
type: integer
|
||||||
|
specificParameters:
|
||||||
|
type: string
|
||||||
|
dcBlock:
|
||||||
|
type: integer
|
||||||
|
iqCorrection:
|
||||||
|
type: integer
|
||||||
|
fcPos:
|
||||||
|
description: 0=Infra 1=Supra 2=Center
|
||||||
|
type: integer
|
||||||
|
fileRecordName:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
SDRdaemonSourceReport:
|
||||||
|
description: SDRdaemonSource
|
||||||
|
properties:
|
||||||
|
centerFrequency:
|
||||||
|
type: integer
|
||||||
|
format: uint64
|
||||||
|
sampleRate:
|
||||||
|
type: integer
|
||||||
|
bufferRWBalance:
|
||||||
|
description: percentage off the mid buffer (positive read leads)
|
||||||
|
type: integer
|
||||||
|
daemonTimestamp:
|
||||||
|
description: string representation of timestamp as sent by the SDRdaemon instance
|
||||||
|
type: string
|
||||||
|
minNbBlocks:
|
||||||
|
description: Minimum number of blocks retrieved per frame
|
||||||
|
type: integer
|
||||||
|
maxNbRecovery:
|
||||||
|
description: Maximum number of recovery blocks used per frame
|
||||||
|
type: integer
|
||||||
|
|
@ -1775,6 +1775,8 @@ definitions:
|
|||||||
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputSettings"
|
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputSettings"
|
||||||
rtlSdrSettings:
|
rtlSdrSettings:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
||||||
|
sdrDaemonSourceSettings:
|
||||||
|
$ref: "http://localhost:8081/api/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceSettings"
|
||||||
|
|
||||||
DeviceReport:
|
DeviceReport:
|
||||||
description: Base device report. The specific device report present depends on deviceHwType
|
description: Base device report. The specific device report present depends on deviceHwType
|
||||||
@ -1807,6 +1809,8 @@ definitions:
|
|||||||
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
|
$ref: "http://localhost:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
|
||||||
rtlSdrReport:
|
rtlSdrReport:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
||||||
|
sdrDaemonSourceReport:
|
||||||
|
$ref: "http://localhost:8081/api/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceReport "
|
||||||
|
|
||||||
ChannelSettings:
|
ChannelSettings:
|
||||||
description: Base channel settings. The specific channel settings present depends on channelType.
|
description: Base channel settings. The specific channel settings present depends on channelType.
|
||||||
|
@ -1738,6 +1738,9 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"rtlSdrReport" : {
|
"rtlSdrReport" : {
|
||||||
"$ref" : "#/definitions/RtlSdrReport"
|
"$ref" : "#/definitions/RtlSdrReport"
|
||||||
|
},
|
||||||
|
"sdrDaemonSourceReport" : {
|
||||||
|
"$ref" : "#/definitions/SDRdaemonSourceReport"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Base device report. The specific device report present depends on deviceHwType"
|
"description" : "Base device report. The specific device report present depends on deviceHwType"
|
||||||
@ -1838,6 +1841,9 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"rtlSdrSettings" : {
|
"rtlSdrSettings" : {
|
||||||
"$ref" : "#/definitions/RtlSdrSettings"
|
"$ref" : "#/definitions/RtlSdrSettings"
|
||||||
|
},
|
||||||
|
"sdrDaemonSourceSettings" : {
|
||||||
|
"$ref" : "#/definitions/SDRdaemonSourceSettings"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Base device settings. The specific device settings present depends on deviceHwType."
|
"description" : "Base device settings. The specific device settings present depends on deviceHwType."
|
||||||
@ -3047,6 +3053,82 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "RTLSDR"
|
"description" : "RTLSDR"
|
||||||
|
};
|
||||||
|
defs.SDRdaemonSourceReport = {
|
||||||
|
"properties" : {
|
||||||
|
"centerFrequency" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"format" : "uint64"
|
||||||
|
},
|
||||||
|
"sampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"bufferRWBalance" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "percentage off the mid buffer (positive read leads)"
|
||||||
|
},
|
||||||
|
"daemonTimestamp" : {
|
||||||
|
"type" : "string",
|
||||||
|
"description" : "string representation of timestamp as sent by the SDRdaemon instance"
|
||||||
|
},
|
||||||
|
"minNbBlocks" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Minimum number of blocks retrieved per frame"
|
||||||
|
},
|
||||||
|
"maxNbRecovery" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Maximum number of recovery blocks used per frame"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "SDRdaemonSource"
|
||||||
|
};
|
||||||
|
defs.SDRdaemonSourceSettings = {
|
||||||
|
"properties" : {
|
||||||
|
"centerFrequency" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"format" : "uint64"
|
||||||
|
},
|
||||||
|
"sampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"log2Decim" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"txDelay" : {
|
||||||
|
"type" : "number",
|
||||||
|
"format" : "float",
|
||||||
|
"description" : "minimum delay in ms between two consecutive packets sending"
|
||||||
|
},
|
||||||
|
"nbFECBlocks" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"address" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"dataPort" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"controlPort" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"specificParameters" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"dcBlock" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"iqCorrection" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"fcPos" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "0=Infra 1=Supra 2=Center"
|
||||||
|
},
|
||||||
|
"fileRecordName" : {
|
||||||
|
"type" : "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "SDRdaemonSource"
|
||||||
};
|
};
|
||||||
defs.SSBDemodReport = {
|
defs.SSBDemodReport = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -22292,7 +22374,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2018-05-26T22:09:48.356+02:00
|
Generated 2018-05-26T23:41:15.758+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,6 +50,8 @@ SWGDeviceReport::SWGDeviceReport() {
|
|||||||
m_pluto_sdr_output_report_isSet = false;
|
m_pluto_sdr_output_report_isSet = false;
|
||||||
rtl_sdr_report = nullptr;
|
rtl_sdr_report = nullptr;
|
||||||
m_rtl_sdr_report_isSet = false;
|
m_rtl_sdr_report_isSet = false;
|
||||||
|
sdr_daemon_source_report = nullptr;
|
||||||
|
m_sdr_daemon_source_report_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDeviceReport::~SWGDeviceReport() {
|
SWGDeviceReport::~SWGDeviceReport() {
|
||||||
@ -80,6 +82,8 @@ SWGDeviceReport::init() {
|
|||||||
m_pluto_sdr_output_report_isSet = false;
|
m_pluto_sdr_output_report_isSet = false;
|
||||||
rtl_sdr_report = new SWGRtlSdrReport();
|
rtl_sdr_report = new SWGRtlSdrReport();
|
||||||
m_rtl_sdr_report_isSet = false;
|
m_rtl_sdr_report_isSet = false;
|
||||||
|
sdr_daemon_source_report = new SWGSDRdaemonSourceReport();
|
||||||
|
m_sdr_daemon_source_report_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -115,6 +119,9 @@ SWGDeviceReport::cleanup() {
|
|||||||
if(rtl_sdr_report != nullptr) {
|
if(rtl_sdr_report != nullptr) {
|
||||||
delete rtl_sdr_report;
|
delete rtl_sdr_report;
|
||||||
}
|
}
|
||||||
|
if(sdr_daemon_source_report != nullptr) {
|
||||||
|
delete sdr_daemon_source_report;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDeviceReport*
|
SWGDeviceReport*
|
||||||
@ -150,6 +157,8 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&rtl_sdr_report, pJson["rtlSdrReport"], "SWGRtlSdrReport", "SWGRtlSdrReport");
|
::SWGSDRangel::setValue(&rtl_sdr_report, pJson["rtlSdrReport"], "SWGRtlSdrReport", "SWGRtlSdrReport");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&sdr_daemon_source_report, pJson["sdrDaemonSourceReport"], "SWGSDRdaemonSourceReport", "SWGSDRdaemonSourceReport");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@ -199,6 +208,9 @@ SWGDeviceReport::asJsonObject() {
|
|||||||
if((rtl_sdr_report != nullptr) && (rtl_sdr_report->isSet())){
|
if((rtl_sdr_report != nullptr) && (rtl_sdr_report->isSet())){
|
||||||
toJsonValue(QString("rtlSdrReport"), rtl_sdr_report, obj, QString("SWGRtlSdrReport"));
|
toJsonValue(QString("rtlSdrReport"), rtl_sdr_report, obj, QString("SWGRtlSdrReport"));
|
||||||
}
|
}
|
||||||
|
if((sdr_daemon_source_report != nullptr) && (sdr_daemon_source_report->isSet())){
|
||||||
|
toJsonValue(QString("sdrDaemonSourceReport"), sdr_daemon_source_report, obj, QString("SWGSDRdaemonSourceReport"));
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -313,6 +325,16 @@ SWGDeviceReport::setRtlSdrReport(SWGRtlSdrReport* rtl_sdr_report) {
|
|||||||
this->m_rtl_sdr_report_isSet = true;
|
this->m_rtl_sdr_report_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport*
|
||||||
|
SWGDeviceReport::getSdrDaemonSourceReport() {
|
||||||
|
return sdr_daemon_source_report;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGDeviceReport::setSdrDaemonSourceReport(SWGSDRdaemonSourceReport* sdr_daemon_source_report) {
|
||||||
|
this->sdr_daemon_source_report = sdr_daemon_source_report;
|
||||||
|
this->m_sdr_daemon_source_report_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGDeviceReport::isSet(){
|
SWGDeviceReport::isSet(){
|
||||||
@ -329,6 +351,7 @@ SWGDeviceReport::isSet(){
|
|||||||
if(pluto_sdr_input_report != nullptr && pluto_sdr_input_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(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;}
|
if(rtl_sdr_report != nullptr && rtl_sdr_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
|
if(sdr_daemon_source_report != nullptr && sdr_daemon_source_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
}while(false);
|
}while(false);
|
||||||
return isObjectUpdated;
|
return isObjectUpdated;
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "SWGPlutoSdrInputReport.h"
|
#include "SWGPlutoSdrInputReport.h"
|
||||||
#include "SWGPlutoSdrOutputReport.h"
|
#include "SWGPlutoSdrOutputReport.h"
|
||||||
#include "SWGRtlSdrReport.h"
|
#include "SWGRtlSdrReport.h"
|
||||||
|
#include "SWGSDRdaemonSourceReport.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
@ -84,6 +85,9 @@ public:
|
|||||||
SWGRtlSdrReport* getRtlSdrReport();
|
SWGRtlSdrReport* getRtlSdrReport();
|
||||||
void setRtlSdrReport(SWGRtlSdrReport* rtl_sdr_report);
|
void setRtlSdrReport(SWGRtlSdrReport* rtl_sdr_report);
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport* getSdrDaemonSourceReport();
|
||||||
|
void setSdrDaemonSourceReport(SWGSDRdaemonSourceReport* sdr_daemon_source_report);
|
||||||
|
|
||||||
|
|
||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
@ -121,6 +125,9 @@ private:
|
|||||||
SWGRtlSdrReport* rtl_sdr_report;
|
SWGRtlSdrReport* rtl_sdr_report;
|
||||||
bool m_rtl_sdr_report_isSet;
|
bool m_rtl_sdr_report_isSet;
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport* sdr_daemon_source_report;
|
||||||
|
bool m_sdr_daemon_source_report_isSet;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,8 @@ SWGDeviceSettings::SWGDeviceSettings() {
|
|||||||
m_pluto_sdr_output_settings_isSet = false;
|
m_pluto_sdr_output_settings_isSet = false;
|
||||||
rtl_sdr_settings = nullptr;
|
rtl_sdr_settings = nullptr;
|
||||||
m_rtl_sdr_settings_isSet = false;
|
m_rtl_sdr_settings_isSet = false;
|
||||||
|
sdr_daemon_source_settings = nullptr;
|
||||||
|
m_sdr_daemon_source_settings_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDeviceSettings::~SWGDeviceSettings() {
|
SWGDeviceSettings::~SWGDeviceSettings() {
|
||||||
@ -104,6 +106,8 @@ SWGDeviceSettings::init() {
|
|||||||
m_pluto_sdr_output_settings_isSet = false;
|
m_pluto_sdr_output_settings_isSet = false;
|
||||||
rtl_sdr_settings = new SWGRtlSdrSettings();
|
rtl_sdr_settings = new SWGRtlSdrSettings();
|
||||||
m_rtl_sdr_settings_isSet = false;
|
m_rtl_sdr_settings_isSet = false;
|
||||||
|
sdr_daemon_source_settings = new SWGSDRdaemonSourceSettings();
|
||||||
|
m_sdr_daemon_source_settings_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -157,6 +161,9 @@ SWGDeviceSettings::cleanup() {
|
|||||||
if(rtl_sdr_settings != nullptr) {
|
if(rtl_sdr_settings != nullptr) {
|
||||||
delete rtl_sdr_settings;
|
delete rtl_sdr_settings;
|
||||||
}
|
}
|
||||||
|
if(sdr_daemon_source_settings != nullptr) {
|
||||||
|
delete sdr_daemon_source_settings;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDeviceSettings*
|
SWGDeviceSettings*
|
||||||
@ -204,6 +211,8 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&rtl_sdr_settings, pJson["rtlSdrSettings"], "SWGRtlSdrSettings", "SWGRtlSdrSettings");
|
::SWGSDRangel::setValue(&rtl_sdr_settings, pJson["rtlSdrSettings"], "SWGRtlSdrSettings", "SWGRtlSdrSettings");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&sdr_daemon_source_settings, pJson["sdrDaemonSourceSettings"], "SWGSDRdaemonSourceSettings", "SWGSDRdaemonSourceSettings");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@ -271,6 +280,9 @@ SWGDeviceSettings::asJsonObject() {
|
|||||||
if((rtl_sdr_settings != nullptr) && (rtl_sdr_settings->isSet())){
|
if((rtl_sdr_settings != nullptr) && (rtl_sdr_settings->isSet())){
|
||||||
toJsonValue(QString("rtlSdrSettings"), rtl_sdr_settings, obj, QString("SWGRtlSdrSettings"));
|
toJsonValue(QString("rtlSdrSettings"), rtl_sdr_settings, obj, QString("SWGRtlSdrSettings"));
|
||||||
}
|
}
|
||||||
|
if((sdr_daemon_source_settings != nullptr) && (sdr_daemon_source_settings->isSet())){
|
||||||
|
toJsonValue(QString("sdrDaemonSourceSettings"), sdr_daemon_source_settings, obj, QString("SWGSDRdaemonSourceSettings"));
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -445,6 +457,16 @@ SWGDeviceSettings::setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings) {
|
|||||||
this->m_rtl_sdr_settings_isSet = true;
|
this->m_rtl_sdr_settings_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings*
|
||||||
|
SWGDeviceSettings::getSdrDaemonSourceSettings() {
|
||||||
|
return sdr_daemon_source_settings;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGDeviceSettings::setSdrDaemonSourceSettings(SWGSDRdaemonSourceSettings* sdr_daemon_source_settings) {
|
||||||
|
this->sdr_daemon_source_settings = sdr_daemon_source_settings;
|
||||||
|
this->m_sdr_daemon_source_settings_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGDeviceSettings::isSet(){
|
SWGDeviceSettings::isSet(){
|
||||||
@ -467,6 +489,7 @@ SWGDeviceSettings::isSet(){
|
|||||||
if(pluto_sdr_input_settings != nullptr && pluto_sdr_input_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(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;}
|
if(rtl_sdr_settings != nullptr && rtl_sdr_settings->isSet()){ isObjectUpdated = true; break;}
|
||||||
|
if(sdr_daemon_source_settings != nullptr && sdr_daemon_source_settings->isSet()){ isObjectUpdated = true; break;}
|
||||||
}while(false);
|
}while(false);
|
||||||
return isObjectUpdated;
|
return isObjectUpdated;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "SWGPlutoSdrInputSettings.h"
|
#include "SWGPlutoSdrInputSettings.h"
|
||||||
#include "SWGPlutoSdrOutputSettings.h"
|
#include "SWGPlutoSdrOutputSettings.h"
|
||||||
#include "SWGRtlSdrSettings.h"
|
#include "SWGRtlSdrSettings.h"
|
||||||
|
#include "SWGSDRdaemonSourceSettings.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
@ -108,6 +109,9 @@ public:
|
|||||||
SWGRtlSdrSettings* getRtlSdrSettings();
|
SWGRtlSdrSettings* getRtlSdrSettings();
|
||||||
void setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings);
|
void setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings);
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings* getSdrDaemonSourceSettings();
|
||||||
|
void setSdrDaemonSourceSettings(SWGSDRdaemonSourceSettings* sdr_daemon_source_settings);
|
||||||
|
|
||||||
|
|
||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
@ -163,6 +167,9 @@ private:
|
|||||||
SWGRtlSdrSettings* rtl_sdr_settings;
|
SWGRtlSdrSettings* rtl_sdr_settings;
|
||||||
bool m_rtl_sdr_settings_isSet;
|
bool m_rtl_sdr_settings_isSet;
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings* sdr_daemon_source_settings;
|
||||||
|
bool m_sdr_daemon_source_settings_isSet;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,8 @@
|
|||||||
#include "SWGRtlSdrReport.h"
|
#include "SWGRtlSdrReport.h"
|
||||||
#include "SWGRtlSdrReport_gains.h"
|
#include "SWGRtlSdrReport_gains.h"
|
||||||
#include "SWGRtlSdrSettings.h"
|
#include "SWGRtlSdrSettings.h"
|
||||||
|
#include "SWGSDRdaemonSourceReport.h"
|
||||||
|
#include "SWGSDRdaemonSourceSettings.h"
|
||||||
#include "SWGSSBDemodReport.h"
|
#include "SWGSSBDemodReport.h"
|
||||||
#include "SWGSSBDemodSettings.h"
|
#include "SWGSSBDemodSettings.h"
|
||||||
#include "SWGSSBModReport.h"
|
#include "SWGSSBModReport.h"
|
||||||
@ -320,6 +322,12 @@ namespace SWGSDRangel {
|
|||||||
if(QString("SWGRtlSdrSettings").compare(type) == 0) {
|
if(QString("SWGRtlSdrSettings").compare(type) == 0) {
|
||||||
return new SWGRtlSdrSettings();
|
return new SWGRtlSdrSettings();
|
||||||
}
|
}
|
||||||
|
if(QString("SWGSDRdaemonSourceReport").compare(type) == 0) {
|
||||||
|
return new SWGSDRdaemonSourceReport();
|
||||||
|
}
|
||||||
|
if(QString("SWGSDRdaemonSourceSettings").compare(type) == 0) {
|
||||||
|
return new SWGSDRdaemonSourceSettings();
|
||||||
|
}
|
||||||
if(QString("SWGSSBDemodReport").compare(type) == 0) {
|
if(QString("SWGSSBDemodReport").compare(type) == 0) {
|
||||||
return new SWGSSBDemodReport();
|
return new SWGSSBDemodReport();
|
||||||
}
|
}
|
||||||
|
213
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceReport.cpp
Normal file
213
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceReport.cpp
Normal file
@ -0,0 +1,213 @@
|
|||||||
|
/**
|
||||||
|
* 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 "SWGSDRdaemonSourceReport.h"
|
||||||
|
|
||||||
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport::SWGSDRdaemonSourceReport(QString* json) {
|
||||||
|
init();
|
||||||
|
this->fromJson(*json);
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport::SWGSDRdaemonSourceReport() {
|
||||||
|
center_frequency = 0;
|
||||||
|
m_center_frequency_isSet = false;
|
||||||
|
sample_rate = 0;
|
||||||
|
m_sample_rate_isSet = false;
|
||||||
|
buffer_rw_balance = 0;
|
||||||
|
m_buffer_rw_balance_isSet = false;
|
||||||
|
daemon_timestamp = nullptr;
|
||||||
|
m_daemon_timestamp_isSet = false;
|
||||||
|
min_nb_blocks = 0;
|
||||||
|
m_min_nb_blocks_isSet = false;
|
||||||
|
max_nb_recovery = 0;
|
||||||
|
m_max_nb_recovery_isSet = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport::~SWGSDRdaemonSourceReport() {
|
||||||
|
this->cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::init() {
|
||||||
|
center_frequency = 0;
|
||||||
|
m_center_frequency_isSet = false;
|
||||||
|
sample_rate = 0;
|
||||||
|
m_sample_rate_isSet = false;
|
||||||
|
buffer_rw_balance = 0;
|
||||||
|
m_buffer_rw_balance_isSet = false;
|
||||||
|
daemon_timestamp = new QString("");
|
||||||
|
m_daemon_timestamp_isSet = false;
|
||||||
|
min_nb_blocks = 0;
|
||||||
|
m_min_nb_blocks_isSet = false;
|
||||||
|
max_nb_recovery = 0;
|
||||||
|
m_max_nb_recovery_isSet = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::cleanup() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(daemon_timestamp != nullptr) {
|
||||||
|
delete daemon_timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceReport*
|
||||||
|
SWGSDRdaemonSourceReport::fromJson(QString &json) {
|
||||||
|
QByteArray array (json.toStdString().c_str());
|
||||||
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||||
|
QJsonObject jsonObject = doc.object();
|
||||||
|
this->fromJsonObject(jsonObject);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::fromJsonObject(QJsonObject &pJson) {
|
||||||
|
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&buffer_rw_balance, pJson["bufferRWBalance"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&daemon_timestamp, pJson["daemonTimestamp"], "QString", "QString");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&min_nb_blocks, pJson["minNbBlocks"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&max_nb_recovery, pJson["maxNbRecovery"], "qint32", "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
SWGSDRdaemonSourceReport::asJson ()
|
||||||
|
{
|
||||||
|
QJsonObject* obj = this->asJsonObject();
|
||||||
|
|
||||||
|
QJsonDocument doc(*obj);
|
||||||
|
QByteArray bytes = doc.toJson();
|
||||||
|
delete obj;
|
||||||
|
return QString(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
QJsonObject*
|
||||||
|
SWGSDRdaemonSourceReport::asJsonObject() {
|
||||||
|
QJsonObject* obj = new QJsonObject();
|
||||||
|
if(m_center_frequency_isSet){
|
||||||
|
obj->insert("centerFrequency", QJsonValue(center_frequency));
|
||||||
|
}
|
||||||
|
if(m_sample_rate_isSet){
|
||||||
|
obj->insert("sampleRate", QJsonValue(sample_rate));
|
||||||
|
}
|
||||||
|
if(m_buffer_rw_balance_isSet){
|
||||||
|
obj->insert("bufferRWBalance", QJsonValue(buffer_rw_balance));
|
||||||
|
}
|
||||||
|
if(daemon_timestamp != nullptr && *daemon_timestamp != QString("")){
|
||||||
|
toJsonValue(QString("daemonTimestamp"), daemon_timestamp, obj, QString("QString"));
|
||||||
|
}
|
||||||
|
if(m_min_nb_blocks_isSet){
|
||||||
|
obj->insert("minNbBlocks", QJsonValue(min_nb_blocks));
|
||||||
|
}
|
||||||
|
if(m_max_nb_recovery_isSet){
|
||||||
|
obj->insert("maxNbRecovery", QJsonValue(max_nb_recovery));
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceReport::getCenterFrequency() {
|
||||||
|
return center_frequency;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::setCenterFrequency(qint32 center_frequency) {
|
||||||
|
this->center_frequency = center_frequency;
|
||||||
|
this->m_center_frequency_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceReport::getSampleRate() {
|
||||||
|
return sample_rate;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::setSampleRate(qint32 sample_rate) {
|
||||||
|
this->sample_rate = sample_rate;
|
||||||
|
this->m_sample_rate_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceReport::getBufferRwBalance() {
|
||||||
|
return buffer_rw_balance;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::setBufferRwBalance(qint32 buffer_rw_balance) {
|
||||||
|
this->buffer_rw_balance = buffer_rw_balance;
|
||||||
|
this->m_buffer_rw_balance_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGSDRdaemonSourceReport::getDaemonTimestamp() {
|
||||||
|
return daemon_timestamp;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::setDaemonTimestamp(QString* daemon_timestamp) {
|
||||||
|
this->daemon_timestamp = daemon_timestamp;
|
||||||
|
this->m_daemon_timestamp_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceReport::getMinNbBlocks() {
|
||||||
|
return min_nb_blocks;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::setMinNbBlocks(qint32 min_nb_blocks) {
|
||||||
|
this->min_nb_blocks = min_nb_blocks;
|
||||||
|
this->m_min_nb_blocks_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceReport::getMaxNbRecovery() {
|
||||||
|
return max_nb_recovery;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceReport::setMaxNbRecovery(qint32 max_nb_recovery) {
|
||||||
|
this->max_nb_recovery = max_nb_recovery;
|
||||||
|
this->m_max_nb_recovery_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
SWGSDRdaemonSourceReport::isSet(){
|
||||||
|
bool isObjectUpdated = false;
|
||||||
|
do{
|
||||||
|
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_buffer_rw_balance_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(daemon_timestamp != nullptr && *daemon_timestamp != QString("")){ isObjectUpdated = true; break;}
|
||||||
|
if(m_min_nb_blocks_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_max_nb_recovery_isSet){ isObjectUpdated = true; break;}
|
||||||
|
}while(false);
|
||||||
|
return isObjectUpdated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
89
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceReport.h
Normal file
89
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceReport.h
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SWGSDRdaemonSourceReport.h
|
||||||
|
*
|
||||||
|
* SDRdaemonSource
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SWGSDRdaemonSourceReport_H_
|
||||||
|
#define SWGSDRdaemonSourceReport_H_
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "SWGObject.h"
|
||||||
|
#include "export.h"
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
class SWG_API SWGSDRdaemonSourceReport: public SWGObject {
|
||||||
|
public:
|
||||||
|
SWGSDRdaemonSourceReport();
|
||||||
|
SWGSDRdaemonSourceReport(QString* json);
|
||||||
|
virtual ~SWGSDRdaemonSourceReport();
|
||||||
|
void init();
|
||||||
|
void cleanup();
|
||||||
|
|
||||||
|
virtual QString asJson () override;
|
||||||
|
virtual QJsonObject* asJsonObject() override;
|
||||||
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
|
virtual SWGSDRdaemonSourceReport* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
|
qint32 getCenterFrequency();
|
||||||
|
void setCenterFrequency(qint32 center_frequency);
|
||||||
|
|
||||||
|
qint32 getSampleRate();
|
||||||
|
void setSampleRate(qint32 sample_rate);
|
||||||
|
|
||||||
|
qint32 getBufferRwBalance();
|
||||||
|
void setBufferRwBalance(qint32 buffer_rw_balance);
|
||||||
|
|
||||||
|
QString* getDaemonTimestamp();
|
||||||
|
void setDaemonTimestamp(QString* daemon_timestamp);
|
||||||
|
|
||||||
|
qint32 getMinNbBlocks();
|
||||||
|
void setMinNbBlocks(qint32 min_nb_blocks);
|
||||||
|
|
||||||
|
qint32 getMaxNbRecovery();
|
||||||
|
void setMaxNbRecovery(qint32 max_nb_recovery);
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool isSet() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
qint32 center_frequency;
|
||||||
|
bool m_center_frequency_isSet;
|
||||||
|
|
||||||
|
qint32 sample_rate;
|
||||||
|
bool m_sample_rate_isSet;
|
||||||
|
|
||||||
|
qint32 buffer_rw_balance;
|
||||||
|
bool m_buffer_rw_balance_isSet;
|
||||||
|
|
||||||
|
QString* daemon_timestamp;
|
||||||
|
bool m_daemon_timestamp_isSet;
|
||||||
|
|
||||||
|
qint32 min_nb_blocks;
|
||||||
|
bool m_min_nb_blocks_isSet;
|
||||||
|
|
||||||
|
qint32 max_nb_recovery;
|
||||||
|
bool m_max_nb_recovery_isSet;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* SWGSDRdaemonSourceReport_H_ */
|
364
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceSettings.cpp
Normal file
364
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceSettings.cpp
Normal file
@ -0,0 +1,364 @@
|
|||||||
|
/**
|
||||||
|
* 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 "SWGSDRdaemonSourceSettings.h"
|
||||||
|
|
||||||
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings::SWGSDRdaemonSourceSettings(QString* json) {
|
||||||
|
init();
|
||||||
|
this->fromJson(*json);
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings::SWGSDRdaemonSourceSettings() {
|
||||||
|
center_frequency = 0;
|
||||||
|
m_center_frequency_isSet = false;
|
||||||
|
sample_rate = 0;
|
||||||
|
m_sample_rate_isSet = false;
|
||||||
|
log2_decim = 0;
|
||||||
|
m_log2_decim_isSet = false;
|
||||||
|
tx_delay = 0.0f;
|
||||||
|
m_tx_delay_isSet = false;
|
||||||
|
nb_fec_blocks = 0;
|
||||||
|
m_nb_fec_blocks_isSet = false;
|
||||||
|
address = nullptr;
|
||||||
|
m_address_isSet = false;
|
||||||
|
data_port = 0;
|
||||||
|
m_data_port_isSet = false;
|
||||||
|
control_port = 0;
|
||||||
|
m_control_port_isSet = false;
|
||||||
|
specific_parameters = nullptr;
|
||||||
|
m_specific_parameters_isSet = false;
|
||||||
|
dc_block = 0;
|
||||||
|
m_dc_block_isSet = false;
|
||||||
|
iq_correction = 0;
|
||||||
|
m_iq_correction_isSet = false;
|
||||||
|
fc_pos = 0;
|
||||||
|
m_fc_pos_isSet = false;
|
||||||
|
file_record_name = nullptr;
|
||||||
|
m_file_record_name_isSet = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings::~SWGSDRdaemonSourceSettings() {
|
||||||
|
this->cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::init() {
|
||||||
|
center_frequency = 0;
|
||||||
|
m_center_frequency_isSet = false;
|
||||||
|
sample_rate = 0;
|
||||||
|
m_sample_rate_isSet = false;
|
||||||
|
log2_decim = 0;
|
||||||
|
m_log2_decim_isSet = false;
|
||||||
|
tx_delay = 0.0f;
|
||||||
|
m_tx_delay_isSet = false;
|
||||||
|
nb_fec_blocks = 0;
|
||||||
|
m_nb_fec_blocks_isSet = false;
|
||||||
|
address = new QString("");
|
||||||
|
m_address_isSet = false;
|
||||||
|
data_port = 0;
|
||||||
|
m_data_port_isSet = false;
|
||||||
|
control_port = 0;
|
||||||
|
m_control_port_isSet = false;
|
||||||
|
specific_parameters = new QString("");
|
||||||
|
m_specific_parameters_isSet = false;
|
||||||
|
dc_block = 0;
|
||||||
|
m_dc_block_isSet = false;
|
||||||
|
iq_correction = 0;
|
||||||
|
m_iq_correction_isSet = false;
|
||||||
|
fc_pos = 0;
|
||||||
|
m_fc_pos_isSet = false;
|
||||||
|
file_record_name = new QString("");
|
||||||
|
m_file_record_name_isSet = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::cleanup() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(address != nullptr) {
|
||||||
|
delete address;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(specific_parameters != nullptr) {
|
||||||
|
delete specific_parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(file_record_name != nullptr) {
|
||||||
|
delete file_record_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGSDRdaemonSourceSettings*
|
||||||
|
SWGSDRdaemonSourceSettings::fromJson(QString &json) {
|
||||||
|
QByteArray array (json.toStdString().c_str());
|
||||||
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||||
|
QJsonObject jsonObject = doc.object();
|
||||||
|
this->fromJsonObject(jsonObject);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
||||||
|
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&tx_delay, pJson["txDelay"], "float", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&address, pJson["address"], "QString", "QString");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&control_port, pJson["controlPort"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&specific_parameters, pJson["specificParameters"], "QString", "QString");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
SWGSDRdaemonSourceSettings::asJson ()
|
||||||
|
{
|
||||||
|
QJsonObject* obj = this->asJsonObject();
|
||||||
|
|
||||||
|
QJsonDocument doc(*obj);
|
||||||
|
QByteArray bytes = doc.toJson();
|
||||||
|
delete obj;
|
||||||
|
return QString(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
QJsonObject*
|
||||||
|
SWGSDRdaemonSourceSettings::asJsonObject() {
|
||||||
|
QJsonObject* obj = new QJsonObject();
|
||||||
|
if(m_center_frequency_isSet){
|
||||||
|
obj->insert("centerFrequency", QJsonValue(center_frequency));
|
||||||
|
}
|
||||||
|
if(m_sample_rate_isSet){
|
||||||
|
obj->insert("sampleRate", QJsonValue(sample_rate));
|
||||||
|
}
|
||||||
|
if(m_log2_decim_isSet){
|
||||||
|
obj->insert("log2Decim", QJsonValue(log2_decim));
|
||||||
|
}
|
||||||
|
if(m_tx_delay_isSet){
|
||||||
|
obj->insert("txDelay", QJsonValue(tx_delay));
|
||||||
|
}
|
||||||
|
if(m_nb_fec_blocks_isSet){
|
||||||
|
obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks));
|
||||||
|
}
|
||||||
|
if(address != nullptr && *address != QString("")){
|
||||||
|
toJsonValue(QString("address"), address, obj, QString("QString"));
|
||||||
|
}
|
||||||
|
if(m_data_port_isSet){
|
||||||
|
obj->insert("dataPort", QJsonValue(data_port));
|
||||||
|
}
|
||||||
|
if(m_control_port_isSet){
|
||||||
|
obj->insert("controlPort", QJsonValue(control_port));
|
||||||
|
}
|
||||||
|
if(specific_parameters != nullptr && *specific_parameters != QString("")){
|
||||||
|
toJsonValue(QString("specificParameters"), specific_parameters, obj, QString("QString"));
|
||||||
|
}
|
||||||
|
if(m_dc_block_isSet){
|
||||||
|
obj->insert("dcBlock", QJsonValue(dc_block));
|
||||||
|
}
|
||||||
|
if(m_iq_correction_isSet){
|
||||||
|
obj->insert("iqCorrection", QJsonValue(iq_correction));
|
||||||
|
}
|
||||||
|
if(m_fc_pos_isSet){
|
||||||
|
obj->insert("fcPos", QJsonValue(fc_pos));
|
||||||
|
}
|
||||||
|
if(file_record_name != nullptr && *file_record_name != QString("")){
|
||||||
|
toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getCenterFrequency() {
|
||||||
|
return center_frequency;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setCenterFrequency(qint32 center_frequency) {
|
||||||
|
this->center_frequency = center_frequency;
|
||||||
|
this->m_center_frequency_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getSampleRate() {
|
||||||
|
return sample_rate;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setSampleRate(qint32 sample_rate) {
|
||||||
|
this->sample_rate = sample_rate;
|
||||||
|
this->m_sample_rate_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getLog2Decim() {
|
||||||
|
return log2_decim;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setLog2Decim(qint32 log2_decim) {
|
||||||
|
this->log2_decim = log2_decim;
|
||||||
|
this->m_log2_decim_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SWGSDRdaemonSourceSettings::getTxDelay() {
|
||||||
|
return tx_delay;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setTxDelay(float tx_delay) {
|
||||||
|
this->tx_delay = tx_delay;
|
||||||
|
this->m_tx_delay_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getNbFecBlocks() {
|
||||||
|
return nb_fec_blocks;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setNbFecBlocks(qint32 nb_fec_blocks) {
|
||||||
|
this->nb_fec_blocks = nb_fec_blocks;
|
||||||
|
this->m_nb_fec_blocks_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGSDRdaemonSourceSettings::getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setAddress(QString* address) {
|
||||||
|
this->address = address;
|
||||||
|
this->m_address_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getDataPort() {
|
||||||
|
return data_port;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setDataPort(qint32 data_port) {
|
||||||
|
this->data_port = data_port;
|
||||||
|
this->m_data_port_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getControlPort() {
|
||||||
|
return control_port;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setControlPort(qint32 control_port) {
|
||||||
|
this->control_port = control_port;
|
||||||
|
this->m_control_port_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGSDRdaemonSourceSettings::getSpecificParameters() {
|
||||||
|
return specific_parameters;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setSpecificParameters(QString* specific_parameters) {
|
||||||
|
this->specific_parameters = specific_parameters;
|
||||||
|
this->m_specific_parameters_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getDcBlock() {
|
||||||
|
return dc_block;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setDcBlock(qint32 dc_block) {
|
||||||
|
this->dc_block = dc_block;
|
||||||
|
this->m_dc_block_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getIqCorrection() {
|
||||||
|
return iq_correction;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setIqCorrection(qint32 iq_correction) {
|
||||||
|
this->iq_correction = iq_correction;
|
||||||
|
this->m_iq_correction_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSourceSettings::getFcPos() {
|
||||||
|
return fc_pos;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setFcPos(qint32 fc_pos) {
|
||||||
|
this->fc_pos = fc_pos;
|
||||||
|
this->m_fc_pos_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGSDRdaemonSourceSettings::getFileRecordName() {
|
||||||
|
return file_record_name;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSourceSettings::setFileRecordName(QString* file_record_name) {
|
||||||
|
this->file_record_name = file_record_name;
|
||||||
|
this->m_file_record_name_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
SWGSDRdaemonSourceSettings::isSet(){
|
||||||
|
bool isObjectUpdated = false;
|
||||||
|
do{
|
||||||
|
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_log2_decim_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_tx_delay_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(address != nullptr && *address != QString("")){ isObjectUpdated = true; break;}
|
||||||
|
if(m_data_port_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_control_port_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(specific_parameters != nullptr && *specific_parameters != QString("")){ isObjectUpdated = true; break;}
|
||||||
|
if(m_dc_block_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_iq_correction_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_fc_pos_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(file_record_name != nullptr && *file_record_name != QString("")){ isObjectUpdated = true; break;}
|
||||||
|
}while(false);
|
||||||
|
return isObjectUpdated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
131
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceSettings.h
Normal file
131
swagger/sdrangel/code/qt5/client/SWGSDRdaemonSourceSettings.h
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SWGSDRdaemonSourceSettings.h
|
||||||
|
*
|
||||||
|
* SDRdaemonSource
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SWGSDRdaemonSourceSettings_H_
|
||||||
|
#define SWGSDRdaemonSourceSettings_H_
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "SWGObject.h"
|
||||||
|
#include "export.h"
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
class SWG_API SWGSDRdaemonSourceSettings: public SWGObject {
|
||||||
|
public:
|
||||||
|
SWGSDRdaemonSourceSettings();
|
||||||
|
SWGSDRdaemonSourceSettings(QString* json);
|
||||||
|
virtual ~SWGSDRdaemonSourceSettings();
|
||||||
|
void init();
|
||||||
|
void cleanup();
|
||||||
|
|
||||||
|
virtual QString asJson () override;
|
||||||
|
virtual QJsonObject* asJsonObject() override;
|
||||||
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
|
virtual SWGSDRdaemonSourceSettings* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
|
qint32 getCenterFrequency();
|
||||||
|
void setCenterFrequency(qint32 center_frequency);
|
||||||
|
|
||||||
|
qint32 getSampleRate();
|
||||||
|
void setSampleRate(qint32 sample_rate);
|
||||||
|
|
||||||
|
qint32 getLog2Decim();
|
||||||
|
void setLog2Decim(qint32 log2_decim);
|
||||||
|
|
||||||
|
float getTxDelay();
|
||||||
|
void setTxDelay(float tx_delay);
|
||||||
|
|
||||||
|
qint32 getNbFecBlocks();
|
||||||
|
void setNbFecBlocks(qint32 nb_fec_blocks);
|
||||||
|
|
||||||
|
QString* getAddress();
|
||||||
|
void setAddress(QString* address);
|
||||||
|
|
||||||
|
qint32 getDataPort();
|
||||||
|
void setDataPort(qint32 data_port);
|
||||||
|
|
||||||
|
qint32 getControlPort();
|
||||||
|
void setControlPort(qint32 control_port);
|
||||||
|
|
||||||
|
QString* getSpecificParameters();
|
||||||
|
void setSpecificParameters(QString* specific_parameters);
|
||||||
|
|
||||||
|
qint32 getDcBlock();
|
||||||
|
void setDcBlock(qint32 dc_block);
|
||||||
|
|
||||||
|
qint32 getIqCorrection();
|
||||||
|
void setIqCorrection(qint32 iq_correction);
|
||||||
|
|
||||||
|
qint32 getFcPos();
|
||||||
|
void setFcPos(qint32 fc_pos);
|
||||||
|
|
||||||
|
QString* getFileRecordName();
|
||||||
|
void setFileRecordName(QString* file_record_name);
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool isSet() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
qint32 center_frequency;
|
||||||
|
bool m_center_frequency_isSet;
|
||||||
|
|
||||||
|
qint32 sample_rate;
|
||||||
|
bool m_sample_rate_isSet;
|
||||||
|
|
||||||
|
qint32 log2_decim;
|
||||||
|
bool m_log2_decim_isSet;
|
||||||
|
|
||||||
|
float tx_delay;
|
||||||
|
bool m_tx_delay_isSet;
|
||||||
|
|
||||||
|
qint32 nb_fec_blocks;
|
||||||
|
bool m_nb_fec_blocks_isSet;
|
||||||
|
|
||||||
|
QString* address;
|
||||||
|
bool m_address_isSet;
|
||||||
|
|
||||||
|
qint32 data_port;
|
||||||
|
bool m_data_port_isSet;
|
||||||
|
|
||||||
|
qint32 control_port;
|
||||||
|
bool m_control_port_isSet;
|
||||||
|
|
||||||
|
QString* specific_parameters;
|
||||||
|
bool m_specific_parameters_isSet;
|
||||||
|
|
||||||
|
qint32 dc_block;
|
||||||
|
bool m_dc_block_isSet;
|
||||||
|
|
||||||
|
qint32 iq_correction;
|
||||||
|
bool m_iq_correction_isSet;
|
||||||
|
|
||||||
|
qint32 fc_pos;
|
||||||
|
bool m_fc_pos_isSet;
|
||||||
|
|
||||||
|
QString* file_record_name;
|
||||||
|
bool m_file_record_name_isSet;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* SWGSDRdaemonSourceSettings_H_ */
|
Loading…
x
Reference in New Issue
Block a user