1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-11-13 03:33:23 -05:00

SigMF file input: REST API generated code

This commit is contained in:
f4exb 2020-06-16 01:49:33 +02:00
parent 4a6410a0ec
commit 1b5725c00d
21 changed files with 1667 additions and 63 deletions

View File

@ -54,6 +54,7 @@
<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/SigMFFileInput.yaml</file>
<file>webapi/doc/swagger/include/SoapySDR.yaml</file>
<file>webapi/doc/swagger/include/SSBDemod.yaml</file>
<file>webapi/doc/swagger/include/SSBMod.yaml</file>

View File

@ -3138,6 +3138,9 @@ margin-bottom: 20px;
"sdrPlayActions" : {
"$ref" : "#/definitions/SDRPlayActions"
},
"sigMFFileInputActions" : {
"$ref" : "#/definitions/SigMFFileInputActions"
},
"soapySDRInputActions" : {
"$ref" : "#/definitions/SoapySDRInputActions"
},
@ -3274,6 +3277,9 @@ margin-bottom: 20px;
"sdrPlayReport" : {
"$ref" : "#/definitions/SDRPlayReport"
},
"sigMFFileInputReport" : {
"$ref" : "#/definitions/SigMFFileInputReport"
},
"soapySDRInputReport" : {
"$ref" : "#/definitions/SoapySDRReport"
},
@ -3423,6 +3429,9 @@ margin-bottom: 20px;
"sdrPlaySettings" : {
"$ref" : "#/definitions/SDRPlaySettings"
},
"sigMFFileInputSettings" : {
"$ref" : "#/definitions/SigMFFileInputSettings"
},
"soapySDRInputSettings" : {
"$ref" : "#/definitions/SoapySDRInputSettings"
},
@ -7012,6 +7021,118 @@ margin-bottom: 20px;
}
},
"description" : "Information about a logical device available from an attached hardware device that can be used as a sampling device"
};
defs.SigMFFileInputActions = {
"properties" : {
"playTrack" : {
"type" : "integer",
"description" : "Play IQ stream action\n * 0 - stop playing\n * 1 - start playing current track\n"
},
"playRecord" : {
"type" : "integer",
"description" : "Play IQ stream action\n * 0 - stop playing\n * 1 - start playing\n"
},
"seekTrack" : {
"type" : "integer",
"description" : "Move to beginning of track given its number. Must stop first."
},
"seekTrackMillis" : {
"type" : "integer",
"description" : "Move to this number / 1000 raio in track. Must stop first."
},
"seekRecordMillis" : {
"type" : "integer",
"description" : "Move to this number / 1000 raio in full record. Must stop first."
}
},
"description" : "SigMFFileInput"
};
defs.SigMFFileInputReport = {
"properties" : {
"sampleSize" : {
"type" : "integer",
"description" : "Record sample size in number of bits"
},
"sampleBytes" : {
"type" : "integer",
"description" : "Record sample size in number of bytes"
},
"crcStatus" : {
"type" : "integer",
"description" : "CRC status\n * 0 - no CRC available\n * 1 - CRC (SHA512) OK\n * 2 - CRC (SHA512) KO\n"
},
"totalBytesStatus" : {
"type" : "integer",
"description" : "Total number of bytes in data file vs meta data\n * 0 - mismatch\n * 1 - match\n"
},
"centerFrequency" : {
"type" : "integer",
"description" : "Current track center frequency in Hz"
},
"sampleRate" : {
"type" : "integer",
"description" : "Current track sample rate in S/s"
},
"trackNunber" : {
"type" : "integer",
"description" : "Current track number"
},
"absoluteTime" : {
"type" : "string",
"description" : "Absolute record time string representation"
},
"elapsedRecordTime" : {
"type" : "string",
"description" : "Elapsed record time since beginning string representation"
},
"elapsedTrackime" : {
"type" : "string",
"description" : "Elapsed track time since beginning string representation"
},
"recordDuration" : {
"type" : "string",
"description" : "Record duration time string representation"
},
"trackDuration" : {
"type" : "string",
"description" : "Track duration time string representation"
}
},
"description" : "SigMFFileInput"
};
defs.SigMFFileInputSettings = {
"properties" : {
"fileName" : {
"type" : "string",
"description" : "The name (path) of the file being read without extension"
},
"accelerationFactor" : {
"type" : "integer",
"description" : "Playback acceleration (1 if normal speed)"
},
"trackLoop" : {
"type" : "integer",
"description" : "1 if playing track in a loop else 0"
},
"fullLoop" : {
"type" : "integer",
"description" : "1 if playing full file in a loop else 0"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
}
},
"description" : "SigMFFileInput"
};
defs.SoapySDRFrequencySetting = {
"properties" : {
@ -37245,7 +37366,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-05-10T09:28:39.270+02:00
Generated 2020-06-16T01:37:19.538+02:00
</div>
</div>
</div>

View File

@ -44,6 +44,8 @@ DeviceActions:
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrActions"
sdrPlayActions:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlayActions"
sigMFFileInputActions:
$ref: "/doc/swagger/include/SigMFFileInput.yaml#/SigMFFileInputActions"
soapySDRInputActions:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRInputActions"
testSourceActions:

View File

@ -0,0 +1,61 @@
DeviceReport:
description: Base device report. Only the device report corresponding to the device specified in the deviceHwType is or should be present.
discriminator: deviceHwType
required:
- deviceHwType
- direction
properties:
deviceHwType:
description: Device hardware type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
airspyReport:
$ref: "/doc/swagger/include/Airspy.yaml#/AirspyReport"
airspyHFReport:
$ref: "/doc/swagger/include/AirspyHF.yaml#/AirspyHFReport"
bladeRF2InputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2InputReport"
bladeRF2OutputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2OutputReport"
fileInputReport:
$ref: "/doc/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
kiwiSDRReport:
$ref: "/doc/swagger/include/KiwiSDR.yaml#/KiwiSDRReport"
limeSdrOutputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrOutputReport"
limeSdrMIMOReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrMIMOReport"
localInputReport:
$ref: "/doc/swagger/include/LocalInput.yaml#/LocalInputReport"
localOutputReport:
$ref: "/doc/swagger/include/LocalOutput.yaml#/LocalOutputReport"
perseusReport:
$ref: "/doc/swagger/include/Perseus.yaml#/PerseusReport"
plutoSdrInputReport:
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrInputReport"
plutoSdrOutputReport:
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
rtlSdrReport:
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
remoteOutputReport:
$ref: "/doc/swagger/include/RemoteOutput.yaml#/RemoteOutputReport"
remoteInputReport:
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputReport"
sdrPlayReport:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlayReport"
sigMFFileInputReport:
$ref: "/doc/swagger/include/SigMFFileInput.yaml#/SigMFFileInputReport"
soapySDRInputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
soapySDROutputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
xtrxInputReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxInputReport"
xtrxOutputReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxOutputReport"
xtrxMIMOReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxMIMOReport"

View File

@ -64,6 +64,8 @@ DeviceSettings:
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputSettings"
sdrPlaySettings:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlaySettings"
sigMFFileInputSettings:
$ref: "/doc/swagger/include/SigMFFileInput.yaml#/SigMFFileInputSettings"
soapySDRInputSettings:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRInputSettings"
soapySDROutputSettings:

View File

@ -0,0 +1,96 @@
SigMFFileInputSettings:
description: SigMFFileInput
properties:
fileName:
description: The name (path) of the file being read without extension
type: string
accelerationFactor:
description: Playback acceleration (1 if normal speed)
type: integer
trackLoop:
description: 1 if playing track in a loop else 0
type: integer
fullLoop:
description: 1 if playing full file in a loop else 0
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
SigMFFileInputReport:
description: SigMFFileInput
properties:
sampleSize:
description: Record sample size in number of bits
type: integer
sampleBytes:
description: Record sample size in number of bytes
type: integer
crcStatus:
type: integer
description: >
CRC status
* 0 - no CRC available
* 1 - CRC (SHA512) OK
* 2 - CRC (SHA512) KO
totalBytesStatus:
type: integer
description: >
Total number of bytes in data file vs meta data
* 0 - mismatch
* 1 - match
centerFrequency:
description: Current track center frequency in Hz
type: integer
sampleRate:
description: Current track sample rate in S/s
type: integer
trackNunber:
description: Current track number
type: integer
absoluteTime:
description: Absolute record time string representation
type: string
elapsedRecordTime:
description: Elapsed record time since beginning string representation
type: string
elapsedTrackime:
description: Elapsed track time since beginning string representation
type: string
recordDuration:
description: Record duration time string representation
type: string
trackDuration:
description: Track duration time string representation
type: string
SigMFFileInputActions:
description: SigMFFileInput
properties:
playTrack:
type: integer
description: >
Play IQ stream action
* 0 - stop playing
* 1 - start playing current track
playRecord:
type: integer
description: >
Play IQ stream action
* 0 - stop playing
* 1 - start playing
seekTrack:
type: integer
description: Move to beginning of track given its number. Must stop first.
seekTrackMillis:
type: integer
description: Move to this number / 1000 raio in track. Must stop first.
seekRecordMillis:
type: integer
description: Move to this number / 1000 raio in full record. Must stop first.

View File

@ -1508,7 +1508,7 @@ paths:
"200":
description: On success return device report
schema:
$ref: "#/definitions/DeviceReport"
$ref: "/doc/swagger/include/DeviceReports.yaml#/DeviceReport"
"400":
description: Invalid device set
schema:
@ -2459,66 +2459,6 @@ definitions:
preset:
$ref: "#/definitions/PresetIdentifier"
DeviceReport:
description: Base device report. Only the device report corresponding to the device specified in the deviceHwType is or should be present.
discriminator: deviceHwType
required:
- deviceHwType
- direction
properties:
deviceHwType:
description: Device hardware type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
airspyReport:
$ref: "/doc/swagger/include/Airspy.yaml#/AirspyReport"
airspyHFReport:
$ref: "/doc/swagger/include/AirspyHF.yaml#/AirspyHFReport"
bladeRF2InputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2InputReport"
bladeRF2OutputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2OutputReport"
fileInputReport:
$ref: "/doc/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
kiwiSDRReport:
$ref: "/doc/swagger/include/KiwiSDR.yaml#/KiwiSDRReport"
limeSdrOutputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrOutputReport"
limeSdrMIMOReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrMIMOReport"
localInputReport:
$ref: "/doc/swagger/include/LocalInput.yaml#/LocalInputReport"
localOutputReport:
$ref: "/doc/swagger/include/LocalOutput.yaml#/LocalOutputReport"
perseusReport:
$ref: "/doc/swagger/include/Perseus.yaml#/PerseusReport"
plutoSdrInputReport:
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrInputReport"
plutoSdrOutputReport:
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
rtlSdrReport:
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
remoteOutputReport:
$ref: "/doc/swagger/include/RemoteOutput.yaml#/RemoteOutputReport"
remoteInputReport:
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputReport"
sdrPlayReport:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlayReport"
soapySDRInputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
soapySDROutputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
xtrxInputReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxInputReport"
xtrxOutputReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxOutputReport"
xtrxMIMOReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxMIMOReport"
ChannelReport:
description: Base channel report. Only the channel report corresponding to the channel specified in the channelType field is or should be present.
discriminator: channelType

View File

@ -3138,6 +3138,9 @@ margin-bottom: 20px;
"sdrPlayActions" : {
"$ref" : "#/definitions/SDRPlayActions"
},
"sigMFFileInputActions" : {
"$ref" : "#/definitions/SigMFFileInputActions"
},
"soapySDRInputActions" : {
"$ref" : "#/definitions/SoapySDRInputActions"
},
@ -3274,6 +3277,9 @@ margin-bottom: 20px;
"sdrPlayReport" : {
"$ref" : "#/definitions/SDRPlayReport"
},
"sigMFFileInputReport" : {
"$ref" : "#/definitions/SigMFFileInputReport"
},
"soapySDRInputReport" : {
"$ref" : "#/definitions/SoapySDRReport"
},
@ -3423,6 +3429,9 @@ margin-bottom: 20px;
"sdrPlaySettings" : {
"$ref" : "#/definitions/SDRPlaySettings"
},
"sigMFFileInputSettings" : {
"$ref" : "#/definitions/SigMFFileInputSettings"
},
"soapySDRInputSettings" : {
"$ref" : "#/definitions/SoapySDRInputSettings"
},
@ -7012,6 +7021,118 @@ margin-bottom: 20px;
}
},
"description" : "Information about a logical device available from an attached hardware device that can be used as a sampling device"
};
defs.SigMFFileInputActions = {
"properties" : {
"playTrack" : {
"type" : "integer",
"description" : "Play IQ stream action\n * 0 - stop playing\n * 1 - start playing current track\n"
},
"playRecord" : {
"type" : "integer",
"description" : "Play IQ stream action\n * 0 - stop playing\n * 1 - start playing\n"
},
"seekTrack" : {
"type" : "integer",
"description" : "Move to beginning of track given its number. Must stop first."
},
"seekTrackMillis" : {
"type" : "integer",
"description" : "Move to this number / 1000 raio in track. Must stop first."
},
"seekRecordMillis" : {
"type" : "integer",
"description" : "Move to this number / 1000 raio in full record. Must stop first."
}
},
"description" : "SigMFFileInput"
};
defs.SigMFFileInputReport = {
"properties" : {
"sampleSize" : {
"type" : "integer",
"description" : "Record sample size in number of bits"
},
"sampleBytes" : {
"type" : "integer",
"description" : "Record sample size in number of bytes"
},
"crcStatus" : {
"type" : "integer",
"description" : "CRC status\n * 0 - no CRC available\n * 1 - CRC (SHA512) OK\n * 2 - CRC (SHA512) KO\n"
},
"totalBytesStatus" : {
"type" : "integer",
"description" : "Total number of bytes in data file vs meta data\n * 0 - mismatch\n * 1 - match\n"
},
"centerFrequency" : {
"type" : "integer",
"description" : "Current track center frequency in Hz"
},
"sampleRate" : {
"type" : "integer",
"description" : "Current track sample rate in S/s"
},
"trackNunber" : {
"type" : "integer",
"description" : "Current track number"
},
"absoluteTime" : {
"type" : "string",
"description" : "Absolute record time string representation"
},
"elapsedRecordTime" : {
"type" : "string",
"description" : "Elapsed record time since beginning string representation"
},
"elapsedTrackime" : {
"type" : "string",
"description" : "Elapsed track time since beginning string representation"
},
"recordDuration" : {
"type" : "string",
"description" : "Record duration time string representation"
},
"trackDuration" : {
"type" : "string",
"description" : "Track duration time string representation"
}
},
"description" : "SigMFFileInput"
};
defs.SigMFFileInputSettings = {
"properties" : {
"fileName" : {
"type" : "string",
"description" : "The name (path) of the file being read without extension"
},
"accelerationFactor" : {
"type" : "integer",
"description" : "Playback acceleration (1 if normal speed)"
},
"trackLoop" : {
"type" : "integer",
"description" : "1 if playing track in a loop else 0"
},
"fullLoop" : {
"type" : "integer",
"description" : "1 if playing full file in a loop else 0"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
}
},
"description" : "SigMFFileInput"
};
defs.SoapySDRFrequencySetting = {
"properties" : {
@ -37245,7 +37366,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-05-10T09:28:39.270+02:00
Generated 2020-06-16T01:37:19.538+02:00
</div>
</div>
</div>

View File

@ -64,6 +64,8 @@ SWGDeviceActions::SWGDeviceActions() {
m_rtl_sdr_actions_isSet = false;
sdr_play_actions = nullptr;
m_sdr_play_actions_isSet = false;
sig_mf_file_input_actions = nullptr;
m_sig_mf_file_input_actions_isSet = false;
soapy_sdr_input_actions = nullptr;
m_soapy_sdr_input_actions_isSet = false;
test_source_actions = nullptr;
@ -114,6 +116,8 @@ SWGDeviceActions::init() {
m_rtl_sdr_actions_isSet = false;
sdr_play_actions = new SWGSDRPlayActions();
m_sdr_play_actions_isSet = false;
sig_mf_file_input_actions = new SWGSigMFFileInputActions();
m_sig_mf_file_input_actions_isSet = false;
soapy_sdr_input_actions = new SWGSoapySDRInputActions();
m_soapy_sdr_input_actions_isSet = false;
test_source_actions = new SWGTestSourceActions();
@ -174,6 +178,9 @@ SWGDeviceActions::cleanup() {
if(sdr_play_actions != nullptr) {
delete sdr_play_actions;
}
if(sig_mf_file_input_actions != nullptr) {
delete sig_mf_file_input_actions;
}
if(soapy_sdr_input_actions != nullptr) {
delete soapy_sdr_input_actions;
}
@ -232,6 +239,8 @@ SWGDeviceActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&sdr_play_actions, pJson["sdrPlayActions"], "SWGSDRPlayActions", "SWGSDRPlayActions");
::SWGSDRangel::setValue(&sig_mf_file_input_actions, pJson["sigMFFileInputActions"], "SWGSigMFFileInputActions", "SWGSigMFFileInputActions");
::SWGSDRangel::setValue(&soapy_sdr_input_actions, pJson["soapySDRInputActions"], "SWGSoapySDRInputActions", "SWGSoapySDRInputActions");
::SWGSDRangel::setValue(&test_source_actions, pJson["testSourceActions"], "SWGTestSourceActions", "SWGTestSourceActions");
@ -308,6 +317,9 @@ SWGDeviceActions::asJsonObject() {
if((sdr_play_actions != nullptr) && (sdr_play_actions->isSet())){
toJsonValue(QString("sdrPlayActions"), sdr_play_actions, obj, QString("SWGSDRPlayActions"));
}
if((sig_mf_file_input_actions != nullptr) && (sig_mf_file_input_actions->isSet())){
toJsonValue(QString("sigMFFileInputActions"), sig_mf_file_input_actions, obj, QString("SWGSigMFFileInputActions"));
}
if((soapy_sdr_input_actions != nullptr) && (soapy_sdr_input_actions->isSet())){
toJsonValue(QString("soapySDRInputActions"), soapy_sdr_input_actions, obj, QString("SWGSoapySDRInputActions"));
}
@ -501,6 +513,16 @@ SWGDeviceActions::setSdrPlayActions(SWGSDRPlayActions* sdr_play_actions) {
this->m_sdr_play_actions_isSet = true;
}
SWGSigMFFileInputActions*
SWGDeviceActions::getSigMfFileInputActions() {
return sig_mf_file_input_actions;
}
void
SWGDeviceActions::setSigMfFileInputActions(SWGSigMFFileInputActions* sig_mf_file_input_actions) {
this->sig_mf_file_input_actions = sig_mf_file_input_actions;
this->m_sig_mf_file_input_actions_isSet = true;
}
SWGSoapySDRInputActions*
SWGDeviceActions::getSoapySdrInputActions() {
return soapy_sdr_input_actions;
@ -590,6 +612,9 @@ SWGDeviceActions::isSet(){
if(sdr_play_actions && sdr_play_actions->isSet()){
isObjectUpdated = true; break;
}
if(sig_mf_file_input_actions && sig_mf_file_input_actions->isSet()){
isObjectUpdated = true; break;
}
if(soapy_sdr_input_actions && soapy_sdr_input_actions->isSet()){
isObjectUpdated = true; break;
}

View File

@ -37,6 +37,7 @@
#include "SWGRemoteInputActions.h"
#include "SWGRtlSdrActions.h"
#include "SWGSDRPlayActions.h"
#include "SWGSigMFFileInputActions.h"
#include "SWGSoapySDRInputActions.h"
#include "SWGTestSourceActions.h"
#include "SWGXtrxInputActions.h"
@ -114,6 +115,9 @@ public:
SWGSDRPlayActions* getSdrPlayActions();
void setSdrPlayActions(SWGSDRPlayActions* sdr_play_actions);
SWGSigMFFileInputActions* getSigMfFileInputActions();
void setSigMfFileInputActions(SWGSigMFFileInputActions* sig_mf_file_input_actions);
SWGSoapySDRInputActions* getSoapySdrInputActions();
void setSoapySdrInputActions(SWGSoapySDRInputActions* soapy_sdr_input_actions);
@ -181,6 +185,9 @@ private:
SWGSDRPlayActions* sdr_play_actions;
bool m_sdr_play_actions_isSet;
SWGSigMFFileInputActions* sig_mf_file_input_actions;
bool m_sig_mf_file_input_actions_isSet;
SWGSoapySDRInputActions* soapy_sdr_input_actions;
bool m_soapy_sdr_input_actions_isSet;

View File

@ -68,6 +68,8 @@ SWGDeviceReport::SWGDeviceReport() {
m_remote_input_report_isSet = false;
sdr_play_report = nullptr;
m_sdr_play_report_isSet = false;
sig_mf_file_input_report = nullptr;
m_sig_mf_file_input_report_isSet = false;
soapy_sdr_input_report = nullptr;
m_soapy_sdr_input_report_isSet = false;
soapy_sdr_output_report = nullptr;
@ -126,6 +128,8 @@ SWGDeviceReport::init() {
m_remote_input_report_isSet = false;
sdr_play_report = new SWGSDRPlayReport();
m_sdr_play_report_isSet = false;
sig_mf_file_input_report = new SWGSigMFFileInputReport();
m_sig_mf_file_input_report_isSet = false;
soapy_sdr_input_report = new SWGSoapySDRReport();
m_soapy_sdr_input_report_isSet = false;
soapy_sdr_output_report = new SWGSoapySDRReport();
@ -198,6 +202,9 @@ SWGDeviceReport::cleanup() {
if(sdr_play_report != nullptr) {
delete sdr_play_report;
}
if(sig_mf_file_input_report != nullptr) {
delete sig_mf_file_input_report;
}
if(soapy_sdr_input_report != nullptr) {
delete soapy_sdr_input_report;
}
@ -266,6 +273,8 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&sdr_play_report, pJson["sdrPlayReport"], "SWGSDRPlayReport", "SWGSDRPlayReport");
::SWGSDRangel::setValue(&sig_mf_file_input_report, pJson["sigMFFileInputReport"], "SWGSigMFFileInputReport", "SWGSigMFFileInputReport");
::SWGSDRangel::setValue(&soapy_sdr_input_report, pJson["soapySDRInputReport"], "SWGSoapySDRReport", "SWGSoapySDRReport");
::SWGSDRangel::setValue(&soapy_sdr_output_report, pJson["soapySDROutputReport"], "SWGSoapySDRReport", "SWGSoapySDRReport");
@ -352,6 +361,9 @@ SWGDeviceReport::asJsonObject() {
if((sdr_play_report != nullptr) && (sdr_play_report->isSet())){
toJsonValue(QString("sdrPlayReport"), sdr_play_report, obj, QString("SWGSDRPlayReport"));
}
if((sig_mf_file_input_report != nullptr) && (sig_mf_file_input_report->isSet())){
toJsonValue(QString("sigMFFileInputReport"), sig_mf_file_input_report, obj, QString("SWGSigMFFileInputReport"));
}
if((soapy_sdr_input_report != nullptr) && (soapy_sdr_input_report->isSet())){
toJsonValue(QString("soapySDRInputReport"), soapy_sdr_input_report, obj, QString("SWGSoapySDRReport"));
}
@ -571,6 +583,16 @@ SWGDeviceReport::setSdrPlayReport(SWGSDRPlayReport* sdr_play_report) {
this->m_sdr_play_report_isSet = true;
}
SWGSigMFFileInputReport*
SWGDeviceReport::getSigMfFileInputReport() {
return sig_mf_file_input_report;
}
void
SWGDeviceReport::setSigMfFileInputReport(SWGSigMFFileInputReport* sig_mf_file_input_report) {
this->sig_mf_file_input_report = sig_mf_file_input_report;
this->m_sig_mf_file_input_report_isSet = true;
}
SWGSoapySDRReport*
SWGDeviceReport::getSoapySdrInputReport() {
return soapy_sdr_input_report;
@ -686,6 +708,9 @@ SWGDeviceReport::isSet(){
if(sdr_play_report && sdr_play_report->isSet()){
isObjectUpdated = true; break;
}
if(sig_mf_file_input_report && sig_mf_file_input_report->isSet()){
isObjectUpdated = true; break;
}
if(soapy_sdr_input_report && soapy_sdr_input_report->isSet()){
isObjectUpdated = true; break;
}

View File

@ -40,6 +40,7 @@
#include "SWGRemoteOutputReport.h"
#include "SWGRtlSdrReport.h"
#include "SWGSDRPlayReport.h"
#include "SWGSigMFFileInputReport.h"
#include "SWGSoapySDRReport.h"
#include "SWGXtrxInputReport.h"
#include "SWGXtrxMIMOReport.h"
@ -124,6 +125,9 @@ public:
SWGSDRPlayReport* getSdrPlayReport();
void setSdrPlayReport(SWGSDRPlayReport* sdr_play_report);
SWGSigMFFileInputReport* getSigMfFileInputReport();
void setSigMfFileInputReport(SWGSigMFFileInputReport* sig_mf_file_input_report);
SWGSoapySDRReport* getSoapySdrInputReport();
void setSoapySdrInputReport(SWGSoapySDRReport* soapy_sdr_input_report);
@ -203,6 +207,9 @@ private:
SWGSDRPlayReport* sdr_play_report;
bool m_sdr_play_report_isSet;
SWGSigMFFileInputReport* sig_mf_file_input_report;
bool m_sig_mf_file_input_report_isSet;
SWGSoapySDRReport* soapy_sdr_input_report;
bool m_soapy_sdr_input_report_isSet;

View File

@ -84,6 +84,8 @@ SWGDeviceSettings::SWGDeviceSettings() {
m_remote_input_settings_isSet = false;
sdr_play_settings = nullptr;
m_sdr_play_settings_isSet = false;
sig_mf_file_input_settings = nullptr;
m_sig_mf_file_input_settings_isSet = false;
soapy_sdr_input_settings = nullptr;
m_soapy_sdr_input_settings_isSet = false;
soapy_sdr_output_settings = nullptr;
@ -164,6 +166,8 @@ SWGDeviceSettings::init() {
m_remote_input_settings_isSet = false;
sdr_play_settings = new SWGSDRPlaySettings();
m_sdr_play_settings_isSet = false;
sig_mf_file_input_settings = new SWGSigMFFileInputSettings();
m_sig_mf_file_input_settings_isSet = false;
soapy_sdr_input_settings = new SWGSoapySDRInputSettings();
m_soapy_sdr_input_settings_isSet = false;
soapy_sdr_output_settings = new SWGSoapySDROutputSettings();
@ -264,6 +268,9 @@ SWGDeviceSettings::cleanup() {
if(sdr_play_settings != nullptr) {
delete sdr_play_settings;
}
if(sig_mf_file_input_settings != nullptr) {
delete sig_mf_file_input_settings;
}
if(soapy_sdr_input_settings != nullptr) {
delete soapy_sdr_input_settings;
}
@ -357,6 +364,8 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&sdr_play_settings, pJson["sdrPlaySettings"], "SWGSDRPlaySettings", "SWGSDRPlaySettings");
::SWGSDRangel::setValue(&sig_mf_file_input_settings, pJson["sigMFFileInputSettings"], "SWGSigMFFileInputSettings", "SWGSigMFFileInputSettings");
::SWGSDRangel::setValue(&soapy_sdr_input_settings, pJson["soapySDRInputSettings"], "SWGSoapySDRInputSettings", "SWGSoapySDRInputSettings");
::SWGSDRangel::setValue(&soapy_sdr_output_settings, pJson["soapySDROutputSettings"], "SWGSoapySDROutputSettings", "SWGSoapySDROutputSettings");
@ -473,6 +482,9 @@ SWGDeviceSettings::asJsonObject() {
if((sdr_play_settings != nullptr) && (sdr_play_settings->isSet())){
toJsonValue(QString("sdrPlaySettings"), sdr_play_settings, obj, QString("SWGSDRPlaySettings"));
}
if((sig_mf_file_input_settings != nullptr) && (sig_mf_file_input_settings->isSet())){
toJsonValue(QString("sigMFFileInputSettings"), sig_mf_file_input_settings, obj, QString("SWGSigMFFileInputSettings"));
}
if((soapy_sdr_input_settings != nullptr) && (soapy_sdr_input_settings->isSet())){
toJsonValue(QString("soapySDRInputSettings"), soapy_sdr_input_settings, obj, QString("SWGSoapySDRInputSettings"));
}
@ -781,6 +793,16 @@ SWGDeviceSettings::setSdrPlaySettings(SWGSDRPlaySettings* sdr_play_settings) {
this->m_sdr_play_settings_isSet = true;
}
SWGSigMFFileInputSettings*
SWGDeviceSettings::getSigMfFileInputSettings() {
return sig_mf_file_input_settings;
}
void
SWGDeviceSettings::setSigMfFileInputSettings(SWGSigMFFileInputSettings* sig_mf_file_input_settings) {
this->sig_mf_file_input_settings = sig_mf_file_input_settings;
this->m_sig_mf_file_input_settings_isSet = true;
}
SWGSoapySDRInputSettings*
SWGDeviceSettings::getSoapySdrInputSettings() {
return soapy_sdr_input_settings;
@ -950,6 +972,9 @@ SWGDeviceSettings::isSet(){
if(sdr_play_settings && sdr_play_settings->isSet()){
isObjectUpdated = true; break;
}
if(sig_mf_file_input_settings && sig_mf_file_input_settings->isSet()){
isObjectUpdated = true; break;
}
if(soapy_sdr_input_settings && soapy_sdr_input_settings->isSet()){
isObjectUpdated = true; break;
}

View File

@ -47,6 +47,7 @@
#include "SWGRemoteOutputSettings.h"
#include "SWGRtlSdrSettings.h"
#include "SWGSDRPlaySettings.h"
#include "SWGSigMFFileInputSettings.h"
#include "SWGSoapySDRInputSettings.h"
#include "SWGSoapySDROutputSettings.h"
#include "SWGTestMISettings.h"
@ -159,6 +160,9 @@ public:
SWGSDRPlaySettings* getSdrPlaySettings();
void setSdrPlaySettings(SWGSDRPlaySettings* sdr_play_settings);
SWGSigMFFileInputSettings* getSigMfFileInputSettings();
void setSigMfFileInputSettings(SWGSigMFFileInputSettings* sig_mf_file_input_settings);
SWGSoapySDRInputSettings* getSoapySdrInputSettings();
void setSoapySdrInputSettings(SWGSoapySDRInputSettings* soapy_sdr_input_settings);
@ -271,6 +275,9 @@ private:
SWGSDRPlaySettings* sdr_play_settings;
bool m_sdr_play_settings_isSet;
SWGSigMFFileInputSettings* sig_mf_file_input_settings;
bool m_sig_mf_file_input_settings_isSet;
SWGSoapySDRInputSettings* soapy_sdr_input_settings;
bool m_soapy_sdr_input_settings_isSet;

View File

@ -174,6 +174,9 @@
#include "SWGSSBModSettings.h"
#include "SWGSampleRate.h"
#include "SWGSamplingDevice.h"
#include "SWGSigMFFileInputActions.h"
#include "SWGSigMFFileInputReport.h"
#include "SWGSigMFFileInputSettings.h"
#include "SWGSoapySDRFrequencySetting.h"
#include "SWGSoapySDRGainSetting.h"
#include "SWGSoapySDRInputActions.h"
@ -689,6 +692,15 @@ namespace SWGSDRangel {
if(QString("SWGSamplingDevice").compare(type) == 0) {
return new SWGSamplingDevice();
}
if(QString("SWGSigMFFileInputActions").compare(type) == 0) {
return new SWGSigMFFileInputActions();
}
if(QString("SWGSigMFFileInputReport").compare(type) == 0) {
return new SWGSigMFFileInputReport();
}
if(QString("SWGSigMFFileInputSettings").compare(type) == 0) {
return new SWGSigMFFileInputSettings();
}
if(QString("SWGSoapySDRFrequencySetting").compare(type) == 0) {
return new SWGSoapySDRFrequencySetting();
}

View File

@ -0,0 +1,200 @@
/**
* 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: 5.6.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 "SWGSigMFFileInputActions.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGSigMFFileInputActions::SWGSigMFFileInputActions(QString* json) {
init();
this->fromJson(*json);
}
SWGSigMFFileInputActions::SWGSigMFFileInputActions() {
play_track = 0;
m_play_track_isSet = false;
play_record = 0;
m_play_record_isSet = false;
seek_track = 0;
m_seek_track_isSet = false;
seek_track_millis = 0;
m_seek_track_millis_isSet = false;
seek_record_millis = 0;
m_seek_record_millis_isSet = false;
}
SWGSigMFFileInputActions::~SWGSigMFFileInputActions() {
this->cleanup();
}
void
SWGSigMFFileInputActions::init() {
play_track = 0;
m_play_track_isSet = false;
play_record = 0;
m_play_record_isSet = false;
seek_track = 0;
m_seek_track_isSet = false;
seek_track_millis = 0;
m_seek_track_millis_isSet = false;
seek_record_millis = 0;
m_seek_record_millis_isSet = false;
}
void
SWGSigMFFileInputActions::cleanup() {
}
SWGSigMFFileInputActions*
SWGSigMFFileInputActions::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGSigMFFileInputActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&play_track, pJson["playTrack"], "qint32", "");
::SWGSDRangel::setValue(&play_record, pJson["playRecord"], "qint32", "");
::SWGSDRangel::setValue(&seek_track, pJson["seekTrack"], "qint32", "");
::SWGSDRangel::setValue(&seek_track_millis, pJson["seekTrackMillis"], "qint32", "");
::SWGSDRangel::setValue(&seek_record_millis, pJson["seekRecordMillis"], "qint32", "");
}
QString
SWGSigMFFileInputActions::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGSigMFFileInputActions::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_play_track_isSet){
obj->insert("playTrack", QJsonValue(play_track));
}
if(m_play_record_isSet){
obj->insert("playRecord", QJsonValue(play_record));
}
if(m_seek_track_isSet){
obj->insert("seekTrack", QJsonValue(seek_track));
}
if(m_seek_track_millis_isSet){
obj->insert("seekTrackMillis", QJsonValue(seek_track_millis));
}
if(m_seek_record_millis_isSet){
obj->insert("seekRecordMillis", QJsonValue(seek_record_millis));
}
return obj;
}
qint32
SWGSigMFFileInputActions::getPlayTrack() {
return play_track;
}
void
SWGSigMFFileInputActions::setPlayTrack(qint32 play_track) {
this->play_track = play_track;
this->m_play_track_isSet = true;
}
qint32
SWGSigMFFileInputActions::getPlayRecord() {
return play_record;
}
void
SWGSigMFFileInputActions::setPlayRecord(qint32 play_record) {
this->play_record = play_record;
this->m_play_record_isSet = true;
}
qint32
SWGSigMFFileInputActions::getSeekTrack() {
return seek_track;
}
void
SWGSigMFFileInputActions::setSeekTrack(qint32 seek_track) {
this->seek_track = seek_track;
this->m_seek_track_isSet = true;
}
qint32
SWGSigMFFileInputActions::getSeekTrackMillis() {
return seek_track_millis;
}
void
SWGSigMFFileInputActions::setSeekTrackMillis(qint32 seek_track_millis) {
this->seek_track_millis = seek_track_millis;
this->m_seek_track_millis_isSet = true;
}
qint32
SWGSigMFFileInputActions::getSeekRecordMillis() {
return seek_record_millis;
}
void
SWGSigMFFileInputActions::setSeekRecordMillis(qint32 seek_record_millis) {
this->seek_record_millis = seek_record_millis;
this->m_seek_record_millis_isSet = true;
}
bool
SWGSigMFFileInputActions::isSet(){
bool isObjectUpdated = false;
do{
if(m_play_track_isSet){
isObjectUpdated = true; break;
}
if(m_play_record_isSet){
isObjectUpdated = true; break;
}
if(m_seek_track_isSet){
isObjectUpdated = true; break;
}
if(m_seek_track_millis_isSet){
isObjectUpdated = true; break;
}
if(m_seek_record_millis_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,82 @@
/**
* 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: 5.6.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.
*/
/*
* SWGSigMFFileInputActions.h
*
* SigMFFileInput
*/
#ifndef SWGSigMFFileInputActions_H_
#define SWGSigMFFileInputActions_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGSigMFFileInputActions: public SWGObject {
public:
SWGSigMFFileInputActions();
SWGSigMFFileInputActions(QString* json);
virtual ~SWGSigMFFileInputActions();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGSigMFFileInputActions* fromJson(QString &jsonString) override;
qint32 getPlayTrack();
void setPlayTrack(qint32 play_track);
qint32 getPlayRecord();
void setPlayRecord(qint32 play_record);
qint32 getSeekTrack();
void setSeekTrack(qint32 seek_track);
qint32 getSeekTrackMillis();
void setSeekTrackMillis(qint32 seek_track_millis);
qint32 getSeekRecordMillis();
void setSeekRecordMillis(qint32 seek_record_millis);
virtual bool isSet() override;
private:
qint32 play_track;
bool m_play_track_isSet;
qint32 play_record;
bool m_play_record_isSet;
qint32 seek_track;
bool m_seek_track_isSet;
qint32 seek_track_millis;
bool m_seek_track_millis_isSet;
qint32 seek_record_millis;
bool m_seek_record_millis_isSet;
};
}
#endif /* SWGSigMFFileInputActions_H_ */

View File

@ -0,0 +1,371 @@
/**
* 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: 5.6.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 "SWGSigMFFileInputReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGSigMFFileInputReport::SWGSigMFFileInputReport(QString* json) {
init();
this->fromJson(*json);
}
SWGSigMFFileInputReport::SWGSigMFFileInputReport() {
sample_size = 0;
m_sample_size_isSet = false;
sample_bytes = 0;
m_sample_bytes_isSet = false;
crc_status = 0;
m_crc_status_isSet = false;
total_bytes_status = 0;
m_total_bytes_status_isSet = false;
center_frequency = 0;
m_center_frequency_isSet = false;
sample_rate = 0;
m_sample_rate_isSet = false;
track_nunber = 0;
m_track_nunber_isSet = false;
absolute_time = nullptr;
m_absolute_time_isSet = false;
elapsed_record_time = nullptr;
m_elapsed_record_time_isSet = false;
elapsed_trackime = nullptr;
m_elapsed_trackime_isSet = false;
record_duration = nullptr;
m_record_duration_isSet = false;
track_duration = nullptr;
m_track_duration_isSet = false;
}
SWGSigMFFileInputReport::~SWGSigMFFileInputReport() {
this->cleanup();
}
void
SWGSigMFFileInputReport::init() {
sample_size = 0;
m_sample_size_isSet = false;
sample_bytes = 0;
m_sample_bytes_isSet = false;
crc_status = 0;
m_crc_status_isSet = false;
total_bytes_status = 0;
m_total_bytes_status_isSet = false;
center_frequency = 0;
m_center_frequency_isSet = false;
sample_rate = 0;
m_sample_rate_isSet = false;
track_nunber = 0;
m_track_nunber_isSet = false;
absolute_time = new QString("");
m_absolute_time_isSet = false;
elapsed_record_time = new QString("");
m_elapsed_record_time_isSet = false;
elapsed_trackime = new QString("");
m_elapsed_trackime_isSet = false;
record_duration = new QString("");
m_record_duration_isSet = false;
track_duration = new QString("");
m_track_duration_isSet = false;
}
void
SWGSigMFFileInputReport::cleanup() {
if(absolute_time != nullptr) {
delete absolute_time;
}
if(elapsed_record_time != nullptr) {
delete elapsed_record_time;
}
if(elapsed_trackime != nullptr) {
delete elapsed_trackime;
}
if(record_duration != nullptr) {
delete record_duration;
}
if(track_duration != nullptr) {
delete track_duration;
}
}
SWGSigMFFileInputReport*
SWGSigMFFileInputReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGSigMFFileInputReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&sample_size, pJson["sampleSize"], "qint32", "");
::SWGSDRangel::setValue(&sample_bytes, pJson["sampleBytes"], "qint32", "");
::SWGSDRangel::setValue(&crc_status, pJson["crcStatus"], "qint32", "");
::SWGSDRangel::setValue(&total_bytes_status, pJson["totalBytesStatus"], "qint32", "");
::SWGSDRangel::setValue(&center_frequency, pJson["centerFrequency"], "qint32", "");
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
::SWGSDRangel::setValue(&track_nunber, pJson["trackNunber"], "qint32", "");
::SWGSDRangel::setValue(&absolute_time, pJson["absoluteTime"], "QString", "QString");
::SWGSDRangel::setValue(&elapsed_record_time, pJson["elapsedRecordTime"], "QString", "QString");
::SWGSDRangel::setValue(&elapsed_trackime, pJson["elapsedTrackime"], "QString", "QString");
::SWGSDRangel::setValue(&record_duration, pJson["recordDuration"], "QString", "QString");
::SWGSDRangel::setValue(&track_duration, pJson["trackDuration"], "QString", "QString");
}
QString
SWGSigMFFileInputReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGSigMFFileInputReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_sample_size_isSet){
obj->insert("sampleSize", QJsonValue(sample_size));
}
if(m_sample_bytes_isSet){
obj->insert("sampleBytes", QJsonValue(sample_bytes));
}
if(m_crc_status_isSet){
obj->insert("crcStatus", QJsonValue(crc_status));
}
if(m_total_bytes_status_isSet){
obj->insert("totalBytesStatus", QJsonValue(total_bytes_status));
}
if(m_center_frequency_isSet){
obj->insert("centerFrequency", QJsonValue(center_frequency));
}
if(m_sample_rate_isSet){
obj->insert("sampleRate", QJsonValue(sample_rate));
}
if(m_track_nunber_isSet){
obj->insert("trackNunber", QJsonValue(track_nunber));
}
if(absolute_time != nullptr && *absolute_time != QString("")){
toJsonValue(QString("absoluteTime"), absolute_time, obj, QString("QString"));
}
if(elapsed_record_time != nullptr && *elapsed_record_time != QString("")){
toJsonValue(QString("elapsedRecordTime"), elapsed_record_time, obj, QString("QString"));
}
if(elapsed_trackime != nullptr && *elapsed_trackime != QString("")){
toJsonValue(QString("elapsedTrackime"), elapsed_trackime, obj, QString("QString"));
}
if(record_duration != nullptr && *record_duration != QString("")){
toJsonValue(QString("recordDuration"), record_duration, obj, QString("QString"));
}
if(track_duration != nullptr && *track_duration != QString("")){
toJsonValue(QString("trackDuration"), track_duration, obj, QString("QString"));
}
return obj;
}
qint32
SWGSigMFFileInputReport::getSampleSize() {
return sample_size;
}
void
SWGSigMFFileInputReport::setSampleSize(qint32 sample_size) {
this->sample_size = sample_size;
this->m_sample_size_isSet = true;
}
qint32
SWGSigMFFileInputReport::getSampleBytes() {
return sample_bytes;
}
void
SWGSigMFFileInputReport::setSampleBytes(qint32 sample_bytes) {
this->sample_bytes = sample_bytes;
this->m_sample_bytes_isSet = true;
}
qint32
SWGSigMFFileInputReport::getCrcStatus() {
return crc_status;
}
void
SWGSigMFFileInputReport::setCrcStatus(qint32 crc_status) {
this->crc_status = crc_status;
this->m_crc_status_isSet = true;
}
qint32
SWGSigMFFileInputReport::getTotalBytesStatus() {
return total_bytes_status;
}
void
SWGSigMFFileInputReport::setTotalBytesStatus(qint32 total_bytes_status) {
this->total_bytes_status = total_bytes_status;
this->m_total_bytes_status_isSet = true;
}
qint32
SWGSigMFFileInputReport::getCenterFrequency() {
return center_frequency;
}
void
SWGSigMFFileInputReport::setCenterFrequency(qint32 center_frequency) {
this->center_frequency = center_frequency;
this->m_center_frequency_isSet = true;
}
qint32
SWGSigMFFileInputReport::getSampleRate() {
return sample_rate;
}
void
SWGSigMFFileInputReport::setSampleRate(qint32 sample_rate) {
this->sample_rate = sample_rate;
this->m_sample_rate_isSet = true;
}
qint32
SWGSigMFFileInputReport::getTrackNunber() {
return track_nunber;
}
void
SWGSigMFFileInputReport::setTrackNunber(qint32 track_nunber) {
this->track_nunber = track_nunber;
this->m_track_nunber_isSet = true;
}
QString*
SWGSigMFFileInputReport::getAbsoluteTime() {
return absolute_time;
}
void
SWGSigMFFileInputReport::setAbsoluteTime(QString* absolute_time) {
this->absolute_time = absolute_time;
this->m_absolute_time_isSet = true;
}
QString*
SWGSigMFFileInputReport::getElapsedRecordTime() {
return elapsed_record_time;
}
void
SWGSigMFFileInputReport::setElapsedRecordTime(QString* elapsed_record_time) {
this->elapsed_record_time = elapsed_record_time;
this->m_elapsed_record_time_isSet = true;
}
QString*
SWGSigMFFileInputReport::getElapsedTrackime() {
return elapsed_trackime;
}
void
SWGSigMFFileInputReport::setElapsedTrackime(QString* elapsed_trackime) {
this->elapsed_trackime = elapsed_trackime;
this->m_elapsed_trackime_isSet = true;
}
QString*
SWGSigMFFileInputReport::getRecordDuration() {
return record_duration;
}
void
SWGSigMFFileInputReport::setRecordDuration(QString* record_duration) {
this->record_duration = record_duration;
this->m_record_duration_isSet = true;
}
QString*
SWGSigMFFileInputReport::getTrackDuration() {
return track_duration;
}
void
SWGSigMFFileInputReport::setTrackDuration(QString* track_duration) {
this->track_duration = track_duration;
this->m_track_duration_isSet = true;
}
bool
SWGSigMFFileInputReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_sample_size_isSet){
isObjectUpdated = true; break;
}
if(m_sample_bytes_isSet){
isObjectUpdated = true; break;
}
if(m_crc_status_isSet){
isObjectUpdated = true; break;
}
if(m_total_bytes_status_isSet){
isObjectUpdated = true; break;
}
if(m_center_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_sample_rate_isSet){
isObjectUpdated = true; break;
}
if(m_track_nunber_isSet){
isObjectUpdated = true; break;
}
if(absolute_time && *absolute_time != QString("")){
isObjectUpdated = true; break;
}
if(elapsed_record_time && *elapsed_record_time != QString("")){
isObjectUpdated = true; break;
}
if(elapsed_trackime && *elapsed_trackime != QString("")){
isObjectUpdated = true; break;
}
if(record_duration && *record_duration != QString("")){
isObjectUpdated = true; break;
}
if(track_duration && *track_duration != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,125 @@
/**
* 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: 5.6.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.
*/
/*
* SWGSigMFFileInputReport.h
*
* SigMFFileInput
*/
#ifndef SWGSigMFFileInputReport_H_
#define SWGSigMFFileInputReport_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGSigMFFileInputReport: public SWGObject {
public:
SWGSigMFFileInputReport();
SWGSigMFFileInputReport(QString* json);
virtual ~SWGSigMFFileInputReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGSigMFFileInputReport* fromJson(QString &jsonString) override;
qint32 getSampleSize();
void setSampleSize(qint32 sample_size);
qint32 getSampleBytes();
void setSampleBytes(qint32 sample_bytes);
qint32 getCrcStatus();
void setCrcStatus(qint32 crc_status);
qint32 getTotalBytesStatus();
void setTotalBytesStatus(qint32 total_bytes_status);
qint32 getCenterFrequency();
void setCenterFrequency(qint32 center_frequency);
qint32 getSampleRate();
void setSampleRate(qint32 sample_rate);
qint32 getTrackNunber();
void setTrackNunber(qint32 track_nunber);
QString* getAbsoluteTime();
void setAbsoluteTime(QString* absolute_time);
QString* getElapsedRecordTime();
void setElapsedRecordTime(QString* elapsed_record_time);
QString* getElapsedTrackime();
void setElapsedTrackime(QString* elapsed_trackime);
QString* getRecordDuration();
void setRecordDuration(QString* record_duration);
QString* getTrackDuration();
void setTrackDuration(QString* track_duration);
virtual bool isSet() override;
private:
qint32 sample_size;
bool m_sample_size_isSet;
qint32 sample_bytes;
bool m_sample_bytes_isSet;
qint32 crc_status;
bool m_crc_status_isSet;
qint32 total_bytes_status;
bool m_total_bytes_status_isSet;
qint32 center_frequency;
bool m_center_frequency_isSet;
qint32 sample_rate;
bool m_sample_rate_isSet;
qint32 track_nunber;
bool m_track_nunber_isSet;
QString* absolute_time;
bool m_absolute_time_isSet;
QString* elapsed_record_time;
bool m_elapsed_record_time_isSet;
QString* elapsed_trackime;
bool m_elapsed_trackime_isSet;
QString* record_duration;
bool m_record_duration_isSet;
QString* track_duration;
bool m_track_duration_isSet;
};
}
#endif /* SWGSigMFFileInputReport_H_ */

View File

@ -0,0 +1,273 @@
/**
* 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: 5.6.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 "SWGSigMFFileInputSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGSigMFFileInputSettings::SWGSigMFFileInputSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGSigMFFileInputSettings::SWGSigMFFileInputSettings() {
file_name = nullptr;
m_file_name_isSet = false;
acceleration_factor = 0;
m_acceleration_factor_isSet = false;
track_loop = 0;
m_track_loop_isSet = false;
full_loop = 0;
m_full_loop_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;
}
SWGSigMFFileInputSettings::~SWGSigMFFileInputSettings() {
this->cleanup();
}
void
SWGSigMFFileInputSettings::init() {
file_name = new QString("");
m_file_name_isSet = false;
acceleration_factor = 0;
m_acceleration_factor_isSet = false;
track_loop = 0;
m_track_loop_isSet = false;
full_loop = 0;
m_full_loop_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;
}
void
SWGSigMFFileInputSettings::cleanup() {
if(file_name != nullptr) {
delete file_name;
}
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
}
SWGSigMFFileInputSettings*
SWGSigMFFileInputSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGSigMFFileInputSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&file_name, pJson["fileName"], "QString", "QString");
::SWGSDRangel::setValue(&acceleration_factor, pJson["accelerationFactor"], "qint32", "");
::SWGSDRangel::setValue(&track_loop, pJson["trackLoop"], "qint32", "");
::SWGSDRangel::setValue(&full_loop, pJson["fullLoop"], "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", "");
}
QString
SWGSigMFFileInputSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGSigMFFileInputSettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(file_name != nullptr && *file_name != QString("")){
toJsonValue(QString("fileName"), file_name, obj, QString("QString"));
}
if(m_acceleration_factor_isSet){
obj->insert("accelerationFactor", QJsonValue(acceleration_factor));
}
if(m_track_loop_isSet){
obj->insert("trackLoop", QJsonValue(track_loop));
}
if(m_full_loop_isSet){
obj->insert("fullLoop", QJsonValue(full_loop));
}
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));
}
return obj;
}
QString*
SWGSigMFFileInputSettings::getFileName() {
return file_name;
}
void
SWGSigMFFileInputSettings::setFileName(QString* file_name) {
this->file_name = file_name;
this->m_file_name_isSet = true;
}
qint32
SWGSigMFFileInputSettings::getAccelerationFactor() {
return acceleration_factor;
}
void
SWGSigMFFileInputSettings::setAccelerationFactor(qint32 acceleration_factor) {
this->acceleration_factor = acceleration_factor;
this->m_acceleration_factor_isSet = true;
}
qint32
SWGSigMFFileInputSettings::getTrackLoop() {
return track_loop;
}
void
SWGSigMFFileInputSettings::setTrackLoop(qint32 track_loop) {
this->track_loop = track_loop;
this->m_track_loop_isSet = true;
}
qint32
SWGSigMFFileInputSettings::getFullLoop() {
return full_loop;
}
void
SWGSigMFFileInputSettings::setFullLoop(qint32 full_loop) {
this->full_loop = full_loop;
this->m_full_loop_isSet = true;
}
qint32
SWGSigMFFileInputSettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGSigMFFileInputSettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGSigMFFileInputSettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGSigMFFileInputSettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGSigMFFileInputSettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGSigMFFileInputSettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGSigMFFileInputSettings::getReverseApiDeviceIndex() {
return reverse_api_device_index;
}
void
SWGSigMFFileInputSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
this->reverse_api_device_index = reverse_api_device_index;
this->m_reverse_api_device_index_isSet = true;
}
bool
SWGSigMFFileInputSettings::isSet(){
bool isObjectUpdated = false;
do{
if(file_name && *file_name != QString("")){
isObjectUpdated = true; break;
}
if(m_acceleration_factor_isSet){
isObjectUpdated = true; break;
}
if(m_track_loop_isSet){
isObjectUpdated = true; break;
}
if(m_full_loop_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;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,101 @@
/**
* 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: 5.6.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.
*/
/*
* SWGSigMFFileInputSettings.h
*
* SigMFFileInput
*/
#ifndef SWGSigMFFileInputSettings_H_
#define SWGSigMFFileInputSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGSigMFFileInputSettings: public SWGObject {
public:
SWGSigMFFileInputSettings();
SWGSigMFFileInputSettings(QString* json);
virtual ~SWGSigMFFileInputSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGSigMFFileInputSettings* fromJson(QString &jsonString) override;
QString* getFileName();
void setFileName(QString* file_name);
qint32 getAccelerationFactor();
void setAccelerationFactor(qint32 acceleration_factor);
qint32 getTrackLoop();
void setTrackLoop(qint32 track_loop);
qint32 getFullLoop();
void setFullLoop(qint32 full_loop);
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);
virtual bool isSet() override;
private:
QString* file_name;
bool m_file_name_isSet;
qint32 acceleration_factor;
bool m_acceleration_factor_isSet;
qint32 track_loop;
bool m_track_loop_isSet;
qint32 full_loop;
bool m_full_loop_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;
};
}
#endif /* SWGSigMFFileInputSettings_H_ */