1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 05:41:56 -05:00

REST API: Channel Analyzer settings (1)

This commit is contained in:
f4exb 2019-08-08 18:42:17 +02:00
parent 524326de6d
commit 3ecb73e36e
17 changed files with 296 additions and 38 deletions

View File

@ -5,7 +5,7 @@ set(chanalyzer_SOURCES
chanalyzergui.cpp
chanalyzerplugin.cpp
chanalyzersettings.cpp
chanalyzerwebapiadapter.cpp
chanalyzergui.ui
)
@ -14,6 +14,11 @@ set(chanalyzer_HEADERS
chanalyzergui.h
chanalyzerplugin.h
chanalyzersettings.h
chanalyzerwebapiadapter.h
)
include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
)
include_directories(
@ -25,8 +30,8 @@ add_library(chanalyzer SHARED
)
target_link_libraries(chanalyzer
Qt5::Core
Qt5::Widgets
Qt5::Core
Qt5::Widgets
sdrbase
sdrgui
)

View File

@ -21,10 +21,11 @@
#include "chanalyzer.h"
#include "chanalyzerplugin.h"
#include "chanalyzergui.h"
#include "chanalyzerwebapiadapter.h"
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
QString("Channel Analyzer"),
QString("4.5.1"),
QString("4.11.6"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -65,3 +66,7 @@ ChannelAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
return new ChannelAnalyzer(deviceAPI);
}
ChannelWebAPIAdapter* ChannelAnalyzerPlugin::createChannelWebAPIAdapter() const
{
return new ChannelAnalyzerWebAPIAdapter();
}

View File

@ -39,6 +39,7 @@ public:
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const;
virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const;
virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const;
virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const;
private:
static const PluginDescriptor m_pluginDescriptor;

View File

@ -15,6 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QString>
#include "SWGChannelSettings.h"
#include "chanalyzerwebapiadapter.h"
@ -27,6 +29,17 @@ ChannelAnalyzerWebAPIAdapter::ChannelAnalyzerWebAPIAdapter()
ChannelAnalyzerWebAPIAdapter::~ChannelAnalyzerWebAPIAdapter()
{}
int ChannelAnalyzerWebAPIAdapter::webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage)
{
(void) errorMessage;
response.setChannelAnalyzerSettings(new SWGSDRangel::SWGChannelAnalyzerSettings());
response.getChannelAnalyzerSettings()->init();
webapiFormatChannelSettings(response, m_settings, m_glScopeSettings, m_glSpectrumSettings);
return 200;
}
void ChannelAnalyzerWebAPIAdapter::webapiFormatChannelSettings(
SWGSDRangel::SWGChannelSettings& response,
const ChannelAnalyzerSettings& settings,
@ -48,6 +61,8 @@ void ChannelAnalyzerWebAPIAdapter::webapiFormatChannelSettings(
response.getChannelAnalyzerSettings()->setInputType((int) settings.m_inputType);
response.getChannelAnalyzerSettings()->setRgbColor(settings.m_rgbColor);
response.getChannelAnalyzerSettings()->setTitle(new QString(settings.m_title));
// scope
SWGSDRangel::SWGGLScope *swgScope = new SWGSDRangel::SWGGLScope();
swgScope->init();
response.getChannelAnalyzerSettings()->setScopeConfig(swgScope);
@ -58,8 +73,61 @@ void ChannelAnalyzerWebAPIAdapter::webapiFormatChannelSettings(
swgScope->setTraceIntensity(scopeSettings.m_traceIntensity);
swgScope->setTraceLen(scopeSettings.m_traceLen);
swgScope->setTrigPre(scopeSettings.m_trigPre);
// TODO array of traces
// TODO array of triggers
// array of traces
swgScope->setTracesData(new QList<SWGSDRangel::SWGTraceData *>);
std::vector<GLScopeSettings::TraceData>::const_iterator traceIt = scopeSettings.m_tracesData.begin();
for (; traceIt != scopeSettings.m_tracesData.end(); ++traceIt)
{
swgScope->getTracesData()->append(new SWGSDRangel::SWGTraceData);
swgScope->getTracesData()->back()->setAmp(traceIt->m_amp);
swgScope->getTracesData()->back()->setAmpIndex(traceIt->m_ampIndex);
swgScope->getTracesData()->back()->setHasTextOverlay(traceIt->m_hasTextOverlay ? 1 : 0);
swgScope->getTracesData()->back()->setInputIndex(traceIt->m_inputIndex);
swgScope->getTracesData()->back()->setOfs(traceIt->m_ofs);
swgScope->getTracesData()->back()->setOfsCoarse(traceIt->m_ofsCoarse);
swgScope->getTracesData()->back()->setOfsFine(traceIt->m_ofsFine);
swgScope->getTracesData()->back()->setProjectionType((int) traceIt->m_projectionType);
swgScope->getTracesData()->back()->setTextOverlay(new QString(traceIt->m_textOverlay));
swgScope->getTracesData()->back()->setTraceColor(qColorToInt(traceIt->m_traceColor));
swgScope->getTracesData()->back()->setTraceColorB(traceIt->m_traceColorB);
swgScope->getTracesData()->back()->setTraceColorG(traceIt->m_traceColorG);
swgScope->getTracesData()->back()->setTraceColorR(traceIt->m_traceColorR);
swgScope->getTracesData()->back()->setTraceDelay(traceIt->m_traceDelay);
swgScope->getTracesData()->back()->setTraceDelayCoarse(traceIt->m_traceDelayCoarse);
swgScope->getTracesData()->back()->setTraceDelayFine(traceIt->m_traceDelayFine);
swgScope->getTracesData()->back()->setTriggerDisplayLevel(traceIt->m_triggerDisplayLevel);
swgScope->getTracesData()->back()->setViewTrace(traceIt->m_viewTrace ? 1 : 0);
}
// array of triggers
swgScope->setTriggersData(new QList<SWGSDRangel::SWGTriggerData *>);
std::vector<GLScopeSettings::TriggerData>::const_iterator triggerIt = scopeSettings.m_triggersData.begin();
for (; triggerIt != scopeSettings.m_triggersData.end(); ++triggerIt)
{
swgScope->getTriggersData()->append(new SWGSDRangel::SWGTriggerData);
swgScope->getTriggersData()->back()->setInputIndex(triggerIt->m_inputIndex);
swgScope->getTriggersData()->back()->setProjectionType((int) triggerIt->m_projectionType);
swgScope->getTriggersData()->back()->setTriggerBothEdges(triggerIt->m_triggerBothEdges ? 1 : 0);
swgScope->getTriggersData()->back()->setTriggerColor(qColorToInt(triggerIt->m_triggerColor));
swgScope->getTriggersData()->back()->setTriggerColorB(triggerIt->m_triggerColorB);
swgScope->getTriggersData()->back()->setTriggerColorG(triggerIt->m_triggerColorG);
swgScope->getTriggersData()->back()->setTriggerColorR(triggerIt->m_triggerColorR);
swgScope->getTriggersData()->back()->setTriggerDelay(triggerIt->m_triggerDelay);
swgScope->getTriggersData()->back()->setTriggerDelayCoarse(triggerIt->m_triggerDelayCoarse);
swgScope->getTriggersData()->back()->setTriggerDelayFine(triggerIt->m_triggerDelayFine);
swgScope->getTriggersData()->back()->setTriggerDelayMult(triggerIt->m_triggerDelayMult);
swgScope->getTriggersData()->back()->setTriggerHoldoff(triggerIt->m_triggerHoldoff ? 1 : 0);
swgScope->getTriggersData()->back()->setTriggerLevel(triggerIt->m_triggerLevel);
swgScope->getTriggersData()->back()->setTriggerLevelCoarse(triggerIt->m_triggerLevelCoarse);
swgScope->getTriggersData()->back()->setTriggerLevelFine(triggerIt->m_triggerLevelFine);
swgScope->getTriggersData()->back()->setTriggerPositiveEdge(triggerIt->m_triggerPositiveEdge ? 1 : 0);
swgScope->getTriggersData()->back()->setTriggerRepeat(triggerIt->m_triggerRepeat);
}
// spectrum
SWGSDRangel::SWGGLSpectrum *swgSpectrum = new SWGSDRangel::SWGGLSpectrum();
swgSpectrum->init();
response.getChannelAnalyzerSettings()->setSpectrumConfig(swgSpectrum);
@ -76,7 +144,17 @@ void ChannelAnalyzerWebAPIAdapter::webapiFormatChannelSettings(
swgSpectrum->setDisplayWaterfall(spectrumSettings.m_displayWaterfall ? 1 : 0);
swgSpectrum->setFftOverlap(spectrumSettings.m_fftOverlap);
swgSpectrum->setFftSize(spectrumSettings.m_fftSize);
}
int ChannelAnalyzerWebAPIAdapter::webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage)
{
(void) force;
(void) errorMessage;
webapiUpdateChannelSettings(m_settings, m_glScopeSettings, m_glSpectrumSettings, channelSettingsKeys, response);
}
void ChannelAnalyzerWebAPIAdapter::webapiUpdateChannelSettings(
@ -86,6 +164,72 @@ void ChannelAnalyzerWebAPIAdapter::webapiUpdateChannelSettings(
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response)
{
if (channelSettingsKeys.contains("frequency")) {
settings.m_frequency = response.getChannelAnalyzerSettings()->getFrequency();
}
if (channelSettingsKeys.contains("downSample")) {
settings.m_downSample = response.getChannelAnalyzerSettings()->getDownSample() != 0;
}
if (channelSettingsKeys.contains("downSampleRate")) {
settings.m_downSampleRate = response.getChannelAnalyzerSettings()->getDownSampleRate();
}
if (channelSettingsKeys.contains("bandwidth")) {
settings.m_bandwidth = response.getChannelAnalyzerSettings()->getBandwidth();
}
if (channelSettingsKeys.contains("lowCutoff")) {
settings.m_lowCutoff = response.getChannelAnalyzerSettings()->getLowCutoff();
}
if (channelSettingsKeys.contains("spanLog2")) {
settings.m_spanLog2 = response.getChannelAnalyzerSettings()->getSpanLog2();
}
if (channelSettingsKeys.contains("ssb")) {
settings.m_ssb = response.getChannelAnalyzerSettings()->getSsb() != 0;
}
if (channelSettingsKeys.contains("pll")) {
settings.m_pll = response.getChannelAnalyzerSettings()->getPll() != 0;
}
if (channelSettingsKeys.contains("fll")) {
settings.m_fll = response.getChannelAnalyzerSettings()->getFll() != 0;
}
if (channelSettingsKeys.contains("rrc")) {
settings.m_rrc = response.getChannelAnalyzerSettings()->getRrc() != 0;
}
if (channelSettingsKeys.contains("rrcRolloff")) {
settings.m_rrcRolloff = response.getChannelAnalyzerSettings()->getRrcRolloff();
}
if (channelSettingsKeys.contains("pllPskOrder")) {
settings.m_pllPskOrder = response.getChannelAnalyzerSettings()->getPllPskOrder();
}
if (channelSettingsKeys.contains("inputType")) {
settings.m_inputType = (ChannelAnalyzerSettings::InputType) response.getChannelAnalyzerSettings()->getInputType();
}
if (channelSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getChannelAnalyzerSettings()->getRgbColor();
}
if (channelSettingsKeys.contains("title")) {
settings.m_title = *response.getChannelAnalyzerSettings()->getTitle();
}
// scope
if (channelSettingsKeys.contains("scopeConfig.displayMode")) {
scopeSettings.m_displayMode = (GLScopeSettings::DisplayMode) response.getChannelAnalyzerSettings()->getScopeConfig()->getDisplayMode();
}
// TODO ...
for (int i = 0; i < 10; i++) // no more than 10 traces anyway
{
// TODO ...
}
}
int ChannelAnalyzerWebAPIAdapter::qColorToInt(const QColor& color)
{
return 256*256*color.blue() + 256*color.green() + color.red();
}
QColor ChannelAnalyzerWebAPIAdapter::intToQColor(int intColor)
{
int r = intColor % 256;
int bg = intColor / 256;
int g = bg % 256;
int b = bg / 256;
return QColor(r, g, b);
}

View File

@ -61,6 +61,9 @@ private:
ChannelAnalyzerSettings m_settings;
GLScopeSettings m_glScopeSettings;
GLSpectrumSettings m_glSpectrumSettings;
static int qColorToInt(const QColor& color);
static QColor intToQColor(int intColor);
};
#endif // INCLUDE_CHANALYZER_WEBAPIADAPTER_H

View File

@ -15,11 +15,11 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <vector>
#include <QByteArray>
#include <QColor>
#include <vector>
#include "export.h"
#include "dsp/dsptypes.h"
#include "dsp/projector.h"

View File

@ -3187,7 +3187,7 @@ margin-bottom: 20px;
"$ref" : "#/definitions/TraceData"
}
},
"m_triggersData" : {
"triggersData" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/TriggerData"
@ -27607,7 +27607,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-08-07T23:30:36.250+02:00
Generated 2019-08-08T13:54:12.590+02:00
</div>
</div>
</div>

View File

@ -140,7 +140,7 @@ GLScope:
type: array
items:
$ref: "/doc/swagger/include/GLScope.yaml#/TraceData"
m_triggersData:
triggersData:
type: array
items:
$ref: "/doc/swagger/include/GLScope.yaml#/TriggerData"

View File

@ -49,3 +49,78 @@ std::regex WebAPIAdapterInterface::devicesetChannelURLRe("^/sdrangel/deviceset/(
std::regex WebAPIAdapterInterface::devicesetChannelIndexURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})$");
std::regex WebAPIAdapterInterface::devicesetChannelSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/settings$");
std::regex WebAPIAdapterInterface::devicesetChannelReportURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/report");
void WebAPIAdapterInterface::ConfigKeys::debug()
{
qDebug("WebAPIAdapterInterface::ConfigKeys::debug");
qDebug("preferences:");
foreach(QString preferenceKey, m_preferencesKeys) {
qDebug(" %s", qPrintable(preferenceKey));
}
qDebug("commands:");
foreach(CommandKeys commandKeys, m_commandKeys)
{
qDebug(" {");
foreach(QString commandKey, commandKeys.m_keys) {
qDebug(" %s", qPrintable(commandKey));
}
qDebug(" }");
}
qDebug("presets:");
foreach(PresetKeys presetKeys, m_presetKeys)
{
qDebug(" {");
foreach(QString presetKey, presetKeys.m_keys) {
qDebug(" %s", qPrintable(presetKey));
}
qDebug(" deviceConfigs:");
foreach(DeviceKeys deviceKeys, presetKeys.m_devicesKeys)
{
qDebug(" {");
qDebug(" config:");
foreach(QString deviceKey, deviceKeys.m_deviceKeys) {
qDebug(" %s", qPrintable(deviceKey));
}
qDebug(" }");
}
qDebug(" channelConfigs");
foreach(ChannelKeys channelKeys, presetKeys.m_channelsKeys)
{
qDebug(" {");
qDebug(" config:");
foreach(QString channelKey, channelKeys.m_channelKeys) {
qDebug(" %s", qPrintable(channelKey));
}
qDebug(" }");
}
qDebug(" }");
}
qDebug("workingPreset:");
foreach(QString presetKey, m_workingPresetKeys.m_keys) {
qDebug(" %s", qPrintable(presetKey));
}
qDebug(" deviceConfigs:");
foreach(DeviceKeys deviceKeys, m_workingPresetKeys.m_devicesKeys)
{
qDebug(" {");
qDebug(" config:");
foreach(QString deviceKey, deviceKeys.m_deviceKeys) {
qDebug(" %s", qPrintable(deviceKey));
}
qDebug(" }");
}
qDebug(" channelConfigs:");
foreach(ChannelKeys channelKeys, m_workingPresetKeys.m_channelsKeys)
{
qDebug(" {");
qDebug(" config:");
foreach(QString channelKey, channelKeys.m_channelKeys) {
qDebug(" %s", qPrintable(channelKey));
}
qDebug(" }");
}
}

View File

@ -89,6 +89,7 @@ public:
PresetKeys m_workingPresetKeys;
QList<PresetKeys> m_presetKeys;
QList<CommandKeys> m_commandKeys;
void debug();
};
virtual ~WebAPIAdapterInterface() {}

View File

@ -53,6 +53,7 @@ const QMap<QString, QString> WebAPIRequestMapper::m_channelURIToSettingsKey = {
{"sdrangel.channeltx.ammod", "AMModSettings"},
{"sdrangel.channeltx.atvmod", "ATVModSettings"},
{"sdrangel.channel.bfm", "BFMDemodSettings"},
{"sdrangel.channel.chanalyzer", "ChannelAnalyzerSettings"},
{"sdrangel.channel.dsddemod", "DSDDemodSettings"},
{"sdrangel.channeltx.filesrc", "FileSourceSettings"},
{"sdrangel.channel.freedvdemod", "FreeDVDemodSettings"},
@ -117,6 +118,7 @@ const QMap<QString, QString> WebAPIRequestMapper::m_channelTypeToSettingsKey = {
{"AMMod", "AMModSettings"},
{"ATVMod", "ATVModSettings"},
{"BFMDemod", "BFMDemodSettings"},
{"ChannelAnalyzer", "ChannelAnalyzerSettings"},
{"DSDDemod", "DSDDemodSettings"},
{"FileSource", "FileSourceSettings"},
{"FreeDVDemod", "FreeDVDemodSettings"},
@ -375,6 +377,7 @@ void WebAPIRequestMapper::instanceConfigService(qtwebapp::HttpRequest& request,
if (validateConfig(query, jsonObject, configKeys))
{
configKeys.debug();
int status = m_adapter->instanceConfigPutPatch(
true,
query,
@ -2254,11 +2257,26 @@ bool WebAPIRequestMapper::validateConfig(SWGSDRangel::SWGInstanceConfigResponse&
}
}
if (jsonObject.contains("presets"))
{
QJsonArray presetsJson = jsonObject["presets"].toArray();
QJsonArray::const_iterator presetsIt = presetsJson.begin();
for (; presetsIt != presetsJson.end(); ++presetsIt)
{
SWGSDRangel::SWGPreset *preset = new SWGSDRangel::SWGPreset();
QJsonObject presetJson = presetsIt->toObject();
configKeys.m_presetKeys.append(WebAPIAdapterInterface::PresetKeys());
appendPresetKeys(preset, presetJson, configKeys.m_presetKeys.back());
}
}
if (jsonObject.contains("workingPreset"))
{
SWGSDRangel::SWGPreset *workingPreset = new SWGSDRangel::SWGPreset();
SWGSDRangel::SWGPreset *preset = new SWGSDRangel::SWGPreset();
config.setWorkingPreset(preset);
QJsonObject presetJson = jsonObject["workingPreset"].toObject();
appendPresetKeys(workingPreset, presetJson, configKeys.m_workingPresetKeys);
appendPresetKeys(preset, presetJson, configKeys.m_workingPresetKeys);
}
return true;
@ -2413,6 +2431,11 @@ bool WebAPIRequestMapper::getChannel(
channelSettings->setBfmDemodSettings(new SWGSDRangel::SWGBFMDemodSettings());
channelSettings->getBfmDemodSettings()->fromJsonObject(settingsJsonObject);
}
else if (channelSettingsKey == "ChannelAnalyzerSettings")
{
channelSettings->setChannelAnalyzerSettings(new SWGSDRangel::SWGChannelAnalyzerSettings());
channelSettings->getChannelAnalyzerSettings()->fromJsonObject(settingsJsonObject);
}
else if (channelSettingsKey == "DSDDemodSettings")
{
channelSettings->setDsdDemodSettings(new SWGSDRangel::SWGDSDDemodSettings());

View File

@ -29,6 +29,7 @@ WebAPIServer::WebAPIServer(const QString& host, uint16_t port, WebAPIRequestMapp
{
m_settings.host = host;
m_settings.port = port;
m_settings.maxRequestSize = 1<<23; // 8M
}
WebAPIServer::~WebAPIServer()

View File

@ -32,7 +32,7 @@ ChannelAnalyzerSettings:
pllPskOrder:
type: integer
inputType:
description: see ChannelAnalyzer::InputType
description: see ChannelAnalyzerSettings::InputType
type: integer
rgbColor:
type: integer

View File

@ -140,7 +140,7 @@ GLScope:
type: array
items:
$ref: "http://localhost:8081/api/swagger/include/GLScope.yaml#/TraceData"
m_triggersData:
triggersData:
type: array
items:
$ref: "http://localhost:8081/api/swagger/include/GLScope.yaml#/TriggerData"

View File

@ -3187,7 +3187,7 @@ margin-bottom: 20px;
"$ref" : "#/definitions/TraceData"
}
},
"m_triggersData" : {
"triggersData" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/TriggerData"
@ -27607,7 +27607,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-08-07T23:30:36.250+02:00
Generated 2019-08-08T13:54:12.590+02:00
</div>
</div>
</div>

View File

@ -44,8 +44,8 @@ SWGGLScope::SWGGLScope() {
m_trig_pre_isSet = false;
traces_data = nullptr;
m_traces_data_isSet = false;
m_triggers_data = nullptr;
m_m_triggers_data_isSet = false;
triggers_data = nullptr;
m_triggers_data_isSet = false;
}
SWGGLScope::~SWGGLScope() {
@ -70,8 +70,8 @@ SWGGLScope::init() {
m_trig_pre_isSet = false;
traces_data = new QList<SWGTraceData*>();
m_traces_data_isSet = false;
m_triggers_data = new QList<SWGTriggerData*>();
m_m_triggers_data_isSet = false;
triggers_data = new QList<SWGTriggerData*>();
m_triggers_data_isSet = false;
}
void
@ -90,12 +90,12 @@ SWGGLScope::cleanup() {
}
delete traces_data;
}
if(m_triggers_data != nullptr) {
auto arr = m_triggers_data;
if(triggers_data != nullptr) {
auto arr = triggers_data;
for(auto o: *arr) {
delete o;
}
delete m_triggers_data;
delete triggers_data;
}
}
@ -127,7 +127,7 @@ SWGGLScope::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&traces_data, pJson["tracesData"], "QList", "SWGTraceData");
::SWGSDRangel::setValue(&m_triggers_data, pJson["m_triggersData"], "QList", "SWGTriggerData");
::SWGSDRangel::setValue(&triggers_data, pJson["triggersData"], "QList", "SWGTriggerData");
}
QString
@ -168,8 +168,8 @@ SWGGLScope::asJsonObject() {
if(traces_data && traces_data->size() > 0){
toJsonArray((QList<void*>*)traces_data, obj, "tracesData", "SWGTraceData");
}
if(m_triggers_data && m_triggers_data->size() > 0){
toJsonArray((QList<void*>*)m_triggers_data, obj, "m_triggersData", "SWGTriggerData");
if(triggers_data && triggers_data->size() > 0){
toJsonArray((QList<void*>*)triggers_data, obj, "triggersData", "SWGTriggerData");
}
return obj;
@ -256,13 +256,13 @@ SWGGLScope::setTracesData(QList<SWGTraceData*>* traces_data) {
}
QList<SWGTriggerData*>*
SWGGLScope::getMTriggersData() {
return m_triggers_data;
SWGGLScope::getTriggersData() {
return triggers_data;
}
void
SWGGLScope::setMTriggersData(QList<SWGTriggerData*>* m_triggers_data) {
this->m_triggers_data = m_triggers_data;
this->m_m_triggers_data_isSet = true;
SWGGLScope::setTriggersData(QList<SWGTriggerData*>* triggers_data) {
this->triggers_data = triggers_data;
this->m_triggers_data_isSet = true;
}
@ -294,7 +294,7 @@ SWGGLScope::isSet(){
if(traces_data && (traces_data->size() > 0)){
isObjectUpdated = true; break;
}
if(m_triggers_data && (m_triggers_data->size() > 0)){
if(triggers_data && (triggers_data->size() > 0)){
isObjectUpdated = true; break;
}
}while(false);

View File

@ -68,8 +68,8 @@ public:
QList<SWGTraceData*>* getTracesData();
void setTracesData(QList<SWGTraceData*>* traces_data);
QList<SWGTriggerData*>* getMTriggersData();
void setMTriggersData(QList<SWGTriggerData*>* m_triggers_data);
QList<SWGTriggerData*>* getTriggersData();
void setTriggersData(QList<SWGTriggerData*>* triggers_data);
virtual bool isSet() override;
@ -99,8 +99,8 @@ private:
QList<SWGTraceData*>* traces_data;
bool m_traces_data_isSet;
QList<SWGTriggerData*>* m_triggers_data;
bool m_m_triggers_data_isSet;
QList<SWGTriggerData*>* triggers_data;
bool m_triggers_data_isSet;
};