mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Rename SDRDaemonSource device plugin to RemoteInput (2): REST API
This commit is contained in:
parent
4fe16095d4
commit
60ca383a6e
@ -24,7 +24,7 @@
|
||||
#include "SWGDeviceSettings.h"
|
||||
#include "SWGDeviceState.h"
|
||||
#include "SWGDeviceReport.h"
|
||||
#include "SWGSDRdaemonSourceReport.h"
|
||||
#include "SWGRemoteInputReport.h"
|
||||
|
||||
#include "util/simpleserializer.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
@ -317,8 +317,8 @@ int RemoteInput::webapiSettingsGet(
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
response.setSdrDaemonSourceSettings(new SWGSDRangel::SWGSDRdaemonSourceSettings());
|
||||
response.getSdrDaemonSourceSettings()->init();
|
||||
response.setRemoteInputSettings(new SWGSDRangel::SWGRemoteInputSettings());
|
||||
response.getRemoteInputSettings()->init();
|
||||
webapiFormatDeviceSettings(response, m_settings);
|
||||
return 200;
|
||||
}
|
||||
@ -333,37 +333,37 @@ int RemoteInput::webapiSettingsPutPatch(
|
||||
RemoteInputSettings settings = m_settings;
|
||||
|
||||
if (deviceSettingsKeys.contains("apiAddress")) {
|
||||
settings.m_apiAddress = *response.getSdrDaemonSourceSettings()->getApiAddress();
|
||||
settings.m_apiAddress = *response.getRemoteInputSettings()->getApiAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("apiPort")) {
|
||||
settings.m_apiPort = response.getSdrDaemonSourceSettings()->getApiPort();
|
||||
settings.m_apiPort = response.getRemoteInputSettings()->getApiPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dataAddress")) {
|
||||
settings.m_dataAddress = *response.getSdrDaemonSourceSettings()->getDataAddress();
|
||||
settings.m_dataAddress = *response.getRemoteInputSettings()->getDataAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dataPort")) {
|
||||
settings.m_dataPort = response.getSdrDaemonSourceSettings()->getDataPort();
|
||||
settings.m_dataPort = response.getRemoteInputSettings()->getDataPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dcBlock")) {
|
||||
settings.m_dcBlock = response.getSdrDaemonSourceSettings()->getDcBlock() != 0;
|
||||
settings.m_dcBlock = response.getRemoteInputSettings()->getDcBlock() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("iqCorrection")) {
|
||||
settings.m_iqCorrection = response.getSdrDaemonSourceSettings()->getIqCorrection() != 0;
|
||||
settings.m_iqCorrection = response.getRemoteInputSettings()->getIqCorrection() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fileRecordName")) {
|
||||
settings.m_fileRecordName = *response.getSdrDaemonSourceSettings()->getFileRecordName();
|
||||
settings.m_fileRecordName = *response.getRemoteInputSettings()->getFileRecordName();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getSdrDaemonSourceSettings()->getUseReverseApi() != 0;
|
||||
settings.m_useReverseAPI = response.getRemoteInputSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.getSdrDaemonSourceSettings()->getReverseApiAddress();
|
||||
settings.m_reverseAPIAddress = *response.getRemoteInputSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.getSdrDaemonSourceSettings()->getReverseApiPort();
|
||||
settings.m_reverseAPIPort = response.getRemoteInputSettings()->getReverseApiPort();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getSdrDaemonSourceSettings()->getReverseApiDeviceIndex();
|
||||
settings.m_reverseAPIDeviceIndex = response.getRemoteInputSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureRemoteInput *msg = MsgConfigureRemoteInput::create(settings, force);
|
||||
@ -381,29 +381,29 @@ int RemoteInput::webapiSettingsPutPatch(
|
||||
|
||||
void RemoteInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RemoteInputSettings& settings)
|
||||
{
|
||||
response.getSdrDaemonSourceSettings()->setApiAddress(new QString(settings.m_apiAddress));
|
||||
response.getSdrDaemonSourceSettings()->setApiPort(settings.m_apiPort);
|
||||
response.getSdrDaemonSourceSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
||||
response.getSdrDaemonSourceSettings()->setDataPort(settings.m_dataPort);
|
||||
response.getSdrDaemonSourceSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
response.getSdrDaemonSourceSettings()->setIqCorrection(settings.m_iqCorrection);
|
||||
response.getRemoteInputSettings()->setApiAddress(new QString(settings.m_apiAddress));
|
||||
response.getRemoteInputSettings()->setApiPort(settings.m_apiPort);
|
||||
response.getRemoteInputSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
||||
response.getRemoteInputSettings()->setDataPort(settings.m_dataPort);
|
||||
response.getRemoteInputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
response.getRemoteInputSettings()->setIqCorrection(settings.m_iqCorrection);
|
||||
|
||||
if (response.getSdrDaemonSourceSettings()->getFileRecordName()) {
|
||||
*response.getSdrDaemonSourceSettings()->getFileRecordName() = settings.m_fileRecordName;
|
||||
if (response.getRemoteInputSettings()->getFileRecordName()) {
|
||||
*response.getRemoteInputSettings()->getFileRecordName() = settings.m_fileRecordName;
|
||||
} else {
|
||||
response.getSdrDaemonSourceSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
response.getRemoteInputSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
|
||||
response.getSdrDaemonSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
response.getRemoteInputSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getSdrDaemonSourceSettings()->getReverseApiAddress()) {
|
||||
*response.getSdrDaemonSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
if (response.getRemoteInputSettings()->getReverseApiAddress()) {
|
||||
*response.getRemoteInputSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.getSdrDaemonSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
response.getRemoteInputSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.getSdrDaemonSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getSdrDaemonSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.getRemoteInputSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getRemoteInputSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
}
|
||||
|
||||
int RemoteInput::webapiReportGet(
|
||||
@ -411,55 +411,55 @@ int RemoteInput::webapiReportGet(
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
response.setSdrDaemonSourceReport(new SWGSDRangel::SWGSDRdaemonSourceReport());
|
||||
response.getSdrDaemonSourceReport()->init();
|
||||
response.setRemoteInputReport(new SWGSDRangel::SWGRemoteInputReport());
|
||||
response.getRemoteInputReport()->init();
|
||||
webapiFormatDeviceReport(response);
|
||||
return 200;
|
||||
}
|
||||
|
||||
void RemoteInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getSdrDaemonSourceReport()->setCenterFrequency(m_remoteInputUDPHandler->getCenterFrequency());
|
||||
response.getSdrDaemonSourceReport()->setSampleRate(m_remoteInputUDPHandler->getSampleRate());
|
||||
response.getSdrDaemonSourceReport()->setBufferRwBalance(m_remoteInputUDPHandler->getBufferGauge());
|
||||
response.getRemoteInputReport()->setCenterFrequency(m_remoteInputUDPHandler->getCenterFrequency());
|
||||
response.getRemoteInputReport()->setSampleRate(m_remoteInputUDPHandler->getSampleRate());
|
||||
response.getRemoteInputReport()->setBufferRwBalance(m_remoteInputUDPHandler->getBufferGauge());
|
||||
|
||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(m_remoteInputUDPHandler->getTVmSec());
|
||||
response.getSdrDaemonSourceReport()->setDaemonTimestamp(new QString(dt.toString("yyyy-MM-dd HH:mm:ss.zzz")));
|
||||
response.getRemoteInputReport()->setRemoteTimestamp(new QString(dt.toString("yyyy-MM-dd HH:mm:ss.zzz")));
|
||||
|
||||
response.getSdrDaemonSourceReport()->setMinNbBlocks(m_remoteInputUDPHandler->getMinNbBlocks());
|
||||
response.getSdrDaemonSourceReport()->setMaxNbRecovery(m_remoteInputUDPHandler->getMaxNbRecovery());
|
||||
response.getRemoteInputReport()->setMinNbBlocks(m_remoteInputUDPHandler->getMinNbBlocks());
|
||||
response.getRemoteInputReport()->setMaxNbRecovery(m_remoteInputUDPHandler->getMaxNbRecovery());
|
||||
}
|
||||
|
||||
void RemoteInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const RemoteInputSettings& settings, bool force)
|
||||
{
|
||||
SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings();
|
||||
swgDeviceSettings->setTx(0);
|
||||
swgDeviceSettings->setDeviceHwType(new QString("SDRdaemonSource"));
|
||||
swgDeviceSettings->setSdrDaemonSourceSettings(new SWGSDRangel::SWGSDRdaemonSourceSettings());
|
||||
SWGSDRangel::SWGSDRdaemonSourceSettings *swgSDRDaemonSourceSettings = swgDeviceSettings->getSdrDaemonSourceSettings();
|
||||
swgDeviceSettings->setDeviceHwType(new QString("RemoteInput"));
|
||||
swgDeviceSettings->setRemoteInputSettings(new SWGSDRangel::SWGRemoteInputSettings());
|
||||
SWGSDRangel::SWGRemoteInputSettings *swgRemoteInputSettings = swgDeviceSettings->getRemoteInputSettings();
|
||||
|
||||
// transfer data that has been modified. When force is on transfer all data except reverse API data
|
||||
|
||||
if (deviceSettingsKeys.contains("apiAddress") || force) {
|
||||
swgSDRDaemonSourceSettings->setApiAddress(new QString(settings.m_apiAddress));
|
||||
swgRemoteInputSettings->setApiAddress(new QString(settings.m_apiAddress));
|
||||
}
|
||||
if (deviceSettingsKeys.contains("apiPort") || force) {
|
||||
swgSDRDaemonSourceSettings->setApiPort(settings.m_apiPort);
|
||||
swgRemoteInputSettings->setApiPort(settings.m_apiPort);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dataAddress") || force) {
|
||||
swgSDRDaemonSourceSettings->setDataAddress(new QString(settings.m_dataAddress));
|
||||
swgRemoteInputSettings->setDataAddress(new QString(settings.m_dataAddress));
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dataPort") || force) {
|
||||
swgSDRDaemonSourceSettings->setDataPort(settings.m_dataPort);
|
||||
swgRemoteInputSettings->setDataPort(settings.m_dataPort);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("dcBlock") || force) {
|
||||
swgSDRDaemonSourceSettings->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
swgRemoteInputSettings->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("iqCorrection") || force) {
|
||||
swgSDRDaemonSourceSettings->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
|
||||
swgRemoteInputSettings->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fileRecordName") || force) {
|
||||
swgSDRDaemonSourceSettings->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
swgRemoteInputSettings->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||
}
|
||||
|
||||
QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings")
|
||||
@ -510,5 +510,5 @@ void RemoteInput::networkManagerFinished(QNetworkReply *reply)
|
||||
|
||||
QString answer = reply->readAll();
|
||||
answer.chop(1); // remove last \n
|
||||
qDebug("SDRdaemonSourceInput::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
|
||||
qDebug("RemoteInput::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RemoteSink.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RemoteSource.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SDRDaemonSource.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RemoteInput.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RemoteOutput.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SDRPlay.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SoapySDR.yaml</file>
|
||||
|
@ -2137,8 +2137,8 @@ margin-bottom: 20px;
|
||||
"remoteOutputReport" : {
|
||||
"$ref" : "#/definitions/RemoteOutputReport"
|
||||
},
|
||||
"sdrDaemonSourceReport" : {
|
||||
"$ref" : "#/definitions/SDRdaemonSourceReport"
|
||||
"remoteInputReport" : {
|
||||
"$ref" : "#/definitions/RemoteInputReport"
|
||||
},
|
||||
"sdrPlayReport" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport"
|
||||
@ -2264,8 +2264,8 @@ margin-bottom: 20px;
|
||||
"remoteOutputSettings" : {
|
||||
"$ref" : "#/definitions/RemoteOutputSettings"
|
||||
},
|
||||
"sdrDaemonSourceSettings" : {
|
||||
"$ref" : "#/definitions/SDRdaemonSourceSettings"
|
||||
"remoteInputSettings" : {
|
||||
"$ref" : "#/definitions/RemoteInputSettings"
|
||||
},
|
||||
"sdrPlaySettings" : {
|
||||
"$ref" : "#/definitions/SDRPlaySettings"
|
||||
@ -3709,6 +3709,73 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "An arbitrary range of floating point values"
|
||||
};
|
||||
defs.RemoteInputReport = {
|
||||
"properties" : {
|
||||
"centerFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "uint64"
|
||||
},
|
||||
"sampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"bufferRWBalance" : {
|
||||
"type" : "integer",
|
||||
"description" : "percentage off the mid buffer (positive read leads)"
|
||||
},
|
||||
"remoteTimestamp" : {
|
||||
"type" : "string",
|
||||
"description" : "string representation of timestamp as sent by the remote 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" : "RemoteInput"
|
||||
};
|
||||
defs.RemoteInputSettings = {
|
||||
"properties" : {
|
||||
"apiAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"apiPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"iqCorrection" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fileRecordName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "RemoteInput"
|
||||
};
|
||||
defs.RemoteOutputReport = {
|
||||
"properties" : {
|
||||
@ -4085,73 +4152,6 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "SDRplay1"
|
||||
};
|
||||
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" : {
|
||||
"apiAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"apiPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"iqCorrection" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fileRecordName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "SDRdaemonSource"
|
||||
};
|
||||
defs.SSBDemodReport = {
|
||||
"properties" : {
|
||||
@ -24373,7 +24373,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2019-02-02T23:09:20.329+01:00
|
||||
Generated 2019-02-03T00:47:25.749+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
SDRdaemonSourceSettings:
|
||||
description: SDRdaemonSource
|
||||
RemoteInputSettings:
|
||||
description: RemoteInput
|
||||
properties:
|
||||
apiAddress:
|
||||
type: string
|
||||
@ -25,8 +25,8 @@ SDRdaemonSourceSettings:
|
||||
reverseAPIDeviceIndex:
|
||||
type: integer
|
||||
|
||||
SDRdaemonSourceReport:
|
||||
description: SDRdaemonSource
|
||||
RemoteInputReport:
|
||||
description: RemoteInput
|
||||
properties:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
@ -36,8 +36,8 @@ SDRdaemonSourceReport:
|
||||
bufferRWBalance:
|
||||
description: percentage off the mid buffer (positive read leads)
|
||||
type: integer
|
||||
daemonTimestamp:
|
||||
description: string representation of timestamp as sent by the SDRdaemon instance
|
||||
remoteTimestamp:
|
||||
description: string representation of timestamp as sent by the remote instance
|
||||
type: string
|
||||
minNbBlocks:
|
||||
description: Minimum number of blocks retrieved per frame
|
@ -1795,8 +1795,8 @@ definitions:
|
||||
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
||||
remoteOutputSettings:
|
||||
$ref: "/doc/swagger/include/RemoteOutput.yaml#/RemoteOutputSettings"
|
||||
sdrDaemonSourceSettings:
|
||||
$ref: "/doc/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceSettings"
|
||||
remoteInputSettings:
|
||||
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputSettings"
|
||||
sdrPlaySettings:
|
||||
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlaySettings"
|
||||
soapySDRInputSettings:
|
||||
@ -1848,8 +1848,8 @@ definitions:
|
||||
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
||||
remoteOutputReport:
|
||||
$ref: "/doc/swagger/include/RemoteOutput.yaml#/RemoteOutputReport"
|
||||
sdrDaemonSourceReport:
|
||||
$ref: "/doc/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceReport"
|
||||
remoteInputReport:
|
||||
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputReport"
|
||||
sdrPlayReport:
|
||||
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlayReport"
|
||||
soapySDRInputReport:
|
||||
|
@ -2105,6 +2105,21 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((*deviceHwType == "RemoteInput") && (deviceSettings.getTx() == 0))
|
||||
{
|
||||
if (jsonObject.contains("remoteInputSettings") && jsonObject["remoteInputSettings"].isObject())
|
||||
{
|
||||
QJsonObject remoteInputSettingsJsonObject = jsonObject["remoteInputSettings"].toObject();
|
||||
deviceSettingsKeys = remoteInputSettingsJsonObject.keys();
|
||||
deviceSettings.setRemoteInputSettings(new SWGSDRangel::SWGRemoteInputSettings());
|
||||
deviceSettings.getRemoteInputSettings()->fromJsonObject(remoteInputSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((*deviceHwType == "RemoteOutput") && (deviceSettings.getTx() != 0))
|
||||
{
|
||||
if (jsonObject.contains("remoteOutputSettings") && jsonObject["remoteOutputSettings"].isObject())
|
||||
@ -2489,7 +2504,7 @@ void WebAPIRequestMapper::resetDeviceSettings(SWGSDRangel::SWGDeviceSettings& de
|
||||
deviceSettings.setPlutoSdrOutputSettings(0);
|
||||
deviceSettings.setRtlSdrSettings(0);
|
||||
deviceSettings.setRemoteOutputSettings(0);
|
||||
deviceSettings.setSdrDaemonSourceSettings(0);
|
||||
deviceSettings.setRemoteInputSettings(0);
|
||||
deviceSettings.setSdrPlaySettings(0);
|
||||
deviceSettings.setTestSourceSettings(0);
|
||||
}
|
||||
@ -2508,7 +2523,7 @@ void WebAPIRequestMapper::resetDeviceReport(SWGSDRangel::SWGDeviceReport& device
|
||||
deviceReport.setPlutoSdrOutputReport(0);
|
||||
deviceReport.setRtlSdrReport(0);
|
||||
deviceReport.setRemoteOutputReport(0);
|
||||
deviceReport.setSdrDaemonSourceReport(0);
|
||||
deviceReport.setRemoteInputReport(0);
|
||||
deviceReport.setSdrPlayReport(0);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
SDRdaemonSourceSettings:
|
||||
description: SDRdaemonSource
|
||||
RemoteInputSettings:
|
||||
description: RemoteInput
|
||||
properties:
|
||||
apiAddress:
|
||||
type: string
|
||||
@ -25,8 +25,8 @@ SDRdaemonSourceSettings:
|
||||
reverseAPIDeviceIndex:
|
||||
type: integer
|
||||
|
||||
SDRdaemonSourceReport:
|
||||
description: SDRdaemonSource
|
||||
RemoteInputReport:
|
||||
description: RemoteInput
|
||||
properties:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
@ -36,8 +36,8 @@ SDRdaemonSourceReport:
|
||||
bufferRWBalance:
|
||||
description: percentage off the mid buffer (positive read leads)
|
||||
type: integer
|
||||
daemonTimestamp:
|
||||
description: string representation of timestamp as sent by the SDRdaemon instance
|
||||
remoteTimestamp:
|
||||
description: string representation of timestamp as sent by the remote instance
|
||||
type: string
|
||||
minNbBlocks:
|
||||
description: Minimum number of blocks retrieved per frame
|
@ -1795,8 +1795,8 @@ definitions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrSettings"
|
||||
remoteOutputSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RemoteOutput.yaml#/RemoteOutputSettings"
|
||||
sdrDaemonSourceSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceSettings"
|
||||
remoteInputSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RemoteInput.yaml#/RemoteInputSettings"
|
||||
sdrPlaySettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/SDRPlay.yaml#/SDRPlaySettings"
|
||||
soapySDRInputSettings:
|
||||
@ -1848,8 +1848,8 @@ definitions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrReport"
|
||||
remoteOutputReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RemoteOutput.yaml#/RemoteOutputReport"
|
||||
sdrDaemonSourceReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/SDRDaemonSource.yaml#/SDRdaemonSourceReport"
|
||||
remoteInputReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RemoteInput.yaml#/RemoteInputReport"
|
||||
sdrPlayReport:
|
||||
$ref: "http://localhost:8081/api/swagger/include/SDRPlay.yaml#/SDRPlayReport"
|
||||
soapySDRInputReport:
|
||||
|
@ -2137,8 +2137,8 @@ margin-bottom: 20px;
|
||||
"remoteOutputReport" : {
|
||||
"$ref" : "#/definitions/RemoteOutputReport"
|
||||
},
|
||||
"sdrDaemonSourceReport" : {
|
||||
"$ref" : "#/definitions/SDRdaemonSourceReport"
|
||||
"remoteInputReport" : {
|
||||
"$ref" : "#/definitions/RemoteInputReport"
|
||||
},
|
||||
"sdrPlayReport" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport"
|
||||
@ -2264,8 +2264,8 @@ margin-bottom: 20px;
|
||||
"remoteOutputSettings" : {
|
||||
"$ref" : "#/definitions/RemoteOutputSettings"
|
||||
},
|
||||
"sdrDaemonSourceSettings" : {
|
||||
"$ref" : "#/definitions/SDRdaemonSourceSettings"
|
||||
"remoteInputSettings" : {
|
||||
"$ref" : "#/definitions/RemoteInputSettings"
|
||||
},
|
||||
"sdrPlaySettings" : {
|
||||
"$ref" : "#/definitions/SDRPlaySettings"
|
||||
@ -3709,6 +3709,73 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "An arbitrary range of floating point values"
|
||||
};
|
||||
defs.RemoteInputReport = {
|
||||
"properties" : {
|
||||
"centerFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "uint64"
|
||||
},
|
||||
"sampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"bufferRWBalance" : {
|
||||
"type" : "integer",
|
||||
"description" : "percentage off the mid buffer (positive read leads)"
|
||||
},
|
||||
"remoteTimestamp" : {
|
||||
"type" : "string",
|
||||
"description" : "string representation of timestamp as sent by the remote 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" : "RemoteInput"
|
||||
};
|
||||
defs.RemoteInputSettings = {
|
||||
"properties" : {
|
||||
"apiAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"apiPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"iqCorrection" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fileRecordName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "RemoteInput"
|
||||
};
|
||||
defs.RemoteOutputReport = {
|
||||
"properties" : {
|
||||
@ -4085,73 +4152,6 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "SDRplay1"
|
||||
};
|
||||
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" : {
|
||||
"apiAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"apiPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"iqCorrection" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fileRecordName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "SDRdaemonSource"
|
||||
};
|
||||
defs.SSBDemodReport = {
|
||||
"properties" : {
|
||||
@ -24373,7 +24373,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2019-02-02T23:09:20.329+01:00
|
||||
Generated 2019-02-03T00:47:25.749+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -56,8 +56,8 @@ SWGDeviceReport::SWGDeviceReport() {
|
||||
m_rtl_sdr_report_isSet = false;
|
||||
remote_output_report = nullptr;
|
||||
m_remote_output_report_isSet = false;
|
||||
sdr_daemon_source_report = nullptr;
|
||||
m_sdr_daemon_source_report_isSet = false;
|
||||
remote_input_report = nullptr;
|
||||
m_remote_input_report_isSet = false;
|
||||
sdr_play_report = nullptr;
|
||||
m_sdr_play_report_isSet = false;
|
||||
soapy_sdr_input_report = nullptr;
|
||||
@ -104,8 +104,8 @@ SWGDeviceReport::init() {
|
||||
m_rtl_sdr_report_isSet = false;
|
||||
remote_output_report = new SWGRemoteOutputReport();
|
||||
m_remote_output_report_isSet = false;
|
||||
sdr_daemon_source_report = new SWGSDRdaemonSourceReport();
|
||||
m_sdr_daemon_source_report_isSet = false;
|
||||
remote_input_report = new SWGRemoteInputReport();
|
||||
m_remote_input_report_isSet = false;
|
||||
sdr_play_report = new SWGSDRPlayReport();
|
||||
m_sdr_play_report_isSet = false;
|
||||
soapy_sdr_input_report = new SWGSoapySDRReport();
|
||||
@ -160,8 +160,8 @@ SWGDeviceReport::cleanup() {
|
||||
if(remote_output_report != nullptr) {
|
||||
delete remote_output_report;
|
||||
}
|
||||
if(sdr_daemon_source_report != nullptr) {
|
||||
delete sdr_daemon_source_report;
|
||||
if(remote_input_report != nullptr) {
|
||||
delete remote_input_report;
|
||||
}
|
||||
if(sdr_play_report != nullptr) {
|
||||
delete sdr_play_report;
|
||||
@ -219,7 +219,7 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&remote_output_report, pJson["remoteOutputReport"], "SWGRemoteOutputReport", "SWGRemoteOutputReport");
|
||||
|
||||
::SWGSDRangel::setValue(&sdr_daemon_source_report, pJson["sdrDaemonSourceReport"], "SWGSDRdaemonSourceReport", "SWGSDRdaemonSourceReport");
|
||||
::SWGSDRangel::setValue(&remote_input_report, pJson["remoteInputReport"], "SWGRemoteInputReport", "SWGRemoteInputReport");
|
||||
|
||||
::SWGSDRangel::setValue(&sdr_play_report, pJson["sdrPlayReport"], "SWGSDRPlayReport", "SWGSDRPlayReport");
|
||||
|
||||
@ -289,8 +289,8 @@ SWGDeviceReport::asJsonObject() {
|
||||
if((remote_output_report != nullptr) && (remote_output_report->isSet())){
|
||||
toJsonValue(QString("remoteOutputReport"), remote_output_report, obj, QString("SWGRemoteOutputReport"));
|
||||
}
|
||||
if((sdr_daemon_source_report != nullptr) && (sdr_daemon_source_report->isSet())){
|
||||
toJsonValue(QString("sdrDaemonSourceReport"), sdr_daemon_source_report, obj, QString("SWGSDRdaemonSourceReport"));
|
||||
if((remote_input_report != nullptr) && (remote_input_report->isSet())){
|
||||
toJsonValue(QString("remoteInputReport"), remote_input_report, obj, QString("SWGRemoteInputReport"));
|
||||
}
|
||||
if((sdr_play_report != nullptr) && (sdr_play_report->isSet())){
|
||||
toJsonValue(QString("sdrPlayReport"), sdr_play_report, obj, QString("SWGSDRPlayReport"));
|
||||
@ -451,14 +451,14 @@ SWGDeviceReport::setRemoteOutputReport(SWGRemoteOutputReport* remote_output_repo
|
||||
this->m_remote_output_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceReport*
|
||||
SWGDeviceReport::getSdrDaemonSourceReport() {
|
||||
return sdr_daemon_source_report;
|
||||
SWGRemoteInputReport*
|
||||
SWGDeviceReport::getRemoteInputReport() {
|
||||
return remote_input_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;
|
||||
SWGDeviceReport::setRemoteInputReport(SWGRemoteInputReport* remote_input_report) {
|
||||
this->remote_input_report = remote_input_report;
|
||||
this->m_remote_input_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGSDRPlayReport*
|
||||
@ -530,7 +530,7 @@ SWGDeviceReport::isSet(){
|
||||
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(remote_output_report != nullptr && remote_output_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(sdr_daemon_source_report != nullptr && sdr_daemon_source_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(remote_input_report != nullptr && remote_input_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(sdr_play_report != nullptr && sdr_play_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(soapy_sdr_input_report != nullptr && soapy_sdr_input_report->isSet()){ isObjectUpdated = true; break;}
|
||||
if(soapy_sdr_output_report != nullptr && soapy_sdr_output_report->isSet()){ isObjectUpdated = true; break;}
|
||||
|
@ -32,10 +32,10 @@
|
||||
#include "SWGPerseusReport.h"
|
||||
#include "SWGPlutoSdrInputReport.h"
|
||||
#include "SWGPlutoSdrOutputReport.h"
|
||||
#include "SWGRemoteInputReport.h"
|
||||
#include "SWGRemoteOutputReport.h"
|
||||
#include "SWGRtlSdrReport.h"
|
||||
#include "SWGSDRPlayReport.h"
|
||||
#include "SWGSDRdaemonSourceReport.h"
|
||||
#include "SWGSoapySDRReport.h"
|
||||
#include "SWGXtrxInputReport.h"
|
||||
#include "SWGXtrxOutputReport.h"
|
||||
@ -101,8 +101,8 @@ public:
|
||||
SWGRemoteOutputReport* getRemoteOutputReport();
|
||||
void setRemoteOutputReport(SWGRemoteOutputReport* remote_output_report);
|
||||
|
||||
SWGSDRdaemonSourceReport* getSdrDaemonSourceReport();
|
||||
void setSdrDaemonSourceReport(SWGSDRdaemonSourceReport* sdr_daemon_source_report);
|
||||
SWGRemoteInputReport* getRemoteInputReport();
|
||||
void setRemoteInputReport(SWGRemoteInputReport* remote_input_report);
|
||||
|
||||
SWGSDRPlayReport* getSdrPlayReport();
|
||||
void setSdrPlayReport(SWGSDRPlayReport* sdr_play_report);
|
||||
@ -165,8 +165,8 @@ private:
|
||||
SWGRemoteOutputReport* remote_output_report;
|
||||
bool m_remote_output_report_isSet;
|
||||
|
||||
SWGSDRdaemonSourceReport* sdr_daemon_source_report;
|
||||
bool m_sdr_daemon_source_report_isSet;
|
||||
SWGRemoteInputReport* remote_input_report;
|
||||
bool m_remote_input_report_isSet;
|
||||
|
||||
SWGSDRPlayReport* sdr_play_report;
|
||||
bool m_sdr_play_report_isSet;
|
||||
|
@ -68,8 +68,8 @@ SWGDeviceSettings::SWGDeviceSettings() {
|
||||
m_rtl_sdr_settings_isSet = false;
|
||||
remote_output_settings = nullptr;
|
||||
m_remote_output_settings_isSet = false;
|
||||
sdr_daemon_source_settings = nullptr;
|
||||
m_sdr_daemon_source_settings_isSet = false;
|
||||
remote_input_settings = nullptr;
|
||||
m_remote_input_settings_isSet = false;
|
||||
sdr_play_settings = nullptr;
|
||||
m_sdr_play_settings_isSet = false;
|
||||
soapy_sdr_input_settings = nullptr;
|
||||
@ -130,8 +130,8 @@ SWGDeviceSettings::init() {
|
||||
m_rtl_sdr_settings_isSet = false;
|
||||
remote_output_settings = new SWGRemoteOutputSettings();
|
||||
m_remote_output_settings_isSet = false;
|
||||
sdr_daemon_source_settings = new SWGSDRdaemonSourceSettings();
|
||||
m_sdr_daemon_source_settings_isSet = false;
|
||||
remote_input_settings = new SWGRemoteInputSettings();
|
||||
m_remote_input_settings_isSet = false;
|
||||
sdr_play_settings = new SWGSDRPlaySettings();
|
||||
m_sdr_play_settings_isSet = false;
|
||||
soapy_sdr_input_settings = new SWGSoapySDRInputSettings();
|
||||
@ -206,8 +206,8 @@ SWGDeviceSettings::cleanup() {
|
||||
if(remote_output_settings != nullptr) {
|
||||
delete remote_output_settings;
|
||||
}
|
||||
if(sdr_daemon_source_settings != nullptr) {
|
||||
delete sdr_daemon_source_settings;
|
||||
if(remote_input_settings != nullptr) {
|
||||
delete remote_input_settings;
|
||||
}
|
||||
if(sdr_play_settings != nullptr) {
|
||||
delete sdr_play_settings;
|
||||
@ -280,7 +280,7 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&remote_output_settings, pJson["remoteOutputSettings"], "SWGRemoteOutputSettings", "SWGRemoteOutputSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&sdr_daemon_source_settings, pJson["sdrDaemonSourceSettings"], "SWGSDRdaemonSourceSettings", "SWGSDRdaemonSourceSettings");
|
||||
::SWGSDRangel::setValue(&remote_input_settings, pJson["remoteInputSettings"], "SWGRemoteInputSettings", "SWGRemoteInputSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&sdr_play_settings, pJson["sdrPlaySettings"], "SWGSDRPlaySettings", "SWGSDRPlaySettings");
|
||||
|
||||
@ -370,8 +370,8 @@ SWGDeviceSettings::asJsonObject() {
|
||||
if((remote_output_settings != nullptr) && (remote_output_settings->isSet())){
|
||||
toJsonValue(QString("remoteOutputSettings"), remote_output_settings, obj, QString("SWGRemoteOutputSettings"));
|
||||
}
|
||||
if((sdr_daemon_source_settings != nullptr) && (sdr_daemon_source_settings->isSet())){
|
||||
toJsonValue(QString("sdrDaemonSourceSettings"), sdr_daemon_source_settings, obj, QString("SWGSDRdaemonSourceSettings"));
|
||||
if((remote_input_settings != nullptr) && (remote_input_settings->isSet())){
|
||||
toJsonValue(QString("remoteInputSettings"), remote_input_settings, obj, QString("SWGRemoteInputSettings"));
|
||||
}
|
||||
if((sdr_play_settings != nullptr) && (sdr_play_settings->isSet())){
|
||||
toJsonValue(QString("sdrPlaySettings"), sdr_play_settings, obj, QString("SWGSDRPlaySettings"));
|
||||
@ -595,14 +595,14 @@ SWGDeviceSettings::setRemoteOutputSettings(SWGRemoteOutputSettings* remote_outpu
|
||||
this->m_remote_output_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceSettings*
|
||||
SWGDeviceSettings::getSdrDaemonSourceSettings() {
|
||||
return sdr_daemon_source_settings;
|
||||
SWGRemoteInputSettings*
|
||||
SWGDeviceSettings::getRemoteInputSettings() {
|
||||
return remote_input_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;
|
||||
SWGDeviceSettings::setRemoteInputSettings(SWGRemoteInputSettings* remote_input_settings) {
|
||||
this->remote_input_settings = remote_input_settings;
|
||||
this->m_remote_input_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGSDRPlaySettings*
|
||||
@ -690,7 +690,7 @@ SWGDeviceSettings::isSet(){
|
||||
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(remote_output_settings != nullptr && remote_output_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(sdr_daemon_source_settings != nullptr && sdr_daemon_source_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(remote_input_settings != nullptr && remote_input_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(sdr_play_settings != nullptr && sdr_play_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(soapy_sdr_input_settings != nullptr && soapy_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(soapy_sdr_output_settings != nullptr && soapy_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
|
@ -38,10 +38,10 @@
|
||||
#include "SWGPerseusSettings.h"
|
||||
#include "SWGPlutoSdrInputSettings.h"
|
||||
#include "SWGPlutoSdrOutputSettings.h"
|
||||
#include "SWGRemoteInputSettings.h"
|
||||
#include "SWGRemoteOutputSettings.h"
|
||||
#include "SWGRtlSdrSettings.h"
|
||||
#include "SWGSDRPlaySettings.h"
|
||||
#include "SWGSDRdaemonSourceSettings.h"
|
||||
#include "SWGSoapySDRInputSettings.h"
|
||||
#include "SWGSoapySDROutputSettings.h"
|
||||
#include "SWGTestSourceSettings.h"
|
||||
@ -127,8 +127,8 @@ public:
|
||||
SWGRemoteOutputSettings* getRemoteOutputSettings();
|
||||
void setRemoteOutputSettings(SWGRemoteOutputSettings* remote_output_settings);
|
||||
|
||||
SWGSDRdaemonSourceSettings* getSdrDaemonSourceSettings();
|
||||
void setSdrDaemonSourceSettings(SWGSDRdaemonSourceSettings* sdr_daemon_source_settings);
|
||||
SWGRemoteInputSettings* getRemoteInputSettings();
|
||||
void setRemoteInputSettings(SWGRemoteInputSettings* remote_input_settings);
|
||||
|
||||
SWGSDRPlaySettings* getSdrPlaySettings();
|
||||
void setSdrPlaySettings(SWGSDRPlaySettings* sdr_play_settings);
|
||||
@ -212,8 +212,8 @@ private:
|
||||
SWGRemoteOutputSettings* remote_output_settings;
|
||||
bool m_remote_output_settings_isSet;
|
||||
|
||||
SWGSDRdaemonSourceSettings* sdr_daemon_source_settings;
|
||||
bool m_sdr_daemon_source_settings_isSet;
|
||||
SWGRemoteInputSettings* remote_input_settings;
|
||||
bool m_remote_input_settings_isSet;
|
||||
|
||||
SWGSDRPlaySettings* sdr_play_settings;
|
||||
bool m_sdr_play_settings_isSet;
|
||||
|
@ -97,6 +97,8 @@
|
||||
#include "SWGRDSReport_altFrequencies.h"
|
||||
#include "SWGRange.h"
|
||||
#include "SWGRangeFloat.h"
|
||||
#include "SWGRemoteInputReport.h"
|
||||
#include "SWGRemoteInputSettings.h"
|
||||
#include "SWGRemoteOutputReport.h"
|
||||
#include "SWGRemoteOutputSettings.h"
|
||||
#include "SWGRemoteSinkSettings.h"
|
||||
@ -106,8 +108,6 @@
|
||||
#include "SWGRtlSdrSettings.h"
|
||||
#include "SWGSDRPlayReport.h"
|
||||
#include "SWGSDRPlaySettings.h"
|
||||
#include "SWGSDRdaemonSourceReport.h"
|
||||
#include "SWGSDRdaemonSourceSettings.h"
|
||||
#include "SWGSSBDemodReport.h"
|
||||
#include "SWGSSBDemodSettings.h"
|
||||
#include "SWGSSBModReport.h"
|
||||
@ -386,6 +386,12 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGRangeFloat").compare(type) == 0) {
|
||||
return new SWGRangeFloat();
|
||||
}
|
||||
if(QString("SWGRemoteInputReport").compare(type) == 0) {
|
||||
return new SWGRemoteInputReport();
|
||||
}
|
||||
if(QString("SWGRemoteInputSettings").compare(type) == 0) {
|
||||
return new SWGRemoteInputSettings();
|
||||
}
|
||||
if(QString("SWGRemoteOutputReport").compare(type) == 0) {
|
||||
return new SWGRemoteOutputReport();
|
||||
}
|
||||
@ -413,12 +419,6 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGSDRPlaySettings").compare(type) == 0) {
|
||||
return new SWGSDRPlaySettings();
|
||||
}
|
||||
if(QString("SWGSDRdaemonSourceReport").compare(type) == 0) {
|
||||
return new SWGSDRdaemonSourceReport();
|
||||
}
|
||||
if(QString("SWGSDRdaemonSourceSettings").compare(type) == 0) {
|
||||
return new SWGSDRdaemonSourceSettings();
|
||||
}
|
||||
if(QString("SWGSSBDemodReport").compare(type) == 0) {
|
||||
return new SWGSSBDemodReport();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGSDRdaemonSourceReport.h"
|
||||
#include "SWGRemoteInputReport.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
@ -22,40 +22,40 @@
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGSDRdaemonSourceReport::SWGSDRdaemonSourceReport(QString* json) {
|
||||
SWGRemoteInputReport::SWGRemoteInputReport(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceReport::SWGSDRdaemonSourceReport() {
|
||||
SWGRemoteInputReport::SWGRemoteInputReport() {
|
||||
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;
|
||||
remote_timestamp = nullptr;
|
||||
m_remote_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() {
|
||||
SWGRemoteInputReport::~SWGRemoteInputReport() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGSDRdaemonSourceReport::init() {
|
||||
SWGRemoteInputReport::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;
|
||||
remote_timestamp = new QString("");
|
||||
m_remote_timestamp_isSet = false;
|
||||
min_nb_blocks = 0;
|
||||
m_min_nb_blocks_isSet = false;
|
||||
max_nb_recovery = 0;
|
||||
@ -63,19 +63,19 @@ SWGSDRdaemonSourceReport::init() {
|
||||
}
|
||||
|
||||
void
|
||||
SWGSDRdaemonSourceReport::cleanup() {
|
||||
SWGRemoteInputReport::cleanup() {
|
||||
|
||||
|
||||
|
||||
if(daemon_timestamp != nullptr) {
|
||||
delete daemon_timestamp;
|
||||
if(remote_timestamp != nullptr) {
|
||||
delete remote_timestamp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceReport*
|
||||
SWGSDRdaemonSourceReport::fromJson(QString &json) {
|
||||
SWGRemoteInputReport*
|
||||
SWGRemoteInputReport::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
@ -84,14 +84,14 @@ SWGSDRdaemonSourceReport::fromJson(QString &json) {
|
||||
}
|
||||
|
||||
void
|
||||
SWGSDRdaemonSourceReport::fromJsonObject(QJsonObject &pJson) {
|
||||
SWGRemoteInputReport::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(&remote_timestamp, pJson["remoteTimestamp"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&min_nb_blocks, pJson["minNbBlocks"], "qint32", "");
|
||||
|
||||
@ -100,7 +100,7 @@ SWGSDRdaemonSourceReport::fromJsonObject(QJsonObject &pJson) {
|
||||
}
|
||||
|
||||
QString
|
||||
SWGSDRdaemonSourceReport::asJson ()
|
||||
SWGRemoteInputReport::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
@ -111,7 +111,7 @@ SWGSDRdaemonSourceReport::asJson ()
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGSDRdaemonSourceReport::asJsonObject() {
|
||||
SWGRemoteInputReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_center_frequency_isSet){
|
||||
obj->insert("centerFrequency", QJsonValue(center_frequency));
|
||||
@ -122,8 +122,8 @@ SWGSDRdaemonSourceReport::asJsonObject() {
|
||||
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(remote_timestamp != nullptr && *remote_timestamp != QString("")){
|
||||
toJsonValue(QString("remoteTimestamp"), remote_timestamp, obj, QString("QString"));
|
||||
}
|
||||
if(m_min_nb_blocks_isSet){
|
||||
obj->insert("minNbBlocks", QJsonValue(min_nb_blocks));
|
||||
@ -136,74 +136,74 @@ SWGSDRdaemonSourceReport::asJsonObject() {
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceReport::getCenterFrequency() {
|
||||
SWGRemoteInputReport::getCenterFrequency() {
|
||||
return center_frequency;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceReport::setCenterFrequency(qint32 center_frequency) {
|
||||
SWGRemoteInputReport::setCenterFrequency(qint32 center_frequency) {
|
||||
this->center_frequency = center_frequency;
|
||||
this->m_center_frequency_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceReport::getSampleRate() {
|
||||
SWGRemoteInputReport::getSampleRate() {
|
||||
return sample_rate;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceReport::setSampleRate(qint32 sample_rate) {
|
||||
SWGRemoteInputReport::setSampleRate(qint32 sample_rate) {
|
||||
this->sample_rate = sample_rate;
|
||||
this->m_sample_rate_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceReport::getBufferRwBalance() {
|
||||
SWGRemoteInputReport::getBufferRwBalance() {
|
||||
return buffer_rw_balance;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceReport::setBufferRwBalance(qint32 buffer_rw_balance) {
|
||||
SWGRemoteInputReport::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;
|
||||
SWGRemoteInputReport::getRemoteTimestamp() {
|
||||
return remote_timestamp;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceReport::setDaemonTimestamp(QString* daemon_timestamp) {
|
||||
this->daemon_timestamp = daemon_timestamp;
|
||||
this->m_daemon_timestamp_isSet = true;
|
||||
SWGRemoteInputReport::setRemoteTimestamp(QString* remote_timestamp) {
|
||||
this->remote_timestamp = remote_timestamp;
|
||||
this->m_remote_timestamp_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceReport::getMinNbBlocks() {
|
||||
SWGRemoteInputReport::getMinNbBlocks() {
|
||||
return min_nb_blocks;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceReport::setMinNbBlocks(qint32 min_nb_blocks) {
|
||||
SWGRemoteInputReport::setMinNbBlocks(qint32 min_nb_blocks) {
|
||||
this->min_nb_blocks = min_nb_blocks;
|
||||
this->m_min_nb_blocks_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceReport::getMaxNbRecovery() {
|
||||
SWGRemoteInputReport::getMaxNbRecovery() {
|
||||
return max_nb_recovery;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceReport::setMaxNbRecovery(qint32 max_nb_recovery) {
|
||||
SWGRemoteInputReport::setMaxNbRecovery(qint32 max_nb_recovery) {
|
||||
this->max_nb_recovery = max_nb_recovery;
|
||||
this->m_max_nb_recovery_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGSDRdaemonSourceReport::isSet(){
|
||||
SWGRemoteInputReport::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(remote_timestamp != nullptr && *remote_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);
|
@ -11,13 +11,13 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGSDRdaemonSourceReport.h
|
||||
* SWGRemoteInputReport.h
|
||||
*
|
||||
* SDRdaemonSource
|
||||
* RemoteInput
|
||||
*/
|
||||
|
||||
#ifndef SWGSDRdaemonSourceReport_H_
|
||||
#define SWGSDRdaemonSourceReport_H_
|
||||
#ifndef SWGRemoteInputReport_H_
|
||||
#define SWGRemoteInputReport_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
@ -29,18 +29,18 @@
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGSDRdaemonSourceReport: public SWGObject {
|
||||
class SWG_API SWGRemoteInputReport: public SWGObject {
|
||||
public:
|
||||
SWGSDRdaemonSourceReport();
|
||||
SWGSDRdaemonSourceReport(QString* json);
|
||||
virtual ~SWGSDRdaemonSourceReport();
|
||||
SWGRemoteInputReport();
|
||||
SWGRemoteInputReport(QString* json);
|
||||
virtual ~SWGRemoteInputReport();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSDRdaemonSourceReport* fromJson(QString &jsonString) override;
|
||||
virtual SWGRemoteInputReport* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getCenterFrequency();
|
||||
void setCenterFrequency(qint32 center_frequency);
|
||||
@ -51,8 +51,8 @@ public:
|
||||
qint32 getBufferRwBalance();
|
||||
void setBufferRwBalance(qint32 buffer_rw_balance);
|
||||
|
||||
QString* getDaemonTimestamp();
|
||||
void setDaemonTimestamp(QString* daemon_timestamp);
|
||||
QString* getRemoteTimestamp();
|
||||
void setRemoteTimestamp(QString* remote_timestamp);
|
||||
|
||||
qint32 getMinNbBlocks();
|
||||
void setMinNbBlocks(qint32 min_nb_blocks);
|
||||
@ -73,8 +73,8 @@ private:
|
||||
qint32 buffer_rw_balance;
|
||||
bool m_buffer_rw_balance_isSet;
|
||||
|
||||
QString* daemon_timestamp;
|
||||
bool m_daemon_timestamp_isSet;
|
||||
QString* remote_timestamp;
|
||||
bool m_remote_timestamp_isSet;
|
||||
|
||||
qint32 min_nb_blocks;
|
||||
bool m_min_nb_blocks_isSet;
|
||||
@ -86,4 +86,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGSDRdaemonSourceReport_H_ */
|
||||
#endif /* SWGRemoteInputReport_H_ */
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGSDRdaemonSourceSettings.h"
|
||||
#include "SWGRemoteInputSettings.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
@ -22,12 +22,12 @@
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGSDRdaemonSourceSettings::SWGSDRdaemonSourceSettings(QString* json) {
|
||||
SWGRemoteInputSettings::SWGRemoteInputSettings(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceSettings::SWGSDRdaemonSourceSettings() {
|
||||
SWGRemoteInputSettings::SWGRemoteInputSettings() {
|
||||
api_address = nullptr;
|
||||
m_api_address_isSet = false;
|
||||
api_port = 0;
|
||||
@ -52,12 +52,12 @@ SWGSDRdaemonSourceSettings::SWGSDRdaemonSourceSettings() {
|
||||
m_reverse_api_device_index_isSet = false;
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceSettings::~SWGSDRdaemonSourceSettings() {
|
||||
SWGRemoteInputSettings::~SWGRemoteInputSettings() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::init() {
|
||||
SWGRemoteInputSettings::init() {
|
||||
api_address = new QString("");
|
||||
m_api_address_isSet = false;
|
||||
api_port = 0;
|
||||
@ -83,7 +83,7 @@ SWGSDRdaemonSourceSettings::init() {
|
||||
}
|
||||
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::cleanup() {
|
||||
SWGRemoteInputSettings::cleanup() {
|
||||
if(api_address != nullptr) {
|
||||
delete api_address;
|
||||
}
|
||||
@ -105,8 +105,8 @@ SWGSDRdaemonSourceSettings::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGSDRdaemonSourceSettings*
|
||||
SWGSDRdaemonSourceSettings::fromJson(QString &json) {
|
||||
SWGRemoteInputSettings*
|
||||
SWGRemoteInputSettings::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
@ -115,7 +115,7 @@ SWGSDRdaemonSourceSettings::fromJson(QString &json) {
|
||||
}
|
||||
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
SWGRemoteInputSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&api_address, pJson["apiAddress"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&api_port, pJson["apiPort"], "qint32", "");
|
||||
@ -141,7 +141,7 @@ SWGSDRdaemonSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
}
|
||||
|
||||
QString
|
||||
SWGSDRdaemonSourceSettings::asJson ()
|
||||
SWGRemoteInputSettings::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
@ -152,7 +152,7 @@ SWGSDRdaemonSourceSettings::asJson ()
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGSDRdaemonSourceSettings::asJsonObject() {
|
||||
SWGRemoteInputSettings::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(api_address != nullptr && *api_address != QString("")){
|
||||
toJsonValue(QString("apiAddress"), api_address, obj, QString("QString"));
|
||||
@ -192,118 +192,118 @@ SWGSDRdaemonSourceSettings::asJsonObject() {
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGSDRdaemonSourceSettings::getApiAddress() {
|
||||
SWGRemoteInputSettings::getApiAddress() {
|
||||
return api_address;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setApiAddress(QString* api_address) {
|
||||
SWGRemoteInputSettings::setApiAddress(QString* api_address) {
|
||||
this->api_address = api_address;
|
||||
this->m_api_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getApiPort() {
|
||||
SWGRemoteInputSettings::getApiPort() {
|
||||
return api_port;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setApiPort(qint32 api_port) {
|
||||
SWGRemoteInputSettings::setApiPort(qint32 api_port) {
|
||||
this->api_port = api_port;
|
||||
this->m_api_port_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGSDRdaemonSourceSettings::getDataAddress() {
|
||||
SWGRemoteInputSettings::getDataAddress() {
|
||||
return data_address;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setDataAddress(QString* data_address) {
|
||||
SWGRemoteInputSettings::setDataAddress(QString* data_address) {
|
||||
this->data_address = data_address;
|
||||
this->m_data_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getDataPort() {
|
||||
SWGRemoteInputSettings::getDataPort() {
|
||||
return data_port;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setDataPort(qint32 data_port) {
|
||||
SWGRemoteInputSettings::setDataPort(qint32 data_port) {
|
||||
this->data_port = data_port;
|
||||
this->m_data_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getDcBlock() {
|
||||
SWGRemoteInputSettings::getDcBlock() {
|
||||
return dc_block;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setDcBlock(qint32 dc_block) {
|
||||
SWGRemoteInputSettings::setDcBlock(qint32 dc_block) {
|
||||
this->dc_block = dc_block;
|
||||
this->m_dc_block_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getIqCorrection() {
|
||||
SWGRemoteInputSettings::getIqCorrection() {
|
||||
return iq_correction;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setIqCorrection(qint32 iq_correction) {
|
||||
SWGRemoteInputSettings::setIqCorrection(qint32 iq_correction) {
|
||||
this->iq_correction = iq_correction;
|
||||
this->m_iq_correction_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGSDRdaemonSourceSettings::getFileRecordName() {
|
||||
SWGRemoteInputSettings::getFileRecordName() {
|
||||
return file_record_name;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setFileRecordName(QString* file_record_name) {
|
||||
SWGRemoteInputSettings::setFileRecordName(QString* file_record_name) {
|
||||
this->file_record_name = file_record_name;
|
||||
this->m_file_record_name_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getUseReverseApi() {
|
||||
SWGRemoteInputSettings::getUseReverseApi() {
|
||||
return use_reverse_api;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setUseReverseApi(qint32 use_reverse_api) {
|
||||
SWGRemoteInputSettings::setUseReverseApi(qint32 use_reverse_api) {
|
||||
this->use_reverse_api = use_reverse_api;
|
||||
this->m_use_reverse_api_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGSDRdaemonSourceSettings::getReverseApiAddress() {
|
||||
SWGRemoteInputSettings::getReverseApiAddress() {
|
||||
return reverse_api_address;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setReverseApiAddress(QString* reverse_api_address) {
|
||||
SWGRemoteInputSettings::setReverseApiAddress(QString* reverse_api_address) {
|
||||
this->reverse_api_address = reverse_api_address;
|
||||
this->m_reverse_api_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getReverseApiPort() {
|
||||
SWGRemoteInputSettings::getReverseApiPort() {
|
||||
return reverse_api_port;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setReverseApiPort(qint32 reverse_api_port) {
|
||||
SWGRemoteInputSettings::setReverseApiPort(qint32 reverse_api_port) {
|
||||
this->reverse_api_port = reverse_api_port;
|
||||
this->m_reverse_api_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSDRdaemonSourceSettings::getReverseApiDeviceIndex() {
|
||||
SWGRemoteInputSettings::getReverseApiDeviceIndex() {
|
||||
return reverse_api_device_index;
|
||||
}
|
||||
void
|
||||
SWGSDRdaemonSourceSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
||||
SWGRemoteInputSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
||||
this->reverse_api_device_index = reverse_api_device_index;
|
||||
this->m_reverse_api_device_index_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGSDRdaemonSourceSettings::isSet(){
|
||||
SWGRemoteInputSettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(api_address != nullptr && *api_address != QString("")){ isObjectUpdated = true; break;}
|
@ -11,13 +11,13 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGSDRdaemonSourceSettings.h
|
||||
* SWGRemoteInputSettings.h
|
||||
*
|
||||
* SDRdaemonSource
|
||||
* RemoteInput
|
||||
*/
|
||||
|
||||
#ifndef SWGSDRdaemonSourceSettings_H_
|
||||
#define SWGSDRdaemonSourceSettings_H_
|
||||
#ifndef SWGRemoteInputSettings_H_
|
||||
#define SWGRemoteInputSettings_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
@ -29,18 +29,18 @@
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGSDRdaemonSourceSettings: public SWGObject {
|
||||
class SWG_API SWGRemoteInputSettings: public SWGObject {
|
||||
public:
|
||||
SWGSDRdaemonSourceSettings();
|
||||
SWGSDRdaemonSourceSettings(QString* json);
|
||||
virtual ~SWGSDRdaemonSourceSettings();
|
||||
SWGRemoteInputSettings();
|
||||
SWGRemoteInputSettings(QString* json);
|
||||
virtual ~SWGRemoteInputSettings();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSDRdaemonSourceSettings* fromJson(QString &jsonString) override;
|
||||
virtual SWGRemoteInputSettings* fromJson(QString &jsonString) override;
|
||||
|
||||
QString* getApiAddress();
|
||||
void setApiAddress(QString* api_address);
|
||||
@ -116,4 +116,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGSDRdaemonSourceSettings_H_ */
|
||||
#endif /* SWGRemoteInputSettings_H_ */
|
Loading…
Reference in New Issue
Block a user