mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-23 04:44:53 -04:00
Web API: put some array items in their own classes
This commit is contained in:
parent
9360c4de0b
commit
2184425311
@ -741,11 +741,11 @@ void AirspyInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
|
||||
|
||||
void AirspyInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getAirspyReport()->setSampleRates(new QList<SWGSDRangel::SWGAirspyReport_sampleRates*>);
|
||||
response.getAirspyReport()->setSampleRates(new QList<SWGSDRangel::SWGSampleRate*>);
|
||||
|
||||
for (std::vector<uint32_t>::const_iterator it = getSampleRates().begin(); it != getSampleRates().end(); ++it)
|
||||
{
|
||||
response.getAirspyReport()->getSampleRates()->append(new SWGSDRangel::SWGAirspyReport_sampleRates);
|
||||
response.getAirspyReport()->getSampleRates()->back()->setSampleRate(*it);
|
||||
response.getAirspyReport()->getSampleRates()->append(new SWGSDRangel::SWGSampleRate);
|
||||
response.getAirspyReport()->getSampleRates()->back()->setRate(*it);
|
||||
}
|
||||
}
|
||||
|
@ -565,12 +565,12 @@ void AirspyHFInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
|
||||
void AirspyHFInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getAirspyHfReport()->setSampleRates(new QList<SWGSDRangel::SWGAirspyReport_sampleRates*>);
|
||||
response.getAirspyHfReport()->setSampleRates(new QList<SWGSDRangel::SWGSampleRate*>);
|
||||
|
||||
for (std::vector<uint32_t>::const_iterator it = getSampleRates().begin(); it != getSampleRates().end(); ++it)
|
||||
{
|
||||
response.getAirspyHfReport()->getSampleRates()->append(new SWGSDRangel::SWGAirspyReport_sampleRates);
|
||||
response.getAirspyHfReport()->getSampleRates()->back()->setSampleRate(*it);
|
||||
response.getAirspyHfReport()->getSampleRates()->append(new SWGSDRangel::SWGSampleRate);
|
||||
response.getAirspyHfReport()->getSampleRates()->back()->setRate(*it);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -525,12 +525,12 @@ void PerseusInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
|
||||
|
||||
void PerseusInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getPerseusReport()->setSampleRates(new QList<SWGSDRangel::SWGAirspyReport_sampleRates*>);
|
||||
response.getPerseusReport()->setSampleRates(new QList<SWGSDRangel::SWGSampleRate*>);
|
||||
|
||||
for (std::vector<uint32_t>::const_iterator it = getSampleRates().begin(); it != getSampleRates().end(); ++it)
|
||||
{
|
||||
response.getPerseusReport()->getSampleRates()->append(new SWGSDRangel::SWGAirspyReport_sampleRates);
|
||||
response.getPerseusReport()->getSampleRates()->back()->setSampleRate(*it);
|
||||
response.getPerseusReport()->getSampleRates()->append(new SWGSDRangel::SWGSampleRate);
|
||||
response.getPerseusReport()->getSampleRates()->back()->setRate(*it);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -668,12 +668,12 @@ int RTLSDRInput::webapiReportGet(
|
||||
|
||||
void RTLSDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getRtlSdrReport()->setGains(new QList<SWGSDRangel::SWGRtlSdrReport_gains*>);
|
||||
response.getRtlSdrReport()->setGains(new QList<SWGSDRangel::SWGGain*>);
|
||||
|
||||
for (std::vector<int>::const_iterator it = getGains().begin(); it != getGains().end(); ++it)
|
||||
{
|
||||
response.getRtlSdrReport()->getGains()->append(new SWGSDRangel::SWGRtlSdrReport_gains);
|
||||
response.getRtlSdrReport()->getGains()->back()->setGain(*it);
|
||||
response.getRtlSdrReport()->getGains()->append(new SWGSDRangel::SWGGain);
|
||||
response.getRtlSdrReport()->getGains()->back()->setGainCb(*it);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -662,38 +662,38 @@ int SDRPlayInput::webapiReportGet(
|
||||
|
||||
void SDRPlayInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getSdrPlayReport()->setSampleRates(new QList<SWGSDRangel::SWGAirspyReport_sampleRates*>);
|
||||
response.getSdrPlayReport()->setSampleRates(new QList<SWGSDRangel::SWGSampleRate*>);
|
||||
|
||||
for (unsigned int i = 0; i < SDRPlaySampleRates::getNbRates(); i++)
|
||||
{
|
||||
response.getSdrPlayReport()->getSampleRates()->append(new SWGSDRangel::SWGAirspyReport_sampleRates);
|
||||
response.getSdrPlayReport()->getSampleRates()->back()->setSampleRate(SDRPlaySampleRates::getRate(i));
|
||||
response.getSdrPlayReport()->getSampleRates()->append(new SWGSDRangel::SWGSampleRate);
|
||||
response.getSdrPlayReport()->getSampleRates()->back()->setRate(SDRPlaySampleRates::getRate(i));
|
||||
}
|
||||
|
||||
response.getSdrPlayReport()->setIntermediateFrequencies(new QList<SWGSDRangel::SWGSDRPlayReport_intermediateFrequencies*>);
|
||||
response.getSdrPlayReport()->setIntermediateFrequencies(new QList<SWGSDRangel::SWGFrequency*>);
|
||||
|
||||
for (unsigned int i = 0; i < SDRPlayIF::getNbIFs(); i++)
|
||||
{
|
||||
response.getSdrPlayReport()->getIntermediateFrequencies()->append(new SWGSDRangel::SWGSDRPlayReport_intermediateFrequencies);
|
||||
response.getSdrPlayReport()->getIntermediateFrequencies()->back()->setIntermediateFrequency(SDRPlayIF::getIF(i));
|
||||
response.getSdrPlayReport()->getIntermediateFrequencies()->append(new SWGSDRangel::SWGFrequency);
|
||||
response.getSdrPlayReport()->getIntermediateFrequencies()->back()->setFrequency(SDRPlayIF::getIF(i));
|
||||
}
|
||||
|
||||
response.getSdrPlayReport()->setBandwidths(new QList<SWGSDRangel::SWGSDRPlayReport_bandwidths*>);
|
||||
response.getSdrPlayReport()->setBandwidths(new QList<SWGSDRangel::SWGBandwidth*>);
|
||||
|
||||
for (unsigned int i = 0; i < SDRPlayBandwidths::getNbBandwidths(); i++)
|
||||
{
|
||||
response.getSdrPlayReport()->getBandwidths()->append(new SWGSDRangel::SWGSDRPlayReport_bandwidths);
|
||||
response.getSdrPlayReport()->getBandwidths()->append(new SWGSDRangel::SWGBandwidth);
|
||||
response.getSdrPlayReport()->getBandwidths()->back()->setBandwidth(SDRPlayBandwidths::getBandwidth(i));
|
||||
}
|
||||
|
||||
response.getSdrPlayReport()->setFrequencyBands(new QList<SWGSDRangel::SWGSDRPlayReport_frequencyBands*>);
|
||||
response.getSdrPlayReport()->setFrequencyBands(new QList<SWGSDRangel::SWGFrequencyBand*>);
|
||||
|
||||
for (unsigned int i = 0; i < SDRPlayBands::getNbBands(); i++)
|
||||
{
|
||||
response.getSdrPlayReport()->getFrequencyBands()->append(new SWGSDRangel::SWGSDRPlayReport_frequencyBands);
|
||||
response.getSdrPlayReport()->getFrequencyBands()->back()->setBandName(new QString(SDRPlayBands::getBandName(i)));
|
||||
response.getSdrPlayReport()->getFrequencyBands()->back()->setBandLow(SDRPlayBands::getBandLow(i));
|
||||
response.getSdrPlayReport()->getFrequencyBands()->back()->setBandHigh(SDRPlayBands::getBandHigh(i));
|
||||
response.getSdrPlayReport()->getFrequencyBands()->append(new SWGSDRangel::SWGFrequencyBand);
|
||||
response.getSdrPlayReport()->getFrequencyBands()->back()->setName(new QString(SDRPlayBands::getBandName(i)));
|
||||
response.getSdrPlayReport()->getFrequencyBands()->back()->setLowerBound(SDRPlayBands::getBandLow(i));
|
||||
response.getSdrPlayReport()->getFrequencyBands()->back()->setHigherBound(SDRPlayBands::getBandHigh(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,11 @@
|
||||
<file>webapi/doc/swagger/include/Perseus.yaml</file>
|
||||
<file>webapi/doc/swagger/include/PlutoSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SDRDaemonSource.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SDRPlay.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SSBDemod.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SSBMod.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SSBMod.yaml</file>
|
||||
<file>webapi/doc/swagger/include/Structs.yaml</file>
|
||||
<file>webapi/doc/swagger/include/UDPSink.yaml</file>
|
||||
<file>webapi/doc/swagger/include/UDPSrc.yaml</file>
|
||||
<file>webapi/doc/swagger/include/WFMDemod.yaml</file>
|
||||
|
@ -917,7 +917,7 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -959,19 +959,11 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "Airspy"
|
||||
};
|
||||
defs.AirspyReport_sampleRates = {
|
||||
"properties" : {
|
||||
"sampleRate" : {
|
||||
"type" : "integer",
|
||||
"description" : "sample rate in S/s"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.AirspySettings = {
|
||||
"properties" : {
|
||||
@ -1212,6 +1204,14 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "BFMDemod"
|
||||
};
|
||||
defs.Bandwidth = {
|
||||
"properties" : {
|
||||
"bandwidth" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A bandwidth expressed in Hertz (Hz)"
|
||||
};
|
||||
defs.BladeRFInputSettings = {
|
||||
"properties" : {
|
||||
@ -2037,6 +2037,36 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "FileSource"
|
||||
};
|
||||
defs.Frequency = {
|
||||
"properties" : {
|
||||
"frequency" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A frequency expressed in Hertz (Hz)"
|
||||
};
|
||||
defs.FrequencyBand = {
|
||||
"properties" : {
|
||||
"name" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"lowerBound" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"higherBound" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A band of frequencies given its boudaries in Hertz (Hz)"
|
||||
};
|
||||
defs.Gain = {
|
||||
"properties" : {
|
||||
"gainCB" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A gain expressed in centi-Bels (tenths of dB)"
|
||||
};
|
||||
defs.HackRFInputSettings = {
|
||||
"properties" : {
|
||||
@ -2596,7 +2626,7 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2994,19 +3024,11 @@ margin-bottom: 20px;
|
||||
"gains" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/RtlSdrReport_gains"
|
||||
"$ref" : "#/definitions/Gain"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "RTLSDR"
|
||||
};
|
||||
defs.RtlSdrReport_gains = {
|
||||
"properties" : {
|
||||
"gain" : {
|
||||
"type" : "integer",
|
||||
"description" : "gain in centi Bels"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.RtlSdrSettings = {
|
||||
"properties" : {
|
||||
@ -3065,60 +3087,29 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
},
|
||||
"bandwidths" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport_bandwidths"
|
||||
"$ref" : "#/definitions/Bandwidth"
|
||||
}
|
||||
},
|
||||
"intermediateFrequencies" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport_intermediateFrequencies"
|
||||
"$ref" : "#/definitions/Frequency"
|
||||
}
|
||||
},
|
||||
"frequencyBands" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport_frequencyBands"
|
||||
"$ref" : "#/definitions/FrequencyBand"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "SDRplay1"
|
||||
};
|
||||
defs.SDRPlayReport_bandwidths = {
|
||||
"properties" : {
|
||||
"bandwidth" : {
|
||||
"type" : "integer",
|
||||
"description" : "bandwidth in Hz"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.SDRPlayReport_frequencyBands = {
|
||||
"properties" : {
|
||||
"bandName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"bandLow" : {
|
||||
"type" : "integer",
|
||||
"description" : "lower frequency bound in Hz"
|
||||
},
|
||||
"bandHigh" : {
|
||||
"type" : "integer",
|
||||
"description" : "higher frequency bound in Hz"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.SDRPlayReport_intermediateFrequencies = {
|
||||
"properties" : {
|
||||
"intermediateFrequency" : {
|
||||
"type" : "integer",
|
||||
"description" : "frequency in Hz"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.SDRPlaySettings = {
|
||||
"properties" : {
|
||||
@ -3438,6 +3429,14 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "SSBMod"
|
||||
};
|
||||
defs.SampleRate = {
|
||||
"properties" : {
|
||||
"rate" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A sample rate expressed in samples per second (S/s)"
|
||||
};
|
||||
defs.SamplingDevice = {
|
||||
"required" : [ "bandwidth", "centerFrequency", "hwType", "index", "sequence", "serial", "state", "streamIndex" ],
|
||||
@ -22495,7 +22494,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-05-27T11:38:07.698+02:00
|
||||
Generated 2018-05-27T13:20:33.079+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -46,9 +46,5 @@ AirspyReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/SampleRate"
|
||||
|
@ -26,9 +26,5 @@ AirspyHFReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/SampleRate"
|
||||
|
@ -36,9 +36,5 @@ PerseusReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/SampleRate"
|
||||
|
@ -40,7 +40,4 @@ RtlSdrReport:
|
||||
gains:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
gain:
|
||||
description: gain in centi Bels
|
||||
type: integer
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/Gain"
|
@ -44,34 +44,16 @@ SDRPlayReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/SampleRate"
|
||||
bandwidths:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
bandwidth:
|
||||
description: bandwidth in Hz
|
||||
type: integer
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/Bandwidth"
|
||||
intermediateFrequencies:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
intermediateFrequency:
|
||||
description: frequency in Hz
|
||||
type: integer
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/Frequency"
|
||||
frequencyBands:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
bandName:
|
||||
type: string
|
||||
bandLow:
|
||||
description: lower frequency bound in Hz
|
||||
type: integer
|
||||
bandHigh:
|
||||
description: higher frequency bound in Hz
|
||||
type: integer
|
||||
|
||||
$ref: "/doc/swagger/include/Structs.yaml#/FrequencyBand"
|
||||
|
34
sdrbase/resources/webapi/doc/swagger/include/Structs.yaml
Normal file
34
sdrbase/resources/webapi/doc/swagger/include/Structs.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
SampleRate:
|
||||
description: A sample rate expressed in samples per second (S/s)
|
||||
properties:
|
||||
rate:
|
||||
type: integer
|
||||
|
||||
Bandwidth:
|
||||
description: A bandwidth expressed in Hertz (Hz)
|
||||
properties:
|
||||
bandwidth:
|
||||
type: integer
|
||||
|
||||
Frequency:
|
||||
description: A frequency expressed in Hertz (Hz)
|
||||
properties:
|
||||
frequency:
|
||||
type: integer
|
||||
|
||||
FrequencyBand:
|
||||
description: A band of frequencies given its boudaries in Hertz (Hz)
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
lowerBound:
|
||||
type: integer
|
||||
higherBound:
|
||||
type: integer
|
||||
|
||||
Gain:
|
||||
description: A gain expressed in centi-Bels (tenths of dB)
|
||||
properties:
|
||||
gainCB:
|
||||
type: integer
|
||||
|
@ -46,9 +46,5 @@ AirspyReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/SampleRate"
|
||||
|
@ -26,9 +26,5 @@ AirspyHFReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/SampleRate"
|
||||
|
@ -36,9 +36,5 @@ PerseusReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/SampleRate"
|
||||
|
@ -40,7 +40,4 @@ RtlSdrReport:
|
||||
gains:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
gain:
|
||||
description: gain in centi Bels
|
||||
type: integer
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/Gain"
|
@ -44,34 +44,16 @@ SDRPlayReport:
|
||||
sampleRates:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
sampleRate:
|
||||
description: sample rate in S/s
|
||||
type: integer
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/SampleRate"
|
||||
bandwidths:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
bandwidth:
|
||||
description: bandwidth in Hz
|
||||
type: integer
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/Bandwidth"
|
||||
intermediateFrequencies:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
intermediateFrequency:
|
||||
description: frequency in Hz
|
||||
type: integer
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/Frequency"
|
||||
frequencyBands:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
bandName:
|
||||
type: string
|
||||
bandLow:
|
||||
description: lower frequency bound in Hz
|
||||
type: integer
|
||||
bandHigh:
|
||||
description: higher frequency bound in Hz
|
||||
type: integer
|
||||
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/FrequencyBand"
|
||||
|
34
swagger/sdrangel/api/swagger/include/Structs.yaml
Normal file
34
swagger/sdrangel/api/swagger/include/Structs.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
SampleRate:
|
||||
description: A sample rate expressed in samples per second (S/s)
|
||||
properties:
|
||||
rate:
|
||||
type: integer
|
||||
|
||||
Bandwidth:
|
||||
description: A bandwidth expressed in Hertz (Hz)
|
||||
properties:
|
||||
bandwidth:
|
||||
type: integer
|
||||
|
||||
Frequency:
|
||||
description: A frequency expressed in Hertz (Hz)
|
||||
properties:
|
||||
frequency:
|
||||
type: integer
|
||||
|
||||
FrequencyBand:
|
||||
description: A band of frequencies given its boudaries in Hertz (Hz)
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
lowerBound:
|
||||
type: integer
|
||||
higherBound:
|
||||
type: integer
|
||||
|
||||
Gain:
|
||||
description: A gain expressed in centi-Bels (tenths of dB)
|
||||
properties:
|
||||
gainCB:
|
||||
type: integer
|
||||
|
@ -917,7 +917,7 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -959,19 +959,11 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "Airspy"
|
||||
};
|
||||
defs.AirspyReport_sampleRates = {
|
||||
"properties" : {
|
||||
"sampleRate" : {
|
||||
"type" : "integer",
|
||||
"description" : "sample rate in S/s"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.AirspySettings = {
|
||||
"properties" : {
|
||||
@ -1212,6 +1204,14 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "BFMDemod"
|
||||
};
|
||||
defs.Bandwidth = {
|
||||
"properties" : {
|
||||
"bandwidth" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A bandwidth expressed in Hertz (Hz)"
|
||||
};
|
||||
defs.BladeRFInputSettings = {
|
||||
"properties" : {
|
||||
@ -2037,6 +2037,36 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "FileSource"
|
||||
};
|
||||
defs.Frequency = {
|
||||
"properties" : {
|
||||
"frequency" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A frequency expressed in Hertz (Hz)"
|
||||
};
|
||||
defs.FrequencyBand = {
|
||||
"properties" : {
|
||||
"name" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"lowerBound" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"higherBound" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A band of frequencies given its boudaries in Hertz (Hz)"
|
||||
};
|
||||
defs.Gain = {
|
||||
"properties" : {
|
||||
"gainCB" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A gain expressed in centi-Bels (tenths of dB)"
|
||||
};
|
||||
defs.HackRFInputSettings = {
|
||||
"properties" : {
|
||||
@ -2596,7 +2626,7 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2994,19 +3024,11 @@ margin-bottom: 20px;
|
||||
"gains" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/RtlSdrReport_gains"
|
||||
"$ref" : "#/definitions/Gain"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "RTLSDR"
|
||||
};
|
||||
defs.RtlSdrReport_gains = {
|
||||
"properties" : {
|
||||
"gain" : {
|
||||
"type" : "integer",
|
||||
"description" : "gain in centi Bels"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.RtlSdrSettings = {
|
||||
"properties" : {
|
||||
@ -3065,60 +3087,29 @@ margin-bottom: 20px;
|
||||
"sampleRates" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/AirspyReport_sampleRates"
|
||||
"$ref" : "#/definitions/SampleRate"
|
||||
}
|
||||
},
|
||||
"bandwidths" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport_bandwidths"
|
||||
"$ref" : "#/definitions/Bandwidth"
|
||||
}
|
||||
},
|
||||
"intermediateFrequencies" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport_intermediateFrequencies"
|
||||
"$ref" : "#/definitions/Frequency"
|
||||
}
|
||||
},
|
||||
"frequencyBands" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/SDRPlayReport_frequencyBands"
|
||||
"$ref" : "#/definitions/FrequencyBand"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "SDRplay1"
|
||||
};
|
||||
defs.SDRPlayReport_bandwidths = {
|
||||
"properties" : {
|
||||
"bandwidth" : {
|
||||
"type" : "integer",
|
||||
"description" : "bandwidth in Hz"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.SDRPlayReport_frequencyBands = {
|
||||
"properties" : {
|
||||
"bandName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"bandLow" : {
|
||||
"type" : "integer",
|
||||
"description" : "lower frequency bound in Hz"
|
||||
},
|
||||
"bandHigh" : {
|
||||
"type" : "integer",
|
||||
"description" : "higher frequency bound in Hz"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.SDRPlayReport_intermediateFrequencies = {
|
||||
"properties" : {
|
||||
"intermediateFrequency" : {
|
||||
"type" : "integer",
|
||||
"description" : "frequency in Hz"
|
||||
}
|
||||
}
|
||||
};
|
||||
defs.SDRPlaySettings = {
|
||||
"properties" : {
|
||||
@ -3438,6 +3429,14 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "SSBMod"
|
||||
};
|
||||
defs.SampleRate = {
|
||||
"properties" : {
|
||||
"rate" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "A sample rate expressed in samples per second (S/s)"
|
||||
};
|
||||
defs.SamplingDevice = {
|
||||
"required" : [ "bandwidth", "centerFrequency", "hwType", "index", "sequence", "serial", "state", "streamIndex" ],
|
||||
@ -22495,7 +22494,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-05-27T11:38:07.698+02:00
|
||||
Generated 2018-05-27T13:20:33.079+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,7 +38,7 @@ SWGAirspyHFReport::~SWGAirspyHFReport() {
|
||||
|
||||
void
|
||||
SWGAirspyHFReport::init() {
|
||||
sample_rates = new QList<SWGAirspyReport_sampleRates*>();
|
||||
sample_rates = new QList<SWGSampleRate*>();
|
||||
m_sample_rates_isSet = false;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ SWGAirspyHFReport::fromJson(QString &json) {
|
||||
void
|
||||
SWGAirspyHFReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGAirspyReport_sampleRates");
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGSampleRate");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -83,18 +83,18 @@ QJsonObject*
|
||||
SWGAirspyHFReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(sample_rates->size() > 0){
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGAirspyReport_sampleRates");
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGSampleRate");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>*
|
||||
QList<SWGSampleRate*>*
|
||||
SWGAirspyHFReport::getSampleRates() {
|
||||
return sample_rates;
|
||||
}
|
||||
void
|
||||
SWGAirspyHFReport::setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates) {
|
||||
SWGAirspyHFReport::setSampleRates(QList<SWGSampleRate*>* sample_rates) {
|
||||
this->sample_rates = sample_rates;
|
||||
this->m_sample_rates_isSet = true;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGAirspyReport_sampleRates.h"
|
||||
#include "SWGSampleRate.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
@ -43,14 +43,14 @@ public:
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGAirspyHFReport* fromJson(QString &jsonString) override;
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates);
|
||||
QList<SWGSampleRate*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGSampleRate*>* sample_rates);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QList<SWGAirspyReport_sampleRates*>* sample_rates;
|
||||
QList<SWGSampleRate*>* sample_rates;
|
||||
bool m_sample_rates_isSet;
|
||||
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ SWGAirspyReport::~SWGAirspyReport() {
|
||||
|
||||
void
|
||||
SWGAirspyReport::init() {
|
||||
sample_rates = new QList<SWGAirspyReport_sampleRates*>();
|
||||
sample_rates = new QList<SWGSampleRate*>();
|
||||
m_sample_rates_isSet = false;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ SWGAirspyReport::fromJson(QString &json) {
|
||||
void
|
||||
SWGAirspyReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGAirspyReport_sampleRates");
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGSampleRate");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -83,18 +83,18 @@ QJsonObject*
|
||||
SWGAirspyReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(sample_rates->size() > 0){
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGAirspyReport_sampleRates");
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGSampleRate");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>*
|
||||
QList<SWGSampleRate*>*
|
||||
SWGAirspyReport::getSampleRates() {
|
||||
return sample_rates;
|
||||
}
|
||||
void
|
||||
SWGAirspyReport::setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates) {
|
||||
SWGAirspyReport::setSampleRates(QList<SWGSampleRate*>* sample_rates) {
|
||||
this->sample_rates = sample_rates;
|
||||
this->m_sample_rates_isSet = true;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGAirspyReport_sampleRates.h"
|
||||
#include "SWGSampleRate.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
@ -43,14 +43,14 @@ public:
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGAirspyReport* fromJson(QString &jsonString) override;
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates);
|
||||
QList<SWGSampleRate*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGSampleRate*>* sample_rates);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QList<SWGAirspyReport_sampleRates*>* sample_rates;
|
||||
QList<SWGSampleRate*>* sample_rates;
|
||||
bool m_sample_rates_isSet;
|
||||
|
||||
};
|
||||
|
106
swagger/sdrangel/code/qt5/client/SWGBandwidth.cpp
Normal file
106
swagger/sdrangel/code/qt5/client/SWGBandwidth.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGBandwidth.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGBandwidth::SWGBandwidth(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGBandwidth::SWGBandwidth() {
|
||||
bandwidth = 0;
|
||||
m_bandwidth_isSet = false;
|
||||
}
|
||||
|
||||
SWGBandwidth::~SWGBandwidth() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGBandwidth::init() {
|
||||
bandwidth = 0;
|
||||
m_bandwidth_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGBandwidth::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGBandwidth*
|
||||
SWGBandwidth::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGBandwidth::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&bandwidth, pJson["bandwidth"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGBandwidth::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGBandwidth::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_bandwidth_isSet){
|
||||
obj->insert("bandwidth", QJsonValue(bandwidth));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGBandwidth::getBandwidth() {
|
||||
return bandwidth;
|
||||
}
|
||||
void
|
||||
SWGBandwidth::setBandwidth(qint32 bandwidth) {
|
||||
this->bandwidth = bandwidth;
|
||||
this->m_bandwidth_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGBandwidth::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_bandwidth_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
58
swagger/sdrangel/code/qt5/client/SWGBandwidth.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGBandwidth.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. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGBandwidth.h
|
||||
*
|
||||
* A bandwidth expressed in Hertz (Hz)
|
||||
*/
|
||||
|
||||
#ifndef SWGBandwidth_H_
|
||||
#define SWGBandwidth_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGBandwidth: public SWGObject {
|
||||
public:
|
||||
SWGBandwidth();
|
||||
SWGBandwidth(QString* json);
|
||||
virtual ~SWGBandwidth();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGBandwidth* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getBandwidth();
|
||||
void setBandwidth(qint32 bandwidth);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 bandwidth;
|
||||
bool m_bandwidth_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGBandwidth_H_ */
|
106
swagger/sdrangel/code/qt5/client/SWGFrequency.cpp
Normal file
106
swagger/sdrangel/code/qt5/client/SWGFrequency.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGFrequency.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGFrequency::SWGFrequency(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGFrequency::SWGFrequency() {
|
||||
frequency = 0;
|
||||
m_frequency_isSet = false;
|
||||
}
|
||||
|
||||
SWGFrequency::~SWGFrequency() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGFrequency::init() {
|
||||
frequency = 0;
|
||||
m_frequency_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFrequency::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGFrequency*
|
||||
SWGFrequency::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFrequency::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&frequency, pJson["frequency"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGFrequency::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGFrequency::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_frequency_isSet){
|
||||
obj->insert("frequency", QJsonValue(frequency));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFrequency::getFrequency() {
|
||||
return frequency;
|
||||
}
|
||||
void
|
||||
SWGFrequency::setFrequency(qint32 frequency) {
|
||||
this->frequency = frequency;
|
||||
this->m_frequency_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGFrequency::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_frequency_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
58
swagger/sdrangel/code/qt5/client/SWGFrequency.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGFrequency.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. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGFrequency.h
|
||||
*
|
||||
* A frequency expressed in Hertz (Hz)
|
||||
*/
|
||||
|
||||
#ifndef SWGFrequency_H_
|
||||
#define SWGFrequency_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGFrequency: public SWGObject {
|
||||
public:
|
||||
SWGFrequency();
|
||||
SWGFrequency(QString* json);
|
||||
virtual ~SWGFrequency();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGFrequency* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getFrequency();
|
||||
void setFrequency(qint32 frequency);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 frequency;
|
||||
bool m_frequency_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGFrequency_H_ */
|
150
swagger/sdrangel/code/qt5/client/SWGFrequencyBand.cpp
Normal file
150
swagger/sdrangel/code/qt5/client/SWGFrequencyBand.cpp
Normal file
@ -0,0 +1,150 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGFrequencyBand.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGFrequencyBand::SWGFrequencyBand(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGFrequencyBand::SWGFrequencyBand() {
|
||||
name = nullptr;
|
||||
m_name_isSet = false;
|
||||
lower_bound = 0;
|
||||
m_lower_bound_isSet = false;
|
||||
higher_bound = 0;
|
||||
m_higher_bound_isSet = false;
|
||||
}
|
||||
|
||||
SWGFrequencyBand::~SWGFrequencyBand() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGFrequencyBand::init() {
|
||||
name = new QString("");
|
||||
m_name_isSet = false;
|
||||
lower_bound = 0;
|
||||
m_lower_bound_isSet = false;
|
||||
higher_bound = 0;
|
||||
m_higher_bound_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFrequencyBand::cleanup() {
|
||||
if(name != nullptr) {
|
||||
delete name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGFrequencyBand*
|
||||
SWGFrequencyBand::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGFrequencyBand::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&lower_bound, pJson["lowerBound"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&higher_bound, pJson["higherBound"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGFrequencyBand::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGFrequencyBand::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(name != nullptr && *name != QString("")){
|
||||
toJsonValue(QString("name"), name, obj, QString("QString"));
|
||||
}
|
||||
if(m_lower_bound_isSet){
|
||||
obj->insert("lowerBound", QJsonValue(lower_bound));
|
||||
}
|
||||
if(m_higher_bound_isSet){
|
||||
obj->insert("higherBound", QJsonValue(higher_bound));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGFrequencyBand::getName() {
|
||||
return name;
|
||||
}
|
||||
void
|
||||
SWGFrequencyBand::setName(QString* name) {
|
||||
this->name = name;
|
||||
this->m_name_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFrequencyBand::getLowerBound() {
|
||||
return lower_bound;
|
||||
}
|
||||
void
|
||||
SWGFrequencyBand::setLowerBound(qint32 lower_bound) {
|
||||
this->lower_bound = lower_bound;
|
||||
this->m_lower_bound_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFrequencyBand::getHigherBound() {
|
||||
return higher_bound;
|
||||
}
|
||||
void
|
||||
SWGFrequencyBand::setHigherBound(qint32 higher_bound) {
|
||||
this->higher_bound = higher_bound;
|
||||
this->m_higher_bound_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGFrequencyBand::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(name != nullptr && *name != QString("")){ isObjectUpdated = true; break;}
|
||||
if(m_lower_bound_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_higher_bound_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
71
swagger/sdrangel/code/qt5/client/SWGFrequencyBand.h
Normal file
71
swagger/sdrangel/code/qt5/client/SWGFrequencyBand.h
Normal file
@ -0,0 +1,71 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGFrequencyBand.h
|
||||
*
|
||||
* A band of frequencies given its boudaries in Hertz (Hz)
|
||||
*/
|
||||
|
||||
#ifndef SWGFrequencyBand_H_
|
||||
#define SWGFrequencyBand_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGFrequencyBand: public SWGObject {
|
||||
public:
|
||||
SWGFrequencyBand();
|
||||
SWGFrequencyBand(QString* json);
|
||||
virtual ~SWGFrequencyBand();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGFrequencyBand* fromJson(QString &jsonString) override;
|
||||
|
||||
QString* getName();
|
||||
void setName(QString* name);
|
||||
|
||||
qint32 getLowerBound();
|
||||
void setLowerBound(qint32 lower_bound);
|
||||
|
||||
qint32 getHigherBound();
|
||||
void setHigherBound(qint32 higher_bound);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QString* name;
|
||||
bool m_name_isSet;
|
||||
|
||||
qint32 lower_bound;
|
||||
bool m_lower_bound_isSet;
|
||||
|
||||
qint32 higher_bound;
|
||||
bool m_higher_bound_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGFrequencyBand_H_ */
|
106
swagger/sdrangel/code/qt5/client/SWGGain.cpp
Normal file
106
swagger/sdrangel/code/qt5/client/SWGGain.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGGain.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGGain::SWGGain(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGGain::SWGGain() {
|
||||
gain_cb = 0;
|
||||
m_gain_cb_isSet = false;
|
||||
}
|
||||
|
||||
SWGGain::~SWGGain() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGGain::init() {
|
||||
gain_cb = 0;
|
||||
m_gain_cb_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGGain::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGGain*
|
||||
SWGGain::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGGain::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&gain_cb, pJson["gainCB"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGGain::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGGain::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_gain_cb_isSet){
|
||||
obj->insert("gainCB", QJsonValue(gain_cb));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGGain::getGainCb() {
|
||||
return gain_cb;
|
||||
}
|
||||
void
|
||||
SWGGain::setGainCb(qint32 gain_cb) {
|
||||
this->gain_cb = gain_cb;
|
||||
this->m_gain_cb_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGGain::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_gain_cb_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
58
swagger/sdrangel/code/qt5/client/SWGGain.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGGain.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. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGGain.h
|
||||
*
|
||||
* A gain expressed in centi-Bels (tenths of dB)
|
||||
*/
|
||||
|
||||
#ifndef SWGGain_H_
|
||||
#define SWGGain_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGGain: public SWGObject {
|
||||
public:
|
||||
SWGGain();
|
||||
SWGGain(QString* json);
|
||||
virtual ~SWGGain();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGGain* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getGainCb();
|
||||
void setGainCb(qint32 gain_cb);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 gain_cb;
|
||||
bool m_gain_cb_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGGain_H_ */
|
@ -23,13 +23,13 @@
|
||||
#include "SWGAirspyHFReport.h"
|
||||
#include "SWGAirspyHFSettings.h"
|
||||
#include "SWGAirspyReport.h"
|
||||
#include "SWGAirspyReport_sampleRates.h"
|
||||
#include "SWGAirspySettings.h"
|
||||
#include "SWGAudioDevices.h"
|
||||
#include "SWGAudioInputDevice.h"
|
||||
#include "SWGAudioOutputDevice.h"
|
||||
#include "SWGBFMDemodReport.h"
|
||||
#include "SWGBFMDemodSettings.h"
|
||||
#include "SWGBandwidth.h"
|
||||
#include "SWGBladeRFInputSettings.h"
|
||||
#include "SWGBladeRFOutputSettings.h"
|
||||
#include "SWGCWKeyerSettings.h"
|
||||
@ -53,6 +53,9 @@
|
||||
#include "SWGFCDProSettings.h"
|
||||
#include "SWGFileSourceReport.h"
|
||||
#include "SWGFileSourceSettings.h"
|
||||
#include "SWGFrequency.h"
|
||||
#include "SWGFrequencyBand.h"
|
||||
#include "SWGGain.h"
|
||||
#include "SWGHackRFInputSettings.h"
|
||||
#include "SWGHackRFOutputSettings.h"
|
||||
#include "SWGInstanceChannelsResponse.h"
|
||||
@ -84,12 +87,8 @@
|
||||
#include "SWGRDSReport.h"
|
||||
#include "SWGRDSReport_altFrequencies.h"
|
||||
#include "SWGRtlSdrReport.h"
|
||||
#include "SWGRtlSdrReport_gains.h"
|
||||
#include "SWGRtlSdrSettings.h"
|
||||
#include "SWGSDRPlayReport.h"
|
||||
#include "SWGSDRPlayReport_bandwidths.h"
|
||||
#include "SWGSDRPlayReport_frequencyBands.h"
|
||||
#include "SWGSDRPlayReport_intermediateFrequencies.h"
|
||||
#include "SWGSDRPlaySettings.h"
|
||||
#include "SWGSDRdaemonSourceReport.h"
|
||||
#include "SWGSDRdaemonSourceSettings.h"
|
||||
@ -97,6 +96,7 @@
|
||||
#include "SWGSSBDemodSettings.h"
|
||||
#include "SWGSSBModReport.h"
|
||||
#include "SWGSSBModSettings.h"
|
||||
#include "SWGSampleRate.h"
|
||||
#include "SWGSamplingDevice.h"
|
||||
#include "SWGSuccessResponse.h"
|
||||
#include "SWGUDPSinkReport.h"
|
||||
@ -138,9 +138,6 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGAirspyReport").compare(type) == 0) {
|
||||
return new SWGAirspyReport();
|
||||
}
|
||||
if(QString("SWGAirspyReport_sampleRates").compare(type) == 0) {
|
||||
return new SWGAirspyReport_sampleRates();
|
||||
}
|
||||
if(QString("SWGAirspySettings").compare(type) == 0) {
|
||||
return new SWGAirspySettings();
|
||||
}
|
||||
@ -159,6 +156,9 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGBFMDemodSettings").compare(type) == 0) {
|
||||
return new SWGBFMDemodSettings();
|
||||
}
|
||||
if(QString("SWGBandwidth").compare(type) == 0) {
|
||||
return new SWGBandwidth();
|
||||
}
|
||||
if(QString("SWGBladeRFInputSettings").compare(type) == 0) {
|
||||
return new SWGBladeRFInputSettings();
|
||||
}
|
||||
@ -228,6 +228,15 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGFileSourceSettings").compare(type) == 0) {
|
||||
return new SWGFileSourceSettings();
|
||||
}
|
||||
if(QString("SWGFrequency").compare(type) == 0) {
|
||||
return new SWGFrequency();
|
||||
}
|
||||
if(QString("SWGFrequencyBand").compare(type) == 0) {
|
||||
return new SWGFrequencyBand();
|
||||
}
|
||||
if(QString("SWGGain").compare(type) == 0) {
|
||||
return new SWGGain();
|
||||
}
|
||||
if(QString("SWGHackRFInputSettings").compare(type) == 0) {
|
||||
return new SWGHackRFInputSettings();
|
||||
}
|
||||
@ -321,24 +330,12 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGRtlSdrReport").compare(type) == 0) {
|
||||
return new SWGRtlSdrReport();
|
||||
}
|
||||
if(QString("SWGRtlSdrReport_gains").compare(type) == 0) {
|
||||
return new SWGRtlSdrReport_gains();
|
||||
}
|
||||
if(QString("SWGRtlSdrSettings").compare(type) == 0) {
|
||||
return new SWGRtlSdrSettings();
|
||||
}
|
||||
if(QString("SWGSDRPlayReport").compare(type) == 0) {
|
||||
return new SWGSDRPlayReport();
|
||||
}
|
||||
if(QString("SWGSDRPlayReport_bandwidths").compare(type) == 0) {
|
||||
return new SWGSDRPlayReport_bandwidths();
|
||||
}
|
||||
if(QString("SWGSDRPlayReport_frequencyBands").compare(type) == 0) {
|
||||
return new SWGSDRPlayReport_frequencyBands();
|
||||
}
|
||||
if(QString("SWGSDRPlayReport_intermediateFrequencies").compare(type) == 0) {
|
||||
return new SWGSDRPlayReport_intermediateFrequencies();
|
||||
}
|
||||
if(QString("SWGSDRPlaySettings").compare(type) == 0) {
|
||||
return new SWGSDRPlaySettings();
|
||||
}
|
||||
@ -360,6 +357,9 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGSSBModSettings").compare(type) == 0) {
|
||||
return new SWGSSBModSettings();
|
||||
}
|
||||
if(QString("SWGSampleRate").compare(type) == 0) {
|
||||
return new SWGSampleRate();
|
||||
}
|
||||
if(QString("SWGSamplingDevice").compare(type) == 0) {
|
||||
return new SWGSamplingDevice();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ SWGPerseusReport::~SWGPerseusReport() {
|
||||
|
||||
void
|
||||
SWGPerseusReport::init() {
|
||||
sample_rates = new QList<SWGAirspyReport_sampleRates*>();
|
||||
sample_rates = new QList<SWGSampleRate*>();
|
||||
m_sample_rates_isSet = false;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ SWGPerseusReport::fromJson(QString &json) {
|
||||
void
|
||||
SWGPerseusReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGAirspyReport_sampleRates");
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGSampleRate");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -83,18 +83,18 @@ QJsonObject*
|
||||
SWGPerseusReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(sample_rates->size() > 0){
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGAirspyReport_sampleRates");
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGSampleRate");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>*
|
||||
QList<SWGSampleRate*>*
|
||||
SWGPerseusReport::getSampleRates() {
|
||||
return sample_rates;
|
||||
}
|
||||
void
|
||||
SWGPerseusReport::setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates) {
|
||||
SWGPerseusReport::setSampleRates(QList<SWGSampleRate*>* sample_rates) {
|
||||
this->sample_rates = sample_rates;
|
||||
this->m_sample_rates_isSet = true;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGAirspyReport_sampleRates.h"
|
||||
#include "SWGSampleRate.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
@ -43,14 +43,14 @@ public:
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGPerseusReport* fromJson(QString &jsonString) override;
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates);
|
||||
QList<SWGSampleRate*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGSampleRate*>* sample_rates);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QList<SWGAirspyReport_sampleRates*>* sample_rates;
|
||||
QList<SWGSampleRate*>* sample_rates;
|
||||
bool m_sample_rates_isSet;
|
||||
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ SWGRtlSdrReport::~SWGRtlSdrReport() {
|
||||
|
||||
void
|
||||
SWGRtlSdrReport::init() {
|
||||
gains = new QList<SWGRtlSdrReport_gains*>();
|
||||
gains = new QList<SWGGain*>();
|
||||
m_gains_isSet = false;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ SWGRtlSdrReport::fromJson(QString &json) {
|
||||
void
|
||||
SWGRtlSdrReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&gains, pJson["gains"], "QList", "SWGRtlSdrReport_gains");
|
||||
::SWGSDRangel::setValue(&gains, pJson["gains"], "QList", "SWGGain");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -83,18 +83,18 @@ QJsonObject*
|
||||
SWGRtlSdrReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(gains->size() > 0){
|
||||
toJsonArray((QList<void*>*)gains, obj, "gains", "SWGRtlSdrReport_gains");
|
||||
toJsonArray((QList<void*>*)gains, obj, "gains", "SWGGain");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QList<SWGRtlSdrReport_gains*>*
|
||||
QList<SWGGain*>*
|
||||
SWGRtlSdrReport::getGains() {
|
||||
return gains;
|
||||
}
|
||||
void
|
||||
SWGRtlSdrReport::setGains(QList<SWGRtlSdrReport_gains*>* gains) {
|
||||
SWGRtlSdrReport::setGains(QList<SWGGain*>* gains) {
|
||||
this->gains = gains;
|
||||
this->m_gains_isSet = true;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGRtlSdrReport_gains.h"
|
||||
#include "SWGGain.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
@ -43,14 +43,14 @@ public:
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGRtlSdrReport* fromJson(QString &jsonString) override;
|
||||
|
||||
QList<SWGRtlSdrReport_gains*>* getGains();
|
||||
void setGains(QList<SWGRtlSdrReport_gains*>* gains);
|
||||
QList<SWGGain*>* getGains();
|
||||
void setGains(QList<SWGGain*>* gains);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QList<SWGRtlSdrReport_gains*>* gains;
|
||||
QList<SWGGain*>* gains;
|
||||
bool m_gains_isSet;
|
||||
|
||||
};
|
||||
|
@ -44,13 +44,13 @@ SWGSDRPlayReport::~SWGSDRPlayReport() {
|
||||
|
||||
void
|
||||
SWGSDRPlayReport::init() {
|
||||
sample_rates = new QList<SWGAirspyReport_sampleRates*>();
|
||||
sample_rates = new QList<SWGSampleRate*>();
|
||||
m_sample_rates_isSet = false;
|
||||
bandwidths = new QList<SWGSDRPlayReport_bandwidths*>();
|
||||
bandwidths = new QList<SWGBandwidth*>();
|
||||
m_bandwidths_isSet = false;
|
||||
intermediate_frequencies = new QList<SWGSDRPlayReport_intermediateFrequencies*>();
|
||||
intermediate_frequencies = new QList<SWGFrequency*>();
|
||||
m_intermediate_frequencies_isSet = false;
|
||||
frequency_bands = new QList<SWGSDRPlayReport_frequencyBands*>();
|
||||
frequency_bands = new QList<SWGFrequencyBand*>();
|
||||
m_frequency_bands_isSet = false;
|
||||
}
|
||||
|
||||
@ -98,13 +98,13 @@ SWGSDRPlayReport::fromJson(QString &json) {
|
||||
void
|
||||
SWGSDRPlayReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGAirspyReport_sampleRates");
|
||||
::SWGSDRangel::setValue(&sample_rates, pJson["sampleRates"], "QList", "SWGSampleRate");
|
||||
|
||||
::SWGSDRangel::setValue(&bandwidths, pJson["bandwidths"], "QList", "SWGSDRPlayReport_bandwidths");
|
||||
::SWGSDRangel::setValue(&bandwidths, pJson["bandwidths"], "QList", "SWGBandwidth");
|
||||
|
||||
::SWGSDRangel::setValue(&intermediate_frequencies, pJson["intermediateFrequencies"], "QList", "SWGSDRPlayReport_intermediateFrequencies");
|
||||
::SWGSDRangel::setValue(&intermediate_frequencies, pJson["intermediateFrequencies"], "QList", "SWGFrequency");
|
||||
|
||||
::SWGSDRangel::setValue(&frequency_bands, pJson["frequencyBands"], "QList", "SWGSDRPlayReport_frequencyBands");
|
||||
::SWGSDRangel::setValue(&frequency_bands, pJson["frequencyBands"], "QList", "SWGFrequencyBand");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -122,57 +122,57 @@ QJsonObject*
|
||||
SWGSDRPlayReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(sample_rates->size() > 0){
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGAirspyReport_sampleRates");
|
||||
toJsonArray((QList<void*>*)sample_rates, obj, "sampleRates", "SWGSampleRate");
|
||||
}
|
||||
if(bandwidths->size() > 0){
|
||||
toJsonArray((QList<void*>*)bandwidths, obj, "bandwidths", "SWGSDRPlayReport_bandwidths");
|
||||
toJsonArray((QList<void*>*)bandwidths, obj, "bandwidths", "SWGBandwidth");
|
||||
}
|
||||
if(intermediate_frequencies->size() > 0){
|
||||
toJsonArray((QList<void*>*)intermediate_frequencies, obj, "intermediateFrequencies", "SWGSDRPlayReport_intermediateFrequencies");
|
||||
toJsonArray((QList<void*>*)intermediate_frequencies, obj, "intermediateFrequencies", "SWGFrequency");
|
||||
}
|
||||
if(frequency_bands->size() > 0){
|
||||
toJsonArray((QList<void*>*)frequency_bands, obj, "frequencyBands", "SWGSDRPlayReport_frequencyBands");
|
||||
toJsonArray((QList<void*>*)frequency_bands, obj, "frequencyBands", "SWGFrequencyBand");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>*
|
||||
QList<SWGSampleRate*>*
|
||||
SWGSDRPlayReport::getSampleRates() {
|
||||
return sample_rates;
|
||||
}
|
||||
void
|
||||
SWGSDRPlayReport::setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates) {
|
||||
SWGSDRPlayReport::setSampleRates(QList<SWGSampleRate*>* sample_rates) {
|
||||
this->sample_rates = sample_rates;
|
||||
this->m_sample_rates_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGSDRPlayReport_bandwidths*>*
|
||||
QList<SWGBandwidth*>*
|
||||
SWGSDRPlayReport::getBandwidths() {
|
||||
return bandwidths;
|
||||
}
|
||||
void
|
||||
SWGSDRPlayReport::setBandwidths(QList<SWGSDRPlayReport_bandwidths*>* bandwidths) {
|
||||
SWGSDRPlayReport::setBandwidths(QList<SWGBandwidth*>* bandwidths) {
|
||||
this->bandwidths = bandwidths;
|
||||
this->m_bandwidths_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGSDRPlayReport_intermediateFrequencies*>*
|
||||
QList<SWGFrequency*>*
|
||||
SWGSDRPlayReport::getIntermediateFrequencies() {
|
||||
return intermediate_frequencies;
|
||||
}
|
||||
void
|
||||
SWGSDRPlayReport::setIntermediateFrequencies(QList<SWGSDRPlayReport_intermediateFrequencies*>* intermediate_frequencies) {
|
||||
SWGSDRPlayReport::setIntermediateFrequencies(QList<SWGFrequency*>* intermediate_frequencies) {
|
||||
this->intermediate_frequencies = intermediate_frequencies;
|
||||
this->m_intermediate_frequencies_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGSDRPlayReport_frequencyBands*>*
|
||||
QList<SWGFrequencyBand*>*
|
||||
SWGSDRPlayReport::getFrequencyBands() {
|
||||
return frequency_bands;
|
||||
}
|
||||
void
|
||||
SWGSDRPlayReport::setFrequencyBands(QList<SWGSDRPlayReport_frequencyBands*>* frequency_bands) {
|
||||
SWGSDRPlayReport::setFrequencyBands(QList<SWGFrequencyBand*>* frequency_bands) {
|
||||
this->frequency_bands = frequency_bands;
|
||||
this->m_frequency_bands_isSet = true;
|
||||
}
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGAirspyReport_sampleRates.h"
|
||||
#include "SWGSDRPlayReport_bandwidths.h"
|
||||
#include "SWGSDRPlayReport_frequencyBands.h"
|
||||
#include "SWGSDRPlayReport_intermediateFrequencies.h"
|
||||
#include "SWGBandwidth.h"
|
||||
#include "SWGFrequency.h"
|
||||
#include "SWGFrequencyBand.h"
|
||||
#include "SWGSampleRate.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
@ -46,32 +46,32 @@ public:
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSDRPlayReport* fromJson(QString &jsonString) override;
|
||||
|
||||
QList<SWGAirspyReport_sampleRates*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGAirspyReport_sampleRates*>* sample_rates);
|
||||
QList<SWGSampleRate*>* getSampleRates();
|
||||
void setSampleRates(QList<SWGSampleRate*>* sample_rates);
|
||||
|
||||
QList<SWGSDRPlayReport_bandwidths*>* getBandwidths();
|
||||
void setBandwidths(QList<SWGSDRPlayReport_bandwidths*>* bandwidths);
|
||||
QList<SWGBandwidth*>* getBandwidths();
|
||||
void setBandwidths(QList<SWGBandwidth*>* bandwidths);
|
||||
|
||||
QList<SWGSDRPlayReport_intermediateFrequencies*>* getIntermediateFrequencies();
|
||||
void setIntermediateFrequencies(QList<SWGSDRPlayReport_intermediateFrequencies*>* intermediate_frequencies);
|
||||
QList<SWGFrequency*>* getIntermediateFrequencies();
|
||||
void setIntermediateFrequencies(QList<SWGFrequency*>* intermediate_frequencies);
|
||||
|
||||
QList<SWGSDRPlayReport_frequencyBands*>* getFrequencyBands();
|
||||
void setFrequencyBands(QList<SWGSDRPlayReport_frequencyBands*>* frequency_bands);
|
||||
QList<SWGFrequencyBand*>* getFrequencyBands();
|
||||
void setFrequencyBands(QList<SWGFrequencyBand*>* frequency_bands);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QList<SWGAirspyReport_sampleRates*>* sample_rates;
|
||||
QList<SWGSampleRate*>* sample_rates;
|
||||
bool m_sample_rates_isSet;
|
||||
|
||||
QList<SWGSDRPlayReport_bandwidths*>* bandwidths;
|
||||
QList<SWGBandwidth*>* bandwidths;
|
||||
bool m_bandwidths_isSet;
|
||||
|
||||
QList<SWGSDRPlayReport_intermediateFrequencies*>* intermediate_frequencies;
|
||||
QList<SWGFrequency*>* intermediate_frequencies;
|
||||
bool m_intermediate_frequencies_isSet;
|
||||
|
||||
QList<SWGSDRPlayReport_frequencyBands*>* frequency_bands;
|
||||
QList<SWGFrequencyBand*>* frequency_bands;
|
||||
bool m_frequency_bands_isSet;
|
||||
|
||||
};
|
||||
|
106
swagger/sdrangel/code/qt5/client/SWGSampleRate.cpp
Normal file
106
swagger/sdrangel/code/qt5/client/SWGSampleRate.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGSampleRate.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGSampleRate::SWGSampleRate(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGSampleRate::SWGSampleRate() {
|
||||
rate = 0;
|
||||
m_rate_isSet = false;
|
||||
}
|
||||
|
||||
SWGSampleRate::~SWGSampleRate() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGSampleRate::init() {
|
||||
rate = 0;
|
||||
m_rate_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSampleRate::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGSampleRate*
|
||||
SWGSampleRate::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSampleRate::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&rate, pJson["rate"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGSampleRate::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGSampleRate::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_rate_isSet){
|
||||
obj->insert("rate", QJsonValue(rate));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSampleRate::getRate() {
|
||||
return rate;
|
||||
}
|
||||
void
|
||||
SWGSampleRate::setRate(qint32 rate) {
|
||||
this->rate = rate;
|
||||
this->m_rate_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGSampleRate::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_rate_isSet){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
58
swagger/sdrangel/code/qt5/client/SWGSampleRate.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGSampleRate.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. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 ---
|
||||
*
|
||||
* OpenAPI spec version: 4.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGSampleRate.h
|
||||
*
|
||||
* A sample rate expressed in samples per second (S/s)
|
||||
*/
|
||||
|
||||
#ifndef SWGSampleRate_H_
|
||||
#define SWGSampleRate_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGSampleRate: public SWGObject {
|
||||
public:
|
||||
SWGSampleRate();
|
||||
SWGSampleRate(QString* json);
|
||||
virtual ~SWGSampleRate();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSampleRate* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getRate();
|
||||
void setRate(qint32 rate);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 rate;
|
||||
bool m_rate_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGSampleRate_H_ */
|
Loading…
Reference in New Issue
Block a user