LimeRFE feature: API updates

This commit is contained in:
f4exb 2022-05-22 11:59:02 +02:00
parent 539a03373f
commit 6d7ee18989
30 changed files with 1646 additions and 18 deletions

View File

@ -20,14 +20,20 @@
#include "SWGDeviceState.h"
#include "SWGErrorResponse.h"
#include "SWGFeatureSettings.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureActions.h"
#include "util/simpleserializer.h"
#include "util/serialutil.h"
#include "settings/serializable.h"
#include "webapi/webapiadapterinterface.h"
#include "limerfe.h"
MESSAGE_CLASS_DEFINITION(LimeRFE::MsgConfigureLimeRFE, Message)
MESSAGE_CLASS_DEFINITION(LimeRFE::MsgReportSetRx, Message)
MESSAGE_CLASS_DEFINITION(LimeRFE::MsgReportSetTx, Message)
const char* const LimeRFE::m_featureIdURI = "sdrangel.feature.limerfe";
const char* const LimeRFE::m_featureId = "LimeRFE";
@ -99,9 +105,23 @@ void LimeRFE::listComPorts()
}
}
void LimeRFE::applySettings(const LimeRFESettings& settings, bool force)
{
(void) force;
m_settings = settings;
}
bool LimeRFE::handleMessage(const Message& cmd)
{
(void) cmd;
if (MsgConfigureLimeRFE::match(cmd))
{
MsgConfigureLimeRFE& cfg = (MsgConfigureLimeRFE&) cmd;
qDebug() << "LimeRFE::handleMessage: MsgConfigureLimeRFE";
applySettings(cfg.getSettings(), cfg.getForce());
return true;
}
return false;
}
@ -257,15 +277,30 @@ int LimeRFE::setRx(LimeRFESettings& settings, bool rxOn)
return -1;
}
int mode = rxOn && settings.m_txOn ?
RFE_MODE_TXRX : rxOn ?
RFE_MODE_RX : settings.m_txOn ?
RFE_MODE_TX : RFE_MODE_NONE;
int mode = RFE_MODE_NONE;
if (rxOn)
{
if (settings.m_txOn) {
mode = RFE_MODE_TXRX;
} else {
mode = RFE_MODE_RX;
}
}
else
{
if (settings.m_txOn) {
mode = RFE_MODE_TX;
}
}
qDebug("LimeRFE::setRx: switch %s mode: %d", rxOn ? "on" : "off", mode);
int rc = RFE_Mode(m_rfeDevice, mode);
if (rc == 0) {
settings.m_rxOn = rxOn;
} else {
qInfo("LimeRFE::setRx: %s", getError(rc).c_str());
}
return rc;
@ -277,15 +312,30 @@ int LimeRFE::setTx(LimeRFESettings& settings, bool txOn)
return -1;
}
int mode = txOn && settings.m_rxOn ?
RFE_MODE_TXRX : txOn ?
RFE_MODE_TX : settings.m_rxOn ?
RFE_MODE_RX : RFE_MODE_NONE;
int mode = RFE_MODE_NONE;
if (txOn)
{
if (settings.m_rxOn) {
mode = RFE_MODE_TXRX;
} else {
mode = RFE_MODE_TX;
}
}
else
{
if (settings.m_rxOn) {
mode = RFE_MODE_RX;
}
}
qDebug("LimeRFE::setTx: switch %s mode: %d", txOn ? "on" : "off", mode);
int rc = RFE_Mode(m_rfeDevice, mode);
if (rc == 0) {
settings.m_txOn = txOn;
} else {
qInfo("LimeRFE::setTx: %s", getError(rc).c_str());
}
return rc;
@ -714,3 +764,339 @@ void LimeRFE::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
int LimeRFE::webapiSettingsGet(
SWGSDRangel::SWGFeatureSettings& response,
QString& errorMessage)
{
(void) errorMessage;
response.setLimeRfeSettings(new SWGSDRangel::SWGLimeRFESettings());
response.getLimeRfeSettings()->init();
webapiFormatFeatureSettings(response, m_settings);
return 200;
}
int LimeRFE::webapiSettingsPutPatch(
bool force,
const QStringList& featureSettingsKeys,
SWGSDRangel::SWGFeatureSettings& response,
QString& errorMessage)
{
(void) errorMessage;
LimeRFESettings settings = m_settings;
webapiUpdateFeatureSettings(settings, featureSettingsKeys, response);
MsgConfigureLimeRFE *msg = MsgConfigureLimeRFE::create(settings, force);
m_inputMessageQueue.push(msg);
qDebug("LimeRFE::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
if (m_guiMessageQueue) // forward to GUI if any
{
MsgConfigureLimeRFE *msgToGUI = MsgConfigureLimeRFE::create(settings, true);
m_guiMessageQueue->push(msgToGUI);
}
webapiFormatFeatureSettings(response, settings);
return 200;
}
int LimeRFE::webapiReportGet(
SWGSDRangel::SWGFeatureReport& response,
QString& errorMessage)
{
response.setLimeRfeReport(new SWGSDRangel::SWGLimeRFEReport());
response.getLimeRfeReport()->init();
return webapiFormatFeatureReport(response, errorMessage);
}
int LimeRFE::webapiActionsPost(
const QStringList& featureActionsKeys,
SWGSDRangel::SWGFeatureActions& query,
QString& errorMessage)
{
SWGSDRangel::SWGLimeRFEActions *swgLimeRFEActions = query.getLimeRfeActions();
if (swgLimeRFEActions)
{
bool unknownAction = true;
int channel = -1;
int deviceSetIndex = -1;
if (featureActionsKeys.contains("selectChannel"))
{
channel = swgLimeRFEActions->getSelectChannel();
unknownAction = false;
}
if (featureActionsKeys.contains("deviceSetIndex"))
{
deviceSetIndex = swgLimeRFEActions->getDeviceSetIndex();
unknownAction = false;
}
if (featureActionsKeys.contains("openCloseDevice") && (swgLimeRFEActions->getOpenCloseDevice() != 0))
{
int rc = openDevice(m_settings.m_devicePath.toStdString());
unknownAction = false;
if (rc != 0)
{
errorMessage = QString("Open %1: %2").arg(m_settings.m_devicePath).arg(getError(rc).c_str());
return 500;
}
}
if (featureActionsKeys.contains("fromToSettings") && (swgLimeRFEActions->getFromToSettings() != 0))
{
settingsToState(m_settings);
unknownAction = false;
}
if ((channel >= 0) && featureActionsKeys.contains("switchChannel"))
{
if (channel == 0)
{
bool on = swgLimeRFEActions->getSwitchChannel() != 0;
int rc = setRx(m_settings, on);
if (rc != 0)
{
errorMessage = QString("Set Rx %1 %2: %3").arg(m_settings.m_devicePath).arg(on).arg(getError(rc).c_str());
return 500;
}
if (getMessageQueueToGUI())
{
MsgConfigureLimeRFE *msg = MsgConfigureLimeRFE::create(m_settings, false);
getMessageQueueToGUI()->push(msg);
}
}
else
{
bool on = swgLimeRFEActions->getSwitchChannel() != 0;
int rc = setTx(m_settings, swgLimeRFEActions->getSwitchChannel() != 0);
if (rc != 0)
{
errorMessage = QString("Set Tx %1 %2: %3").arg(m_settings.m_devicePath).arg(on).arg(getError(rc).c_str());
return 500;
}
if (getMessageQueueToGUI())
{
MsgConfigureLimeRFE *msg = MsgConfigureLimeRFE::create(m_settings, false);
getMessageQueueToGUI()->push(msg);
}
}
if (deviceSetIndex >= 0) {
turnDevice(deviceSetIndex, swgLimeRFEActions->getSwitchChannel() != 0);
}
unknownAction = false;
}
if (featureActionsKeys.contains("fromToSettings") && (swgLimeRFEActions->getFromToSettings() == 0))
{
stateToSettings(m_settings);
unknownAction = false;
if (getMessageQueueToGUI())
{
MsgConfigureLimeRFE *msg = MsgConfigureLimeRFE::create(m_settings, false);
getMessageQueueToGUI()->push(msg);
}
}
if (featureActionsKeys.contains("openCloseDevice") && (swgLimeRFEActions->getOpenCloseDevice() == 0))
{
closeDevice();
unknownAction = false;
}
if (unknownAction)
{
errorMessage = "Unknown action";
return 400;
}
else
{
return 202;
}
}
else
{
errorMessage = "Missing SimplePTTActions in query";
return 400;
}
}
void LimeRFE::webapiFormatFeatureSettings(
SWGSDRangel::SWGFeatureSettings& response,
const LimeRFESettings& settings)
{
if (response.getLimeRfeSettings()->getTitle()) {
*response.getLimeRfeSettings()->getTitle() = settings.m_title;
} else {
response.getLimeRfeSettings()->setTitle(new QString(settings.m_title));
}
response.getLimeRfeSettings()->setRgbColor(settings.m_rgbColor);
response.getLimeRfeSettings()->setDevicePath(new QString(settings.m_devicePath));
response.getLimeRfeSettings()->setRxChannels((int) settings.m_rxChannels);
response.getLimeRfeSettings()->setRxWidebandChannel((int) settings.m_rxWidebandChannel);
response.getLimeRfeSettings()->setRxHamChannel((int) settings.m_rxHAMChannel);
response.getLimeRfeSettings()->setRxCellularChannel((int) settings.m_rxCellularChannel);
response.getLimeRfeSettings()->setRxPort((int) settings.m_rxPort);
response.getLimeRfeSettings()->setRxOn(settings.m_rxOn ? 1 : 0);
response.getLimeRfeSettings()->setAmfmNotch(settings.m_amfmNotch ? 1 : 0);
response.getLimeRfeSettings()->setAttenuationFactor(settings.m_attenuationFactor);
response.getLimeRfeSettings()->setTxChannels((int) settings.m_txChannels);
response.getLimeRfeSettings()->setTxWidebandChannel((int) settings.m_txWidebandChannel);
response.getLimeRfeSettings()->setTxHamChannel((int) settings.m_txHAMChannel);
response.getLimeRfeSettings()->setTxCellularChannel((int) settings.m_txCellularChannel);
response.getLimeRfeSettings()->setTxPort((int) settings.m_txPort);
response.getLimeRfeSettings()->setTxOn(settings.m_txOn ? 1 : 0);
response.getLimeRfeSettings()->setSwrEnable(settings.m_swrEnable ? 1 : 0);
response.getLimeRfeSettings()->setSwrSource((int) settings.m_swrSource);
response.getLimeRfeSettings()->setTxRxDriven(settings.m_txRxDriven ? 1 : 0);
response.getLimeRfeSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
if (response.getLimeRfeSettings()->getReverseApiAddress()) {
*response.getLimeRfeSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
} else {
response.getLimeRfeSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
}
response.getLimeRfeSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getLimeRfeSettings()->setReverseApiFeatureSetIndex(settings.m_reverseAPIFeatureSetIndex);
response.getLimeRfeSettings()->setReverseApiFeatureIndex(settings.m_reverseAPIFeatureIndex);
if (settings.m_rollupState)
{
if (response.getLimeRfeSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getLimeRfeSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getLimeRfeSettings()->setRollupState(swgRollupState);
}
}
}
void LimeRFE::webapiUpdateFeatureSettings(
LimeRFESettings& settings,
const QStringList& featureSettingsKeys,
SWGSDRangel::SWGFeatureSettings& response)
{
if (featureSettingsKeys.contains("title")) {
settings.m_title = *response.getLimeRfeSettings()->getTitle();
}
if (featureSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getLimeRfeSettings()->getRgbColor();
}
if (featureSettingsKeys.contains("devicePath")) {
settings.m_devicePath = *response.getLimeRfeSettings()->getDevicePath();
}
if (featureSettingsKeys.contains("rxChannels")) {
settings.m_rxChannels = (LimeRFESettings::ChannelGroups) response.getLimeRfeSettings()->getRxChannels();
}
if (featureSettingsKeys.contains("rxWidebandChannel")) {
settings.m_rxWidebandChannel = (LimeRFESettings::WidebandChannel) response.getLimeRfeSettings()->getRxWidebandChannel();
}
if (featureSettingsKeys.contains("rxHAMChannel")) {
settings.m_rxHAMChannel = (LimeRFESettings::HAMChannel) response.getLimeRfeSettings()->getRxHamChannel();
}
if (featureSettingsKeys.contains("rxCellularChannel")) {
settings.m_rxCellularChannel = (LimeRFESettings::CellularChannel) response.getLimeRfeSettings()->getRxCellularChannel();
}
if (featureSettingsKeys.contains("rxPort")) {
settings.m_rxPort = (LimeRFESettings::RxPort) response.getLimeRfeSettings()->getRxPort();
}
if (featureSettingsKeys.contains("rxOn")) {
settings.m_rxOn = response.getLimeRfeSettings()->getRxOn() != 0;
}
if (featureSettingsKeys.contains("amfmNotch")) {
settings.m_amfmNotch = response.getLimeRfeSettings()->getAmfmNotch() != 0;
}
if (featureSettingsKeys.contains("attenuationFactor")) {
settings.m_attenuationFactor = response.getLimeRfeSettings()->getAttenuationFactor();
}
if (featureSettingsKeys.contains("txChannels")) {
settings.m_txChannels = (LimeRFESettings::ChannelGroups) response.getLimeRfeSettings()->getTxChannels();
}
if (featureSettingsKeys.contains("txWidebandChannel")) {
settings.m_txWidebandChannel = (LimeRFESettings::WidebandChannel) response.getLimeRfeSettings()->getTxWidebandChannel();
}
if (featureSettingsKeys.contains("txHAMChannel")) {
settings.m_txHAMChannel = (LimeRFESettings::HAMChannel) response.getLimeRfeSettings()->getTxHamChannel();
}
if (featureSettingsKeys.contains("txCellularChannel")) {
settings.m_txCellularChannel = (LimeRFESettings::CellularChannel) response.getLimeRfeSettings()->getTxCellularChannel();
}
if (featureSettingsKeys.contains("txPort")) {
settings.m_txPort = (LimeRFESettings::TxPort) response.getLimeRfeSettings()->getTxPort();
}
if (featureSettingsKeys.contains("txOn")) {
settings.m_txOn = response.getLimeRfeSettings()->getTxOn() != 0;
}
if (featureSettingsKeys.contains("swrEnable")) {
settings.m_swrEnable = response.getLimeRfeSettings()->getSwrEnable() != 0;
}
if (featureSettingsKeys.contains("swrSource")) {
settings.m_swrSource = (LimeRFESettings::SWRSource) response.getLimeRfeSettings()->getSwrSource();
}
if (featureSettingsKeys.contains("txRxDriven")) {
settings.m_txRxDriven = response.getLimeRfeSettings()->getTxRxDriven() != 0;
}
if (featureSettingsKeys.contains("useReverseAPI")) {
settings.m_useReverseAPI = response.getLimeRfeSettings()->getUseReverseApi() != 0;
}
if (featureSettingsKeys.contains("reverseAPIAddress")) {
settings.m_reverseAPIAddress = *response.getLimeRfeSettings()->getReverseApiAddress();
}
if (featureSettingsKeys.contains("reverseAPIPort")) {
settings.m_reverseAPIPort = response.getLimeRfeSettings()->getReverseApiPort();
}
if (featureSettingsKeys.contains("reverseAPIFeatureSetIndex")) {
settings.m_reverseAPIFeatureSetIndex = response.getLimeRfeSettings()->getReverseApiFeatureSetIndex();
}
if (featureSettingsKeys.contains("reverseAPIFeatureIndex")) {
settings.m_reverseAPIFeatureIndex = response.getLimeRfeSettings()->getReverseApiFeatureIndex();
}
if (settings.m_rollupState && featureSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(featureSettingsKeys, response.getLimeRfeSettings()->getRollupState());
}
}
int LimeRFE::webapiFormatFeatureReport(SWGSDRangel::SWGFeatureReport& response, QString& errorMessage)
{
int fwdPower;
int rc = getFwdPower(fwdPower);
if (rc != 0)
{
errorMessage = QString("Error getting forward power from LimeRFE device %1: %2")
.arg(m_settings.m_devicePath).arg(getError(rc).c_str());
return 500;
}
int refPower;
rc = getRefPower(refPower);
if (rc != 0)
{
errorMessage = QString("Error getting reflected power from LimeRFE device %1: %2")
.arg(m_settings.m_devicePath).arg(getError(rc).c_str());
return 500;
}
response.getLimeRfeReport()->setForwardPower(fwdPower);
response.getLimeRfeReport()->setReflectedPower(refPower);
return 200;
}

View File

@ -59,6 +59,44 @@ public:
{ }
};
class MsgReportSetRx : public Message {
MESSAGE_CLASS_DECLARATION
public:
bool isOn() const { return m_on; }
static MsgReportSetRx* create(bool on) {
return new MsgReportSetRx(on);
}
private:
bool m_on;
MsgReportSetRx(bool on) :
Message(),
m_on(on)
{ }
};
class MsgReportSetTx : public Message {
MESSAGE_CLASS_DECLARATION
public:
bool isOn() const { return m_on; }
static MsgReportSetTx* create(bool on) {
return new MsgReportSetTx(on);
}
private:
bool m_on;
MsgReportSetTx(bool on) :
Message(),
m_on(on)
{ }
};
LimeRFE(WebAPIAdapterInterface *webAPIAdapterInterface);
virtual ~LimeRFE();
virtual void destroy() { delete this; }
@ -71,6 +109,34 @@ public:
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual int webapiSettingsGet(
SWGSDRangel::SWGFeatureSettings& response,
QString& errorMessage);
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& featureSettingsKeys,
SWGSDRangel::SWGFeatureSettings& response,
QString& errorMessage);
virtual int webapiReportGet(
SWGSDRangel::SWGFeatureReport& response,
QString& errorMessage);
virtual int webapiActionsPost(
const QStringList& featureActionsKeys,
SWGSDRangel::SWGFeatureActions& query,
QString& errorMessage);
static void webapiFormatFeatureSettings(
SWGSDRangel::SWGFeatureSettings& response,
const LimeRFESettings& settings);
static void webapiUpdateFeatureSettings(
LimeRFESettings& settings,
const QStringList& featureSettingsKeys,
SWGSDRangel::SWGFeatureSettings& response);
LimeRFEUSBCalib *getCalib() { return &m_calib; }
int openDevice(const std::string& serialDeviceName);
@ -108,6 +174,8 @@ private:
void start();
void stop();
void listComPorts();
void applySettings(const LimeRFESettings& settings, bool force = false);
int webapiFormatFeatureReport(SWGSDRangel::SWGFeatureReport& response, QString& errorMessage);
private slots:
void networkManagerFinished(QNetworkReply *reply);

View File

@ -980,6 +980,33 @@ void LimeRFEGUI::tick()
refreshPower();
}
bool LimeRFEGUI::handleMessage(const Message& message)
{
if (LimeRFE::MsgConfigureLimeRFE::match(message))
{
qDebug("LimeRFEGUI::handleMessage: LimeRFE::MsgConfigureLimeRFE");
const LimeRFE::MsgConfigureLimeRFE& cfg = (LimeRFE::MsgConfigureLimeRFE&) message;
m_settings = cfg.getSettings();
displaySettings();
highlightApplyButton(cfg.getForce());
return true;
}
return false;
}
void LimeRFEGUI::handleInputMessages()
{
Message* message;
while ((message = getInputMessageQueue()->pop()))
{
if (handleMessage(*message)) {
delete message;
}
}
}
void LimeRFEGUI::makeUIConnections()
{
QObject::connect(ui->openDevice, &QPushButton::clicked, this, &LimeRFEGUI::on_openDevice_clicked);

View File

@ -100,11 +100,13 @@ private:
void stopStartTx(bool start);
void syncRxTx();
void highlightApplyButton(bool highlight);
bool handleMessage(const Message& message);
void makeUIConnections();
private slots:
void onMenuDialogCalled(const QPoint &p);
void onWidgetRolled(QWidget* widget, bool rollDown);
void handleInputMessages();
void on_openDevice_clicked();
void on_closeDevice_clicked();
void on_deviceToGUI_clicked();

View File

@ -5273,6 +5273,9 @@ margin-bottom: 20px;
"GS232ControllerActions" : {
"$ref" : "#/definitions/GS232ControllerActions"
},
"LimeRFEActions" : {
"$ref" : "#/definitions/LimeRFEActions"
},
"MapActions" : {
"$ref" : "#/definitions/MapActions"
},
@ -5409,6 +5412,9 @@ margin-bottom: 20px;
"GS232ControllerReport" : {
"$ref" : "#/definitions/GS232ControllerReport"
},
"LimeRFEReport" : {
"$ref" : "#/definitions/LimeRFEReport"
},
"MapReport" : {
"$ref" : "#/definitions/MapReport"
},
@ -5504,6 +5510,9 @@ margin-bottom: 20px;
"GS232ControllerSettings" : {
"$ref" : "#/definitions/GS232ControllerSettings"
},
"LimeRFESettings" : {
"$ref" : "#/definitions/LimeRFESettings"
},
"MapSettings" : {
"$ref" : "#/definitions/MapSettings"
},
@ -7069,6 +7078,30 @@ margin-bottom: 20px;
}
},
"description" : "KiwiSDR"
};
defs.LimeRFEActions = {
"properties" : {
"selectChannel" : {
"type" : "integer",
"description" : "Select channel\n * 0 - Rx\n * 1 - Tx\n"
},
"deviceSetIndex" : {
"type" : "integer"
},
"switchChannel" : {
"type" : "integer",
"description" : "Switch on or off\n * 0 - Off\n * 1 - On\n"
},
"fromToSettings" : {
"type" : "integer",
"description" : "Move from/to settings to/from device\n * 0 - From device to settings. The toGUI button in GUI mode\n * 1 - From settings to device. The Apply button in GUI mode\n"
},
"openCloseDevice" : {
"type" : "integer",
"description" : "Open or close device\n * 0 - Close device\n * 1 - Open device\n"
}
},
"description" : "LimeRFE"
};
defs.LimeRFEDevice = {
"properties" : {
@ -7107,10 +7140,29 @@ margin-bottom: 20px;
"description" : "relative reflected power in centi-Bels"
}
},
"description" : "report of forward and reflected power measurements"
"description" : "report of forward and reflected power measurements TO BE DECOMMISSIONED"
};
defs.LimeRFEReport = {
"properties" : {
"forwardPower" : {
"type" : "integer",
"description" : "relative forward power in centi-Bels"
},
"reflectedPower" : {
"type" : "integer",
"description" : "relative reflected power in centi-Bels"
}
},
"description" : "LimeRFE"
};
defs.LimeRFESettings = {
"properties" : {
"title" : {
"type" : "string"
},
"rgbColor" : {
"type" : "integer"
},
"devicePath" : {
"type" : "string",
"description" : "Path to the device serial interface (ex /dev/ttyUSB2)"
@ -7170,6 +7222,10 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "SWR measurement source (LimeRFEController::SWRSource)\n * 0 - External\n * 1 - Cellular\n"
},
"txRxDriven" : {
"type" : "integer",
"description" : "Boolean 1 if Tx is copy of Rx else 0"
},
"rxOn" : {
"type" : "integer",
"description" : "Boolean 1 if Rx is active else 0"
@ -7177,6 +7233,25 @@ margin-bottom: 20px;
"txOn" : {
"type" : "integer",
"description" : "Boolean 1 if Tx is active else 0"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIFeatureSetIndex" : {
"type" : "integer"
},
"reverseAPIFeatureIndex" : {
"type" : "integer"
},
"rollupState" : {
"$ref" : "#/definitions/RollupState"
}
},
"description" : "LimeRFE"
@ -59698,7 +59773,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2022-05-19T00:27:23.053+02:00
Generated 2022-05-21T22:11:42.796+02:00
</div>
</div>
</div>

View File

@ -17,6 +17,8 @@ FeatureActions:
$ref: "/doc/swagger/include/AFC.yaml#/AFCActions"
GS232ControllerActions:
$ref: "/doc/swagger/include/GS232Controller.yaml#/GS232ControllerActions"
LimeRFEActions:
$ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFEActions"
MapActions:
$ref: "/doc/swagger/include/Map.yaml#/MapActions"
PERTesterActions:

View File

@ -11,6 +11,8 @@ FeatureReport:
$ref: "/doc/swagger/include/AFC.yaml#/AFCReport"
GS232ControllerReport:
$ref: "/doc/swagger/include/GS232Controller.yaml#/GS232ControllerReport"
LimeRFEReport:
$ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFEReport"
MapReport:
$ref: "/doc/swagger/include/Map.yaml#/MapReport"
PERTesterReport:

View File

@ -27,6 +27,8 @@ FeatureSettings:
$ref: "/doc/swagger/include/JogdialController.yaml#/JogdialControllerSettings"
GS232ControllerSettings:
$ref: "/doc/swagger/include/GS232Controller.yaml#/GS232ControllerSettings"
LimeRFESettings:
$ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings"
MapSettings:
$ref: "/doc/swagger/include/Map.yaml#/MapSettings"
PERTesterSettings:

View File

@ -1,6 +1,10 @@
LimeRFESettings:
description: LimeRFE
properties:
title:
type: string
rgbColor:
type: integer
devicePath:
description: Path to the device serial interface (ex /dev/ttyUSB2)
type: string
@ -102,19 +106,76 @@ LimeRFESettings:
SWR measurement source (LimeRFEController::SWRSource)
* 0 - External
* 1 - Cellular
txRxDriven:
description: Boolean 1 if Tx is copy of Rx else 0
type: integer
rxOn:
description: Boolean 1 if Rx is active else 0
type: integer
txOn:
description: Boolean 1 if Tx is active else 0
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIFeatureSetIndex:
type: integer
reverseAPIFeatureIndex:
type: integer
rollupState:
$ref: "/doc/swagger/include/RollupState.yaml#/RollupState"
LimeRFEReport:
description: LimeRFE
properties:
forwardPower:
description: relative forward power in centi-Bels
type: integer
reflectedPower:
description: relative reflected power in centi-Bels
type: integer
LimeRFEActions:
description: LimeRFE
properties:
selectChannel:
type: integer
description: >
Select channel
* 0 - Rx
* 1 - Tx
deviceSetIndex:
type: integer
dexcription: Index of device set to synchronize switch with
switchChannel:
type: integer
description: >
Switch on or off
* 0 - Off
* 1 - On
fromToSettings:
type: integer
description: >
Move from/to settings to/from device
* 0 - From device to settings. The toGUI button in GUI mode
* 1 - From settings to device. The Apply button in GUI mode
openCloseDevice:
type: integer
description: >
Open or close device
* 0 - Close device
* 1 - Open device
LimeRFEPower:
description: report of forward and reflected power measurements
description: report of forward and reflected power measurements TO BE DECOMMISSIONED
properties:
forward:
description: relative forward power in centi-Bels
type: integer
reflected:
description: relative reflected power in centi-Bels
type: integer
type: integer

View File

@ -5602,6 +5602,11 @@ bool WebAPIRequestMapper::getFeatureActions(
featureActions->setGs232ControllerActions(new SWGSDRangel::SWGGS232ControllerActions());
featureActions->getGs232ControllerActions()->fromJsonObject(actionsJsonObject);
}
else if (featureActionsKey == "LimeRFEActions")
{
featureActions->setLimeRfeActions(new SWGSDRangel::SWGLimeRFEActions());
featureActions->getLimeRfeActions()->fromJsonObject(actionsJsonObject);
}
else if (featureActionsKey == "MapActions")
{
featureActions->setMapActions(new SWGSDRangel::SWGMapActions());

View File

@ -275,6 +275,7 @@ const QMap<QString, QString> WebAPIUtils::m_featureTypeToSettingsKey = {
{"DemodAnalyzer", "DemodAnalyzerSettings"},
{"JogdialController", "JogdialControllerSettings"},
{"GS232Controller", "GS232ControllerSettings"}, // a.k.a Rotator Controller
{"LimeRFE", "LimeRFESettings"},
{"Map", "MapSettings"},
{"PERTester", "PERTesterSettings"},
{"Radiosonde", "RadiosondeSettings"},
@ -288,6 +289,7 @@ const QMap<QString, QString> WebAPIUtils::m_featureTypeToSettingsKey = {
const QMap<QString, QString> WebAPIUtils::m_featureTypeToActionsKey = {
{"AFC", "AFCActions"},
{"GS232Controller", "GS232ControllerActions"},
{"LimeRFE", "LimeRFEActions"},
{"Map", "MapActions"},
{"PERTester", "PERTesterActions"},
{"RigCtlServer", "RigCtlServerActions"},
@ -305,6 +307,7 @@ const QMap<QString, QString> WebAPIUtils::m_featureURIToSettingsKey = {
{"sdrangel.feature.demodanalyzer", "DemodAnalyzerSettings"},
{"sdrangel.feature.jogdialcontroller", "JogdialControllerSettings"},
{"sdrangel.feature.gs232controller", "GS232ControllerSettings"},
{"sdrangel.feature.limerfe", "LimeRFESettings"},
{"sdrangel.feature.map", "MapSettings"},
{"sdrangel.feature.pertester", "PERTesterSettings"},
{"sdrangel.feature.radiosonde", "RadiosondeSettings"},

View File

@ -17,6 +17,8 @@ FeatureActions:
$ref: "http://swgserver:8081/api/swagger/include/AFC.yaml#/AFCActions"
GS232ControllerActions:
$ref: "http://swgserver:8081/api/swagger/include/GS232Controller.yaml#/GS232ControllerActions"
LimeRFEActions:
$ref: "http://swgserver:8081/api/swagger/include/LimeRFE.yaml#/LimeRFEActions"
MapActions:
$ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapActions"
PERTesterActions:

View File

@ -11,6 +11,8 @@ FeatureReport:
$ref: "http://swgserver:8081/api/swagger/include/AFC.yaml#/AFCReport"
GS232ControllerReport:
$ref: "http://swgserver:8081/api/swagger/include/GS232Controller.yaml#/GS232ControllerReport"
LimeRFEReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeRFE.yaml#/LimeRFEReport"
MapReport:
$ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapReport"
PERTesterReport:

View File

@ -27,6 +27,8 @@ FeatureSettings:
$ref: "http://swgserver:8081/api/swagger/include/JogdialController.yaml#/JogdialControllerSettings"
GS232ControllerSettings:
$ref: "http://swgserver:8081/api/swagger/include/GS232Controller.yaml#/GS232ControllerSettings"
LimeRFESettings:
$ref: "http://swgserver:8081/api/swagger/include/LimeRFE.yaml#/LimeRFESettings"
MapSettings:
$ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapSettings"
PERTesterSettings:

View File

@ -1,6 +1,10 @@
LimeRFESettings:
description: LimeRFE
properties:
title:
type: string
rgbColor:
type: integer
devicePath:
description: Path to the device serial interface (ex /dev/ttyUSB2)
type: string
@ -102,19 +106,76 @@ LimeRFESettings:
SWR measurement source (LimeRFEController::SWRSource)
* 0 - External
* 1 - Cellular
txRxDriven:
description: Boolean 1 if Tx is copy of Rx else 0
type: integer
rxOn:
description: Boolean 1 if Rx is active else 0
type: integer
txOn:
description: Boolean 1 if Tx is active else 0
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIFeatureSetIndex:
type: integer
reverseAPIFeatureIndex:
type: integer
rollupState:
$ref: "http://swgserver:8081/api/swagger/include/RollupState.yaml#/RollupState"
LimeRFEReport:
description: LimeRFE
properties:
forwardPower:
description: relative forward power in centi-Bels
type: integer
reflectedPower:
description: relative reflected power in centi-Bels
type: integer
LimeRFEActions:
description: LimeRFE
properties:
selectChannel:
type: integer
description: >
Select channel
* 0 - Rx
* 1 - Tx
deviceSetIndex:
type: integer
dexcription: Index of device set to synchronize switch with
switchChannel:
type: integer
description: >
Switch on or off
* 0 - Off
* 1 - On
fromToSettings:
type: integer
description: >
Move from/to settings to/from device
* 0 - From device to settings. The toGUI button in GUI mode
* 1 - From settings to device. The Apply button in GUI mode
openCloseDevice:
type: integer
description: >
Open or close device
* 0 - Close device
* 1 - Open device
LimeRFEPower:
description: report of forward and reflected power measurements
description: report of forward and reflected power measurements TO BE DECOMMISSIONED
properties:
forward:
description: relative forward power in centi-Bels
type: integer
reflected:
description: relative reflected power in centi-Bels
type: integer
type: integer

View File

@ -5273,6 +5273,9 @@ margin-bottom: 20px;
"GS232ControllerActions" : {
"$ref" : "#/definitions/GS232ControllerActions"
},
"LimeRFEActions" : {
"$ref" : "#/definitions/LimeRFEActions"
},
"MapActions" : {
"$ref" : "#/definitions/MapActions"
},
@ -5409,6 +5412,9 @@ margin-bottom: 20px;
"GS232ControllerReport" : {
"$ref" : "#/definitions/GS232ControllerReport"
},
"LimeRFEReport" : {
"$ref" : "#/definitions/LimeRFEReport"
},
"MapReport" : {
"$ref" : "#/definitions/MapReport"
},
@ -5504,6 +5510,9 @@ margin-bottom: 20px;
"GS232ControllerSettings" : {
"$ref" : "#/definitions/GS232ControllerSettings"
},
"LimeRFESettings" : {
"$ref" : "#/definitions/LimeRFESettings"
},
"MapSettings" : {
"$ref" : "#/definitions/MapSettings"
},
@ -7069,6 +7078,30 @@ margin-bottom: 20px;
}
},
"description" : "KiwiSDR"
};
defs.LimeRFEActions = {
"properties" : {
"selectChannel" : {
"type" : "integer",
"description" : "Select channel\n * 0 - Rx\n * 1 - Tx\n"
},
"deviceSetIndex" : {
"type" : "integer"
},
"switchChannel" : {
"type" : "integer",
"description" : "Switch on or off\n * 0 - Off\n * 1 - On\n"
},
"fromToSettings" : {
"type" : "integer",
"description" : "Move from/to settings to/from device\n * 0 - From device to settings. The toGUI button in GUI mode\n * 1 - From settings to device. The Apply button in GUI mode\n"
},
"openCloseDevice" : {
"type" : "integer",
"description" : "Open or close device\n * 0 - Close device\n * 1 - Open device\n"
}
},
"description" : "LimeRFE"
};
defs.LimeRFEDevice = {
"properties" : {
@ -7107,10 +7140,29 @@ margin-bottom: 20px;
"description" : "relative reflected power in centi-Bels"
}
},
"description" : "report of forward and reflected power measurements"
"description" : "report of forward and reflected power measurements TO BE DECOMMISSIONED"
};
defs.LimeRFEReport = {
"properties" : {
"forwardPower" : {
"type" : "integer",
"description" : "relative forward power in centi-Bels"
},
"reflectedPower" : {
"type" : "integer",
"description" : "relative reflected power in centi-Bels"
}
},
"description" : "LimeRFE"
};
defs.LimeRFESettings = {
"properties" : {
"title" : {
"type" : "string"
},
"rgbColor" : {
"type" : "integer"
},
"devicePath" : {
"type" : "string",
"description" : "Path to the device serial interface (ex /dev/ttyUSB2)"
@ -7170,6 +7222,10 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "SWR measurement source (LimeRFEController::SWRSource)\n * 0 - External\n * 1 - Cellular\n"
},
"txRxDriven" : {
"type" : "integer",
"description" : "Boolean 1 if Tx is copy of Rx else 0"
},
"rxOn" : {
"type" : "integer",
"description" : "Boolean 1 if Rx is active else 0"
@ -7177,6 +7233,25 @@ margin-bottom: 20px;
"txOn" : {
"type" : "integer",
"description" : "Boolean 1 if Tx is active else 0"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIFeatureSetIndex" : {
"type" : "integer"
},
"reverseAPIFeatureIndex" : {
"type" : "integer"
},
"rollupState" : {
"$ref" : "#/definitions/RollupState"
}
},
"description" : "LimeRFE"
@ -59698,7 +59773,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2022-05-19T00:27:23.053+02:00
Generated 2022-05-21T22:11:42.796+02:00
</div>
</div>
</div>

View File

@ -38,6 +38,8 @@ SWGFeatureActions::SWGFeatureActions() {
m_afc_actions_isSet = false;
gs232_controller_actions = nullptr;
m_gs232_controller_actions_isSet = false;
lime_rfe_actions = nullptr;
m_lime_rfe_actions_isSet = false;
map_actions = nullptr;
m_map_actions_isSet = false;
per_tester_actions = nullptr;
@ -70,6 +72,8 @@ SWGFeatureActions::init() {
m_afc_actions_isSet = false;
gs232_controller_actions = new SWGGS232ControllerActions();
m_gs232_controller_actions_isSet = false;
lime_rfe_actions = new SWGLimeRFEActions();
m_lime_rfe_actions_isSet = false;
map_actions = new SWGMapActions();
m_map_actions_isSet = false;
per_tester_actions = new SWGPERTesterActions();
@ -99,6 +103,9 @@ SWGFeatureActions::cleanup() {
if(gs232_controller_actions != nullptr) {
delete gs232_controller_actions;
}
if(lime_rfe_actions != nullptr) {
delete lime_rfe_actions;
}
if(map_actions != nullptr) {
delete map_actions;
}
@ -143,6 +150,8 @@ SWGFeatureActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&gs232_controller_actions, pJson["GS232ControllerActions"], "SWGGS232ControllerActions", "SWGGS232ControllerActions");
::SWGSDRangel::setValue(&lime_rfe_actions, pJson["LimeRFEActions"], "SWGLimeRFEActions", "SWGLimeRFEActions");
::SWGSDRangel::setValue(&map_actions, pJson["MapActions"], "SWGMapActions", "SWGMapActions");
::SWGSDRangel::setValue(&per_tester_actions, pJson["PERTesterActions"], "SWGPERTesterActions", "SWGPERTesterActions");
@ -188,6 +197,9 @@ SWGFeatureActions::asJsonObject() {
if((gs232_controller_actions != nullptr) && (gs232_controller_actions->isSet())){
toJsonValue(QString("GS232ControllerActions"), gs232_controller_actions, obj, QString("SWGGS232ControllerActions"));
}
if((lime_rfe_actions != nullptr) && (lime_rfe_actions->isSet())){
toJsonValue(QString("LimeRFEActions"), lime_rfe_actions, obj, QString("SWGLimeRFEActions"));
}
if((map_actions != nullptr) && (map_actions->isSet())){
toJsonValue(QString("MapActions"), map_actions, obj, QString("SWGMapActions"));
}
@ -263,6 +275,16 @@ SWGFeatureActions::setGs232ControllerActions(SWGGS232ControllerActions* gs232_co
this->m_gs232_controller_actions_isSet = true;
}
SWGLimeRFEActions*
SWGFeatureActions::getLimeRfeActions() {
return lime_rfe_actions;
}
void
SWGFeatureActions::setLimeRfeActions(SWGLimeRFEActions* lime_rfe_actions) {
this->lime_rfe_actions = lime_rfe_actions;
this->m_lime_rfe_actions_isSet = true;
}
SWGMapActions*
SWGFeatureActions::getMapActions() {
return map_actions;
@ -353,6 +375,9 @@ SWGFeatureActions::isSet(){
if(gs232_controller_actions && gs232_controller_actions->isSet()){
isObjectUpdated = true; break;
}
if(lime_rfe_actions && lime_rfe_actions->isSet()){
isObjectUpdated = true; break;
}
if(map_actions && map_actions->isSet()){
isObjectUpdated = true; break;
}

View File

@ -24,6 +24,7 @@
#include "SWGAFCActions.h"
#include "SWGGS232ControllerActions.h"
#include "SWGLimeRFEActions.h"
#include "SWGMapActions.h"
#include "SWGPERTesterActions.h"
#include "SWGRigCtlServerActions.h"
@ -66,6 +67,9 @@ public:
SWGGS232ControllerActions* getGs232ControllerActions();
void setGs232ControllerActions(SWGGS232ControllerActions* gs232_controller_actions);
SWGLimeRFEActions* getLimeRfeActions();
void setLimeRfeActions(SWGLimeRFEActions* lime_rfe_actions);
SWGMapActions* getMapActions();
void setMapActions(SWGMapActions* map_actions);
@ -106,6 +110,9 @@ private:
SWGGS232ControllerActions* gs232_controller_actions;
bool m_gs232_controller_actions_isSet;
SWGLimeRFEActions* lime_rfe_actions;
bool m_lime_rfe_actions_isSet;
SWGMapActions* map_actions;
bool m_map_actions_isSet;

View File

@ -34,6 +34,8 @@ SWGFeatureReport::SWGFeatureReport() {
m_afc_report_isSet = false;
gs232_controller_report = nullptr;
m_gs232_controller_report_isSet = false;
lime_rfe_report = nullptr;
m_lime_rfe_report_isSet = false;
map_report = nullptr;
m_map_report_isSet = false;
per_tester_report = nullptr;
@ -62,6 +64,8 @@ SWGFeatureReport::init() {
m_afc_report_isSet = false;
gs232_controller_report = new SWGGS232ControllerReport();
m_gs232_controller_report_isSet = false;
lime_rfe_report = new SWGLimeRFEReport();
m_lime_rfe_report_isSet = false;
map_report = new SWGMapReport();
m_map_report_isSet = false;
per_tester_report = new SWGPERTesterReport();
@ -89,6 +93,9 @@ SWGFeatureReport::cleanup() {
if(gs232_controller_report != nullptr) {
delete gs232_controller_report;
}
if(lime_rfe_report != nullptr) {
delete lime_rfe_report;
}
if(map_report != nullptr) {
delete map_report;
}
@ -129,6 +136,8 @@ SWGFeatureReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&gs232_controller_report, pJson["GS232ControllerReport"], "SWGGS232ControllerReport", "SWGGS232ControllerReport");
::SWGSDRangel::setValue(&lime_rfe_report, pJson["LimeRFEReport"], "SWGLimeRFEReport", "SWGLimeRFEReport");
::SWGSDRangel::setValue(&map_report, pJson["MapReport"], "SWGMapReport", "SWGMapReport");
::SWGSDRangel::setValue(&per_tester_report, pJson["PERTesterReport"], "SWGPERTesterReport", "SWGPERTesterReport");
@ -168,6 +177,9 @@ SWGFeatureReport::asJsonObject() {
if((gs232_controller_report != nullptr) && (gs232_controller_report->isSet())){
toJsonValue(QString("GS232ControllerReport"), gs232_controller_report, obj, QString("SWGGS232ControllerReport"));
}
if((lime_rfe_report != nullptr) && (lime_rfe_report->isSet())){
toJsonValue(QString("LimeRFEReport"), lime_rfe_report, obj, QString("SWGLimeRFEReport"));
}
if((map_report != nullptr) && (map_report->isSet())){
toJsonValue(QString("MapReport"), map_report, obj, QString("SWGMapReport"));
}
@ -223,6 +235,16 @@ SWGFeatureReport::setGs232ControllerReport(SWGGS232ControllerReport* gs232_contr
this->m_gs232_controller_report_isSet = true;
}
SWGLimeRFEReport*
SWGFeatureReport::getLimeRfeReport() {
return lime_rfe_report;
}
void
SWGFeatureReport::setLimeRfeReport(SWGLimeRFEReport* lime_rfe_report) {
this->lime_rfe_report = lime_rfe_report;
this->m_lime_rfe_report_isSet = true;
}
SWGMapReport*
SWGFeatureReport::getMapReport() {
return map_report;
@ -307,6 +329,9 @@ SWGFeatureReport::isSet(){
if(gs232_controller_report && gs232_controller_report->isSet()){
isObjectUpdated = true; break;
}
if(lime_rfe_report && lime_rfe_report->isSet()){
isObjectUpdated = true; break;
}
if(map_report && map_report->isSet()){
isObjectUpdated = true; break;
}

View File

@ -24,6 +24,7 @@
#include "SWGAFCReport.h"
#include "SWGGS232ControllerReport.h"
#include "SWGLimeRFEReport.h"
#include "SWGMapReport.h"
#include "SWGPERTesterReport.h"
#include "SWGRigCtlServerReport.h"
@ -60,6 +61,9 @@ public:
SWGGS232ControllerReport* getGs232ControllerReport();
void setGs232ControllerReport(SWGGS232ControllerReport* gs232_controller_report);
SWGLimeRFEReport* getLimeRfeReport();
void setLimeRfeReport(SWGLimeRFEReport* lime_rfe_report);
SWGMapReport* getMapReport();
void setMapReport(SWGMapReport* map_report);
@ -94,6 +98,9 @@ private:
SWGGS232ControllerReport* gs232_controller_report;
bool m_gs232_controller_report_isSet;
SWGLimeRFEReport* lime_rfe_report;
bool m_lime_rfe_report_isSet;
SWGMapReport* map_report;
bool m_map_report_isSet;

View File

@ -48,6 +48,8 @@ SWGFeatureSettings::SWGFeatureSettings() {
m_jogdial_controller_settings_isSet = false;
gs232_controller_settings = nullptr;
m_gs232_controller_settings_isSet = false;
lime_rfe_settings = nullptr;
m_lime_rfe_settings_isSet = false;
map_settings = nullptr;
m_map_settings_isSet = false;
per_tester_settings = nullptr;
@ -92,6 +94,8 @@ SWGFeatureSettings::init() {
m_jogdial_controller_settings_isSet = false;
gs232_controller_settings = new SWGGS232ControllerSettings();
m_gs232_controller_settings_isSet = false;
lime_rfe_settings = new SWGLimeRFESettings();
m_lime_rfe_settings_isSet = false;
map_settings = new SWGMapSettings();
m_map_settings_isSet = false;
per_tester_settings = new SWGPERTesterSettings();
@ -138,6 +142,9 @@ SWGFeatureSettings::cleanup() {
if(gs232_controller_settings != nullptr) {
delete gs232_controller_settings;
}
if(lime_rfe_settings != nullptr) {
delete lime_rfe_settings;
}
if(map_settings != nullptr) {
delete map_settings;
}
@ -195,6 +202,8 @@ SWGFeatureSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&gs232_controller_settings, pJson["GS232ControllerSettings"], "SWGGS232ControllerSettings", "SWGGS232ControllerSettings");
::SWGSDRangel::setValue(&lime_rfe_settings, pJson["LimeRFESettings"], "SWGLimeRFESettings", "SWGLimeRFESettings");
::SWGSDRangel::setValue(&map_settings, pJson["MapSettings"], "SWGMapSettings", "SWGMapSettings");
::SWGSDRangel::setValue(&per_tester_settings, pJson["PERTesterSettings"], "SWGPERTesterSettings", "SWGPERTesterSettings");
@ -257,6 +266,9 @@ SWGFeatureSettings::asJsonObject() {
if((gs232_controller_settings != nullptr) && (gs232_controller_settings->isSet())){
toJsonValue(QString("GS232ControllerSettings"), gs232_controller_settings, obj, QString("SWGGS232ControllerSettings"));
}
if((lime_rfe_settings != nullptr) && (lime_rfe_settings->isSet())){
toJsonValue(QString("LimeRFESettings"), lime_rfe_settings, obj, QString("SWGLimeRFESettings"));
}
if((map_settings != nullptr) && (map_settings->isSet())){
toJsonValue(QString("MapSettings"), map_settings, obj, QString("SWGMapSettings"));
}
@ -385,6 +397,16 @@ SWGFeatureSettings::setGs232ControllerSettings(SWGGS232ControllerSettings* gs232
this->m_gs232_controller_settings_isSet = true;
}
SWGLimeRFESettings*
SWGFeatureSettings::getLimeRfeSettings() {
return lime_rfe_settings;
}
void
SWGFeatureSettings::setLimeRfeSettings(SWGLimeRFESettings* lime_rfe_settings) {
this->lime_rfe_settings = lime_rfe_settings;
this->m_lime_rfe_settings_isSet = true;
}
SWGMapSettings*
SWGFeatureSettings::getMapSettings() {
return map_settings;
@ -500,6 +522,9 @@ SWGFeatureSettings::isSet(){
if(gs232_controller_settings && gs232_controller_settings->isSet()){
isObjectUpdated = true; break;
}
if(lime_rfe_settings && lime_rfe_settings->isSet()){
isObjectUpdated = true; break;
}
if(map_settings && map_settings->isSet()){
isObjectUpdated = true; break;
}

View File

@ -29,6 +29,7 @@
#include "SWGDemodAnalyzerSettings.h"
#include "SWGGS232ControllerSettings.h"
#include "SWGJogdialControllerSettings.h"
#include "SWGLimeRFESettings.h"
#include "SWGMapSettings.h"
#include "SWGPERTesterSettings.h"
#include "SWGRadiosondeSettings.h"
@ -87,6 +88,9 @@ public:
SWGGS232ControllerSettings* getGs232ControllerSettings();
void setGs232ControllerSettings(SWGGS232ControllerSettings* gs232_controller_settings);
SWGLimeRFESettings* getLimeRfeSettings();
void setLimeRfeSettings(SWGLimeRFESettings* lime_rfe_settings);
SWGMapSettings* getMapSettings();
void setMapSettings(SWGMapSettings* map_settings);
@ -145,6 +149,9 @@ private:
SWGGS232ControllerSettings* gs232_controller_settings;
bool m_gs232_controller_settings_isSet;
SWGLimeRFESettings* lime_rfe_settings;
bool m_lime_rfe_settings_isSet;
SWGMapSettings* map_settings;
bool m_map_settings_isSet;

View File

@ -0,0 +1,200 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 7.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGLimeRFEActions.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGLimeRFEActions::SWGLimeRFEActions(QString* json) {
init();
this->fromJson(*json);
}
SWGLimeRFEActions::SWGLimeRFEActions() {
select_channel = 0;
m_select_channel_isSet = false;
device_set_index = 0;
m_device_set_index_isSet = false;
switch_channel = 0;
m_switch_channel_isSet = false;
from_to_settings = 0;
m_from_to_settings_isSet = false;
open_close_device = 0;
m_open_close_device_isSet = false;
}
SWGLimeRFEActions::~SWGLimeRFEActions() {
this->cleanup();
}
void
SWGLimeRFEActions::init() {
select_channel = 0;
m_select_channel_isSet = false;
device_set_index = 0;
m_device_set_index_isSet = false;
switch_channel = 0;
m_switch_channel_isSet = false;
from_to_settings = 0;
m_from_to_settings_isSet = false;
open_close_device = 0;
m_open_close_device_isSet = false;
}
void
SWGLimeRFEActions::cleanup() {
}
SWGLimeRFEActions*
SWGLimeRFEActions::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGLimeRFEActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&select_channel, pJson["selectChannel"], "qint32", "");
::SWGSDRangel::setValue(&device_set_index, pJson["deviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&switch_channel, pJson["switchChannel"], "qint32", "");
::SWGSDRangel::setValue(&from_to_settings, pJson["fromToSettings"], "qint32", "");
::SWGSDRangel::setValue(&open_close_device, pJson["openCloseDevice"], "qint32", "");
}
QString
SWGLimeRFEActions::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGLimeRFEActions::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_select_channel_isSet){
obj->insert("selectChannel", QJsonValue(select_channel));
}
if(m_device_set_index_isSet){
obj->insert("deviceSetIndex", QJsonValue(device_set_index));
}
if(m_switch_channel_isSet){
obj->insert("switchChannel", QJsonValue(switch_channel));
}
if(m_from_to_settings_isSet){
obj->insert("fromToSettings", QJsonValue(from_to_settings));
}
if(m_open_close_device_isSet){
obj->insert("openCloseDevice", QJsonValue(open_close_device));
}
return obj;
}
qint32
SWGLimeRFEActions::getSelectChannel() {
return select_channel;
}
void
SWGLimeRFEActions::setSelectChannel(qint32 select_channel) {
this->select_channel = select_channel;
this->m_select_channel_isSet = true;
}
qint32
SWGLimeRFEActions::getDeviceSetIndex() {
return device_set_index;
}
void
SWGLimeRFEActions::setDeviceSetIndex(qint32 device_set_index) {
this->device_set_index = device_set_index;
this->m_device_set_index_isSet = true;
}
qint32
SWGLimeRFEActions::getSwitchChannel() {
return switch_channel;
}
void
SWGLimeRFEActions::setSwitchChannel(qint32 switch_channel) {
this->switch_channel = switch_channel;
this->m_switch_channel_isSet = true;
}
qint32
SWGLimeRFEActions::getFromToSettings() {
return from_to_settings;
}
void
SWGLimeRFEActions::setFromToSettings(qint32 from_to_settings) {
this->from_to_settings = from_to_settings;
this->m_from_to_settings_isSet = true;
}
qint32
SWGLimeRFEActions::getOpenCloseDevice() {
return open_close_device;
}
void
SWGLimeRFEActions::setOpenCloseDevice(qint32 open_close_device) {
this->open_close_device = open_close_device;
this->m_open_close_device_isSet = true;
}
bool
SWGLimeRFEActions::isSet(){
bool isObjectUpdated = false;
do{
if(m_select_channel_isSet){
isObjectUpdated = true; break;
}
if(m_device_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_switch_channel_isSet){
isObjectUpdated = true; break;
}
if(m_from_to_settings_isSet){
isObjectUpdated = true; break;
}
if(m_open_close_device_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,82 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 7.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGLimeRFEActions.h
*
* LimeRFE
*/
#ifndef SWGLimeRFEActions_H_
#define SWGLimeRFEActions_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGLimeRFEActions: public SWGObject {
public:
SWGLimeRFEActions();
SWGLimeRFEActions(QString* json);
virtual ~SWGLimeRFEActions();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGLimeRFEActions* fromJson(QString &jsonString) override;
qint32 getSelectChannel();
void setSelectChannel(qint32 select_channel);
qint32 getDeviceSetIndex();
void setDeviceSetIndex(qint32 device_set_index);
qint32 getSwitchChannel();
void setSwitchChannel(qint32 switch_channel);
qint32 getFromToSettings();
void setFromToSettings(qint32 from_to_settings);
qint32 getOpenCloseDevice();
void setOpenCloseDevice(qint32 open_close_device);
virtual bool isSet() override;
private:
qint32 select_channel;
bool m_select_channel_isSet;
qint32 device_set_index;
bool m_device_set_index_isSet;
qint32 switch_channel;
bool m_switch_channel_isSet;
qint32 from_to_settings;
bool m_from_to_settings_isSet;
qint32 open_close_device;
bool m_open_close_device_isSet;
};
}
#endif /* SWGLimeRFEActions_H_ */

View File

@ -13,7 +13,7 @@
/*
* SWGLimeRFEPower.h
*
* report of forward and reflected power measurements
* report of forward and reflected power measurements TO BE DECOMMISSIONED
*/
#ifndef SWGLimeRFEPower_H_

View 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: 7.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGLimeRFEReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGLimeRFEReport::SWGLimeRFEReport(QString* json) {
init();
this->fromJson(*json);
}
SWGLimeRFEReport::SWGLimeRFEReport() {
forward_power = 0;
m_forward_power_isSet = false;
reflected_power = 0;
m_reflected_power_isSet = false;
}
SWGLimeRFEReport::~SWGLimeRFEReport() {
this->cleanup();
}
void
SWGLimeRFEReport::init() {
forward_power = 0;
m_forward_power_isSet = false;
reflected_power = 0;
m_reflected_power_isSet = false;
}
void
SWGLimeRFEReport::cleanup() {
}
SWGLimeRFEReport*
SWGLimeRFEReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGLimeRFEReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&forward_power, pJson["forwardPower"], "qint32", "");
::SWGSDRangel::setValue(&reflected_power, pJson["reflectedPower"], "qint32", "");
}
QString
SWGLimeRFEReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGLimeRFEReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_forward_power_isSet){
obj->insert("forwardPower", QJsonValue(forward_power));
}
if(m_reflected_power_isSet){
obj->insert("reflectedPower", QJsonValue(reflected_power));
}
return obj;
}
qint32
SWGLimeRFEReport::getForwardPower() {
return forward_power;
}
void
SWGLimeRFEReport::setForwardPower(qint32 forward_power) {
this->forward_power = forward_power;
this->m_forward_power_isSet = true;
}
qint32
SWGLimeRFEReport::getReflectedPower() {
return reflected_power;
}
void
SWGLimeRFEReport::setReflectedPower(qint32 reflected_power) {
this->reflected_power = reflected_power;
this->m_reflected_power_isSet = true;
}
bool
SWGLimeRFEReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_forward_power_isSet){
isObjectUpdated = true; break;
}
if(m_reflected_power_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View 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: 7.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGLimeRFEReport.h
*
* LimeRFE
*/
#ifndef SWGLimeRFEReport_H_
#define SWGLimeRFEReport_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGLimeRFEReport: public SWGObject {
public:
SWGLimeRFEReport();
SWGLimeRFEReport(QString* json);
virtual ~SWGLimeRFEReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGLimeRFEReport* fromJson(QString &jsonString) override;
qint32 getForwardPower();
void setForwardPower(qint32 forward_power);
qint32 getReflectedPower();
void setReflectedPower(qint32 reflected_power);
virtual bool isSet() override;
private:
qint32 forward_power;
bool m_forward_power_isSet;
qint32 reflected_power;
bool m_reflected_power_isSet;
};
}
#endif /* SWGLimeRFEReport_H_ */

View File

@ -28,6 +28,10 @@ SWGLimeRFESettings::SWGLimeRFESettings(QString* json) {
}
SWGLimeRFESettings::SWGLimeRFESettings() {
title = nullptr;
m_title_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
device_path = nullptr;
m_device_path_isSet = false;
rx_channels = 0;
@ -58,10 +62,24 @@ SWGLimeRFESettings::SWGLimeRFESettings() {
m_swr_enable_isSet = false;
swr_source = 0;
m_swr_source_isSet = false;
tx_rx_driven = 0;
m_tx_rx_driven_isSet = false;
rx_on = 0;
m_rx_on_isSet = false;
tx_on = 0;
m_tx_on_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_feature_set_index = 0;
m_reverse_api_feature_set_index_isSet = false;
reverse_api_feature_index = 0;
m_reverse_api_feature_index_isSet = false;
rollup_state = nullptr;
m_rollup_state_isSet = false;
}
SWGLimeRFESettings::~SWGLimeRFESettings() {
@ -70,6 +88,10 @@ SWGLimeRFESettings::~SWGLimeRFESettings() {
void
SWGLimeRFESettings::init() {
title = new QString("");
m_title_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
device_path = new QString("");
m_device_path_isSet = false;
rx_channels = 0;
@ -100,14 +122,32 @@ SWGLimeRFESettings::init() {
m_swr_enable_isSet = false;
swr_source = 0;
m_swr_source_isSet = false;
tx_rx_driven = 0;
m_tx_rx_driven_isSet = false;
rx_on = 0;
m_rx_on_isSet = false;
tx_on = 0;
m_tx_on_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_feature_set_index = 0;
m_reverse_api_feature_set_index_isSet = false;
reverse_api_feature_index = 0;
m_reverse_api_feature_index_isSet = false;
rollup_state = new SWGRollupState();
m_rollup_state_isSet = false;
}
void
SWGLimeRFESettings::cleanup() {
if(title != nullptr) {
delete title;
}
if(device_path != nullptr) {
delete device_path;
}
@ -127,6 +167,17 @@ SWGLimeRFESettings::cleanup() {
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
if(rollup_state != nullptr) {
delete rollup_state;
}
}
SWGLimeRFESettings*
@ -140,6 +191,10 @@ SWGLimeRFESettings::fromJson(QString &json) {
void
SWGLimeRFESettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&device_path, pJson["devicePath"], "QString", "QString");
::SWGSDRangel::setValue(&rx_channels, pJson["rxChannels"], "qint32", "");
@ -170,10 +225,24 @@ SWGLimeRFESettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&swr_source, pJson["swrSource"], "qint32", "");
::SWGSDRangel::setValue(&tx_rx_driven, pJson["txRxDriven"], "qint32", "");
::SWGSDRangel::setValue(&rx_on, pJson["rxOn"], "qint32", "");
::SWGSDRangel::setValue(&tx_on, pJson["txOn"], "qint32", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_feature_set_index, pJson["reverseAPIFeatureSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_feature_index, pJson["reverseAPIFeatureIndex"], "qint32", "");
::SWGSDRangel::setValue(&rollup_state, pJson["rollupState"], "SWGRollupState", "SWGRollupState");
}
QString
@ -190,6 +259,12 @@ SWGLimeRFESettings::asJson ()
QJsonObject*
SWGLimeRFESettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
if(device_path != nullptr && *device_path != QString("")){
toJsonValue(QString("devicePath"), device_path, obj, QString("QString"));
}
@ -235,16 +310,57 @@ SWGLimeRFESettings::asJsonObject() {
if(m_swr_source_isSet){
obj->insert("swrSource", QJsonValue(swr_source));
}
if(m_tx_rx_driven_isSet){
obj->insert("txRxDriven", QJsonValue(tx_rx_driven));
}
if(m_rx_on_isSet){
obj->insert("rxOn", QJsonValue(rx_on));
}
if(m_tx_on_isSet){
obj->insert("txOn", QJsonValue(tx_on));
}
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
}
if(m_reverse_api_port_isSet){
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
}
if(m_reverse_api_feature_set_index_isSet){
obj->insert("reverseAPIFeatureSetIndex", QJsonValue(reverse_api_feature_set_index));
}
if(m_reverse_api_feature_index_isSet){
obj->insert("reverseAPIFeatureIndex", QJsonValue(reverse_api_feature_index));
}
if((rollup_state != nullptr) && (rollup_state->isSet())){
toJsonValue(QString("rollupState"), rollup_state, obj, QString("SWGRollupState"));
}
return obj;
}
QString*
SWGLimeRFESettings::getTitle() {
return title;
}
void
SWGLimeRFESettings::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
qint32
SWGLimeRFESettings::getRgbColor() {
return rgb_color;
}
void
SWGLimeRFESettings::setRgbColor(qint32 rgb_color) {
this->rgb_color = rgb_color;
this->m_rgb_color_isSet = true;
}
QString*
SWGLimeRFESettings::getDevicePath() {
return device_path;
@ -395,6 +511,16 @@ SWGLimeRFESettings::setSwrSource(qint32 swr_source) {
this->m_swr_source_isSet = true;
}
qint32
SWGLimeRFESettings::getTxRxDriven() {
return tx_rx_driven;
}
void
SWGLimeRFESettings::setTxRxDriven(qint32 tx_rx_driven) {
this->tx_rx_driven = tx_rx_driven;
this->m_tx_rx_driven_isSet = true;
}
qint32
SWGLimeRFESettings::getRxOn() {
return rx_on;
@ -415,11 +541,77 @@ SWGLimeRFESettings::setTxOn(qint32 tx_on) {
this->m_tx_on_isSet = true;
}
qint32
SWGLimeRFESettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGLimeRFESettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGLimeRFESettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGLimeRFESettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGLimeRFESettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGLimeRFESettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGLimeRFESettings::getReverseApiFeatureSetIndex() {
return reverse_api_feature_set_index;
}
void
SWGLimeRFESettings::setReverseApiFeatureSetIndex(qint32 reverse_api_feature_set_index) {
this->reverse_api_feature_set_index = reverse_api_feature_set_index;
this->m_reverse_api_feature_set_index_isSet = true;
}
qint32
SWGLimeRFESettings::getReverseApiFeatureIndex() {
return reverse_api_feature_index;
}
void
SWGLimeRFESettings::setReverseApiFeatureIndex(qint32 reverse_api_feature_index) {
this->reverse_api_feature_index = reverse_api_feature_index;
this->m_reverse_api_feature_index_isSet = true;
}
SWGRollupState*
SWGLimeRFESettings::getRollupState() {
return rollup_state;
}
void
SWGLimeRFESettings::setRollupState(SWGRollupState* rollup_state) {
this->rollup_state = rollup_state;
this->m_rollup_state_isSet = true;
}
bool
SWGLimeRFESettings::isSet(){
bool isObjectUpdated = false;
do{
if(title && *title != QString("")){
isObjectUpdated = true; break;
}
if(m_rgb_color_isSet){
isObjectUpdated = true; break;
}
if(device_path && *device_path != QString("")){
isObjectUpdated = true; break;
}
@ -465,12 +657,33 @@ SWGLimeRFESettings::isSet(){
if(m_swr_source_isSet){
isObjectUpdated = true; break;
}
if(m_tx_rx_driven_isSet){
isObjectUpdated = true; break;
}
if(m_rx_on_isSet){
isObjectUpdated = true; break;
}
if(m_tx_on_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}
if(reverse_api_address && *reverse_api_address != QString("")){
isObjectUpdated = true; break;
}
if(m_reverse_api_port_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_feature_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_feature_index_isSet){
isObjectUpdated = true; break;
}
if(rollup_state && rollup_state->isSet()){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGRollupState.h"
#include <QString>
#include "SWGObject.h"
@ -42,6 +43,12 @@ public:
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGLimeRFESettings* fromJson(QString &jsonString) override;
QString* getTitle();
void setTitle(QString* title);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
QString* getDevicePath();
void setDevicePath(QString* device_path);
@ -87,16 +94,43 @@ public:
qint32 getSwrSource();
void setSwrSource(qint32 swr_source);
qint32 getTxRxDriven();
void setTxRxDriven(qint32 tx_rx_driven);
qint32 getRxOn();
void setRxOn(qint32 rx_on);
qint32 getTxOn();
void setTxOn(qint32 tx_on);
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
QString* getReverseApiAddress();
void setReverseApiAddress(QString* reverse_api_address);
qint32 getReverseApiPort();
void setReverseApiPort(qint32 reverse_api_port);
qint32 getReverseApiFeatureSetIndex();
void setReverseApiFeatureSetIndex(qint32 reverse_api_feature_set_index);
qint32 getReverseApiFeatureIndex();
void setReverseApiFeatureIndex(qint32 reverse_api_feature_index);
SWGRollupState* getRollupState();
void setRollupState(SWGRollupState* rollup_state);
virtual bool isSet() override;
private:
QString* title;
bool m_title_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;
QString* device_path;
bool m_device_path_isSet;
@ -142,12 +176,33 @@ private:
qint32 swr_source;
bool m_swr_source_isSet;
qint32 tx_rx_driven;
bool m_tx_rx_driven_isSet;
qint32 rx_on;
bool m_rx_on_isSet;
qint32 tx_on;
bool m_tx_on_isSet;
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;
QString* reverse_api_address;
bool m_reverse_api_address_isSet;
qint32 reverse_api_port;
bool m_reverse_api_port_isSet;
qint32 reverse_api_feature_set_index;
bool m_reverse_api_feature_set_index_isSet;
qint32 reverse_api_feature_index;
bool m_reverse_api_feature_index_isSet;
SWGRollupState* rollup_state;
bool m_rollup_state_isSet;
};
}

View File

@ -158,9 +158,11 @@
#include "SWGJogdialControllerSettings.h"
#include "SWGKiwiSDRReport.h"
#include "SWGKiwiSDRSettings.h"
#include "SWGLimeRFEActions.h"
#include "SWGLimeRFEDevice.h"
#include "SWGLimeRFEDevices.h"
#include "SWGLimeRFEPower.h"
#include "SWGLimeRFEReport.h"
#include "SWGLimeRFESettings.h"
#include "SWGLimeSdrInputReport.h"
#include "SWGLimeSdrInputSettings.h"
@ -1048,6 +1050,11 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGLimeRFEActions").compare(type) == 0) {
SWGLimeRFEActions *obj = new SWGLimeRFEActions();
obj->init();
return obj;
}
if(QString("SWGLimeRFEDevice").compare(type) == 0) {
SWGLimeRFEDevice *obj = new SWGLimeRFEDevice();
obj->init();
@ -1063,6 +1070,11 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGLimeRFEReport").compare(type) == 0) {
SWGLimeRFEReport *obj = new SWGLimeRFEReport();
obj->init();
return obj;
}
if(QString("SWGLimeRFESettings").compare(type) == 0) {
SWGLimeRFESettings *obj = new SWGLimeRFESettings();
obj->init();