1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

LimeSDR REST API: support GPIO

This commit is contained in:
f4exb 2018-11-29 01:21:44 +01:00
parent f96978d196
commit 5319eac2ff
25 changed files with 546 additions and 12 deletions

1
debian/changelog vendored
View File

@ -2,6 +2,7 @@ sdrangel (4.3.1-1) unstable; urgency=medium
* RTL-SDR: offset tuning support
* SoapySDR support: 250 ms minimum timeout
* LimeSDR REST API: support GPIO
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 02 Dec 2018 21:14:18 +0100

View File

@ -18,6 +18,7 @@
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportBuddyChange, Message)
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportClockSourceChange, Message)
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportGPIOChange, Message)
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportDeviceInfo, Message)
const float DeviceLimeSDRShared::m_sampleFifoLengthInSeconds = 0.25;

View File

@ -118,6 +118,28 @@ public:
{ }
};
class DEVICES_API MsgReportGPIOChange : public Message {
MESSAGE_CLASS_DECLARATION
public:
uint8_t getGPIODir() const { return m_gpioDir; }
uint8_t getGPIOPins() const { return m_gpioPins; }
static MsgReportGPIOChange* create(uint8_t gpioDir, uint8_t gpioPins)
{
return new MsgReportGPIOChange(gpioDir, gpioPins);
}
private:
uint8_t m_gpioDir;
uint8_t m_gpioPins;
MsgReportGPIOChange(uint8_t gpioDir, uint8_t gpioPins) :
m_gpioDir(gpioDir),
m_gpioPins(gpioPins)
{}
};
class DEVICES_API ThreadInterface
{
public:

View File

@ -599,6 +599,17 @@ bool LimeSDROutput::handleMessage(const Message& message)
return true;
}
else if (DeviceLimeSDRShared::MsgReportGPIOChange::match(message))
{
DeviceLimeSDRShared::MsgReportGPIOChange& report = (DeviceLimeSDRShared::MsgReportGPIOChange&) message;
m_settings.m_gpioDir = report.getGPIODir();
m_settings.m_gpioPins = report.getGPIOPins();
// no GUI for the moment only REST API
return true;
}
else if (MsgGetStreamInfo::match(message))
{
// qDebug() << "LimeSDROutput::handleMessage: MsgGetStreamInfo";
@ -700,6 +711,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
bool forwardChangeTxDSP = false;
bool forwardChangeAllDSP = false;
bool forwardClockSource = false;
bool forwardGPIOChange = false;
bool ownThreadWasRunning = false;
bool doCalibration = false;
bool doLPCalibration = false;
@ -916,6 +928,32 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
}
}
if ((m_settings.m_gpioDir != settings.m_gpioDir) || force)
{
if (LMS_GPIODirWrite(m_deviceShared.m_deviceParams->getDevice(), &settings.m_gpioDir, 1) < 0)
{
qCritical("LimeSDROutput::applySettings: could not set GPIO directions to %u", settings.m_gpioDir);
}
else
{
forwardGPIOChange = true;
qDebug("LimeSDROutput::applySettings: GPIO directions set to %u", settings.m_gpioDir);
}
}
if ((m_settings.m_gpioPins != settings.m_gpioPins) || force)
{
if (LMS_GPIOWrite(m_deviceShared.m_deviceParams->getDevice(), &settings.m_gpioPins, 1) < 0)
{
qCritical("LimeSDROutput::applySettings: could not set GPIO pins to %u", settings.m_gpioPins);
}
else
{
forwardGPIOChange = true;
qDebug("LimeSDROutput::applySettings: GPIO pins set to %u", settings.m_gpioPins);
}
}
m_settings = settings;
double clockGenFreqAfter;
@ -1072,6 +1110,30 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
}
}
if (forwardGPIOChange)
{
const std::vector<DeviceSourceAPI*>& sourceBuddies = m_deviceAPI->getSourceBuddies();
std::vector<DeviceSourceAPI*>::const_iterator itSource = sourceBuddies.begin();
for (; itSource != sourceBuddies.end(); ++itSource)
{
DeviceLimeSDRShared::MsgReportGPIOChange *report = DeviceLimeSDRShared::MsgReportGPIOChange::create(
m_settings.m_gpioDir, m_settings.m_gpioPins);
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
}
// send to sink buddies
const std::vector<DeviceSinkAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
std::vector<DeviceSinkAPI*>::const_iterator itSink = sinkBuddies.begin();
for (; itSink != sinkBuddies.end(); ++itSink)
{
DeviceLimeSDRShared::MsgReportGPIOChange *report = DeviceLimeSDRShared::MsgReportGPIOChange::create(
m_settings.m_gpioDir, m_settings.m_gpioPins);
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
}
}
QLocale loc;
qDebug().noquote() << "LimeSDROutput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
@ -1092,6 +1154,8 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
<< " m_antennaPath: " << m_settings.m_antennaPath
<< " m_extClock: " << m_settings.m_extClock
<< " m_extClockFreq: " << loc.toString(m_settings.m_extClockFreq)
<< " m_gpioDir: " << m_settings.m_gpioDir
<< " m_gpioPins: " << m_settings.m_gpioPins
<< " force: " << force
<< " forceNCOFrequency: " << forceNCOFrequency
<< " doCalibration: " << doCalibration
@ -1165,6 +1229,12 @@ int LimeSDROutput::webapiSettingsPutPatch(
if (deviceSettingsKeys.contains("transverterMode")) {
settings.m_transverterMode = response.getLimeSdrOutputSettings()->getTransverterMode() != 0;
}
if (deviceSettingsKeys.contains("gpioDir")) {
settings.m_gpioDir = response.getLimeSdrOutputSettings()->getGpioDir() & 0xFF;
}
if (deviceSettingsKeys.contains("gpioPins")) {
settings.m_gpioPins = response.getLimeSdrOutputSettings()->getGpioPins() & 0xFF;
}
MsgConfigureLimeSDR *msg = MsgConfigureLimeSDR::create(settings, force);
m_inputMessageQueue.push(msg);
@ -1206,6 +1276,8 @@ void LimeSDROutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
response.getLimeSdrOutputSettings()->setNcoFrequency(settings.m_ncoFrequency);
response.getLimeSdrOutputSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
response.getLimeSdrOutputSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
response.getLimeSdrOutputSettings()->setGpioDir(settings.m_gpioDir);
response.getLimeSdrOutputSettings()->setGpioPins(settings.m_gpioPins);
}
int LimeSDROutput::webapiRunGet(
@ -1240,6 +1312,8 @@ void LimeSDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
{
bool success = false;
double temp = 0.0;
uint8_t gpioDir = 0;
uint8_t gpioPins = 0;
lms_stream_status_t status;
status.active = false;
status.fifoFilledCount = 0;
@ -1262,9 +1336,14 @@ void LimeSDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo
response.getLimeSdrOutputReport()->setLinkRate(status.linkRate);
response.getLimeSdrOutputReport()->setHwTimestamp(status.timestamp);
if (m_deviceShared.m_deviceParams->getDevice()) {
if (m_deviceShared.m_deviceParams->getDevice())
{
LMS_GetChipTemperature(m_deviceShared.m_deviceParams->getDevice(), 0, &temp);
LMS_GPIODirRead(m_deviceShared.m_deviceParams->getDevice(), &gpioDir, 1);
LMS_GPIORead(m_deviceShared.m_deviceParams->getDevice(), &gpioPins, 1);
}
response.getLimeSdrOutputReport()->setTemperature(temp);
response.getLimeSdrOutputReport()->setGpioDir(gpioDir);
response.getLimeSdrOutputReport()->setGpioPins(gpioPins);
}

View File

@ -34,7 +34,7 @@
const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
QString("LimeSDR Output"),
QString("4.2.4"),
QString("4.3.1"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -40,6 +40,8 @@ void LimeSDROutputSettings::resetToDefaults()
m_extClockFreq = 10000000; // 10 MHz
m_transverterMode = false;
m_transverterDeltaFrequency = 0;
m_gpioDir = 0;
m_gpioPins = 0;
}
QByteArray LimeSDROutputSettings::serialize() const
@ -60,6 +62,8 @@ QByteArray LimeSDROutputSettings::serialize() const
s.writeU32(15, m_extClockFreq);
s.writeBool(16, m_transverterMode);
s.writeS64(17, m_transverterDeltaFrequency);
s.writeU32(18, m_gpioDir);
s.writeU32(19, m_gpioPins);
return s.final();
}
@ -77,6 +81,7 @@ bool LimeSDROutputSettings::deserialize(const QByteArray& data)
if (d.getVersion() == 1)
{
int intval;
uint32_t uintval;
d.readS32(1, &m_devSampleRate, 5000000);
d.readU32(2, &m_log2HardInterp, 2);
@ -93,6 +98,10 @@ bool LimeSDROutputSettings::deserialize(const QByteArray& data)
d.readU32(15, &m_extClockFreq, 10000000);
d.readBool(16, &m_transverterMode, false);
d.readS64(17, &m_transverterDeltaFrequency, 0);
d.readU32(18, &uintval, 0);
m_gpioDir = uintval & 0xFF;
d.readU32(19, &uintval, 0);
m_gpioPins = uintval & 0xFF;
return true;
}

View File

@ -56,6 +56,8 @@ struct LimeSDROutputSettings
uint32_t m_extClockFreq; //!< Frequency (Hz) of external clock source
bool m_transverterMode;
qint64 m_transverterDeltaFrequency;
uint8_t m_gpioDir; //!< GPIO pin direction LSB first; 0 input, 1 output
uint8_t m_gpioPins; //!< GPIO pins to write; LSB first
LimeSDROutputSettings();
void resetToDefaults();

View File

@ -30,7 +30,7 @@ class DeviceSourceAPI;
const PluginDescriptor PlutoSDROutputPlugin::m_pluginDescriptor = {
QString("PlutoSDR Output"),
QString("4.0.4"),
QString("4.3.1"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -615,6 +615,17 @@ bool LimeSDRInput::handleMessage(const Message& message)
return true;
}
else if (DeviceLimeSDRShared::MsgReportGPIOChange::match(message))
{
DeviceLimeSDRShared::MsgReportGPIOChange& report = (DeviceLimeSDRShared::MsgReportGPIOChange&) message;
m_settings.m_gpioDir = report.getGPIODir();
m_settings.m_gpioPins = report.getGPIOPins();
// no GUI for the moment only REST API
return true;
}
else if (MsgGetStreamInfo::match(message))
{
// qDebug() << "LimeSDRInput::handleMessage: MsgGetStreamInfo";
@ -757,6 +768,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
bool forwardChangeRxDSP = false;
bool forwardChangeAllDSP = false;
bool forwardClockSource = false;
bool forwardGPIOChange = false;
bool ownThreadWasRunning = false;
bool doCalibration = false;
bool doLPCalibration = false;
@ -1093,6 +1105,32 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
}
}
if ((m_settings.m_gpioDir != settings.m_gpioDir) || force)
{
if (LMS_GPIODirWrite(m_deviceShared.m_deviceParams->getDevice(), &settings.m_gpioDir, 1) < 0)
{
qCritical("LimeSDROutput::applySettings: could not set GPIO directions to %u", settings.m_gpioDir);
}
else
{
forwardGPIOChange = true;
qDebug("LimeSDROutput::applySettings: GPIO directions set to %u", settings.m_gpioDir);
}
}
if ((m_settings.m_gpioPins != settings.m_gpioPins) || force)
{
if (LMS_GPIOWrite(m_deviceShared.m_deviceParams->getDevice(), &settings.m_gpioPins, 1) < 0)
{
qCritical("LimeSDROutput::applySettings: could not set GPIO pins to %u", settings.m_gpioPins);
}
else
{
forwardGPIOChange = true;
qDebug("LimeSDROutput::applySettings: GPIO pins set to %u", settings.m_gpioPins);
}
}
m_settings = settings;
double clockGenFreqAfter;
@ -1250,6 +1288,31 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
}
}
if (forwardGPIOChange)
{
// send to source buddies
const std::vector<DeviceSourceAPI*>& sourceBuddies = m_deviceAPI->getSourceBuddies();
std::vector<DeviceSourceAPI*>::const_iterator itSource = sourceBuddies.begin();
for (; itSource != sourceBuddies.end(); ++itSource)
{
DeviceLimeSDRShared::MsgReportClockSourceChange *report = DeviceLimeSDRShared::MsgReportClockSourceChange::create(
m_settings.m_extClock, m_settings.m_extClockFreq);
(*itSource)->getSampleSourceInputMessageQueue()->push(report);
}
// send to sink buddies
const std::vector<DeviceSinkAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
std::vector<DeviceSinkAPI*>::const_iterator itSink = sinkBuddies.begin();
for (; itSink != sinkBuddies.end(); ++itSink)
{
DeviceLimeSDRShared::MsgReportClockSourceChange *report = DeviceLimeSDRShared::MsgReportClockSourceChange::create(
m_settings.m_extClock, m_settings.m_extClockFreq);
(*itSink)->getSampleSinkInputMessageQueue()->push(report);
}
}
QLocale loc;
qDebug().noquote() << "LimeSDRInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
@ -1270,6 +1333,8 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
<< " m_antennaPath: " << m_settings.m_antennaPath
<< " m_extClock: " << m_settings.m_extClock
<< " m_extClockFreq: " << loc.toString(m_settings.m_extClockFreq)
<< " m_gpioDir: " << m_settings.m_gpioDir
<< " m_gpioPins: " << m_settings.m_gpioPins
<< " force: " << force
<< " forceNCOFrequency: " << forceNCOFrequency
<< " doCalibration: " << doCalibration
@ -1364,6 +1429,12 @@ int LimeSDRInput::webapiSettingsPutPatch(
if (deviceSettingsKeys.contains("fileRecordName")) {
settings.m_fileRecordName = *response.getLimeSdrInputSettings()->getFileRecordName();
}
if (deviceSettingsKeys.contains("gpioDir")) {
settings.m_gpioDir = response.getLimeSdrInputSettings()->getGpioDir() & 0xFF;
}
if (deviceSettingsKeys.contains("gpioPins")) {
settings.m_gpioPins = response.getLimeSdrInputSettings()->getGpioPins() & 0xFF;
}
MsgConfigureLimeSDR *msg = MsgConfigureLimeSDR::create(settings, force);
m_inputMessageQueue.push(msg);
@ -1407,6 +1478,9 @@ void LimeSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
} else {
response.getLimeSdrInputSettings()->setFileRecordName(new QString(settings.m_fileRecordName));
}
response.getLimeSdrInputSettings()->setGpioDir(settings.m_gpioDir);
response.getLimeSdrInputSettings()->setGpioPins(settings.m_gpioPins);
}
int LimeSDRInput::webapiReportGet(
@ -1452,6 +1526,8 @@ void LimeSDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respon
{
bool success = false;
double temp = 0.0;
uint8_t gpioDir = 0;
uint8_t gpioPins = 0;
lms_stream_status_t status;
status.active = false;
status.fifoFilledCount = 0;
@ -1474,9 +1550,14 @@ void LimeSDRInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respon
response.getLimeSdrInputReport()->setLinkRate(status.linkRate);
response.getLimeSdrInputReport()->setHwTimestamp(status.timestamp);
if (m_deviceShared.m_deviceParams->getDevice()) {
if (m_deviceShared.m_deviceParams->getDevice())
{
LMS_GetChipTemperature(m_deviceShared.m_deviceParams->getDevice(), 0, &temp);
LMS_GPIODirRead(m_deviceShared.m_deviceParams->getDevice(), &gpioDir, 1);
LMS_GPIORead(m_deviceShared.m_deviceParams->getDevice(), &gpioPins, 1);
}
response.getLimeSdrInputReport()->setTemperature(temp);
response.getLimeSdrInputReport()->setGpioDir(gpioDir);
response.getLimeSdrInputReport()->setGpioPins(gpioPins);
}

View File

@ -33,7 +33,7 @@
const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = {
QString("LimeSDR Input"),
QString("4.2.4"),
QString("4.3.1"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -46,6 +46,8 @@ void LimeSDRInputSettings::resetToDefaults()
m_transverterMode = false;
m_transverterDeltaFrequency = 0;
m_fileRecordName = "";
m_gpioDir = 0;
m_gpioPins = 0;
}
QByteArray LimeSDRInputSettings::serialize() const
@ -72,6 +74,8 @@ QByteArray LimeSDRInputSettings::serialize() const
s.writeU32(19, m_extClockFreq);
s.writeBool(20, m_transverterMode);
s.writeS64(21, m_transverterDeltaFrequency);
s.writeU32(22, m_gpioDir);
s.writeU32(23, m_gpioPins);
return s.final();
}
@ -89,6 +93,7 @@ bool LimeSDRInputSettings::deserialize(const QByteArray& data)
if (d.getVersion() == 1)
{
int intval;
uint32_t uintval;
d.readS32(1, &m_devSampleRate, 5000000);
d.readU32(2, &m_log2HardDecim, 2);
@ -112,6 +117,10 @@ bool LimeSDRInputSettings::deserialize(const QByteArray& data)
d.readU32(19, &m_extClockFreq, 10000000);
d.readBool(20, &m_transverterMode, false);
d.readS64(21, &m_transverterDeltaFrequency, 0);
d.readU32(22, &uintval, 0);
m_gpioDir = uintval & 0xFF;
d.readU32(23, &uintval, 0);
m_gpioPins = uintval & 0xFF;
return true;
}

View File

@ -66,6 +66,8 @@ struct LimeSDRInputSettings
bool m_transverterMode;
qint64 m_transverterDeltaFrequency;
QString m_fileRecordName;
uint8_t m_gpioDir; //!< GPIO pin direction LSB first; 0 input, 1 output
uint8_t m_gpioPins; //!< GPIO pins to write; LSB first
LimeSDRInputSettings();
void resetToDefaults();

View File

@ -30,7 +30,7 @@ class DeviceSourceAPI;
const PluginDescriptor PlutoSDRInputPlugin::m_pluginDescriptor = {
QString("PlutoSDR Input"),
QString("4.0.0"),
QString("4.3.1"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -2626,6 +2626,14 @@ margin-bottom: 20px;
"temperature" : {
"type" : "number",
"format" : "float"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -2699,6 +2707,14 @@ margin-bottom: 20px;
},
"fileRecordName" : {
"type" : "string"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -2740,6 +2756,14 @@ margin-bottom: 20px;
"temperature" : {
"type" : "number",
"format" : "float"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -2792,6 +2816,14 @@ margin-bottom: 20px;
"transverterDeltaFrequency" : {
"type" : "integer",
"format" : "int64"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -23617,7 +23649,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-11-26T13:24:54.460+01:00
Generated 2018-11-29T00:50:52.609+01:00
</div>
</div>
</div>

View File

@ -47,6 +47,12 @@ LimeSdrInputSettings:
format: int64
fileRecordName:
type: string
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
LimeSdrOutputSettings:
description: LimeSDR
@ -83,6 +89,12 @@ LimeSdrOutputSettings:
transverterDeltaFrequency:
type: integer
format: int64
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
LimeSdrInputReport:
description: LimeSDR
@ -112,7 +124,13 @@ LimeSdrInputReport:
format: uint64
temperature:
type: number
format: float
format: float
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
LimeSdrOutputReport:
description: LimeSDR
@ -142,5 +160,11 @@ LimeSdrOutputReport:
format: uint64
temperature:
type: number
format: float
format: float
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8

View File

@ -47,6 +47,12 @@ LimeSdrInputSettings:
format: int64
fileRecordName:
type: string
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
LimeSdrOutputSettings:
description: LimeSDR
@ -83,6 +89,12 @@ LimeSdrOutputSettings:
transverterDeltaFrequency:
type: integer
format: int64
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
LimeSdrInputReport:
description: LimeSDR
@ -112,7 +124,13 @@ LimeSdrInputReport:
format: uint64
temperature:
type: number
format: float
format: float
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
LimeSdrOutputReport:
description: LimeSDR
@ -142,5 +160,11 @@ LimeSdrOutputReport:
format: uint64
temperature:
type: number
format: float
format: float
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8

View File

@ -2626,6 +2626,14 @@ margin-bottom: 20px;
"temperature" : {
"type" : "number",
"format" : "float"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -2699,6 +2707,14 @@ margin-bottom: 20px;
},
"fileRecordName" : {
"type" : "string"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -2740,6 +2756,14 @@ margin-bottom: 20px;
"temperature" : {
"type" : "number",
"format" : "float"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -2792,6 +2816,14 @@ margin-bottom: 20px;
"transverterDeltaFrequency" : {
"type" : "integer",
"format" : "int64"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
}
},
"description" : "LimeSDR"
@ -23617,7 +23649,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-11-26T13:24:54.460+01:00
Generated 2018-11-29T00:50:52.609+01:00
</div>
</div>
</div>

View File

@ -48,6 +48,10 @@ SWGLimeSdrInputReport::SWGLimeSdrInputReport() {
m_hw_timestamp_isSet = false;
temperature = 0.0f;
m_temperature_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
SWGLimeSdrInputReport::~SWGLimeSdrInputReport() {
@ -76,6 +80,10 @@ SWGLimeSdrInputReport::init() {
m_hw_timestamp_isSet = false;
temperature = 0.0f;
m_temperature_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
void
@ -90,6 +98,8 @@ SWGLimeSdrInputReport::cleanup() {
}
SWGLimeSdrInputReport*
@ -123,6 +133,10 @@ SWGLimeSdrInputReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&temperature, pJson["temperature"], "float", "");
::SWGSDRangel::setValue(&gpio_dir, pJson["gpioDir"], "qint32", "");
::SWGSDRangel::setValue(&gpio_pins, pJson["gpioPins"], "qint32", "");
}
QString
@ -169,6 +183,12 @@ SWGLimeSdrInputReport::asJsonObject() {
if(m_temperature_isSet){
obj->insert("temperature", QJsonValue(temperature));
}
if(m_gpio_dir_isSet){
obj->insert("gpioDir", QJsonValue(gpio_dir));
}
if(m_gpio_pins_isSet){
obj->insert("gpioPins", QJsonValue(gpio_pins));
}
return obj;
}
@ -273,6 +293,26 @@ SWGLimeSdrInputReport::setTemperature(float temperature) {
this->m_temperature_isSet = true;
}
qint32
SWGLimeSdrInputReport::getGpioDir() {
return gpio_dir;
}
void
SWGLimeSdrInputReport::setGpioDir(qint32 gpio_dir) {
this->gpio_dir = gpio_dir;
this->m_gpio_dir_isSet = true;
}
qint32
SWGLimeSdrInputReport::getGpioPins() {
return gpio_pins;
}
void
SWGLimeSdrInputReport::setGpioPins(qint32 gpio_pins) {
this->gpio_pins = gpio_pins;
this->m_gpio_pins_isSet = true;
}
bool
SWGLimeSdrInputReport::isSet(){
@ -288,6 +328,8 @@ SWGLimeSdrInputReport::isSet(){
if(m_link_rate_isSet){ isObjectUpdated = true; break;}
if(m_hw_timestamp_isSet){ isObjectUpdated = true; break;}
if(m_temperature_isSet){ isObjectUpdated = true; break;}
if(m_gpio_dir_isSet){ isObjectUpdated = true; break;}
if(m_gpio_pins_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}

View File

@ -71,6 +71,12 @@ public:
float getTemperature();
void setTemperature(float temperature);
qint32 getGpioDir();
void setGpioDir(qint32 gpio_dir);
qint32 getGpioPins();
void setGpioPins(qint32 gpio_pins);
virtual bool isSet() override;
@ -105,6 +111,12 @@ private:
float temperature;
bool m_temperature_isSet;
qint32 gpio_dir;
bool m_gpio_dir_isSet;
qint32 gpio_pins;
bool m_gpio_pins_isSet;
};
}

View File

@ -72,6 +72,10 @@ SWGLimeSdrInputSettings::SWGLimeSdrInputSettings() {
m_transverter_delta_frequency_isSet = false;
file_record_name = nullptr;
m_file_record_name_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
SWGLimeSdrInputSettings::~SWGLimeSdrInputSettings() {
@ -124,6 +128,10 @@ SWGLimeSdrInputSettings::init() {
m_transverter_delta_frequency_isSet = false;
file_record_name = new QString("");
m_file_record_name_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
void
@ -152,6 +160,8 @@ SWGLimeSdrInputSettings::cleanup() {
if(file_record_name != nullptr) {
delete file_record_name;
}
}
SWGLimeSdrInputSettings*
@ -209,6 +219,10 @@ SWGLimeSdrInputSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString");
::SWGSDRangel::setValue(&gpio_dir, pJson["gpioDir"], "qint32", "");
::SWGSDRangel::setValue(&gpio_pins, pJson["gpioPins"], "qint32", "");
}
QString
@ -291,6 +305,12 @@ SWGLimeSdrInputSettings::asJsonObject() {
if(file_record_name != nullptr && *file_record_name != QString("")){
toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString"));
}
if(m_gpio_dir_isSet){
obj->insert("gpioDir", QJsonValue(gpio_dir));
}
if(m_gpio_pins_isSet){
obj->insert("gpioPins", QJsonValue(gpio_pins));
}
return obj;
}
@ -515,6 +535,26 @@ SWGLimeSdrInputSettings::setFileRecordName(QString* file_record_name) {
this->m_file_record_name_isSet = true;
}
qint32
SWGLimeSdrInputSettings::getGpioDir() {
return gpio_dir;
}
void
SWGLimeSdrInputSettings::setGpioDir(qint32 gpio_dir) {
this->gpio_dir = gpio_dir;
this->m_gpio_dir_isSet = true;
}
qint32
SWGLimeSdrInputSettings::getGpioPins() {
return gpio_pins;
}
void
SWGLimeSdrInputSettings::setGpioPins(qint32 gpio_pins) {
this->gpio_pins = gpio_pins;
this->m_gpio_pins_isSet = true;
}
bool
SWGLimeSdrInputSettings::isSet(){
@ -542,6 +582,8 @@ SWGLimeSdrInputSettings::isSet(){
if(m_transverter_mode_isSet){ isObjectUpdated = true; break;}
if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;}
if(file_record_name != nullptr && *file_record_name != QString("")){ isObjectUpdated = true; break;}
if(m_gpio_dir_isSet){ isObjectUpdated = true; break;}
if(m_gpio_pins_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}

View File

@ -108,6 +108,12 @@ public:
QString* getFileRecordName();
void setFileRecordName(QString* file_record_name);
qint32 getGpioDir();
void setGpioDir(qint32 gpio_dir);
qint32 getGpioPins();
void setGpioPins(qint32 gpio_pins);
virtual bool isSet() override;
@ -178,6 +184,12 @@ private:
QString* file_record_name;
bool m_file_record_name_isSet;
qint32 gpio_dir;
bool m_gpio_dir_isSet;
qint32 gpio_pins;
bool m_gpio_pins_isSet;
};
}

View File

@ -48,6 +48,10 @@ SWGLimeSdrOutputReport::SWGLimeSdrOutputReport() {
m_hw_timestamp_isSet = false;
temperature = 0.0f;
m_temperature_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
SWGLimeSdrOutputReport::~SWGLimeSdrOutputReport() {
@ -76,6 +80,10 @@ SWGLimeSdrOutputReport::init() {
m_hw_timestamp_isSet = false;
temperature = 0.0f;
m_temperature_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
void
@ -90,6 +98,8 @@ SWGLimeSdrOutputReport::cleanup() {
}
SWGLimeSdrOutputReport*
@ -123,6 +133,10 @@ SWGLimeSdrOutputReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&temperature, pJson["temperature"], "float", "");
::SWGSDRangel::setValue(&gpio_dir, pJson["gpioDir"], "qint32", "");
::SWGSDRangel::setValue(&gpio_pins, pJson["gpioPins"], "qint32", "");
}
QString
@ -169,6 +183,12 @@ SWGLimeSdrOutputReport::asJsonObject() {
if(m_temperature_isSet){
obj->insert("temperature", QJsonValue(temperature));
}
if(m_gpio_dir_isSet){
obj->insert("gpioDir", QJsonValue(gpio_dir));
}
if(m_gpio_pins_isSet){
obj->insert("gpioPins", QJsonValue(gpio_pins));
}
return obj;
}
@ -273,6 +293,26 @@ SWGLimeSdrOutputReport::setTemperature(float temperature) {
this->m_temperature_isSet = true;
}
qint32
SWGLimeSdrOutputReport::getGpioDir() {
return gpio_dir;
}
void
SWGLimeSdrOutputReport::setGpioDir(qint32 gpio_dir) {
this->gpio_dir = gpio_dir;
this->m_gpio_dir_isSet = true;
}
qint32
SWGLimeSdrOutputReport::getGpioPins() {
return gpio_pins;
}
void
SWGLimeSdrOutputReport::setGpioPins(qint32 gpio_pins) {
this->gpio_pins = gpio_pins;
this->m_gpio_pins_isSet = true;
}
bool
SWGLimeSdrOutputReport::isSet(){
@ -288,6 +328,8 @@ SWGLimeSdrOutputReport::isSet(){
if(m_link_rate_isSet){ isObjectUpdated = true; break;}
if(m_hw_timestamp_isSet){ isObjectUpdated = true; break;}
if(m_temperature_isSet){ isObjectUpdated = true; break;}
if(m_gpio_dir_isSet){ isObjectUpdated = true; break;}
if(m_gpio_pins_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}

View File

@ -71,6 +71,12 @@ public:
float getTemperature();
void setTemperature(float temperature);
qint32 getGpioDir();
void setGpioDir(qint32 gpio_dir);
qint32 getGpioPins();
void setGpioPins(qint32 gpio_pins);
virtual bool isSet() override;
@ -105,6 +111,12 @@ private:
float temperature;
bool m_temperature_isSet;
qint32 gpio_dir;
bool m_gpio_dir_isSet;
qint32 gpio_pins;
bool m_gpio_pins_isSet;
};
}

View File

@ -58,6 +58,10 @@ SWGLimeSdrOutputSettings::SWGLimeSdrOutputSettings() {
m_transverter_mode_isSet = false;
transverter_delta_frequency = 0L;
m_transverter_delta_frequency_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
SWGLimeSdrOutputSettings::~SWGLimeSdrOutputSettings() {
@ -96,6 +100,10 @@ SWGLimeSdrOutputSettings::init() {
m_transverter_mode_isSet = false;
transverter_delta_frequency = 0L;
m_transverter_delta_frequency_isSet = false;
gpio_dir = 0;
m_gpio_dir_isSet = false;
gpio_pins = 0;
m_gpio_pins_isSet = false;
}
void
@ -115,6 +123,8 @@ SWGLimeSdrOutputSettings::cleanup() {
}
SWGLimeSdrOutputSettings*
@ -158,6 +168,10 @@ SWGLimeSdrOutputSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", "");
::SWGSDRangel::setValue(&gpio_dir, pJson["gpioDir"], "qint32", "");
::SWGSDRangel::setValue(&gpio_pins, pJson["gpioPins"], "qint32", "");
}
QString
@ -219,6 +233,12 @@ SWGLimeSdrOutputSettings::asJsonObject() {
if(m_transverter_delta_frequency_isSet){
obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency));
}
if(m_gpio_dir_isSet){
obj->insert("gpioDir", QJsonValue(gpio_dir));
}
if(m_gpio_pins_isSet){
obj->insert("gpioPins", QJsonValue(gpio_pins));
}
return obj;
}
@ -373,6 +393,26 @@ SWGLimeSdrOutputSettings::setTransverterDeltaFrequency(qint64 transverter_delta_
this->m_transverter_delta_frequency_isSet = true;
}
qint32
SWGLimeSdrOutputSettings::getGpioDir() {
return gpio_dir;
}
void
SWGLimeSdrOutputSettings::setGpioDir(qint32 gpio_dir) {
this->gpio_dir = gpio_dir;
this->m_gpio_dir_isSet = true;
}
qint32
SWGLimeSdrOutputSettings::getGpioPins() {
return gpio_pins;
}
void
SWGLimeSdrOutputSettings::setGpioPins(qint32 gpio_pins) {
this->gpio_pins = gpio_pins;
this->m_gpio_pins_isSet = true;
}
bool
SWGLimeSdrOutputSettings::isSet(){
@ -393,6 +433,8 @@ SWGLimeSdrOutputSettings::isSet(){
if(m_ext_clock_freq_isSet){ isObjectUpdated = true; break;}
if(m_transverter_mode_isSet){ isObjectUpdated = true; break;}
if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;}
if(m_gpio_dir_isSet){ isObjectUpdated = true; break;}
if(m_gpio_pins_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}

View File

@ -86,6 +86,12 @@ public:
qint64 getTransverterDeltaFrequency();
void setTransverterDeltaFrequency(qint64 transverter_delta_frequency);
qint32 getGpioDir();
void setGpioDir(qint32 gpio_dir);
qint32 getGpioPins();
void setGpioPins(qint32 gpio_pins);
virtual bool isSet() override;
@ -135,6 +141,12 @@ private:
qint64 transverter_delta_frequency;
bool m_transverter_delta_frequency_isSet;
qint32 gpio_dir;
bool m_gpio_dir_isSet;
qint32 gpio_pins;
bool m_gpio_pins_isSet;
};
}