mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-04 16:01:14 -05:00
Packet demod: change mode processing. API: added report
This commit is contained in:
parent
f5276e8c3e
commit
97583d0858
@ -236,6 +236,9 @@ void PacketDemod::applySettings(const PacketDemodSettings& settings, bool force)
|
|||||||
if ((settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force) {
|
if ((settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force) {
|
||||||
reverseAPIKeys.append("inputFrequencyOffset");
|
reverseAPIKeys.append("inputFrequencyOffset");
|
||||||
}
|
}
|
||||||
|
if ((settings.m_mode != m_settings.m_mode) || force) {
|
||||||
|
reverseAPIKeys.append("mode");
|
||||||
|
}
|
||||||
if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) {
|
if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) {
|
||||||
reverseAPIKeys.append("rfBandwidth");
|
reverseAPIKeys.append("rfBandwidth");
|
||||||
}
|
}
|
||||||
@ -393,6 +396,17 @@ int PacketDemod::webapiSettingsPutPatch(
|
|||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PacketDemod::webapiReportGet(
|
||||||
|
SWGSDRangel::SWGChannelReport& response,
|
||||||
|
QString& errorMessage)
|
||||||
|
{
|
||||||
|
(void) errorMessage;
|
||||||
|
response.setPacketDemodReport(new SWGSDRangel::SWGPacketDemodReport());
|
||||||
|
response.getPacketDemodReport()->init();
|
||||||
|
webapiFormatChannelReport(response);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
void PacketDemod::webapiUpdateChannelSettings(
|
void PacketDemod::webapiUpdateChannelSettings(
|
||||||
PacketDemodSettings& settings,
|
PacketDemodSettings& settings,
|
||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
@ -401,6 +415,9 @@ void PacketDemod::webapiUpdateChannelSettings(
|
|||||||
if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
||||||
settings.m_inputFrequencyOffset = response.getPacketDemodSettings()->getInputFrequencyOffset();
|
settings.m_inputFrequencyOffset = response.getPacketDemodSettings()->getInputFrequencyOffset();
|
||||||
}
|
}
|
||||||
|
if (channelSettingsKeys.contains("mode")) {
|
||||||
|
settings.m_mode = (PacketDemodSettings::Mode) response.getPacketDemodSettings()->getMode();
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("fmDeviation")) {
|
if (channelSettingsKeys.contains("fmDeviation")) {
|
||||||
settings.m_fmDeviation = response.getPacketDemodSettings()->getFmDeviation();
|
settings.m_fmDeviation = response.getPacketDemodSettings()->getFmDeviation();
|
||||||
}
|
}
|
||||||
@ -452,6 +469,7 @@ void PacketDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
|
|||||||
{
|
{
|
||||||
response.getPacketDemodSettings()->setFmDeviation(settings.m_fmDeviation);
|
response.getPacketDemodSettings()->setFmDeviation(settings.m_fmDeviation);
|
||||||
response.getPacketDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
response.getPacketDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||||
|
response.getPacketDemodSettings()->setMode((int) settings.m_mode);
|
||||||
response.getPacketDemodSettings()->setRfBandwidth(settings.m_rfBandwidth);
|
response.getPacketDemodSettings()->setRfBandwidth(settings.m_rfBandwidth);
|
||||||
response.getPacketDemodSettings()->setUdpEnabled(settings.m_udpEnabled);
|
response.getPacketDemodSettings()->setUdpEnabled(settings.m_udpEnabled);
|
||||||
response.getPacketDemodSettings()->setUdpAddress(new QString(settings.m_udpAddress));
|
response.getPacketDemodSettings()->setUdpAddress(new QString(settings.m_udpAddress));
|
||||||
@ -480,6 +498,16 @@ void PacketDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
|
|||||||
response.getPacketDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
response.getPacketDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PacketDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
|
||||||
|
{
|
||||||
|
double magsqAvg, magsqPeak;
|
||||||
|
int nbMagsqSamples;
|
||||||
|
getMagSqLevels(magsqAvg, magsqPeak, nbMagsqSamples);
|
||||||
|
|
||||||
|
response.getPacketDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsqAvg));
|
||||||
|
response.getPacketDemodReport()->setChannelSampleRate(m_basebandSink->getChannelSampleRate());
|
||||||
|
}
|
||||||
|
|
||||||
void PacketDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const PacketDemodSettings& settings, bool force)
|
void PacketDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const PacketDemodSettings& settings, bool force)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||||
@ -527,6 +555,9 @@ void PacketDemod::webapiFormatChannelSettings(
|
|||||||
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
|
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
|
||||||
swgPacketDemodSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
swgPacketDemodSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||||
}
|
}
|
||||||
|
if (channelSettingsKeys.contains("mode") || force) {
|
||||||
|
swgPacketDemodSettings->setMode((int) settings.m_mode);
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("rfBandwidth") || force) {
|
if (channelSettingsKeys.contains("rfBandwidth") || force) {
|
||||||
swgPacketDemodSettings->setRfBandwidth(settings.m_rfBandwidth);
|
swgPacketDemodSettings->setRfBandwidth(settings.m_rfBandwidth);
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,10 @@ public:
|
|||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage);
|
||||||
|
|
||||||
|
virtual int webapiReportGet(
|
||||||
|
SWGSDRangel::SWGChannelReport& response,
|
||||||
|
QString& errorMessage);
|
||||||
|
|
||||||
static void webapiFormatChannelSettings(
|
static void webapiFormatChannelSettings(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
const PacketDemodSettings& settings);
|
const PacketDemodSettings& settings);
|
||||||
@ -150,6 +154,7 @@ private:
|
|||||||
const PacketDemodSettings& settings,
|
const PacketDemodSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
);
|
||||||
|
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply);
|
||||||
|
@ -168,6 +168,11 @@ void PacketDemodBaseband::applySettings(const PacketDemodSettings& settings, boo
|
|||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PacketDemodBaseband::getChannelSampleRate() const
|
||||||
|
{
|
||||||
|
return m_channelizer->getChannelSampleRate();
|
||||||
|
}
|
||||||
|
|
||||||
void PacketDemodBaseband::setBasebandSampleRate(int sampleRate)
|
void PacketDemodBaseband::setBasebandSampleRate(int sampleRate)
|
||||||
{
|
{
|
||||||
m_channelizer->setBasebandSampleRate(sampleRate);
|
m_channelizer->setBasebandSampleRate(sampleRate);
|
||||||
|
@ -71,6 +71,7 @@ public:
|
|||||||
}
|
}
|
||||||
void setMessageQueueToChannel(MessageQueue *messageQueue) { m_sink.setMessageQueueToChannel(messageQueue); }
|
void setMessageQueueToChannel(MessageQueue *messageQueue) { m_sink.setMessageQueueToChannel(messageQueue); }
|
||||||
void setBasebandSampleRate(int sampleRate);
|
void setBasebandSampleRate(int sampleRate);
|
||||||
|
int getChannelSampleRate() const;
|
||||||
void setChannel(ChannelAPI *channel);
|
void setChannel(ChannelAPI *channel);
|
||||||
double getMagSq() const { return m_sink.getMagSq(); }
|
double getMagSq() const { return m_sink.getMagSq(); }
|
||||||
bool isRunning() const { return m_running; }
|
bool isRunning() const { return m_running; }
|
||||||
|
@ -32,7 +32,7 @@ PacketDemodSettings::PacketDemodSettings() :
|
|||||||
void PacketDemodSettings::resetToDefaults()
|
void PacketDemodSettings::resetToDefaults()
|
||||||
{
|
{
|
||||||
m_inputFrequencyOffset = 0;
|
m_inputFrequencyOffset = 0;
|
||||||
m_baud = 1200;
|
m_mode = ModeAFSK1200;
|
||||||
m_rfBandwidth = 12500.0f;
|
m_rfBandwidth = 12500.0f;
|
||||||
m_fmDeviation = 2500.0f;
|
m_fmDeviation = 2500.0f;
|
||||||
m_filterFrom = "";
|
m_filterFrom = "";
|
||||||
@ -171,4 +171,8 @@ bool PacketDemodSettings::deserialize(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PacketDemodSettings::getBaudRate() const
|
||||||
|
{
|
||||||
|
return 1200;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -29,8 +29,12 @@ class Serializable;
|
|||||||
|
|
||||||
struct PacketDemodSettings
|
struct PacketDemodSettings
|
||||||
{
|
{
|
||||||
|
enum Mode {
|
||||||
|
ModeAFSK1200
|
||||||
|
};
|
||||||
|
|
||||||
qint32 m_inputFrequencyOffset;
|
qint32 m_inputFrequencyOffset;
|
||||||
qint32 m_baud;
|
Mode m_mode;
|
||||||
Real m_rfBandwidth;
|
Real m_rfBandwidth;
|
||||||
Real m_fmDeviation;
|
Real m_fmDeviation;
|
||||||
QString m_filterFrom;
|
QString m_filterFrom;
|
||||||
@ -57,13 +61,14 @@ struct PacketDemodSettings
|
|||||||
int m_columnSizes[PACKETDEMOD_COLUMNS]; //!< Size of the columns in the table
|
int m_columnSizes[PACKETDEMOD_COLUMNS]; //!< Size of the columns in the table
|
||||||
|
|
||||||
static const int PACKETDEMOD_CHANNEL_BANDWIDTH = 9600;
|
static const int PACKETDEMOD_CHANNEL_BANDWIDTH = 9600;
|
||||||
static const int PACKETDEMOD_CHANNEL_SAMPLE_RATE = 38400; // Must be integer multiple of m_baud=1200
|
static const int PACKETDEMOD_CHANNEL_SAMPLE_RATE = 38400; // Must be integer multiple of baud rate (x32, x4)
|
||||||
|
|
||||||
PacketDemodSettings();
|
PacketDemodSettings();
|
||||||
void resetToDefaults();
|
void resetToDefaults();
|
||||||
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
||||||
QByteArray serialize() const;
|
QByteArray serialize() const;
|
||||||
bool deserialize(const QByteArray& data);
|
bool deserialize(const QByteArray& data);
|
||||||
|
int getBaudRate() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* INCLUDE_PACKETDEMODSETTINGS_H */
|
#endif /* INCLUDE_PACKETDEMODSETTINGS_H */
|
||||||
|
@ -136,7 +136,7 @@ void PacketDemodSink::processOneSample(Complex &ci)
|
|||||||
// Look for edge
|
// Look for edge
|
||||||
if (sample != m_samplePrev)
|
if (sample != m_samplePrev)
|
||||||
{
|
{
|
||||||
m_syncCount = PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE/m_settings.m_baud/2;
|
m_syncCount = PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE/m_settings.getBaudRate()/2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -197,7 +197,9 @@ void PacketDemodSink::processOneSample(Complex &ci)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
qDebug() << QString("CRC mismatch: %1 %2").arg(calcCrc, 4, 16, QLatin1Char('0')).arg(rxCrc, 4, 16, QLatin1Char('0'));
|
qDebug() << QString("PacketDemodSink::processOneSample: CRC mismatch: %1 %2")
|
||||||
|
.arg(calcCrc, 4, 16, QLatin1Char('0'))
|
||||||
|
.arg(rxCrc, 4, 16, QLatin1Char('0'));
|
||||||
// Reset state to start receiving next packet
|
// Reset state to start receiving next packet
|
||||||
m_gotSOP = false;
|
m_gotSOP = false;
|
||||||
m_bits = 0;
|
m_bits = 0;
|
||||||
@ -235,7 +237,7 @@ void PacketDemodSink::processOneSample(Complex &ci)
|
|||||||
m_bitCount = 0;
|
m_bitCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_syncCount = PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE/m_settings.m_baud;
|
m_syncCount = PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE/m_settings.getBaudRate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_samplePrev = sample;
|
m_samplePrev = sample;
|
||||||
@ -307,7 +309,7 @@ void PacketDemodSink::applySettings(const PacketDemodSettings& settings, bool fo
|
|||||||
delete[] m_f1;
|
delete[] m_f1;
|
||||||
delete[] m_f0;
|
delete[] m_f0;
|
||||||
delete[] m_corrBuf;
|
delete[] m_corrBuf;
|
||||||
m_correlationLength = PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE/settings.m_baud;
|
m_correlationLength = PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE/settings.getBaudRate();
|
||||||
m_f1 = new Complex[m_correlationLength]();
|
m_f1 = new Complex[m_correlationLength]();
|
||||||
m_f0 = new Complex[m_correlationLength]();
|
m_f0 = new Complex[m_correlationLength]();
|
||||||
m_corrBuf = new Complex[m_correlationLength]();
|
m_corrBuf = new Complex[m_correlationLength]();
|
||||||
@ -323,8 +325,8 @@ void PacketDemodSink::applySettings(const PacketDemodSettings& settings, bool fo
|
|||||||
f1 += 2.0f*(Real)M_PI*1200.0f/PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE;
|
f1 += 2.0f*(Real)M_PI*1200.0f/PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lowpassF1.create(301, PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE, settings.m_baud * 1.1f);
|
m_lowpassF1.create(301, PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE, settings.getBaudRate() * 1.1f);
|
||||||
m_lowpassF0.create(301, PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE, settings.m_baud * 1.1f);
|
m_lowpassF0.create(301, PacketDemodSettings::PACKETDEMOD_CHANNEL_SAMPLE_RATE, settings.getBaudRate() * 1.1f);
|
||||||
m_samplePrev = 0;
|
m_samplePrev = 0;
|
||||||
m_syncCount = 0;
|
m_syncCount = 0;
|
||||||
m_symbolPrev = 0;
|
m_symbolPrev = 0;
|
||||||
|
@ -3136,6 +3136,9 @@ margin-bottom: 20px;
|
|||||||
"RemoteSourceReport" : {
|
"RemoteSourceReport" : {
|
||||||
"$ref" : "#/definitions/RemoteSourceReport"
|
"$ref" : "#/definitions/RemoteSourceReport"
|
||||||
},
|
},
|
||||||
|
"PacketDemodReport" : {
|
||||||
|
"$ref" : "#/definitions/PacketDemodReport"
|
||||||
|
},
|
||||||
"PacketModReport" : {
|
"PacketModReport" : {
|
||||||
"$ref" : "#/definitions/PacketModReport"
|
"$ref" : "#/definitions/PacketModReport"
|
||||||
},
|
},
|
||||||
@ -8140,6 +8143,19 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "PER Tester settings"
|
"description" : "PER Tester settings"
|
||||||
|
};
|
||||||
|
defs.PacketDemodReport = {
|
||||||
|
"properties" : {
|
||||||
|
"channelPowerDB" : {
|
||||||
|
"type" : "number",
|
||||||
|
"format" : "float",
|
||||||
|
"description" : "power received in channel (dB)"
|
||||||
|
},
|
||||||
|
"channelSampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "AMDemod"
|
||||||
};
|
};
|
||||||
defs.PacketDemodSettings = {
|
defs.PacketDemodSettings = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -8148,8 +8164,8 @@ margin-bottom: 20px;
|
|||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
},
|
},
|
||||||
"mode" : {
|
"mode" : {
|
||||||
"type" : "string",
|
"type" : "integer",
|
||||||
"description" : "Transmission mode\n * \"1200 AFSK\"\n"
|
"description" : "Transmission mode\n * 0 - 1200 AFSK\n"
|
||||||
},
|
},
|
||||||
"rfBandwidth" : {
|
"rfBandwidth" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -51277,7 +51293,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2021-11-07T12:25:19.263+01:00
|
Generated 2021-11-08T00:48:24.214+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,6 +61,8 @@ ChannelReport:
|
|||||||
$ref: "/doc/swagger/include/RadioClock.yaml#/RadioClockReport"
|
$ref: "/doc/swagger/include/RadioClock.yaml#/RadioClockReport"
|
||||||
RemoteSourceReport:
|
RemoteSourceReport:
|
||||||
$ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
|
$ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
|
||||||
|
PacketDemodReport:
|
||||||
|
$ref: "/doc/swagger/include/PacketDemod.yaml#/PacketDemodReport"
|
||||||
PacketModReport:
|
PacketModReport:
|
||||||
$ref: "/doc/swagger/include/PacketMod.yaml#/PacketModReport"
|
$ref: "/doc/swagger/include/PacketMod.yaml#/PacketModReport"
|
||||||
PagerDemodReport:
|
PagerDemodReport:
|
||||||
|
@ -5,10 +5,10 @@ PacketDemodSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
mode:
|
mode:
|
||||||
type: string
|
type: integer
|
||||||
description: >
|
description: >
|
||||||
Transmission mode
|
Transmission mode
|
||||||
* "1200 AFSK"
|
* 0 - 1200 AFSK
|
||||||
rfBandwidth:
|
rfBandwidth:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
@ -46,3 +46,13 @@ PacketDemodSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
reverseAPIChannelIndex:
|
reverseAPIChannelIndex:
|
||||||
type: integer
|
type: integer
|
||||||
|
|
||||||
|
PacketDemodReport:
|
||||||
|
description: AMDemod
|
||||||
|
properties:
|
||||||
|
channelPowerDB:
|
||||||
|
description: power received in channel (dB)
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
channelSampleRate:
|
||||||
|
type: integer
|
||||||
|
@ -61,6 +61,8 @@ ChannelReport:
|
|||||||
$ref: "http://swgserver:8081/api/swagger/include/RadioClock.yaml#/RadioClockReport"
|
$ref: "http://swgserver:8081/api/swagger/include/RadioClock.yaml#/RadioClockReport"
|
||||||
RemoteSourceReport:
|
RemoteSourceReport:
|
||||||
$ref: "http://swgserver:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
|
$ref: "http://swgserver:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
|
||||||
|
PacketDemodReport:
|
||||||
|
$ref: "http://swgserver:8081/api/swagger/include/PacketDemod.yaml#/PacketDemodReport"
|
||||||
PacketModReport:
|
PacketModReport:
|
||||||
$ref: "http://swgserver:8081/api/swagger/include/PacketMod.yaml#/PacketModReport"
|
$ref: "http://swgserver:8081/api/swagger/include/PacketMod.yaml#/PacketModReport"
|
||||||
PagerDemodReport:
|
PagerDemodReport:
|
||||||
|
@ -5,10 +5,10 @@ PacketDemodSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
mode:
|
mode:
|
||||||
type: string
|
type: integer
|
||||||
description: >
|
description: >
|
||||||
Transmission mode
|
Transmission mode
|
||||||
* "1200 AFSK"
|
* 0 - 1200 AFSK
|
||||||
rfBandwidth:
|
rfBandwidth:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
@ -46,3 +46,13 @@ PacketDemodSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
reverseAPIChannelIndex:
|
reverseAPIChannelIndex:
|
||||||
type: integer
|
type: integer
|
||||||
|
|
||||||
|
PacketDemodReport:
|
||||||
|
description: AMDemod
|
||||||
|
properties:
|
||||||
|
channelPowerDB:
|
||||||
|
description: power received in channel (dB)
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
channelSampleRate:
|
||||||
|
type: integer
|
||||||
|
@ -3136,6 +3136,9 @@ margin-bottom: 20px;
|
|||||||
"RemoteSourceReport" : {
|
"RemoteSourceReport" : {
|
||||||
"$ref" : "#/definitions/RemoteSourceReport"
|
"$ref" : "#/definitions/RemoteSourceReport"
|
||||||
},
|
},
|
||||||
|
"PacketDemodReport" : {
|
||||||
|
"$ref" : "#/definitions/PacketDemodReport"
|
||||||
|
},
|
||||||
"PacketModReport" : {
|
"PacketModReport" : {
|
||||||
"$ref" : "#/definitions/PacketModReport"
|
"$ref" : "#/definitions/PacketModReport"
|
||||||
},
|
},
|
||||||
@ -8140,6 +8143,19 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "PER Tester settings"
|
"description" : "PER Tester settings"
|
||||||
|
};
|
||||||
|
defs.PacketDemodReport = {
|
||||||
|
"properties" : {
|
||||||
|
"channelPowerDB" : {
|
||||||
|
"type" : "number",
|
||||||
|
"format" : "float",
|
||||||
|
"description" : "power received in channel (dB)"
|
||||||
|
},
|
||||||
|
"channelSampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "AMDemod"
|
||||||
};
|
};
|
||||||
defs.PacketDemodSettings = {
|
defs.PacketDemodSettings = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -8148,8 +8164,8 @@ margin-bottom: 20px;
|
|||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
},
|
},
|
||||||
"mode" : {
|
"mode" : {
|
||||||
"type" : "string",
|
"type" : "integer",
|
||||||
"description" : "Transmission mode\n * \"1200 AFSK\"\n"
|
"description" : "Transmission mode\n * 0 - 1200 AFSK\n"
|
||||||
},
|
},
|
||||||
"rfBandwidth" : {
|
"rfBandwidth" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -51277,7 +51293,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2021-11-07T12:25:19.263+01:00
|
Generated 2021-11-08T00:48:24.214+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -82,6 +82,8 @@ SWGChannelReport::SWGChannelReport() {
|
|||||||
m_radio_clock_report_isSet = false;
|
m_radio_clock_report_isSet = false;
|
||||||
remote_source_report = nullptr;
|
remote_source_report = nullptr;
|
||||||
m_remote_source_report_isSet = false;
|
m_remote_source_report_isSet = false;
|
||||||
|
packet_demod_report = nullptr;
|
||||||
|
m_packet_demod_report_isSet = false;
|
||||||
packet_mod_report = nullptr;
|
packet_mod_report = nullptr;
|
||||||
m_packet_mod_report_isSet = false;
|
m_packet_mod_report_isSet = false;
|
||||||
pager_demod_report = nullptr;
|
pager_demod_report = nullptr;
|
||||||
@ -164,6 +166,8 @@ SWGChannelReport::init() {
|
|||||||
m_radio_clock_report_isSet = false;
|
m_radio_clock_report_isSet = false;
|
||||||
remote_source_report = new SWGRemoteSourceReport();
|
remote_source_report = new SWGRemoteSourceReport();
|
||||||
m_remote_source_report_isSet = false;
|
m_remote_source_report_isSet = false;
|
||||||
|
packet_demod_report = new SWGPacketDemodReport();
|
||||||
|
m_packet_demod_report_isSet = false;
|
||||||
packet_mod_report = new SWGPacketModReport();
|
packet_mod_report = new SWGPacketModReport();
|
||||||
m_packet_mod_report_isSet = false;
|
m_packet_mod_report_isSet = false;
|
||||||
pager_demod_report = new SWGPagerDemodReport();
|
pager_demod_report = new SWGPagerDemodReport();
|
||||||
@ -267,6 +271,9 @@ SWGChannelReport::cleanup() {
|
|||||||
if(remote_source_report != nullptr) {
|
if(remote_source_report != nullptr) {
|
||||||
delete remote_source_report;
|
delete remote_source_report;
|
||||||
}
|
}
|
||||||
|
if(packet_demod_report != nullptr) {
|
||||||
|
delete packet_demod_report;
|
||||||
|
}
|
||||||
if(packet_mod_report != nullptr) {
|
if(packet_mod_report != nullptr) {
|
||||||
delete packet_mod_report;
|
delete packet_mod_report;
|
||||||
}
|
}
|
||||||
@ -364,6 +371,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&remote_source_report, pJson["RemoteSourceReport"], "SWGRemoteSourceReport", "SWGRemoteSourceReport");
|
::SWGSDRangel::setValue(&remote_source_report, pJson["RemoteSourceReport"], "SWGRemoteSourceReport", "SWGRemoteSourceReport");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&packet_demod_report, pJson["PacketDemodReport"], "SWGPacketDemodReport", "SWGPacketDemodReport");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&packet_mod_report, pJson["PacketModReport"], "SWGPacketModReport", "SWGPacketModReport");
|
::SWGSDRangel::setValue(&packet_mod_report, pJson["PacketModReport"], "SWGPacketModReport", "SWGPacketModReport");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&pager_demod_report, pJson["PagerDemodReport"], "SWGPagerDemodReport", "SWGPagerDemodReport");
|
::SWGSDRangel::setValue(&pager_demod_report, pJson["PagerDemodReport"], "SWGPagerDemodReport", "SWGPagerDemodReport");
|
||||||
@ -481,6 +490,9 @@ SWGChannelReport::asJsonObject() {
|
|||||||
if((remote_source_report != nullptr) && (remote_source_report->isSet())){
|
if((remote_source_report != nullptr) && (remote_source_report->isSet())){
|
||||||
toJsonValue(QString("RemoteSourceReport"), remote_source_report, obj, QString("SWGRemoteSourceReport"));
|
toJsonValue(QString("RemoteSourceReport"), remote_source_report, obj, QString("SWGRemoteSourceReport"));
|
||||||
}
|
}
|
||||||
|
if((packet_demod_report != nullptr) && (packet_demod_report->isSet())){
|
||||||
|
toJsonValue(QString("PacketDemodReport"), packet_demod_report, obj, QString("SWGPacketDemodReport"));
|
||||||
|
}
|
||||||
if((packet_mod_report != nullptr) && (packet_mod_report->isSet())){
|
if((packet_mod_report != nullptr) && (packet_mod_report->isSet())){
|
||||||
toJsonValue(QString("PacketModReport"), packet_mod_report, obj, QString("SWGPacketModReport"));
|
toJsonValue(QString("PacketModReport"), packet_mod_report, obj, QString("SWGPacketModReport"));
|
||||||
}
|
}
|
||||||
@ -785,6 +797,16 @@ SWGChannelReport::setRemoteSourceReport(SWGRemoteSourceReport* remote_source_rep
|
|||||||
this->m_remote_source_report_isSet = true;
|
this->m_remote_source_report_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWGPacketDemodReport*
|
||||||
|
SWGChannelReport::getPacketDemodReport() {
|
||||||
|
return packet_demod_report;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGChannelReport::setPacketDemodReport(SWGPacketDemodReport* packet_demod_report) {
|
||||||
|
this->packet_demod_report = packet_demod_report;
|
||||||
|
this->m_packet_demod_report_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
SWGPacketModReport*
|
SWGPacketModReport*
|
||||||
SWGChannelReport::getPacketModReport() {
|
SWGChannelReport::getPacketModReport() {
|
||||||
return packet_mod_report;
|
return packet_mod_report;
|
||||||
@ -971,6 +993,9 @@ SWGChannelReport::isSet(){
|
|||||||
if(remote_source_report && remote_source_report->isSet()){
|
if(remote_source_report && remote_source_report->isSet()){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(packet_demod_report && packet_demod_report->isSet()){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(packet_mod_report && packet_mod_report->isSet()){
|
if(packet_mod_report && packet_mod_report->isSet()){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "SWGNFMDemodReport.h"
|
#include "SWGNFMDemodReport.h"
|
||||||
#include "SWGNFMModReport.h"
|
#include "SWGNFMModReport.h"
|
||||||
#include "SWGNoiseFigureReport.h"
|
#include "SWGNoiseFigureReport.h"
|
||||||
|
#include "SWGPacketDemodReport.h"
|
||||||
#include "SWGPacketModReport.h"
|
#include "SWGPacketModReport.h"
|
||||||
#include "SWGPagerDemodReport.h"
|
#include "SWGPagerDemodReport.h"
|
||||||
#include "SWGRadioAstronomyReport.h"
|
#include "SWGRadioAstronomyReport.h"
|
||||||
@ -158,6 +159,9 @@ public:
|
|||||||
SWGRemoteSourceReport* getRemoteSourceReport();
|
SWGRemoteSourceReport* getRemoteSourceReport();
|
||||||
void setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report);
|
void setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report);
|
||||||
|
|
||||||
|
SWGPacketDemodReport* getPacketDemodReport();
|
||||||
|
void setPacketDemodReport(SWGPacketDemodReport* packet_demod_report);
|
||||||
|
|
||||||
SWGPacketModReport* getPacketModReport();
|
SWGPacketModReport* getPacketModReport();
|
||||||
void setPacketModReport(SWGPacketModReport* packet_mod_report);
|
void setPacketModReport(SWGPacketModReport* packet_mod_report);
|
||||||
|
|
||||||
@ -273,6 +277,9 @@ private:
|
|||||||
SWGRemoteSourceReport* remote_source_report;
|
SWGRemoteSourceReport* remote_source_report;
|
||||||
bool m_remote_source_report_isSet;
|
bool m_remote_source_report_isSet;
|
||||||
|
|
||||||
|
SWGPacketDemodReport* packet_demod_report;
|
||||||
|
bool m_packet_demod_report_isSet;
|
||||||
|
|
||||||
SWGPacketModReport* packet_mod_report;
|
SWGPacketModReport* packet_mod_report;
|
||||||
bool m_packet_mod_report_isSet;
|
bool m_packet_mod_report_isSet;
|
||||||
|
|
||||||
|
@ -187,6 +187,7 @@
|
|||||||
#include "SWGPERTesterActions_aos.h"
|
#include "SWGPERTesterActions_aos.h"
|
||||||
#include "SWGPERTesterReport.h"
|
#include "SWGPERTesterReport.h"
|
||||||
#include "SWGPERTesterSettings.h"
|
#include "SWGPERTesterSettings.h"
|
||||||
|
#include "SWGPacketDemodReport.h"
|
||||||
#include "SWGPacketDemodSettings.h"
|
#include "SWGPacketDemodSettings.h"
|
||||||
#include "SWGPacketModActions.h"
|
#include "SWGPacketModActions.h"
|
||||||
#include "SWGPacketModActions_tx.h"
|
#include "SWGPacketModActions_tx.h"
|
||||||
@ -1174,6 +1175,11 @@ namespace SWGSDRangel {
|
|||||||
obj->init();
|
obj->init();
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
if(QString("SWGPacketDemodReport").compare(type) == 0) {
|
||||||
|
SWGPacketDemodReport *obj = new SWGPacketDemodReport();
|
||||||
|
obj->init();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
if(QString("SWGPacketDemodSettings").compare(type) == 0) {
|
if(QString("SWGPacketDemodSettings").compare(type) == 0) {
|
||||||
SWGPacketDemodSettings *obj = new SWGPacketDemodSettings();
|
SWGPacketDemodSettings *obj = new SWGPacketDemodSettings();
|
||||||
obj->init();
|
obj->init();
|
||||||
|
131
swagger/sdrangel/code/qt5/client/SWGPacketDemodReport.cpp
Normal file
131
swagger/sdrangel/code/qt5/client/SWGPacketDemodReport.cpp
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
/**
|
||||||
|
* SDRangel
|
||||||
|
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * 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: 6.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 "SWGPacketDemodReport.h"
|
||||||
|
|
||||||
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
SWGPacketDemodReport::SWGPacketDemodReport(QString* json) {
|
||||||
|
init();
|
||||||
|
this->fromJson(*json);
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGPacketDemodReport::SWGPacketDemodReport() {
|
||||||
|
channel_power_db = 0.0f;
|
||||||
|
m_channel_power_db_isSet = false;
|
||||||
|
channel_sample_rate = 0;
|
||||||
|
m_channel_sample_rate_isSet = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGPacketDemodReport::~SWGPacketDemodReport() {
|
||||||
|
this->cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGPacketDemodReport::init() {
|
||||||
|
channel_power_db = 0.0f;
|
||||||
|
m_channel_power_db_isSet = false;
|
||||||
|
channel_sample_rate = 0;
|
||||||
|
m_channel_sample_rate_isSet = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGPacketDemodReport::cleanup() {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SWGPacketDemodReport*
|
||||||
|
SWGPacketDemodReport::fromJson(QString &json) {
|
||||||
|
QByteArray array (json.toStdString().c_str());
|
||||||
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||||
|
QJsonObject jsonObject = doc.object();
|
||||||
|
this->fromJsonObject(jsonObject);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGPacketDemodReport::fromJsonObject(QJsonObject &pJson) {
|
||||||
|
::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
SWGPacketDemodReport::asJson ()
|
||||||
|
{
|
||||||
|
QJsonObject* obj = this->asJsonObject();
|
||||||
|
|
||||||
|
QJsonDocument doc(*obj);
|
||||||
|
QByteArray bytes = doc.toJson();
|
||||||
|
delete obj;
|
||||||
|
return QString(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
QJsonObject*
|
||||||
|
SWGPacketDemodReport::asJsonObject() {
|
||||||
|
QJsonObject* obj = new QJsonObject();
|
||||||
|
if(m_channel_power_db_isSet){
|
||||||
|
obj->insert("channelPowerDB", QJsonValue(channel_power_db));
|
||||||
|
}
|
||||||
|
if(m_channel_sample_rate_isSet){
|
||||||
|
obj->insert("channelSampleRate", QJsonValue(channel_sample_rate));
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SWGPacketDemodReport::getChannelPowerDb() {
|
||||||
|
return channel_power_db;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGPacketDemodReport::setChannelPowerDb(float channel_power_db) {
|
||||||
|
this->channel_power_db = channel_power_db;
|
||||||
|
this->m_channel_power_db_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGPacketDemodReport::getChannelSampleRate() {
|
||||||
|
return channel_sample_rate;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGPacketDemodReport::setChannelSampleRate(qint32 channel_sample_rate) {
|
||||||
|
this->channel_sample_rate = channel_sample_rate;
|
||||||
|
this->m_channel_sample_rate_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
SWGPacketDemodReport::isSet(){
|
||||||
|
bool isObjectUpdated = false;
|
||||||
|
do{
|
||||||
|
if(m_channel_power_db_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
|
if(m_channel_sample_rate_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
|
}while(false);
|
||||||
|
return isObjectUpdated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
64
swagger/sdrangel/code/qt5/client/SWGPacketDemodReport.h
Normal file
64
swagger/sdrangel/code/qt5/client/SWGPacketDemodReport.h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/**
|
||||||
|
* 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: 6.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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SWGPacketDemodReport.h
|
||||||
|
*
|
||||||
|
* AMDemod
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SWGPacketDemodReport_H_
|
||||||
|
#define SWGPacketDemodReport_H_
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "SWGObject.h"
|
||||||
|
#include "export.h"
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
class SWG_API SWGPacketDemodReport: public SWGObject {
|
||||||
|
public:
|
||||||
|
SWGPacketDemodReport();
|
||||||
|
SWGPacketDemodReport(QString* json);
|
||||||
|
virtual ~SWGPacketDemodReport();
|
||||||
|
void init();
|
||||||
|
void cleanup();
|
||||||
|
|
||||||
|
virtual QString asJson () override;
|
||||||
|
virtual QJsonObject* asJsonObject() override;
|
||||||
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
|
virtual SWGPacketDemodReport* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
|
float getChannelPowerDb();
|
||||||
|
void setChannelPowerDb(float channel_power_db);
|
||||||
|
|
||||||
|
qint32 getChannelSampleRate();
|
||||||
|
void setChannelSampleRate(qint32 channel_sample_rate);
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool isSet() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
float channel_power_db;
|
||||||
|
bool m_channel_power_db_isSet;
|
||||||
|
|
||||||
|
qint32 channel_sample_rate;
|
||||||
|
bool m_channel_sample_rate_isSet;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* SWGPacketDemodReport_H_ */
|
@ -30,7 +30,7 @@ SWGPacketDemodSettings::SWGPacketDemodSettings(QString* json) {
|
|||||||
SWGPacketDemodSettings::SWGPacketDemodSettings() {
|
SWGPacketDemodSettings::SWGPacketDemodSettings() {
|
||||||
input_frequency_offset = 0L;
|
input_frequency_offset = 0L;
|
||||||
m_input_frequency_offset_isSet = false;
|
m_input_frequency_offset_isSet = false;
|
||||||
mode = nullptr;
|
mode = 0;
|
||||||
m_mode_isSet = false;
|
m_mode_isSet = false;
|
||||||
rf_bandwidth = 0.0f;
|
rf_bandwidth = 0.0f;
|
||||||
m_rf_bandwidth_isSet = false;
|
m_rf_bandwidth_isSet = false;
|
||||||
@ -72,7 +72,7 @@ void
|
|||||||
SWGPacketDemodSettings::init() {
|
SWGPacketDemodSettings::init() {
|
||||||
input_frequency_offset = 0L;
|
input_frequency_offset = 0L;
|
||||||
m_input_frequency_offset_isSet = false;
|
m_input_frequency_offset_isSet = false;
|
||||||
mode = new QString("");
|
mode = 0;
|
||||||
m_mode_isSet = false;
|
m_mode_isSet = false;
|
||||||
rf_bandwidth = 0.0f;
|
rf_bandwidth = 0.0f;
|
||||||
m_rf_bandwidth_isSet = false;
|
m_rf_bandwidth_isSet = false;
|
||||||
@ -109,9 +109,7 @@ SWGPacketDemodSettings::init() {
|
|||||||
void
|
void
|
||||||
SWGPacketDemodSettings::cleanup() {
|
SWGPacketDemodSettings::cleanup() {
|
||||||
|
|
||||||
if(mode != nullptr) {
|
|
||||||
delete mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -150,7 +148,7 @@ void
|
|||||||
SWGPacketDemodSettings::fromJsonObject(QJsonObject &pJson) {
|
SWGPacketDemodSettings::fromJsonObject(QJsonObject &pJson) {
|
||||||
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", "");
|
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&mode, pJson["mode"], "QString", "QString");
|
::SWGSDRangel::setValue(&mode, pJson["mode"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
|
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
|
||||||
|
|
||||||
@ -201,8 +199,8 @@ SWGPacketDemodSettings::asJsonObject() {
|
|||||||
if(m_input_frequency_offset_isSet){
|
if(m_input_frequency_offset_isSet){
|
||||||
obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset));
|
obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset));
|
||||||
}
|
}
|
||||||
if(mode != nullptr && *mode != QString("")){
|
if(m_mode_isSet){
|
||||||
toJsonValue(QString("mode"), mode, obj, QString("QString"));
|
obj->insert("mode", QJsonValue(mode));
|
||||||
}
|
}
|
||||||
if(m_rf_bandwidth_isSet){
|
if(m_rf_bandwidth_isSet){
|
||||||
obj->insert("rfBandwidth", QJsonValue(rf_bandwidth));
|
obj->insert("rfBandwidth", QJsonValue(rf_bandwidth));
|
||||||
@ -263,12 +261,12 @@ SWGPacketDemodSettings::setInputFrequencyOffset(qint64 input_frequency_offset) {
|
|||||||
this->m_input_frequency_offset_isSet = true;
|
this->m_input_frequency_offset_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString*
|
qint32
|
||||||
SWGPacketDemodSettings::getMode() {
|
SWGPacketDemodSettings::getMode() {
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGPacketDemodSettings::setMode(QString* mode) {
|
SWGPacketDemodSettings::setMode(qint32 mode) {
|
||||||
this->mode = mode;
|
this->mode = mode;
|
||||||
this->m_mode_isSet = true;
|
this->m_mode_isSet = true;
|
||||||
}
|
}
|
||||||
@ -431,7 +429,7 @@ SWGPacketDemodSettings::isSet(){
|
|||||||
if(m_input_frequency_offset_isSet){
|
if(m_input_frequency_offset_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
if(mode && *mode != QString("")){
|
if(m_mode_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
if(m_rf_bandwidth_isSet){
|
if(m_rf_bandwidth_isSet){
|
||||||
|
@ -45,8 +45,8 @@ public:
|
|||||||
qint64 getInputFrequencyOffset();
|
qint64 getInputFrequencyOffset();
|
||||||
void setInputFrequencyOffset(qint64 input_frequency_offset);
|
void setInputFrequencyOffset(qint64 input_frequency_offset);
|
||||||
|
|
||||||
QString* getMode();
|
qint32 getMode();
|
||||||
void setMode(QString* mode);
|
void setMode(qint32 mode);
|
||||||
|
|
||||||
float getRfBandwidth();
|
float getRfBandwidth();
|
||||||
void setRfBandwidth(float rf_bandwidth);
|
void setRfBandwidth(float rf_bandwidth);
|
||||||
@ -100,7 +100,7 @@ private:
|
|||||||
qint64 input_frequency_offset;
|
qint64 input_frequency_offset;
|
||||||
bool m_input_frequency_offset_isSet;
|
bool m_input_frequency_offset_isSet;
|
||||||
|
|
||||||
QString* mode;
|
qint32 mode;
|
||||||
bool m_mode_isSet;
|
bool m_mode_isSet;
|
||||||
|
|
||||||
float rf_bandwidth;
|
float rf_bandwidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user