mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
Generate swagger files for Freq Scanner
This commit is contained in:
parent
b42b6be910
commit
2192a054ed
@ -30,7 +30,7 @@
|
||||
|
||||
#include "SWGChannelSettings.h"
|
||||
#include "SWGWorkspaceInfo.h"
|
||||
//#include "SWGFreqScannerSettings.h"
|
||||
#include "SWGFreqScannerSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
#include "SWGMapItem.h"
|
||||
|
||||
@ -285,9 +285,7 @@ void FreqScanner::initScan()
|
||||
qInfo() << "m_minFFTStartTime" << m_minFFTStartTime.toString("ss.z");
|
||||
}
|
||||
|
||||
qDebug() << "********* initScan: Clear results";
|
||||
m_scanResults.clear();
|
||||
qDebug() << "********* initScan: Clear results done";
|
||||
|
||||
if (m_guiMessageQueue) {
|
||||
m_guiMessageQueue->push(FreqScanner::MsgReportScanning::create());
|
||||
@ -301,6 +299,8 @@ void FreqScanner::processScanResults(const QDateTime& fftStartTime, const QList<
|
||||
|
||||
switch (m_state)
|
||||
{
|
||||
case IDLE:
|
||||
break;
|
||||
|
||||
case START_SCAN:
|
||||
{
|
||||
@ -642,9 +642,9 @@ int FreqScanner::webapiSettingsGet(
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
/*response.ssetFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
response.gsetFreqScannerSettings()->init();
|
||||
webapiFormatChannelSettings(response, m_settings);*/
|
||||
response.setFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
response.getFreqScannerSettings()->init();
|
||||
webapiFormatChannelSettings(response, m_settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
@ -687,9 +687,9 @@ int FreqScanner::webapiReportGet(
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
/*response.ssetFreqScannerReport(new SWGSDRangel::SWGFreqScannerReport());
|
||||
response.gsetFreqScannerReport()->init();
|
||||
webapiFormatChannelReport(response);*/
|
||||
response.setFreqScannerReport(new SWGSDRangel::SWGFreqScannerReport());
|
||||
response.getFreqScannerReport()->init();
|
||||
webapiFormatChannelReport(response);
|
||||
return 200;
|
||||
}
|
||||
|
||||
@ -698,134 +698,105 @@ void FreqScanner::webapiUpdateChannelSettings(
|
||||
const QStringList& channelSettingsKeys,
|
||||
SWGSDRangel::SWGChannelSettings& response)
|
||||
{
|
||||
/*if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
||||
settings.m_inputFrequencyOffset = response.gsetFreqScannerSettings()->getInputFrequencyOffset();
|
||||
if (channelSettingsKeys.contains("channelFrequencyOffset")) {
|
||||
settings.m_channelFrequencyOffset = response.getFreqScannerSettings()->getChannelFrequencyOffset();
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth")) {
|
||||
settings.m_channelBandwidth = response.gsetFreqScannerSettings()->getRfBandwidth();
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioMute")) {
|
||||
settings.m_audioMute = response.gsetFreqScannerSettings()->getAudioMute();
|
||||
if (channelSettingsKeys.contains("channelBandwidth")) {
|
||||
settings.m_channelBandwidth = response.getFreqScannerSettings()->getChannelBandwidth();
|
||||
}
|
||||
if (channelSettingsKeys.contains("threshold")) {
|
||||
settings.m_threshold = response.gsetFreqScannerSettings()->getThreshold();
|
||||
}
|
||||
if (channelSettingsKeys.contains("logFilename")) {
|
||||
settings.m_logFilename = *response.getAdsbDemodSettings()->getLogFilename();
|
||||
}
|
||||
if (channelSettingsKeys.contains("logEnabled")) {
|
||||
settings.m_logEnabled = response.getAdsbDemodSettings()->getLogEnabled();
|
||||
settings.m_threshold = response.getFreqScannerSettings()->getThreshold();
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor")) {
|
||||
settings.m_rgbColor = response.gsetFreqScannerSettings()->getRgbColor();
|
||||
settings.m_rgbColor = response.getFreqScannerSettings()->getRgbColor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.gsetFreqScannerSettings()->getTitle();
|
||||
settings.m_title = *response.getFreqScannerSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.gsetFreqScannerSettings()->getStreamIndex();
|
||||
settings.m_streamIndex = response.getFreqScannerSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.gsetFreqScannerSettings()->getUseReverseApi() != 0;
|
||||
settings.m_useReverseAPI = response.getFreqScannerSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.gsetFreqScannerSettings()->getReverseApiAddress();
|
||||
settings.m_reverseAPIAddress = *response.getFreqScannerSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.gsetFreqScannerSettings()->getReverseApiPort();
|
||||
settings.m_reverseAPIPort = response.getFreqScannerSettings()->getReverseApiPort();
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.gsetFreqScannerSettings()->getReverseApiDeviceIndex();
|
||||
settings.m_reverseAPIDeviceIndex = response.getFreqScannerSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
||||
settings.m_reverseAPIChannelIndex = response.gsetFreqScannerSettings()->getReverseApiChannelIndex();
|
||||
}
|
||||
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
|
||||
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.gsetFreqScannerSettings()->getScopeConfig());
|
||||
settings.m_reverseAPIChannelIndex = response.getFreqScannerSettings()->getReverseApiChannelIndex();
|
||||
}
|
||||
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
|
||||
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.gsetFreqScannerSettings()->getChannelMarker());
|
||||
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFreqScannerSettings()->getChannelMarker());
|
||||
}
|
||||
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
|
||||
settings.m_rollupState->updateFrom(channelSettingsKeys, response.gsetFreqScannerSettings()->getRollupState());
|
||||
}*/
|
||||
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getFreqScannerSettings()->getRollupState());
|
||||
}
|
||||
}
|
||||
|
||||
void FreqScanner::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const FreqScannerSettings& settings)
|
||||
{
|
||||
/*response.gsetFreqScannerSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
response.gsetFreqScannerSettings()->setRfBandwidth(settings.m_channelBandwidth);
|
||||
response.gsetFreqScannerSettings()->setAudioMute(settings.m_audioMute);
|
||||
response.gsetFreqScannerSettings()->setThreshold(settings.m_threshold);
|
||||
response.gsetFreqScannerSettings()->setLogFilename(new QString(settings.m_logFilename));
|
||||
response.gsetFreqScannerSettings()->setLogEnabled(settings.m_logEnabled);
|
||||
response.getFreqScannerSettings()->setChannelFrequencyOffset(settings.m_channelFrequencyOffset);
|
||||
response.getFreqScannerSettings()->setChannelBandwidth(settings.m_channelBandwidth);
|
||||
response.getFreqScannerSettings()->setThreshold(settings.m_threshold);
|
||||
|
||||
response.gsetFreqScannerSettings()->setRgbColor(settings.m_rgbColor);
|
||||
if (response.gsetFreqScannerSettings()->getTitle()) {
|
||||
*response.gsetFreqScannerSettings()->getTitle() = settings.m_title;
|
||||
response.getFreqScannerSettings()->setRgbColor(settings.m_rgbColor);
|
||||
if (response.getFreqScannerSettings()->getTitle()) {
|
||||
*response.getFreqScannerSettings()->getTitle() = settings.m_title;
|
||||
} else {
|
||||
response.gsetFreqScannerSettings()->setTitle(new QString(settings.m_title));
|
||||
response.getFreqScannerSettings()->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
|
||||
response.gsetFreqScannerSettings()->setStreamIndex(settings.m_streamIndex);
|
||||
response.gsetFreqScannerSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
response.getFreqScannerSettings()->setStreamIndex(settings.m_streamIndex);
|
||||
response.getFreqScannerSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.gsetFreqScannerSettings()->getReverseApiAddress()) {
|
||||
*response.gsetFreqScannerSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
if (response.getFreqScannerSettings()->getReverseApiAddress()) {
|
||||
*response.getFreqScannerSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.gsetFreqScannerSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
response.getFreqScannerSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.gsetFreqScannerSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.gsetFreqScannerSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.gsetFreqScannerSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
response.getFreqScannerSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getFreqScannerSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.getFreqScannerSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
|
||||
if (settings.m_scopeGUI)
|
||||
{
|
||||
if (response.gsetFreqScannerSettings()->getScopeConfig())
|
||||
{
|
||||
settings.m_scopeGUI->formatTo(response.gsetFreqScannerSettings()->getScopeConfig());
|
||||
}
|
||||
else
|
||||
{
|
||||
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
|
||||
settings.m_scopeGUI->formatTo(swgGLScope);
|
||||
response.gsetFreqScannerSettings()->setScopeConfig(swgGLScope);
|
||||
}
|
||||
}
|
||||
if (settings.m_channelMarker)
|
||||
{
|
||||
if (response.gsetFreqScannerSettings()->getChannelMarker())
|
||||
if (response.getFreqScannerSettings()->getChannelMarker())
|
||||
{
|
||||
settings.m_channelMarker->formatTo(response.gsetFreqScannerSettings()->getChannelMarker());
|
||||
settings.m_channelMarker->formatTo(response.getFreqScannerSettings()->getChannelMarker());
|
||||
}
|
||||
else
|
||||
{
|
||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||
response.gsetFreqScannerSettings()->setChannelMarker(swgChannelMarker);
|
||||
response.getFreqScannerSettings()->setChannelMarker(swgChannelMarker);
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.m_rollupState)
|
||||
{
|
||||
if (response.gsetFreqScannerSettings()->getRollupState())
|
||||
if (response.getFreqScannerSettings()->getRollupState())
|
||||
{
|
||||
settings.m_rollupState->formatTo(response.gsetFreqScannerSettings()->getRollupState());
|
||||
settings.m_rollupState->formatTo(response.getFreqScannerSettings()->getRollupState());
|
||||
}
|
||||
else
|
||||
{
|
||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||
settings.m_rollupState->formatTo(swgRollupState);
|
||||
response.gsetFreqScannerSettings()->setRollupState(swgRollupState);
|
||||
response.getFreqScannerSettings()->setRollupState(swgRollupState);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
void FreqScanner::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
|
||||
{
|
||||
/*response.gsetFreqScannerReport()->setChannelPowerDb(CalcDb::dbPower(magsqAvg));
|
||||
response.gsetFreqScannerReport()->setChannelSampleRate(m_basebandSink->getChannelSampleRate());*/
|
||||
response.getFreqScannerReport()->setChannelSampleRate(m_basebandSink->getChannelSampleRate());
|
||||
}
|
||||
|
||||
void FreqScanner::webapiReverseSendSettings(const QStringList& channelSettingsKeys, const FreqScannerSettings& settings, bool force)
|
||||
@ -860,33 +831,24 @@ void FreqScanner::webapiFormatChannelSettings(
|
||||
bool force
|
||||
)
|
||||
{
|
||||
/*swgChannelSettings->setDirection(0); // Single sink (Rx)
|
||||
swgChannelSettings->setDirection(0); // Single sink (Rx)
|
||||
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
||||
swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex());
|
||||
swgChannelSettings->setChannelType(new QString("FreqScanner"));
|
||||
swgChannelSettings->ssetFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
SWGSDRangel::SWGFreqScannerSettings *swgFreqScannerSettings = swgChannelSettings->gsetFreqScannerSettings();
|
||||
swgChannelSettings->setFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
SWGSDRangel::SWGFreqScannerSettings *swgFreqScannerSettings = swgChannelSettings->getFreqScannerSettings();
|
||||
|
||||
// transfer data that has been modified. When force is on transfer all data except reverse API data
|
||||
|
||||
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
|
||||
swgFreqScannerSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
if (channelSettingsKeys.contains("channelFrequencyOffset") || force) {
|
||||
swgFreqScannerSettings->setChannelFrequencyOffset(settings.m_channelFrequencyOffset);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth") || force) {
|
||||
swgFreqScannerSettings->setRfBandwidth(settings.m_channelBandwidth);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioMute") || force) {
|
||||
swgFreqScannerSettings->setAudioMute(settings.m_audioMute);
|
||||
if (channelSettingsKeys.contains("channelBandwidth") || force) {
|
||||
swgFreqScannerSettings->setChannelBandwidth(settings.m_channelBandwidth);
|
||||
}
|
||||
if (channelSettingsKeys.contains("threshold") || force) {
|
||||
swgFreqScannerSettings->setThreshold(settings.m_threshold);
|
||||
}
|
||||
if (channelSettingsKeys.contains("logFilename") || force) {
|
||||
swgFreqScannerSettings->setLogFilename(new QString(settings.m_logFilename));
|
||||
}
|
||||
if (channelSettingsKeys.contains("logEnabled") || force) {
|
||||
swgFreqScannerSettings->setLogEnabled(settings.m_logEnabled);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor") || force) {
|
||||
swgFreqScannerSettings->setRgbColor(settings.m_rgbColor);
|
||||
}
|
||||
@ -897,13 +859,6 @@ void FreqScanner::webapiFormatChannelSettings(
|
||||
swgFreqScannerSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
|
||||
{
|
||||
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
|
||||
settings.m_scopeGUI->formatTo(swgGLScope);
|
||||
swgFreqScannerSettings->setScopeConfig(swgGLScope);
|
||||
}
|
||||
|
||||
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
||||
{
|
||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||
@ -916,7 +871,7 @@ void FreqScanner::webapiFormatChannelSettings(
|
||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||
settings.m_rollupState->formatTo(swgRollupState);
|
||||
swgFreqScannerSettings->setRollupState(swgRollupState);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
void FreqScanner::networkManagerFinished(QNetworkReply *reply)
|
||||
@ -956,7 +911,6 @@ void FreqScanner::handleIndexInDeviceSetChanged(int index)
|
||||
void FreqScanner::scanAvailableChannels()
|
||||
{
|
||||
MainCore* mainCore = MainCore::instance();
|
||||
MessagePipes& messagePipes = mainCore->getMessagePipes();
|
||||
std::vector<DeviceSet*>& deviceSets = mainCore->getDeviceSets();
|
||||
m_availableChannels.clear();
|
||||
|
||||
@ -971,7 +925,7 @@ void FreqScanner::scanAvailableChannels()
|
||||
ChannelAPI* channel = deviceSet->getChannelAt(chi);
|
||||
|
||||
FreqScannerSettings::AvailableChannel availableChannel =
|
||||
FreqScannerSettings::AvailableChannel{ channel->getDeviceSetIndex(), channel->getIndexInDeviceSet(), channel };
|
||||
FreqScannerSettings::AvailableChannel{ channel->getDeviceSetIndex(), channel->getIndexInDeviceSet()};
|
||||
m_availableChannels[channel] = availableChannel;
|
||||
}
|
||||
}
|
||||
@ -991,7 +945,7 @@ void FreqScanner::handleChannelAdded(int deviceSetIndex, ChannelAPI* channel)
|
||||
if (deviceSourceEngine)
|
||||
{
|
||||
FreqScannerSettings::AvailableChannel availableChannel =
|
||||
FreqScannerSettings::AvailableChannel{ deviceSetIndex, channel->getIndexInDeviceSet(), channel };
|
||||
FreqScannerSettings::AvailableChannel{ deviceSetIndex, channel->getIndexInDeviceSet()};
|
||||
m_availableChannels[channel] = availableChannel;
|
||||
}
|
||||
|
||||
|
@ -185,12 +185,12 @@ bool FreqScannerGUI::handleMessage(const Message& message)
|
||||
QList<QTableWidgetItem *> items = ui->table->findItems(QString::number(freq), Qt::MatchExactly);
|
||||
for (auto item : items) {
|
||||
int row = item->row();
|
||||
QTableWidgetItem* item = ui->table->item(row, COL_POWER);
|
||||
item->setData(Qt::DisplayRole, results[i].m_power);
|
||||
QTableWidgetItem* powerItem = ui->table->item(row, COL_POWER);
|
||||
powerItem->setData(Qt::DisplayRole, results[i].m_power);
|
||||
bool active = results[i].m_power >= m_settings.m_threshold;
|
||||
if (active)
|
||||
{
|
||||
item->setBackground(Qt::darkGreen);
|
||||
powerItem->setBackground(Qt::darkGreen);
|
||||
QTableWidgetItem* activeCountItem = ui->table->item(row, COL_ACTIVE_COUNT);
|
||||
activeCountItem->setData(Qt::DisplayRole, activeCountItem->data(Qt::DisplayRole).toInt() + 1);
|
||||
}
|
||||
@ -736,7 +736,7 @@ void FreqScannerGUI::updateAnnotation(int row)
|
||||
{
|
||||
if ((marker.m_startFrequency <= frequency) && (frequency < marker.m_startFrequency + marker.m_bandwidth))
|
||||
{
|
||||
if (marker.m_bandwidth == m_settings.m_channelBandwidth) {
|
||||
if (marker.m_bandwidth == (unsigned)m_settings.m_channelBandwidth) {
|
||||
// Exact match
|
||||
annotationItem->setText(marker.m_text);
|
||||
return;
|
||||
|
@ -33,7 +33,6 @@ struct FreqScannerSettings
|
||||
{
|
||||
int m_deviceSetIndex;
|
||||
int m_channelIndex;
|
||||
ChannelAPI* m_channelAPI;
|
||||
|
||||
AvailableChannel() = default;
|
||||
AvailableChannel(const AvailableChannel&) = default;
|
||||
|
@ -36,7 +36,10 @@ FreqScannerSink::FreqScannerSink(FreqScanner *ilsDemod) :
|
||||
m_messageQueueToChannel(nullptr),
|
||||
m_fftSequence(-1),
|
||||
m_fft(nullptr),
|
||||
m_fftCounter(0)
|
||||
m_fftCounter(0),
|
||||
m_fftSize(1024),
|
||||
m_binsPerChannel(16),
|
||||
m_averageCount(0)
|
||||
{
|
||||
applySettings(m_settings, QStringList(), true);
|
||||
applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, 16, 4, true);
|
||||
|
@ -31,9 +31,9 @@ int FreqScannerWebAPIAdapter::webapiSettingsGet(
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
/*response.ssetFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
response.gsetFreqScannerSettings()->init();
|
||||
FreqScanner::webapiFormatChannelSettings(response, m_settings);*/
|
||||
response.setFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
response.getFreqScannerSettings()->init();
|
||||
FreqScanner::webapiFormatChannelSettings(response, m_settings);
|
||||
|
||||
return 200;
|
||||
}
|
||||
|
@ -4525,8 +4525,8 @@ bool WebAPIRequestMapper::getChannelSettings(
|
||||
}
|
||||
else if (channelSettingsKey == "FreqScannerSettings")
|
||||
{
|
||||
//channelSettings->setFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
//channelSettings->getFreqScannerSettings()->fromJsonObject(settingsJsonObject);
|
||||
channelSettings->setFreqScannerSettings(new SWGSDRangel::SWGFreqScannerSettings());
|
||||
channelSettings->getFreqScannerSettings()->fromJsonObject(settingsJsonObject);
|
||||
}
|
||||
else if (channelSettingsKey == "FreqTrackerSettings")
|
||||
{
|
||||
@ -5447,7 +5447,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings&
|
||||
channelSettings.setDatvModSettings(nullptr);
|
||||
channelSettings.setDabDemodSettings(nullptr);
|
||||
channelSettings.setDsdDemodSettings(nullptr);
|
||||
//channelSettings.setFreqScannerSettings(nullptr);
|
||||
channelSettings.setFreqScannerSettings(nullptr);
|
||||
channelSettings.setFreqTrackerSettings(nullptr);
|
||||
channelSettings.setHeatMapSettings(nullptr);
|
||||
channelSettings.setIeee802154ModSettings(nullptr);
|
||||
@ -5491,7 +5491,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan
|
||||
channelReport.setBfmDemodReport(nullptr);
|
||||
channelReport.setDatvModReport(nullptr);
|
||||
channelReport.setDsdDemodReport(nullptr);
|
||||
//channelReport.setFreqScannerReport(nullptr);
|
||||
channelReport.setFreqScannerReport(nullptr);
|
||||
channelReport.setFreqTrackerReport(nullptr);
|
||||
channelReport.setHeatMapReport(nullptr);
|
||||
channelReport.setIlsDemodReport(nullptr);
|
||||
|
@ -1,5 +1,5 @@
|
||||
FreqTrackerSettings:
|
||||
description: FreqTracker
|
||||
FreqScannerSettings:
|
||||
description: FreqScanner
|
||||
properties:
|
||||
channelBandwidth:
|
||||
description: channel RF bandwidth in Hz
|
||||
|
@ -70,6 +70,8 @@ SWGChannelReport::SWGChannelReport() {
|
||||
m_free_dv_demod_report_isSet = false;
|
||||
free_dv_mod_report = nullptr;
|
||||
m_free_dv_mod_report_isSet = false;
|
||||
freq_scanner_report = nullptr;
|
||||
m_freq_scanner_report_isSet = false;
|
||||
freq_tracker_report = nullptr;
|
||||
m_freq_tracker_report_isSet = false;
|
||||
ft8_demod_report = nullptr;
|
||||
@ -176,6 +178,8 @@ SWGChannelReport::init() {
|
||||
m_free_dv_demod_report_isSet = false;
|
||||
free_dv_mod_report = new SWGFreeDVModReport();
|
||||
m_free_dv_mod_report_isSet = false;
|
||||
freq_scanner_report = new SWGFreqScannerReport();
|
||||
m_freq_scanner_report_isSet = false;
|
||||
freq_tracker_report = new SWGFreqTrackerReport();
|
||||
m_freq_tracker_report_isSet = false;
|
||||
ft8_demod_report = new SWGFT8DemodReport();
|
||||
@ -297,6 +301,9 @@ SWGChannelReport::cleanup() {
|
||||
if(free_dv_mod_report != nullptr) {
|
||||
delete free_dv_mod_report;
|
||||
}
|
||||
if(freq_scanner_report != nullptr) {
|
||||
delete freq_scanner_report;
|
||||
}
|
||||
if(freq_tracker_report != nullptr) {
|
||||
delete freq_tracker_report;
|
||||
}
|
||||
@ -436,6 +443,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&free_dv_mod_report, pJson["FreeDVModReport"], "SWGFreeDVModReport", "SWGFreeDVModReport");
|
||||
|
||||
::SWGSDRangel::setValue(&freq_scanner_report, pJson["FreqScannerReport"], "SWGFreqScannerReport", "SWGFreqScannerReport");
|
||||
|
||||
::SWGSDRangel::setValue(&freq_tracker_report, pJson["FreqTrackerReport"], "SWGFreqTrackerReport", "SWGFreqTrackerReport");
|
||||
|
||||
::SWGSDRangel::setValue(&ft8_demod_report, pJson["FT8DemodReport"], "SWGFT8DemodReport", "SWGFT8DemodReport");
|
||||
@ -571,6 +580,9 @@ SWGChannelReport::asJsonObject() {
|
||||
if((free_dv_mod_report != nullptr) && (free_dv_mod_report->isSet())){
|
||||
toJsonValue(QString("FreeDVModReport"), free_dv_mod_report, obj, QString("SWGFreeDVModReport"));
|
||||
}
|
||||
if((freq_scanner_report != nullptr) && (freq_scanner_report->isSet())){
|
||||
toJsonValue(QString("FreqScannerReport"), freq_scanner_report, obj, QString("SWGFreqScannerReport"));
|
||||
}
|
||||
if((freq_tracker_report != nullptr) && (freq_tracker_report->isSet())){
|
||||
toJsonValue(QString("FreqTrackerReport"), freq_tracker_report, obj, QString("SWGFreqTrackerReport"));
|
||||
}
|
||||
@ -869,6 +881,16 @@ SWGChannelReport::setFreeDvModReport(SWGFreeDVModReport* free_dv_mod_report) {
|
||||
this->m_free_dv_mod_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGFreqScannerReport*
|
||||
SWGChannelReport::getFreqScannerReport() {
|
||||
return freq_scanner_report;
|
||||
}
|
||||
void
|
||||
SWGChannelReport::setFreqScannerReport(SWGFreqScannerReport* freq_scanner_report) {
|
||||
this->freq_scanner_report = freq_scanner_report;
|
||||
this->m_freq_scanner_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGFreqTrackerReport*
|
||||
SWGChannelReport::getFreqTrackerReport() {
|
||||
return freq_tracker_report;
|
||||
@ -1217,6 +1239,9 @@ SWGChannelReport::isSet(){
|
||||
if(free_dv_mod_report && free_dv_mod_report->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(freq_scanner_report && freq_scanner_report->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(freq_tracker_report && freq_tracker_report->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "SWGFileSourceReport.h"
|
||||
#include "SWGFreeDVDemodReport.h"
|
||||
#include "SWGFreeDVModReport.h"
|
||||
#include "SWGFreqScannerReport.h"
|
||||
#include "SWGFreqTrackerReport.h"
|
||||
#include "SWGHeatMapReport.h"
|
||||
#include "SWGIEEE_802_15_4_ModReport.h"
|
||||
@ -152,6 +153,9 @@ public:
|
||||
SWGFreeDVModReport* getFreeDvModReport();
|
||||
void setFreeDvModReport(SWGFreeDVModReport* free_dv_mod_report);
|
||||
|
||||
SWGFreqScannerReport* getFreqScannerReport();
|
||||
void setFreqScannerReport(SWGFreqScannerReport* freq_scanner_report);
|
||||
|
||||
SWGFreqTrackerReport* getFreqTrackerReport();
|
||||
void setFreqTrackerReport(SWGFreqTrackerReport* freq_tracker_report);
|
||||
|
||||
@ -303,6 +307,9 @@ private:
|
||||
SWGFreeDVModReport* free_dv_mod_report;
|
||||
bool m_free_dv_mod_report_isSet;
|
||||
|
||||
SWGFreqScannerReport* freq_scanner_report;
|
||||
bool m_freq_scanner_report_isSet;
|
||||
|
||||
SWGFreqTrackerReport* freq_tracker_report;
|
||||
bool m_freq_tracker_report_isSet;
|
||||
|
||||
|
@ -82,6 +82,8 @@ SWGChannelSettings::SWGChannelSettings() {
|
||||
m_free_dv_demod_settings_isSet = false;
|
||||
free_dv_mod_settings = nullptr;
|
||||
m_free_dv_mod_settings_isSet = false;
|
||||
freq_scanner_settings = nullptr;
|
||||
m_freq_scanner_settings_isSet = false;
|
||||
freq_tracker_settings = nullptr;
|
||||
m_freq_tracker_settings_isSet = false;
|
||||
ft8_demod_settings = nullptr;
|
||||
@ -212,6 +214,8 @@ SWGChannelSettings::init() {
|
||||
m_free_dv_demod_settings_isSet = false;
|
||||
free_dv_mod_settings = new SWGFreeDVModSettings();
|
||||
m_free_dv_mod_settings_isSet = false;
|
||||
freq_scanner_settings = new SWGFreqScannerSettings();
|
||||
m_freq_scanner_settings_isSet = false;
|
||||
freq_tracker_settings = new SWGFreqTrackerSettings();
|
||||
m_freq_tracker_settings_isSet = false;
|
||||
ft8_demod_settings = new SWGFT8DemodSettings();
|
||||
@ -359,6 +363,9 @@ SWGChannelSettings::cleanup() {
|
||||
if(free_dv_mod_settings != nullptr) {
|
||||
delete free_dv_mod_settings;
|
||||
}
|
||||
if(freq_scanner_settings != nullptr) {
|
||||
delete freq_scanner_settings;
|
||||
}
|
||||
if(freq_tracker_settings != nullptr) {
|
||||
delete freq_tracker_settings;
|
||||
}
|
||||
@ -528,6 +535,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&free_dv_mod_settings, pJson["FreeDVModSettings"], "SWGFreeDVModSettings", "SWGFreeDVModSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&freq_scanner_settings, pJson["FreqScannerSettings"], "SWGFreqScannerSettings", "SWGFreqScannerSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&freq_tracker_settings, pJson["FreqTrackerSettings"], "SWGFreqTrackerSettings", "SWGFreqTrackerSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&ft8_demod_settings, pJson["FT8DemodSettings"], "SWGFT8DemodSettings", "SWGFT8DemodSettings");
|
||||
@ -693,6 +702,9 @@ SWGChannelSettings::asJsonObject() {
|
||||
if((free_dv_mod_settings != nullptr) && (free_dv_mod_settings->isSet())){
|
||||
toJsonValue(QString("FreeDVModSettings"), free_dv_mod_settings, obj, QString("SWGFreeDVModSettings"));
|
||||
}
|
||||
if((freq_scanner_settings != nullptr) && (freq_scanner_settings->isSet())){
|
||||
toJsonValue(QString("FreqScannerSettings"), freq_scanner_settings, obj, QString("SWGFreqScannerSettings"));
|
||||
}
|
||||
if((freq_tracker_settings != nullptr) && (freq_tracker_settings->isSet())){
|
||||
toJsonValue(QString("FreqTrackerSettings"), freq_tracker_settings, obj, QString("SWGFreqTrackerSettings"));
|
||||
}
|
||||
@ -1069,6 +1081,16 @@ SWGChannelSettings::setFreeDvModSettings(SWGFreeDVModSettings* free_dv_mod_setti
|
||||
this->m_free_dv_mod_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGFreqScannerSettings*
|
||||
SWGChannelSettings::getFreqScannerSettings() {
|
||||
return freq_scanner_settings;
|
||||
}
|
||||
void
|
||||
SWGChannelSettings::setFreqScannerSettings(SWGFreqScannerSettings* freq_scanner_settings) {
|
||||
this->freq_scanner_settings = freq_scanner_settings;
|
||||
this->m_freq_scanner_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGFreqTrackerSettings*
|
||||
SWGChannelSettings::getFreqTrackerSettings() {
|
||||
return freq_tracker_settings;
|
||||
@ -1495,6 +1517,9 @@ SWGChannelSettings::isSet(){
|
||||
if(free_dv_mod_settings && free_dv_mod_settings->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(freq_scanner_settings && freq_scanner_settings->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(freq_tracker_settings && freq_tracker_settings->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "SWGFileSourceSettings.h"
|
||||
#include "SWGFreeDVDemodSettings.h"
|
||||
#include "SWGFreeDVModSettings.h"
|
||||
#include "SWGFreqScannerSettings.h"
|
||||
#include "SWGFreqTrackerSettings.h"
|
||||
#include "SWGHeatMapSettings.h"
|
||||
#include "SWGIEEE_802_15_4_ModSettings.h"
|
||||
@ -180,6 +181,9 @@ public:
|
||||
SWGFreeDVModSettings* getFreeDvModSettings();
|
||||
void setFreeDvModSettings(SWGFreeDVModSettings* free_dv_mod_settings);
|
||||
|
||||
SWGFreqScannerSettings* getFreqScannerSettings();
|
||||
void setFreqScannerSettings(SWGFreqScannerSettings* freq_scanner_settings);
|
||||
|
||||
SWGFreqTrackerSettings* getFreqTrackerSettings();
|
||||
void setFreqTrackerSettings(SWGFreqTrackerSettings* freq_tracker_settings);
|
||||
|
||||
@ -367,6 +371,9 @@ private:
|
||||
SWGFreeDVModSettings* free_dv_mod_settings;
|
||||
bool m_free_dv_mod_settings_isSet;
|
||||
|
||||
SWGFreqScannerSettings* freq_scanner_settings;
|
||||
bool m_freq_scanner_settings_isSet;
|
||||
|
||||
SWGFreqTrackerSettings* freq_tracker_settings;
|
||||
bool m_freq_tracker_settings_isSet;
|
||||
|
||||
|
108
swagger/sdrangel/code/qt5/client/SWGFreqScannerReport.cpp
Normal file
108
swagger/sdrangel/code/qt5/client/SWGFreqScannerReport.cpp
Normal file
@ -0,0 +1,108 @@
|
||||
/**
|
||||
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
*
|
||||
* OpenAPI spec version: 7.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 "SWGFreqScannerReport.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGFreqScannerReport::SWGFreqScannerReport(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGFreqScannerReport::SWGFreqScannerReport() {
|
||||
channel_sample_rate = 0;
|
||||
m_channel_sample_rate_isSet = false;
|
||||
}
|
||||
|
||||
SWGFreqScannerReport::~SWGFreqScannerReport() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGFreqScannerReport::init() {
|
||||
channel_sample_rate = 0;
|
||||
m_channel_sample_rate_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFreqScannerReport::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGFreqScannerReport*
|
||||
SWGFreqScannerReport::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFreqScannerReport::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGFreqScannerReport::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGFreqScannerReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_channel_sample_rate_isSet){
|
||||
obj->insert("channelSampleRate", QJsonValue(channel_sample_rate));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerReport::getChannelSampleRate() {
|
||||
return channel_sample_rate;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerReport::setChannelSampleRate(qint32 channel_sample_rate) {
|
||||
this->channel_sample_rate = channel_sample_rate;
|
||||
this->m_channel_sample_rate_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGFreqScannerReport::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_channel_sample_rate_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
58
swagger/sdrangel/code/qt5/client/SWGFreqScannerReport.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGFreqScannerReport.h
Normal file
@ -0,0 +1,58 @@
|
||||
/**
|
||||
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
*
|
||||
* OpenAPI spec version: 7.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGFreqScannerReport.h
|
||||
*
|
||||
* FreqScanner
|
||||
*/
|
||||
|
||||
#ifndef SWGFreqScannerReport_H_
|
||||
#define SWGFreqScannerReport_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGFreqScannerReport: public SWGObject {
|
||||
public:
|
||||
SWGFreqScannerReport();
|
||||
SWGFreqScannerReport(QString* json);
|
||||
virtual ~SWGFreqScannerReport();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGFreqScannerReport* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getChannelSampleRate();
|
||||
void setChannelSampleRate(qint32 channel_sample_rate);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 channel_sample_rate;
|
||||
bool m_channel_sample_rate_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGFreqScannerReport_H_ */
|
636
swagger/sdrangel/code/qt5/client/SWGFreqScannerSettings.cpp
Normal file
636
swagger/sdrangel/code/qt5/client/SWGFreqScannerSettings.cpp
Normal file
@ -0,0 +1,636 @@
|
||||
/**
|
||||
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
*
|
||||
* OpenAPI spec version: 7.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 "SWGFreqScannerSettings.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGFreqScannerSettings::SWGFreqScannerSettings(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGFreqScannerSettings::SWGFreqScannerSettings() {
|
||||
channel_bandwidth = 0;
|
||||
m_channel_bandwidth_isSet = false;
|
||||
channel_frequency_offset = 0;
|
||||
m_channel_frequency_offset_isSet = false;
|
||||
threshold = 0.0f;
|
||||
m_threshold_isSet = false;
|
||||
m_frequencies = new QList<qint64>();
|
||||
m_m_frequencies_isSet = false;
|
||||
m_enabled = new QList<qint32>();
|
||||
m_m_enabled_isSet = false;
|
||||
m_notes = nullptr;
|
||||
m_m_notes_isSet = false;
|
||||
channel = nullptr;
|
||||
m_channel_isSet = false;
|
||||
scan_time = 0.0f;
|
||||
m_scan_time_isSet = false;
|
||||
retransmit_time = 0.0f;
|
||||
m_retransmit_time_isSet = false;
|
||||
tune_time = 0.0f;
|
||||
m_tune_time_isSet = false;
|
||||
priority = 0;
|
||||
m_priority_isSet = false;
|
||||
measurement = 0;
|
||||
m_measurement_isSet = false;
|
||||
mode = 0;
|
||||
m_mode_isSet = false;
|
||||
rgb_color = 0;
|
||||
m_rgb_color_isSet = false;
|
||||
title = nullptr;
|
||||
m_title_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
m_use_reverse_api_isSet = false;
|
||||
reverse_api_address = nullptr;
|
||||
m_reverse_api_address_isSet = false;
|
||||
reverse_api_port = 0;
|
||||
m_reverse_api_port_isSet = false;
|
||||
reverse_api_device_index = 0;
|
||||
m_reverse_api_device_index_isSet = false;
|
||||
reverse_api_channel_index = 0;
|
||||
m_reverse_api_channel_index_isSet = false;
|
||||
channel_marker = nullptr;
|
||||
m_channel_marker_isSet = false;
|
||||
rollup_state = nullptr;
|
||||
m_rollup_state_isSet = false;
|
||||
}
|
||||
|
||||
SWGFreqScannerSettings::~SWGFreqScannerSettings() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGFreqScannerSettings::init() {
|
||||
channel_bandwidth = 0;
|
||||
m_channel_bandwidth_isSet = false;
|
||||
channel_frequency_offset = 0;
|
||||
m_channel_frequency_offset_isSet = false;
|
||||
threshold = 0.0f;
|
||||
m_threshold_isSet = false;
|
||||
m_frequencies = new QList<qint64>();
|
||||
m_m_frequencies_isSet = false;
|
||||
m_enabled = new QList<qint32>();
|
||||
m_m_enabled_isSet = false;
|
||||
m_notes = new QList<QString*>();
|
||||
m_m_notes_isSet = false;
|
||||
channel = new QString("");
|
||||
m_channel_isSet = false;
|
||||
scan_time = 0.0f;
|
||||
m_scan_time_isSet = false;
|
||||
retransmit_time = 0.0f;
|
||||
m_retransmit_time_isSet = false;
|
||||
tune_time = 0.0f;
|
||||
m_tune_time_isSet = false;
|
||||
priority = 0;
|
||||
m_priority_isSet = false;
|
||||
measurement = 0;
|
||||
m_measurement_isSet = false;
|
||||
mode = 0;
|
||||
m_mode_isSet = false;
|
||||
rgb_color = 0;
|
||||
m_rgb_color_isSet = false;
|
||||
title = new QString("");
|
||||
m_title_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
m_use_reverse_api_isSet = false;
|
||||
reverse_api_address = new QString("");
|
||||
m_reverse_api_address_isSet = false;
|
||||
reverse_api_port = 0;
|
||||
m_reverse_api_port_isSet = false;
|
||||
reverse_api_device_index = 0;
|
||||
m_reverse_api_device_index_isSet = false;
|
||||
reverse_api_channel_index = 0;
|
||||
m_reverse_api_channel_index_isSet = false;
|
||||
channel_marker = new SWGChannelMarker();
|
||||
m_channel_marker_isSet = false;
|
||||
rollup_state = new SWGRollupState();
|
||||
m_rollup_state_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFreqScannerSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(m_notes != nullptr) {
|
||||
auto arr = m_notes;
|
||||
for(auto o: *arr) {
|
||||
delete o;
|
||||
}
|
||||
delete m_notes;
|
||||
}
|
||||
if(channel != nullptr) {
|
||||
delete channel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(title != nullptr) {
|
||||
delete title;
|
||||
}
|
||||
|
||||
|
||||
if(reverse_api_address != nullptr) {
|
||||
delete reverse_api_address;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(channel_marker != nullptr) {
|
||||
delete channel_marker;
|
||||
}
|
||||
if(rollup_state != nullptr) {
|
||||
delete rollup_state;
|
||||
}
|
||||
}
|
||||
|
||||
SWGFreqScannerSettings*
|
||||
SWGFreqScannerSettings::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFreqScannerSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&channel_bandwidth, pJson["channelBandwidth"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&channel_frequency_offset, pJson["channelFrequencyOffset"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&threshold, pJson["threshold"], "float", "");
|
||||
|
||||
|
||||
::SWGSDRangel::setValue(&m_frequencies, pJson["m_frequencies"], "QList", "qint64");
|
||||
|
||||
::SWGSDRangel::setValue(&m_enabled, pJson["m_enabled"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&m_notes, pJson["m_notes"], "QList", "QString");
|
||||
::SWGSDRangel::setValue(&channel, pJson["channel"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&scan_time, pJson["scanTime"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&retransmit_time, pJson["retransmitTime"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tune_time, pJson["tuneTime"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&priority, pJson["priority"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&measurement, pJson["measurement"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&mode, pJson["mode"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&channel_marker, pJson["channelMarker"], "SWGChannelMarker", "SWGChannelMarker");
|
||||
|
||||
::SWGSDRangel::setValue(&rollup_state, pJson["rollupState"], "SWGRollupState", "SWGRollupState");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGFreqScannerSettings::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGFreqScannerSettings::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_channel_bandwidth_isSet){
|
||||
obj->insert("channelBandwidth", QJsonValue(channel_bandwidth));
|
||||
}
|
||||
if(m_channel_frequency_offset_isSet){
|
||||
obj->insert("channelFrequencyOffset", QJsonValue(channel_frequency_offset));
|
||||
}
|
||||
if(m_threshold_isSet){
|
||||
obj->insert("threshold", QJsonValue(threshold));
|
||||
}
|
||||
if(m_frequencies && m_frequencies->size() > 0){
|
||||
toJsonArray((QList<void*>*)m_frequencies, obj, "m_frequencies", "");
|
||||
}
|
||||
if(m_enabled && m_enabled->size() > 0){
|
||||
toJsonArray((QList<void*>*)m_enabled, obj, "m_enabled", "");
|
||||
}
|
||||
if(m_notes && m_notes->size() > 0){
|
||||
toJsonArray((QList<void*>*)m_notes, obj, "m_notes", "QString");
|
||||
}
|
||||
if(channel != nullptr && *channel != QString("")){
|
||||
toJsonValue(QString("channel"), channel, obj, QString("QString"));
|
||||
}
|
||||
if(m_scan_time_isSet){
|
||||
obj->insert("scanTime", QJsonValue(scan_time));
|
||||
}
|
||||
if(m_retransmit_time_isSet){
|
||||
obj->insert("retransmitTime", QJsonValue(retransmit_time));
|
||||
}
|
||||
if(m_tune_time_isSet){
|
||||
obj->insert("tuneTime", QJsonValue(tune_time));
|
||||
}
|
||||
if(m_priority_isSet){
|
||||
obj->insert("priority", QJsonValue(priority));
|
||||
}
|
||||
if(m_measurement_isSet){
|
||||
obj->insert("measurement", QJsonValue(measurement));
|
||||
}
|
||||
if(m_mode_isSet){
|
||||
obj->insert("mode", QJsonValue(mode));
|
||||
}
|
||||
if(m_rgb_color_isSet){
|
||||
obj->insert("rgbColor", QJsonValue(rgb_color));
|
||||
}
|
||||
if(title != nullptr && *title != QString("")){
|
||||
toJsonValue(QString("title"), title, obj, QString("QString"));
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||
}
|
||||
if(m_use_reverse_api_isSet){
|
||||
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
|
||||
}
|
||||
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
|
||||
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
|
||||
}
|
||||
if(m_reverse_api_port_isSet){
|
||||
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
|
||||
}
|
||||
if(m_reverse_api_device_index_isSet){
|
||||
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
|
||||
}
|
||||
if(m_reverse_api_channel_index_isSet){
|
||||
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
|
||||
}
|
||||
if((channel_marker != nullptr) && (channel_marker->isSet())){
|
||||
toJsonValue(QString("channelMarker"), channel_marker, obj, QString("SWGChannelMarker"));
|
||||
}
|
||||
if((rollup_state != nullptr) && (rollup_state->isSet())){
|
||||
toJsonValue(QString("rollupState"), rollup_state, obj, QString("SWGRollupState"));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getChannelBandwidth() {
|
||||
return channel_bandwidth;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setChannelBandwidth(qint32 channel_bandwidth) {
|
||||
this->channel_bandwidth = channel_bandwidth;
|
||||
this->m_channel_bandwidth_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getChannelFrequencyOffset() {
|
||||
return channel_frequency_offset;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setChannelFrequencyOffset(qint32 channel_frequency_offset) {
|
||||
this->channel_frequency_offset = channel_frequency_offset;
|
||||
this->m_channel_frequency_offset_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGFreqScannerSettings::getThreshold() {
|
||||
return threshold;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setThreshold(float threshold) {
|
||||
this->threshold = threshold;
|
||||
this->m_threshold_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint64>*
|
||||
SWGFreqScannerSettings::getMFrequencies() {
|
||||
return m_frequencies;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setMFrequencies(QList<qint64>* m_frequencies) {
|
||||
this->m_frequencies = m_frequencies;
|
||||
this->m_m_frequencies_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGFreqScannerSettings::getMEnabled() {
|
||||
return m_enabled;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setMEnabled(QList<qint32>* m_enabled) {
|
||||
this->m_enabled = m_enabled;
|
||||
this->m_m_enabled_isSet = true;
|
||||
}
|
||||
|
||||
QList<QString*>*
|
||||
SWGFreqScannerSettings::getMNotes() {
|
||||
return m_notes;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setMNotes(QList<QString*>* m_notes) {
|
||||
this->m_notes = m_notes;
|
||||
this->m_m_notes_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGFreqScannerSettings::getChannel() {
|
||||
return channel;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setChannel(QString* channel) {
|
||||
this->channel = channel;
|
||||
this->m_channel_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGFreqScannerSettings::getScanTime() {
|
||||
return scan_time;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setScanTime(float scan_time) {
|
||||
this->scan_time = scan_time;
|
||||
this->m_scan_time_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGFreqScannerSettings::getRetransmitTime() {
|
||||
return retransmit_time;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setRetransmitTime(float retransmit_time) {
|
||||
this->retransmit_time = retransmit_time;
|
||||
this->m_retransmit_time_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGFreqScannerSettings::getTuneTime() {
|
||||
return tune_time;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setTuneTime(float tune_time) {
|
||||
this->tune_time = tune_time;
|
||||
this->m_tune_time_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getPriority() {
|
||||
return priority;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setPriority(qint32 priority) {
|
||||
this->priority = priority;
|
||||
this->m_priority_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getMeasurement() {
|
||||
return measurement;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setMeasurement(qint32 measurement) {
|
||||
this->measurement = measurement;
|
||||
this->m_measurement_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getMode() {
|
||||
return mode;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setMode(qint32 mode) {
|
||||
this->mode = mode;
|
||||
this->m_mode_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getRgbColor() {
|
||||
return rgb_color;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setRgbColor(qint32 rgb_color) {
|
||||
this->rgb_color = rgb_color;
|
||||
this->m_rgb_color_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGFreqScannerSettings::getTitle() {
|
||||
return title;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setTitle(QString* title) {
|
||||
this->title = title;
|
||||
this->m_title_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getStreamIndex() {
|
||||
return stream_index;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setStreamIndex(qint32 stream_index) {
|
||||
this->stream_index = stream_index;
|
||||
this->m_stream_index_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getUseReverseApi() {
|
||||
return use_reverse_api;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setUseReverseApi(qint32 use_reverse_api) {
|
||||
this->use_reverse_api = use_reverse_api;
|
||||
this->m_use_reverse_api_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGFreqScannerSettings::getReverseApiAddress() {
|
||||
return reverse_api_address;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setReverseApiAddress(QString* reverse_api_address) {
|
||||
this->reverse_api_address = reverse_api_address;
|
||||
this->m_reverse_api_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getReverseApiPort() {
|
||||
return reverse_api_port;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setReverseApiPort(qint32 reverse_api_port) {
|
||||
this->reverse_api_port = reverse_api_port;
|
||||
this->m_reverse_api_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getReverseApiDeviceIndex() {
|
||||
return reverse_api_device_index;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
||||
this->reverse_api_device_index = reverse_api_device_index;
|
||||
this->m_reverse_api_device_index_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerSettings::getReverseApiChannelIndex() {
|
||||
return reverse_api_channel_index;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
||||
this->reverse_api_channel_index = reverse_api_channel_index;
|
||||
this->m_reverse_api_channel_index_isSet = true;
|
||||
}
|
||||
|
||||
SWGChannelMarker*
|
||||
SWGFreqScannerSettings::getChannelMarker() {
|
||||
return channel_marker;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setChannelMarker(SWGChannelMarker* channel_marker) {
|
||||
this->channel_marker = channel_marker;
|
||||
this->m_channel_marker_isSet = true;
|
||||
}
|
||||
|
||||
SWGRollupState*
|
||||
SWGFreqScannerSettings::getRollupState() {
|
||||
return rollup_state;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerSettings::setRollupState(SWGRollupState* rollup_state) {
|
||||
this->rollup_state = rollup_state;
|
||||
this->m_rollup_state_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGFreqScannerSettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_channel_bandwidth_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_channel_frequency_offset_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_threshold_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_m_frequencies_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_frequencies && (m_frequencies->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_m_enabled_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_enabled && (m_enabled->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_notes && (m_notes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(channel && *channel != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_scan_time_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_retransmit_time_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tune_time_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_priority_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_measurement_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_mode_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rgb_color_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(title && *title != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_use_reverse_api_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(reverse_api_address && *reverse_api_address != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_reverse_api_port_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_reverse_api_device_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_reverse_api_channel_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(channel_marker && channel_marker->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(rollup_state && rollup_state->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
194
swagger/sdrangel/code/qt5/client/SWGFreqScannerSettings.h
Normal file
194
swagger/sdrangel/code/qt5/client/SWGFreqScannerSettings.h
Normal file
@ -0,0 +1,194 @@
|
||||
/**
|
||||
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
*
|
||||
* OpenAPI spec version: 7.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGFreqScannerSettings.h
|
||||
*
|
||||
* FreqScanner
|
||||
*/
|
||||
|
||||
#ifndef SWGFreqScannerSettings_H_
|
||||
#define SWGFreqScannerSettings_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGChannelMarker.h"
|
||||
#include "SWGRollupState.h"
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGFreqScannerSettings: public SWGObject {
|
||||
public:
|
||||
SWGFreqScannerSettings();
|
||||
SWGFreqScannerSettings(QString* json);
|
||||
virtual ~SWGFreqScannerSettings();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGFreqScannerSettings* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getChannelBandwidth();
|
||||
void setChannelBandwidth(qint32 channel_bandwidth);
|
||||
|
||||
qint32 getChannelFrequencyOffset();
|
||||
void setChannelFrequencyOffset(qint32 channel_frequency_offset);
|
||||
|
||||
float getThreshold();
|
||||
void setThreshold(float threshold);
|
||||
|
||||
QList<qint64>* getMFrequencies();
|
||||
void setMFrequencies(QList<qint64>* m_frequencies);
|
||||
|
||||
QList<qint32>* getMEnabled();
|
||||
void setMEnabled(QList<qint32>* m_enabled);
|
||||
|
||||
QList<QString*>* getMNotes();
|
||||
void setMNotes(QList<QString*>* m_notes);
|
||||
|
||||
QString* getChannel();
|
||||
void setChannel(QString* channel);
|
||||
|
||||
float getScanTime();
|
||||
void setScanTime(float scan_time);
|
||||
|
||||
float getRetransmitTime();
|
||||
void setRetransmitTime(float retransmit_time);
|
||||
|
||||
float getTuneTime();
|
||||
void setTuneTime(float tune_time);
|
||||
|
||||
qint32 getPriority();
|
||||
void setPriority(qint32 priority);
|
||||
|
||||
qint32 getMeasurement();
|
||||
void setMeasurement(qint32 measurement);
|
||||
|
||||
qint32 getMode();
|
||||
void setMode(qint32 mode);
|
||||
|
||||
qint32 getRgbColor();
|
||||
void setRgbColor(qint32 rgb_color);
|
||||
|
||||
QString* getTitle();
|
||||
void setTitle(QString* title);
|
||||
|
||||
qint32 getStreamIndex();
|
||||
void setStreamIndex(qint32 stream_index);
|
||||
|
||||
qint32 getUseReverseApi();
|
||||
void setUseReverseApi(qint32 use_reverse_api);
|
||||
|
||||
QString* getReverseApiAddress();
|
||||
void setReverseApiAddress(QString* reverse_api_address);
|
||||
|
||||
qint32 getReverseApiPort();
|
||||
void setReverseApiPort(qint32 reverse_api_port);
|
||||
|
||||
qint32 getReverseApiDeviceIndex();
|
||||
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
|
||||
|
||||
qint32 getReverseApiChannelIndex();
|
||||
void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
|
||||
|
||||
SWGChannelMarker* getChannelMarker();
|
||||
void setChannelMarker(SWGChannelMarker* channel_marker);
|
||||
|
||||
SWGRollupState* getRollupState();
|
||||
void setRollupState(SWGRollupState* rollup_state);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 channel_bandwidth;
|
||||
bool m_channel_bandwidth_isSet;
|
||||
|
||||
qint32 channel_frequency_offset;
|
||||
bool m_channel_frequency_offset_isSet;
|
||||
|
||||
float threshold;
|
||||
bool m_threshold_isSet;
|
||||
|
||||
QList<qint64>* m_frequencies;
|
||||
bool m_m_frequencies_isSet;
|
||||
|
||||
QList<qint32>* m_enabled;
|
||||
bool m_m_enabled_isSet;
|
||||
|
||||
QList<QString*>* m_notes;
|
||||
bool m_m_notes_isSet;
|
||||
|
||||
QString* channel;
|
||||
bool m_channel_isSet;
|
||||
|
||||
float scan_time;
|
||||
bool m_scan_time_isSet;
|
||||
|
||||
float retransmit_time;
|
||||
bool m_retransmit_time_isSet;
|
||||
|
||||
float tune_time;
|
||||
bool m_tune_time_isSet;
|
||||
|
||||
qint32 priority;
|
||||
bool m_priority_isSet;
|
||||
|
||||
qint32 measurement;
|
||||
bool m_measurement_isSet;
|
||||
|
||||
qint32 mode;
|
||||
bool m_mode_isSet;
|
||||
|
||||
qint32 rgb_color;
|
||||
bool m_rgb_color_isSet;
|
||||
|
||||
QString* title;
|
||||
bool m_title_isSet;
|
||||
|
||||
qint32 stream_index;
|
||||
bool m_stream_index_isSet;
|
||||
|
||||
qint32 use_reverse_api;
|
||||
bool m_use_reverse_api_isSet;
|
||||
|
||||
QString* reverse_api_address;
|
||||
bool m_reverse_api_address_isSet;
|
||||
|
||||
qint32 reverse_api_port;
|
||||
bool m_reverse_api_port_isSet;
|
||||
|
||||
qint32 reverse_api_device_index;
|
||||
bool m_reverse_api_device_index_isSet;
|
||||
|
||||
qint32 reverse_api_channel_index;
|
||||
bool m_reverse_api_channel_index_isSet;
|
||||
|
||||
SWGChannelMarker* channel_marker;
|
||||
bool m_channel_marker_isSet;
|
||||
|
||||
SWGRollupState* rollup_state;
|
||||
bool m_rollup_state_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGFreqScannerSettings_H_ */
|
@ -151,6 +151,8 @@
|
||||
#include "SWGFreeDVDemodSettings.h"
|
||||
#include "SWGFreeDVModReport.h"
|
||||
#include "SWGFreeDVModSettings.h"
|
||||
#include "SWGFreqScannerReport.h"
|
||||
#include "SWGFreqScannerSettings.h"
|
||||
#include "SWGFreqTrackerReport.h"
|
||||
#include "SWGFreqTrackerSettings.h"
|
||||
#include "SWGFrequency.h"
|
||||
@ -1055,6 +1057,16 @@ namespace SWGSDRangel {
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGFreqScannerReport").compare(type) == 0) {
|
||||
SWGFreqScannerReport *obj = new SWGFreqScannerReport();
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGFreqScannerSettings").compare(type) == 0) {
|
||||
SWGFreqScannerSettings *obj = new SWGFreqScannerSettings();
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGFreqTrackerReport").compare(type) == 0) {
|
||||
SWGFreqTrackerReport *obj = new SWGFreqTrackerReport();
|
||||
obj->init();
|
||||
|
Loading…
Reference in New Issue
Block a user