LimeSDR MIMO

This commit is contained in:
f4exb 2020-11-10 23:45:24 +01:00
parent 475ee68667
commit 085c3150d4
36 changed files with 8075 additions and 57 deletions

View File

@ -29,7 +29,7 @@
const PluginDescriptor BeamSteeringCWModPlugin::m_pluginDescriptor = {
QString(BeamSteeringCWMod::m_channelId),
QString("BeamSteeringCWMod"),
QString("5.13.0"),
QString("6.0.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -2,8 +2,6 @@
<h2>Introduction</h2>
This is a v5 only plugin.
This MIMO transmission only (MO) plugin can be used to drive a 2 channel MO device in order to produce a continuous wave signal (CW) with a control of hte phase between the two streams. When the MO device is connected to a two antenna system the resulting beam can be steered in direction using the phase difference. Control is made directly in angle units.
; This was designed more as a proof of concept of multiple output plugin rather than something really useful.
@ -53,4 +51,4 @@ The slider moves the channel center frequency roughly from the lower to the high
This slider controls the beam steering angle &theta; in degrees when the configuration of antennas is made like this:
![Beam steering CW plugin GUI](../../../doc/img/beamsteeringcw_angle.png)
![Beam steering CW plugin GUI](../../../doc/img/beamsteeringcw_angle.png)

View File

@ -4,5 +4,9 @@ if(ENABLE_BLADERF AND LIBBLADERF_FOUND)
add_subdirectory(bladerf2mimo)
endif()
if(ENABLE_LIMESUITE AND LIMESUITE_FOUND)
add_subdirectory(limesdrmimo)
endif()
add_subdirectory(testmi)
add_subdirectory(testmosync)

View File

@ -30,7 +30,7 @@
const PluginDescriptor BladeRF2MIMOPlugin::m_pluginDescriptor = {
QString("BladeRF2"),
QString("BladeRF2 MIMO"),
QString("5.13.0"),
QString("6.0.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -2,8 +2,6 @@
<h2>Introduction</h2>
This is a v5 only plugin.
This MIMO plugin sends and receives its samples to/from a [BladeRF2 device](https://www.nuand.com/bladerf-2). It handles both input (Rx) and output (Tx) streams synchronously. There is no option to synchronize Rx with Tx streams.
<h2>Build</h2>
@ -130,4 +128,4 @@ This sets the gain manually per stream or for both streams if (18) is engaged.
<h3>21. Bias Tee</h3>
This sets the bias tee on all Rx or Tx ports.
This sets the bias tee on all Rx or Tx ports.

View File

@ -0,0 +1,66 @@
project(limesdrmimo)
set(limesdrmimo_SOURCES
limesdrmimo.cpp
limesdrmimoplugin.cpp
limesdrmithread.cpp
limesdrmothread.cpp
limesdrmimosettings.cpp
limesdrmimowebapiadapter.cpp
)
set(limesdrmimo_HEADERS
limesdrmimo.h
limesdrmimoplugin.h
limesdrmithread.h
limesdrmothread.h
limesdrmimosettings.h
limesdrmimowebapiadapter.h
)
include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${CMAKE_SOURCE_DIR}/devices
${LIMESUITE_INCLUDE_DIR}
)
if (NOT SERVER_MODE)
set (limesdrmimo_SOURCES
${limesdrmimo_SOURCES}
limesdrmimogui.cpp
limesdrmimogui.ui
)
set(limesdrmimo_HEADERS
${limesdrmimo_HEADERS}
limesdrmimogui.h
)
set(TARGET_NAME mimolimesdr)
set(TARGET_LIB "Qt5::Widgets")
set(TARGET_LIB_GUI "sdrgui")
set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR})
else()
set(TARGET_NAME mimolimesdrsrv)
set(TARGET_LIB "")
set(TARGET_LIB_GUI "")
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
endif()
add_library(${TARGET_NAME} SHARED
${limesdrmimo_SOURCES}
)
if(LIMESUITE_EXTERNAL)
add_dependencies(${TARGET_NAME} limesuite)
endif()
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}
sdrbase
${TARGET_LIB_GUI}
swagger
${LIMESUITE_LIBRARY}
limesdrdevice
)
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,342 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMO_H_
#define PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMO_H_
#include <stdint.h>
#include <QString>
#include <QByteArray>
#include <QNetworkRequest>
#include "lime/LimeSuite.h"
#include "dsp/devicesamplemimo.h"
#include "limesdrmimosettings.h"
class QNetworkAccessManager;
class QNetworkReply;
class DeviceAPI;
class LimeSDRMIThread;
class LimeSDRMOThread;
class DeviceLimeSDRParams;
class LimeSDRMIMO : public DeviceSampleMIMO {
Q_OBJECT
public:
class MsgConfigureLimeSDRMIMO : public Message {
MESSAGE_CLASS_DECLARATION
public:
const LimeSDRMIMOSettings& getSettings() const { return m_settings; }
bool getForce() const { return m_force; }
static MsgConfigureLimeSDRMIMO* create(const LimeSDRMIMOSettings& settings, bool force)
{
return new MsgConfigureLimeSDRMIMO(settings, force);
}
private:
LimeSDRMIMOSettings m_settings;
bool m_force;
MsgConfigureLimeSDRMIMO(const LimeSDRMIMOSettings& settings, bool force) :
Message(),
m_settings(settings),
m_force(force)
{ }
};
class MsgGetStreamInfo : public Message {
MESSAGE_CLASS_DECLARATION
public:
bool getRxElseTx() const { return m_rxElseTx; }
uint32_t getChannel() const { return m_channel; }
static MsgGetStreamInfo* create(bool rxElseTx, uint32_t channel)
{
return new MsgGetStreamInfo(rxElseTx, channel);
}
private:
bool m_rxElseTx;
uint32_t m_channel;
MsgGetStreamInfo(bool rxElseTx, uint32_t channel) :
Message(),
m_rxElseTx(rxElseTx),
m_channel(channel)
{ }
};
class MsgGetDeviceInfo : public Message {
MESSAGE_CLASS_DECLARATION
public:
static MsgGetDeviceInfo* create()
{
return new MsgGetDeviceInfo();
}
private:
MsgGetDeviceInfo() :
Message()
{ }
};
class MsgReportStreamInfo : public Message {
MESSAGE_CLASS_DECLARATION
public:
bool getSuccess() const { return m_success; }
bool getActive() const { return m_active; }
uint32_t getFifoFilledCount() const { return m_fifoFilledCount; }
uint32_t getFifoSize() const { return m_fifoSize; }
uint32_t getUnderrun() const { return m_underrun; }
uint32_t getOverrun() const { return m_overrun; }
uint32_t getDroppedPackets() const { return m_droppedPackets; }
float getLinkRate() const { return m_linkRate; }
uint64_t getTimestamp() const { return m_timestamp; }
static MsgReportStreamInfo* create(
bool success,
bool active,
uint32_t fifoFilledCount,
uint32_t fifoSize,
uint32_t underrun,
uint32_t overrun,
uint32_t droppedPackets,
float linkRate,
uint64_t timestamp
)
{
return new MsgReportStreamInfo(
success,
active,
fifoFilledCount,
fifoSize,
underrun,
overrun,
droppedPackets,
linkRate,
timestamp
);
}
private:
bool m_success;
// everything from lms_stream_status_t
bool m_active; //!< Indicates whether the stream is currently active
uint32_t m_fifoFilledCount; //!< Number of samples in FIFO buffer
uint32_t m_fifoSize; //!< Size of FIFO buffer
uint32_t m_underrun; //!< FIFO underrun count
uint32_t m_overrun; //!< FIFO overrun count
uint32_t m_droppedPackets; //!< Number of dropped packets by HW
float m_linkRate; //!< Combined data rate of all stream of the same direction (TX or RX)
uint64_t m_timestamp; //!< Current HW timestamp
MsgReportStreamInfo(
bool success,
bool active,
uint32_t fifoFilledCount,
uint32_t fifoSize,
uint32_t underrun,
uint32_t overrun,
uint32_t droppedPackets,
float linkRate,
uint64_t timestamp
) :
Message(),
m_success(success),
m_active(active),
m_fifoFilledCount(fifoFilledCount),
m_fifoSize(fifoSize),
m_underrun(underrun),
m_overrun(overrun),
m_droppedPackets(droppedPackets),
m_linkRate(linkRate),
m_timestamp(timestamp)
{ }
};
class MsgStartStop : public Message {
MESSAGE_CLASS_DECLARATION
public:
bool getStartStop() const { return m_startStop; }
bool getRxElseTx() const { return m_rxElseTx; }
static MsgStartStop* create(bool startStop, bool rxElseTx) {
return new MsgStartStop(startStop, rxElseTx);
}
protected:
bool m_startStop;
bool m_rxElseTx;
MsgStartStop(bool startStop, bool rxElseTx) :
Message(),
m_startStop(startStop),
m_rxElseTx(rxElseTx)
{ }
};
LimeSDRMIMO(DeviceAPI *deviceAPI);
virtual ~LimeSDRMIMO();
virtual void destroy();
virtual void init();
virtual bool startRx();
virtual void stopRx();
virtual bool startTx();
virtual void stopTx();
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
virtual const QString& getDeviceDescription() const;
virtual int getSourceSampleRate(int index) const;
virtual void setSourceSampleRate(int sampleRate, int index) { (void) sampleRate; (void) index; }
virtual quint64 getSourceCenterFrequency(int index) const;
virtual void setSourceCenterFrequency(qint64 centerFrequency, int index);
virtual int getSinkSampleRate(int index) const;
virtual void setSinkSampleRate(int sampleRate, int index) { (void) sampleRate; (void) index; }
virtual quint64 getSinkCenterFrequency(int index) const;
virtual void setSinkCenterFrequency(qint64 centerFrequency, int index);
virtual quint64 getMIMOCenterFrequency() const { return getSourceCenterFrequency(0); }
virtual unsigned int getMIMOSampleRate() const { return getSourceSampleRate(0); }
virtual bool handleMessage(const Message& message);
virtual int webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage);
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage);
virtual int webapiReportGet(
SWGSDRangel::SWGDeviceReport& response,
QString& errorMessage);
virtual int webapiRunGet(
int subsystemIndex,
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage);
virtual int webapiRun(
bool run,
int subsystemIndex,
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage);
static void webapiFormatDeviceSettings(
SWGSDRangel::SWGDeviceSettings& response,
const LimeSDRMIMOSettings& settings);
static void webapiUpdateDeviceSettings(
LimeSDRMIMOSettings& settings,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response);
bool isRecording(unsigned int istream) const { (void) istream; return false; }
void getRxFrequencyRange(uint64_t& min, uint64_t& max, int& step);
void getRxSampleRateRange(int& min, int& max, int& step);
void getRxLPFRange(int& min, int& max, int& step);
void getTxFrequencyRange(uint64_t& min, uint64_t& max, int& step);
void getTxSampleRateRange(int& min, int& max, int& step);
void getTxLPFRange(int& min, int& max, int& step);
bool getRxRunning() const { return m_runningRx; }
bool getTxRunning() const { return m_runningTx; }
private:
DeviceAPI *m_deviceAPI;
QMutex m_mutex;
LimeSDRMIMOSettings m_settings;
LimeSDRMIThread* m_sourceThread;
LimeSDRMOThread* m_sinkThread;
QString m_deviceDescription;
bool m_runningRx;
bool m_runningTx;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
DeviceLimeSDRParams *m_deviceParams;
bool m_rxChannelEnabled[2];
bool m_txChannelEnabled[2];
lms_stream_t m_rxStreams[2];
bool m_rxStreamStarted[2];
lms_stream_t m_txStreams[2];
bool m_txStreamStarted[2];
bool m_open;
bool openDevice();
void closeDevice();
bool setupRxStream(unsigned int channel);
void destroyRxStream(unsigned int channel);
bool setupTxStream(unsigned int channel);
void destroyTxStream(unsigned int channel);
bool applySettings(const LimeSDRMIMOSettings& settings, bool force);
void applyRxGainMode(
unsigned int channel,
bool& doCalibration,
LimeSDRMIMOSettings::RxGainMode gainMode,
uint32_t gain,
uint32_t lnaGain,
uint32_t tiaGain,
uint32_t pgaGain
);
void applyRxGain(unsigned int channel, bool& doCalibration, uint32_t gain);
void applyRxLNAGain(unsigned int channel, bool& doCalibration, uint32_t lnaGain);
void applyRxTIAGain(unsigned int channel, bool& doCalibration, uint32_t tiaGain);
void applyRxPGAGain(unsigned int channel, bool& doCalibration, uint32_t pgaGain);
void applyRxLPFIRBW(unsigned int channel, bool lpfFIREnable, float lpfFIRBW);
void applyRxNCOFrequency(unsigned int channel, bool ncoEnable, int ncoFrequency);
void applyRxAntennaPath(unsigned int channel, bool& doCalibration, LimeSDRMIMOSettings::PathRxRFE path);
void applyRxCalibration(unsigned int channel, qint32 devSampleRate);
void applyRxLPCalibration(unsigned int channel, float lpfBW);
void applyTxGain(unsigned int channel, bool& doCalibration, uint32_t gain);
void applyTxLPFIRBW(unsigned int channel, bool lpfFIREnable, float lpfFIRBW);
void applyTxNCOFrequency(unsigned int channel, bool ncoEnable, int ncoFrequency);
void applyTxAntennaPath(unsigned int channel, bool& doCalibration, LimeSDRMIMOSettings::PathTxRFE path);
bool setRxDeviceCenterFrequency(struct bladerf *dev, quint64 freq_hz, int loPpmTenths);
bool setTxDeviceCenterFrequency(struct bladerf *dev, quint64 freq_hz, int loPpmTenths);
void applyTxCalibration(unsigned int channel, qint32 devSampleRate);
void applyTxLPCalibration(unsigned int channel, float lpfBW);
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
void webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const LimeSDRMIMOSettings& settings, bool force);
void webapiReverseSendStartStop(bool start);
private slots:
void networkManagerFinished(QNetworkReply *reply);
};
#endif // PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMO_H_

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,133 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOGUI_H_
#define PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOGUI_H_
#include <QTimer>
#include <QWidget>
#include "util/messagequeue.h"
#include "device/devicegui.h"
#include "limesdrmimosettings.h"
class DeviceUISet;
class LimeSDRMIMO;
namespace Ui {
class LimeSDRMIMOGUI;
}
class LimeSDRMIMOGUI : public DeviceGUI {
Q_OBJECT
public:
explicit LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent = nullptr);
virtual ~LimeSDRMIMOGUI();
virtual void destroy();
void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
private:
Ui::LimeSDRMIMOGUI* ui;
DeviceUISet* m_deviceUISet;
LimeSDRMIMOSettings m_settings;
bool m_rxElseTx; //!< Which side is being dealt with
int m_streamIndex; //!< Current stream index being dealt with
bool m_spectrumRxElseTx;
int m_spectrumStreamIndex; //!< Index of the stream displayed on main spectrum
bool m_gainLock; //!< Lock Rx or Tx channel gains (set channel gains to gain of channel 0 when engaged)
QTimer m_updateTimer;
QTimer m_statusTimer;
bool m_doApplySettings;
bool m_forceSettings;
LimeSDRMIMO* m_limeSDRMIMO;
std::size_t m_tickCount;
int m_rxBasebandSampleRate;
int m_txBasebandSampleRate;
quint64 m_rxDeviceCenterFrequency; //!< Center frequency in Rx device
quint64 m_txDeviceCenterFrequency; //!< Center frequency in Tx device
int m_lastRxEngineState;
int m_lastTxEngineState;
int m_statusCounter;
int m_deviceStatusCounter;
MessageQueue m_inputMessageQueue;
bool m_sampleRateMode;
int m_srMaxRx, m_srMinRx, m_srStepRx;
int m_srMaxTx, m_srMinTx, m_srStepTx;
int m_bwMaxRx, m_bwMinRx, m_bwStepRx;
int m_bwMaxTx, m_bwMinTx, m_bwStepTx;
uint64_t m_fMinRx, m_fMaxRx;
uint64_t m_fMinTx, m_fMaxTx;
int m_fStepRx, m_fStepTx;
void blockApplySettings(bool block) { m_doApplySettings = !block; }
void displaySettings();
void setRxCenterFrequencyDisplay();
void setRxCenterFrequencySetting(uint64_t kHzValue);
void displayRxSampleRate();
void updateADCRate();
void setTxCenterFrequencyDisplay();
void setTxCenterFrequencySetting(uint64_t kHzValue);
void displayTxSampleRate();
void updateDACRate();
void setNCODisplay();
void updateFrequencyLimits();
void updateLPFLimits();
void updateSampleRateAndFrequency();
void sendSettings();
bool handleMessage(const Message& message);
private slots:
void handleInputMessages();
void updateHardware();
void updateStatus();
void on_streamSide_currentIndexChanged(int index);
void on_streamIndex_currentIndexChanged(int index);
void on_spectrumSide_currentIndexChanged(int index);
void on_spectrumIndex_currentIndexChanged(int index);
void on_startStopRx_toggled(bool checked);
void on_startStopTx_toggled(bool checked);
void on_centerFrequency_changed(quint64 value);
void on_ncoEnable_toggled(bool checked);
void on_ncoFrequency_changed(qint64 value);
void on_dcOffset_toggled(bool checked);
void on_iqImbalance_toggled(bool checked);
void on_extClock_clicked();
void on_hwDecim_currentIndexChanged(int index);
void on_swDecim_currentIndexChanged(int index);
void on_sampleRateMode_toggled(bool checked);
void on_sampleRate_changed(quint64 value);
void on_lpf_changed(quint64 value);
void on_lpFIREnable_toggled(bool checked);
void on_lpFIR_changed(quint64 value);
void on_transverter_clicked();
void on_gainMode_currentIndexChanged(int index);
void on_gain_valueChanged(int value);
void on_lnaGain_valueChanged(int value);
void on_tiaGain_currentIndexChanged(int index);
void on_pgaGain_valueChanged(int value);
void on_antenna_currentIndexChanged(int index);
void openDeviceSettingsDialog(const QPoint& p);
};
#endif // PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOGUI_H_

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,142 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "util/simpleserializer.h"
#include "limesdr/devicelimesdr.h"
#ifndef SERVER_MODE
#include "limesdrmimogui.h"
#endif
#include "limesdrmimo.h"
#include "limesdrmimoplugin.h"
#include "limesdrmimowebapiadapter.h"
const PluginDescriptor LimeSDRMIMOPlugin::m_pluginDescriptor = {
QString("LimeSDR"),
QString("LimeSDR MIMO"),
QString("6.0.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
QString("https://github.com/f4exb/sdrangel")
};
const QString LimeSDRMIMOPlugin::m_hardwareID = "LimeSDR";
const QString LimeSDRMIMOPlugin::m_deviceTypeID = LIMESDRMIMO_DEVICE_TYPE_ID;
LimeSDRMIMOPlugin::LimeSDRMIMOPlugin(QObject* parent) :
QObject(parent)
{
}
const PluginDescriptor& LimeSDRMIMOPlugin::getPluginDescriptor() const
{
return m_pluginDescriptor;
}
void LimeSDRMIMOPlugin::initPlugin(PluginAPI* pluginAPI)
{
pluginAPI->registerSampleMIMO(m_deviceTypeID, this);
}
void LimeSDRMIMOPlugin::enumOriginDevices(QStringList& listedHwIds, OriginDevices& originDevices)
{
if (listedHwIds.contains(m_hardwareID)) { // check if it was done
return;
}
DeviceLimeSDR::enumOriginDevices(m_hardwareID, originDevices);
listedHwIds.append(m_hardwareID);
}
PluginInterface::SamplingDevices LimeSDRMIMOPlugin::enumSampleMIMO(const OriginDevices& originDevices)
{
SamplingDevices result;
for (OriginDevices::const_iterator it = originDevices.begin(); it != originDevices.end(); ++it)
{
if (it->hardwareId == m_hardwareID)
{
QString displayedName = it->displayableName;
displayedName.replace(QString(":$1]"), QString("]"));
result.append(SamplingDevice(
displayedName,
m_hardwareID,
m_deviceTypeID,
it->serial,
it->sequence,
PluginInterface::SamplingDevice::PhysicalDevice,
PluginInterface::SamplingDevice::StreamMIMO,
1,
0
));
}
}
return result;
}
#ifdef SERVER_MODE
DeviceGUI* LimeSDRMIMOPlugin::createSampleMIMOPluginInstanceGUI(
const QString& sourceId,
QWidget **widget,
DeviceUISet *deviceUISet)
{
(void) sourceId;
(void) widget;
(void) deviceUISet;
return nullptr;
}
#else
DeviceGUI* LimeSDRMIMOPlugin::createSampleMIMOPluginInstanceGUI(
const QString& sourceId,
QWidget **widget,
DeviceUISet *deviceUISet)
{
if (sourceId == m_deviceTypeID)
{
LimeSDRMIMOGUI* gui = new LimeSDRMIMOGUI(deviceUISet);
*widget = gui;
return gui;
}
else
{
return nullptr;
}
}
#endif
DeviceSampleMIMO *LimeSDRMIMOPlugin::createSampleMIMOPluginInstance(const QString& mimoId, DeviceAPI *deviceAPI)
{
if (mimoId == m_deviceTypeID)
{
LimeSDRMIMO* input = new LimeSDRMIMO(deviceAPI);
return input;
}
else
{
return nullptr;
}
}
DeviceWebAPIAdapter *LimeSDRMIMOPlugin::createDeviceWebAPIAdapter() const
{
return new LimeSDRMIMOWebAPIAdapter();
}

View File

@ -0,0 +1,56 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef _LIMESDRMIMO_LIMESDRMIMOPLUGIN_H
#define _LIMESDRMIMO_LIMESDRMIMOPLUGIN_H
#include <QObject>
#include "plugin/plugininterface.h"
class PluginAPI;
#define LIMESDRMIMO_DEVICE_TYPE_ID "sdrangel.samplemimo.limesdrmimo"
class LimeSDRMIMOPlugin : public QObject, public PluginInterface {
Q_OBJECT
Q_INTERFACES(PluginInterface)
Q_PLUGIN_METADATA(IID LIMESDRMIMO_DEVICE_TYPE_ID)
public:
explicit LimeSDRMIMOPlugin(QObject* parent = nullptr);
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
virtual void enumOriginDevices(QStringList& listedHwIds, OriginDevices& originDevices);
virtual SamplingDevices enumSampleMIMO(const OriginDevices& originDevices);
virtual DeviceGUI* createSampleMIMOPluginInstanceGUI(
const QString& sourceId,
QWidget **widget,
DeviceUISet *deviceUISet);
virtual DeviceSampleMIMO* createSampleMIMOPluginInstance(const QString& sourceId, DeviceAPI *deviceAPI);
virtual DeviceWebAPIAdapter* createDeviceWebAPIAdapter() const;
static const QString m_hardwareID;
static const QString m_deviceTypeID;
private:
static const PluginDescriptor m_pluginDescriptor;
};
#endif // _LIMESDRMIMO_LIMESDRMIMOPLUGIN_H

View File

@ -0,0 +1,258 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "limesdrmimosettings.h"
#include "util/simpleserializer.h"
LimeSDRMIMOSettings::LimeSDRMIMOSettings()
{
resetToDefaults();
}
void LimeSDRMIMOSettings::resetToDefaults()
{
m_devSampleRate = 3200000;
m_gpioDir = 0;
m_gpioPins = 0;
m_extClock = false;
m_extClockFreq = 10000000; // 10 MHz
m_useReverseAPI = false;
m_reverseAPIAddress = "127.0.0.1";
m_reverseAPIPort = 8888;
m_reverseAPIDeviceIndex = 0;
m_rxCenterFrequency = 435000*1000;
m_log2HardDecim = 3;
m_log2SoftDecim = 0;
m_dcBlock = false;
m_iqCorrection = false;
m_rxTransverterMode = false;
m_rxTransverterDeltaFrequency = 0;
m_iqOrder = true;
m_ncoEnableRx = false;
m_ncoFrequencyRx = 0;
m_lpfBWRx0 = 4.5e6f;
m_lpfFIREnableRx0 = false;
m_lpfFIRBWRx0 = 2.5e6f;
m_gainRx0 = 50;
m_antennaPathRx0 = PATH_RFE_RX_NONE;
m_gainModeRx0 = GAIN_AUTO;
m_lnaGainRx0 = 15;
m_tiaGainRx0 = 2;
m_pgaGainRx0 = 16;
m_lpfBWRx1 = 4.5e6f;
m_lpfFIREnableRx1 = false;
m_lpfFIRBWRx1 = 2.5e6f;
m_gainRx1 = 50;
m_antennaPathRx1 = PATH_RFE_RX_NONE;
m_gainModeRx1 = GAIN_AUTO;
m_lnaGainRx1 = 15;
m_tiaGainRx1 = 2;
m_pgaGainRx1 = 16;
m_txCenterFrequency = 435000*1000;
m_log2HardInterp = 3;
m_log2SoftInterp = 0;
m_txTransverterMode = false;
m_txTransverterDeltaFrequency = 0;
m_ncoEnableTx = false;
m_ncoFrequencyTx = 0;
m_lpfBWTx0 = 5.5e6f;
m_lpfFIREnableTx0 = false;
m_lpfFIRBWTx0 = 2.5e6f;
m_gainTx0 = 4;
m_antennaPathTx0 = PATH_RFE_TX_NONE;
m_lpfBWTx1 = 5.5e6f;
m_lpfFIREnableTx1 = false;
m_lpfFIRBWTx1 = 2.5e6f;
m_gainTx1 = 4;
m_antennaPathTx1 = PATH_RFE_TX_NONE;
}
QByteArray LimeSDRMIMOSettings::serialize() const
{
SimpleSerializer s(1);
s.writeS32(1, m_devSampleRate);
s.writeU32(3, m_gpioDir);
s.writeU32(4, m_gpioPins);
s.writeBool(5, m_extClock);
s.writeU32(6, m_extClockFreq);
s.writeBool(8, m_useReverseAPI);
s.writeString(9, m_reverseAPIAddress);
s.writeU32(10, m_reverseAPIPort);
s.writeU32(11, m_reverseAPIDeviceIndex);
s.writeU64(20, m_rxCenterFrequency);
s.writeU32(21, m_log2HardDecim);
s.writeU32(22, m_log2SoftDecim);
s.writeBool(23, m_dcBlock);
s.writeBool(24, m_iqCorrection);
s.writeBool(25, m_rxTransverterMode);
s.writeS64(26, m_rxTransverterDeltaFrequency);
s.writeBool(27, m_ncoEnableRx);
s.writeS32(28, m_ncoFrequencyRx);
s.writeBool(29, m_iqOrder);
s.writeFloat(30, m_lpfBWRx0);
s.writeBool(31, m_lpfFIREnableRx0);
s.writeFloat(32, m_lpfFIRBWRx0);
s.writeU32(33, m_gainRx0);
s.writeS32(34, (int) m_antennaPathRx0);
s.writeS32(35, (int) m_gainModeRx0);
s.writeU32(36, m_lnaGainRx0);
s.writeU32(37, m_tiaGainRx0);
s.writeU32(38, m_pgaGainRx0);
s.writeFloat(50, m_lpfBWRx1);
s.writeBool(51, m_lpfFIREnableRx1);
s.writeFloat(52, m_lpfFIRBWRx1);
s.writeU32(53, m_gainRx1);
s.writeS32(54, (int) m_antennaPathRx1);
s.writeS32(55, (int) m_gainModeRx1);
s.writeU32(56, m_lnaGainRx1);
s.writeU32(57, m_tiaGainRx1);
s.writeU32(58, m_pgaGainRx1);
s.writeU64(70, m_txCenterFrequency);
s.writeU32(71, m_log2HardInterp);
s.writeU32(72, m_log2SoftInterp);
s.writeBool(73, m_txTransverterMode);
s.writeS64(74, m_txTransverterDeltaFrequency);
s.writeBool(75, m_ncoEnableTx);
s.writeS32(76, m_ncoFrequencyTx);
s.writeFloat(80, m_lpfBWTx0);
s.writeBool(81, m_lpfFIREnableTx0);
s.writeFloat(82, m_lpfFIRBWTx0);
s.writeU32(83, m_gainTx0);
s.writeS32(84, (int) m_antennaPathTx0);
s.writeFloat(90, m_lpfBWTx1);
s.writeBool(91, m_lpfFIREnableTx1);
s.writeFloat(92, m_lpfFIRBWTx1);
s.writeU32(93, m_gainTx1);
s.writeS32(94, (int) m_antennaPathTx1);
return s.final();
}
bool LimeSDRMIMOSettings::deserialize(const QByteArray& data)
{
SimpleDeserializer d(data);
if (!d.isValid())
{
resetToDefaults();
return false;
}
if (d.getVersion() == 1)
{
int intval;
uint32_t uintval;
d.readS32(1, &m_devSampleRate, 5000000);
d.readU32(3, &uintval, 0);
m_gpioDir = uintval & 0xFF;
d.readU32(4, &uintval, 0);
m_gpioPins = uintval & 0xFF;
d.readBool(5, &m_extClock, false);
d.readU32(6, &m_extClockFreq, 10000000);
d.readBool(8, &m_useReverseAPI, false);
d.readString(9, &m_reverseAPIAddress, "127.0.0.1");
d.readU32(10, &uintval, 0);
if ((uintval > 1023) && (uintval < 65535)) {
m_reverseAPIPort = uintval;
} else {
m_reverseAPIPort = 8888;
}
d.readU32(11, &uintval, 0);
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
d.readU64(20, &m_rxCenterFrequency, 435000*1000);
d.readU32(21, &m_log2HardDecim, 2);
d.readU32(22, &m_log2SoftDecim, 0);
d.readBool(23, &m_dcBlock, false);
d.readBool(24, &m_iqCorrection, false);
d.readBool(25, &m_rxTransverterMode, false);
d.readS64(26, &m_rxTransverterDeltaFrequency, 0);
d.readBool(27, &m_ncoEnableRx, false);
d.readS32(28, &m_ncoFrequencyRx, 0);
d.readBool(29, &m_iqOrder, true);
d.readFloat(30, &m_lpfBWRx0, 1.5e6);
d.readBool(31, &m_lpfFIREnableRx0, false);
d.readFloat(32, &m_lpfFIRBWRx0, 1.5e6);
d.readU32(33, &m_gainRx0, 50);
d.readS32(34, &intval, 0);
m_antennaPathRx0 = (PathRxRFE) intval;
d.readS32(35, &intval, 0);
m_gainModeRx0 = (RxGainMode) intval;
d.readU32(36, &m_lnaGainRx0, 15);
d.readU32(37, &m_tiaGainRx0, 2);
d.readU32(38, &m_pgaGainRx0, 16);
d.readFloat(50, &m_lpfBWRx1, 1.5e6);
d.readBool(51, &m_lpfFIREnableRx1, false);
d.readFloat(52, &m_lpfFIRBWRx1, 1.5e6);
d.readU32(53, &m_gainRx1, 50);
d.readS32(54, &intval, 0);
m_antennaPathRx1 = (PathRxRFE) intval;
d.readS32(55, &intval, 0);
m_gainModeRx1 = (RxGainMode) intval;
d.readU32(56, &m_lnaGainRx1, 15);
d.readU32(57, &m_tiaGainRx1, 2);
d.readU32(58, &m_pgaGainRx1, 16);
d.readU64(70, &m_txCenterFrequency, 435000*1000);
d.readU32(71, &m_log2HardInterp, 2);
d.readU32(72, &m_log2SoftInterp, 0);
d.readBool(73, &m_txTransverterMode, false);
d.readS64(74, &m_txTransverterDeltaFrequency, 0);
d.readBool(75, &m_ncoEnableTx, false);
d.readS32(76, &m_ncoFrequencyTx, 0);
d.readFloat(80, &m_lpfBWTx0, 1.5e6);
d.readBool(81, &m_lpfFIREnableTx0, false);
d.readFloat(82, &m_lpfFIRBWTx0, 1.5e6);
d.readU32(83, &m_gainTx0, 4);
d.readS32(84, &intval, 0);
m_antennaPathTx0 = (PathTxRFE) intval;
d.readFloat(90, &m_lpfBWTx1, 1.5e6);
d.readBool(91, &m_lpfFIREnableTx1, false);
d.readFloat(92, &m_lpfFIRBWTx1, 1.5e6);
d.readU32(93, &m_gainTx1, 4);
d.readS32(94, &intval, 0);
m_antennaPathTx1 = (PathTxRFE) intval;
return true;
}
else
{
resetToDefaults();
return false;
}
}

View File

@ -0,0 +1,128 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOSETTINGS_H_
#define PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOSETTINGS_H_
#include <QtGlobal>
#include <QString>
struct LimeSDRMIMOSettings
{
typedef enum {
FC_POS_INFRA = 0,
FC_POS_SUPRA,
FC_POS_CENTER
} fcPos_t;
enum PathRxRFE
{
PATH_RFE_RX_NONE = 0,
PATH_RFE_LNAH,
PATH_RFE_LNAL,
PATH_RFE_LNAW,
PATH_RFE_LB1,
PATH_RFE_LB2
};
typedef enum {
GAIN_AUTO,
GAIN_MANUAL
} RxGainMode;
enum PathTxRFE
{
PATH_RFE_TX_NONE = 0,
PATH_RFE_TXRF1,
PATH_RFE_TXRF2,
};
// General
qint32 m_devSampleRate;
uint8_t m_gpioDir; //!< GPIO pin direction LSB first; 0 input, 1 output
uint8_t m_gpioPins; //!< GPIO pins to write; LSB first
bool m_extClock; //!< True if external clock source
uint32_t m_extClockFreq; //!< Frequency (Hz) of external clock source
bool m_useReverseAPI;
QString m_reverseAPIAddress;
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
// Rx general
quint64 m_rxCenterFrequency;
uint32_t m_log2HardDecim;
uint32_t m_log2SoftDecim;
bool m_dcBlock;
bool m_iqCorrection;
bool m_rxTransverterMode;
qint64 m_rxTransverterDeltaFrequency;
bool m_iqOrder;
bool m_ncoEnableRx; //!< Rx Enable TSP NCO and mixing
int m_ncoFrequencyRx; //!< Rx Actual NCO frequency (the resulting frequency with mixing is displayed)
// Rx channel 0
float m_lpfBWRx0; //!< Rx[0] LMS analog lowpass filter bandwidth (Hz)
bool m_lpfFIREnableRx0; //!< Rx[0] Enable LMS digital lowpass FIR filters
float m_lpfFIRBWRx0; //!< Rx[0] LMS digital lowpass FIR filters bandwidth (Hz)
uint32_t m_gainRx0; //!< Rx[0] Optimally distributed gain (dB)
PathRxRFE m_antennaPathRx0; //!< Rx[0] Antenna connection
RxGainMode m_gainModeRx0; //!< Rx[0] Gain mode: auto or manual
uint32_t m_lnaGainRx0; //!< Rx[0] Manual LAN gain
uint32_t m_tiaGainRx0; //!< Rx[0] Manual TIA gain
uint32_t m_pgaGainRx0; //!< Rx[0] Manual PGA gain
// Rx channel 1
float m_lpfBWRx1; //!< Rx[1] LMS analog lowpass filter bandwidth (Hz)
bool m_lpfFIREnableRx1; //!< Rx[1] Enable LMS digital lowpass FIR filters
float m_lpfFIRBWRx1; //!< Rx[1] LMS digital lowpass FIR filters bandwidth (Hz)
uint32_t m_gainRx1; //!< Rx[1] Optimally distributed gain (dB)
PathRxRFE m_antennaPathRx1; //!< Rx[1] Antenna connection
RxGainMode m_gainModeRx1; //!< Rx[1] Gain mode: auto or manual
uint32_t m_lnaGainRx1; //!< Rx[1] Manual LAN gain
uint32_t m_tiaGainRx1; //!< Rx[1] Manual TIA gain
uint32_t m_pgaGainRx1; //!< Rx[1] Manual PGA gain
// Tx general
quint64 m_txCenterFrequency;
uint32_t m_log2HardInterp;
uint32_t m_log2SoftInterp;
bool m_txTransverterMode;
qint64 m_txTransverterDeltaFrequency;
bool m_ncoEnableTx; //!< Tx Enable TSP NCO and mixing
int m_ncoFrequencyTx; //!< Tx Actual NCO frequency (the resulting frequency with mixing is displayed)
// Tx channel 0
float m_lpfBWTx0; //!< Tx[0] LMS amalog lowpass filter bandwidth (Hz)
bool m_lpfFIREnableTx0; //!< Tx[0] Enable LMS digital lowpass FIR filters
float m_lpfFIRBWTx0; //!< Tx[0] LMS digital lowpass FIR filters bandwidth (Hz)
uint32_t m_gainTx0; //!< Tx[0] Optimally distributed gain (dB)
PathTxRFE m_antennaPathTx0; //!< Tx[0] Antenna connection
// Tx channel 1
float m_lpfBWTx1; //!< Tx[1] LMS amalog lowpass filter bandwidth (Hz)
bool m_lpfFIREnableTx1; //!< Tx[1] Enable LMS digital lowpass FIR filters
float m_lpfFIRBWTx1; //!< Tx[1] LMS digital lowpass FIR filters bandwidth (Hz)
uint32_t m_gainTx1; //!< Tx[1] Optimally distributed gain (dB)
PathTxRFE m_antennaPathTx1; //!< Tx[1] Antenna connection
LimeSDRMIMOSettings();
void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
};
#endif // PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOSETTINGS_H_

View File

@ -0,0 +1,51 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// Implementation of static web API adapters used for preset serialization and //
// deserialization //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "SWGDeviceSettings.h"
#include "limesdrmimo.h"
#include "limesdrmimowebapiadapter.h"
LimeSDRMIMOWebAPIAdapter::LimeSDRMIMOWebAPIAdapter()
{}
LimeSDRMIMOWebAPIAdapter::~LimeSDRMIMOWebAPIAdapter()
{}
int LimeSDRMIMOWebAPIAdapter::webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage)
{
(void) errorMessage;
(void) response;
return 501;
}
int LimeSDRMIMOWebAPIAdapter::webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage)
{
(void) errorMessage;
(void) force;
(void) deviceSettingsKeys;
(void) response;
return 501;
}

View File

@ -0,0 +1,44 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// Implementation of static web API adapters used for preset serialization and //
// deserialization //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "device/devicewebapiadapter.h"
#include "limesdrmimosettings.h"
class LimeSDRMIMOWebAPIAdapter : public DeviceWebAPIAdapter
{
public:
LimeSDRMIMOWebAPIAdapter();
virtual ~LimeSDRMIMOWebAPIAdapter();
virtual QByteArray serialize() { return m_settings.serialize(); }
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); }
virtual int webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage);
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage);
private:
LimeSDRMIMOSettings m_settings;
};

View File

@ -0,0 +1,273 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "dsp/samplemififo.h"
#include "limesdrmithread.h"
LimeSDRMIThread::LimeSDRMIThread(lms_stream_t* stream0, lms_stream_t* stream1, QObject* parent) :
QThread(parent),
m_running(false),
m_stream0(stream0),
m_stream1(stream1),
m_sampleFifo(nullptr),
m_iqOrder(true)
{
qDebug("LimeSDRMIThread::LimeSDRMIThread");
for (unsigned int i = 0; i < 2; i++) {
m_convertBuffer[i].resize(DeviceLimeSDR::blockSize, Sample{0,0});
}
m_vBegin.push_back(m_convertBuffer[0].begin());
m_vBegin.push_back(m_convertBuffer[1].begin());
}
LimeSDRMIThread::~LimeSDRMIThread()
{
qDebug("LimeSDRMIThread::~LimeSDRMIThread");
if (m_running) {
stopWork();
}
}
void LimeSDRMIThread::startWork()
{
if (m_running) {
return; // return if running already
}
int ret[2];
ret[0] = LMS_StartStream(m_stream0);
ret[1] = LMS_StartStream(m_stream1);
if (ret[0] < 0)
{
qCritical("LimeSDRMIThread::startWork: could not start stream 0");
return;
}
else
{
qDebug("LimeSDRMIThread::startWork: stream 0 started");
}
if (m_stream1)
{
if (ret[1] < 0)
{
qCritical("LimeSDRMIThread::startWork: could not start stream 1");
return;
}
else
{
qDebug("LimeSDRMIThread::startWork: stream 0 started");
}
}
usleep(50000);
m_startWaitMutex.lock();
start();
while(!m_running) {
m_startWaiter.wait(&m_startWaitMutex, 100);
}
m_startWaitMutex.unlock();
}
void LimeSDRMIThread::stopWork()
{
if (!m_running) {
return; // return if not running
}
m_running = false;
wait();
int ret[2];
ret[0] = LMS_StopStream(m_stream0);
ret[1] = LMS_StopStream(m_stream1);
if (ret[0] < 0) {
qCritical("LimeSDRInputThread::stopWork: could not stop stream 0");
} else {
qDebug("LimeSDRInputThread::stopWork: stream 0 stopped");
}
if (m_stream1)
{
if (ret[1] < 0) {
qCritical("LimeSDRInputThread::stopWork: could not stop stream 1");
} else {
qDebug("LimeSDRInputThread::stopWork: stream 1 stopped");
}
}
usleep(50000);
}
void LimeSDRMIThread::setLog2Decimation(unsigned int log2_decim)
{
m_log2Decim = log2_decim;
}
unsigned int LimeSDRMIThread::getLog2Decimation() const
{
return m_log2Decim;
}
void LimeSDRMIThread::run()
{
lms_stream_meta_t metadata; //Use metadata for additional control over sample receive function behaviour
metadata.flushPartialPacket = false; //Do not discard data remainder when read size differs from packet size
metadata.waitForTimestamp = false; //Do not wait for specific timestamps
int lengths[2];
int res[2];
m_running = true;
m_startWaiter.wakeAll();
while (m_running && m_stream0)
{
res[0] = LMS_RecvStream(m_stream0, (void *) m_buf0, DeviceLimeSDR::blockSize, &metadata, 1000);
if (res[0] < 0)
{
qCritical("LimeSDRMIThread::run read stream 0 error: %s", strerror(errno));
break;
}
if (m_stream1)
{
res[1] = LMS_RecvStream(m_stream1, (void *) m_buf1, DeviceLimeSDR::blockSize, &metadata, 1000);
if (res[1] < 0)
{
qCritical("LimeSDRMIThread::run read stream 1 error: %s", strerror(errno));
break;
}
}
else
{
std::fill(m_buf1, m_buf1 + 2*DeviceLimeSDR::blockSize, 0);
res[1] = DeviceLimeSDR::blockSize;
}
if (m_iqOrder)
{
lengths[0] = channelCallbackIQ(m_buf0, 2*res[0], 0);
lengths[1] = channelCallbackIQ(m_buf1, 2*res[1], 1);
}
else
{
lengths[0] = channelCallbackQI(m_buf0, 2*res[0], 0);
lengths[1] = channelCallbackQI(m_buf1, 2*res[1], 1);
}
if (lengths[0] == lengths[1])
{
//qDebug("LimeSDRMIThread::run: writeSync %d samples", lengths[0]);
m_sampleFifo->writeSync(m_vBegin, lengths[0]);
}
else
{
qWarning("LimeSDRMIThread::run: unequal channel lengths: [0]=%d [1]=%d", lengths[0], lengths[1]);
m_sampleFifo->writeSync(m_vBegin, (std::min)(lengths[0], lengths[1]));
}
}
m_running = false;
}
int LimeSDRMIThread::channelCallbackIQ(const qint16* buf, qint32 len, int channel)
{
SampleVector::iterator it = m_convertBuffer[channel].begin();
if (m_log2Decim == 0)
{
m_decimatorsIQ[channel].decimate1(&it, buf, len);
}
else
{
switch (m_log2Decim)
{
case 1:
m_decimatorsIQ[channel].decimate2_cen(&it, buf, len);
break;
case 2:
m_decimatorsIQ[channel].decimate4_cen(&it, buf, len);
break;
case 3:
m_decimatorsIQ[channel].decimate8_cen(&it, buf, len);
break;
case 4:
m_decimatorsIQ[channel].decimate16_cen(&it, buf, len);
break;
case 5:
m_decimatorsIQ[channel].decimate32_cen(&it, buf, len);
break;
case 6:
m_decimatorsIQ[channel].decimate64_cen(&it, buf, len);
break;
default:
break;
}
}
return it - m_convertBuffer[channel].begin();
}
int LimeSDRMIThread::channelCallbackQI(const qint16* buf, qint32 len, int channel)
{
SampleVector::iterator it = m_convertBuffer[channel].begin();
if (m_log2Decim == 0)
{
m_decimatorsQI[channel].decimate1(&it, buf, len);
}
else
{
switch (m_log2Decim)
{
case 1:
m_decimatorsQI[channel].decimate2_cen(&it, buf, len);
break;
case 2:
m_decimatorsQI[channel].decimate4_cen(&it, buf, len);
break;
case 3:
m_decimatorsQI[channel].decimate8_cen(&it, buf, len);
break;
case 4:
m_decimatorsQI[channel].decimate16_cen(&it, buf, len);
break;
case 5:
m_decimatorsQI[channel].decimate32_cen(&it, buf, len);
break;
case 6:
m_decimatorsQI[channel].decimate64_cen(&it, buf, len);
break;
default:
break;
}
}
return it - m_convertBuffer[channel].begin();
}

View File

@ -0,0 +1,73 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMITHREAD_H_
#define PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMITHREAD_H_
// LimeSDR is a SISO/MIMO device. It can support one or two Rx. Here ww will
// configure two Rx
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include "lime/LimeSuite.h"
#include "limesdr/devicelimesdr.h"
#include "dsp/decimators.h"
class SampleMIFifo;
class LimeSDRMIThread : public QThread {
Q_OBJECT
public:
LimeSDRMIThread(lms_stream_t* stream0, lms_stream_t* stream1, QObject* parent = nullptr);
~LimeSDRMIThread();
void startWork();
void stopWork();
bool isRunning() const { return m_running; }
void setLog2Decimation(unsigned int log2_decim);
unsigned int getLog2Decimation() const;
void setFifo(SampleMIFifo *sampleFifo) { m_sampleFifo = sampleFifo; }
SampleMIFifo *getFifo() { return m_sampleFifo; }
void setIQOrder(bool iqOrder) { m_iqOrder = iqOrder; }
private:
QMutex m_startWaitMutex;
QWaitCondition m_startWaiter;
bool m_running;
lms_stream_t* m_stream0;
lms_stream_t* m_stream1;
qint16 m_buf0[2*DeviceLimeSDR::blockSize];
qint16 m_buf1[2*DeviceLimeSDR::blockSize];
SampleVector m_convertBuffer[2];
std::vector<SampleVector::const_iterator> m_vBegin;
SampleMIFifo* m_sampleFifo;
Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 12, true> m_decimatorsIQ[2];
Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 12, false> m_decimatorsQI[2];
unsigned int m_log2Decim;
bool m_iqOrder;
void run();
int channelCallbackIQ(const qint16* buf, qint32 len, int channel);
int channelCallbackQI(const qint16* buf, qint32 len, int channel);
};
#endif // PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMITHREAD_H_

View File

@ -0,0 +1,235 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "dsp/samplemofifo.h"
#include "limesdrmothread.h"
LimeSDRMOThread::LimeSDRMOThread(lms_stream_t* stream0, lms_stream_t* stream1, QObject* parent) :
QThread(parent),
m_running(false),
m_stream0(stream0),
m_stream1(stream1),
m_sampleFifo(nullptr)
{
qDebug("LimeSDRMOThread::LimeSDRMOThread");
m_buf = new qint16[2*DeviceLimeSDR::blockSize*2];
std::fill(m_buf, m_buf + 2*DeviceLimeSDR::blockSize*2, 0);
}
LimeSDRMOThread::~LimeSDRMOThread()
{
qDebug("LimeSDRMOThread::~LimeSDRMOThread");
if (m_running) {
stopWork();
}
delete[] m_buf;
}
void LimeSDRMOThread::startWork()
{
if (m_running) {
return; // return if running already
}
int ret[2];
ret[0] = LMS_StartStream(m_stream0);
ret[1] = LMS_StartStream(m_stream1);
if (ret[0] < 0)
{
qCritical("LimeSDROutputThread::startWork: could not start stream 0");
return;
}
else
{
qDebug("LimeSDROutputThread::startWork: stream 0 started");
}
if (m_stream1)
{
if (ret[1] < 0)
{
qCritical("LimeSDROutputThread::startWork: could not start stream 1");
LMS_StopStream(m_stream0);
return;
}
else
{
qDebug("LimeSDROutputThread::startWork: stream 1 started");
}
}
usleep(50000);
m_startWaitMutex.lock();
start();
while(!m_running) {
m_startWaiter.wait(&m_startWaitMutex, 100);
}
m_startWaitMutex.unlock();
}
void LimeSDRMOThread::stopWork()
{
if (!m_running) {
return; // return if not running
}
m_running = false;
wait();
int ret[2];
ret[0] = LMS_StopStream(m_stream0);
ret[1] = LMS_StopStream(m_stream1);
if (ret[0] < 0)
{
qCritical("LimeSDROutputThread::stopWork: could not stop stream 0");
} else {
qDebug("LimeSDROutputThread::stopWork: stream 0 stopped");
}
if (m_stream1)
{
if (ret[1] < 0)
{
qCritical("LimeSDROutputThread::stopWork: could not stop stream 1");
} else {
qDebug("LimeSDROutputThread::stopWork: stream 1 stopped");
}
}
usleep(50000);
}
void LimeSDRMOThread::setLog2Interpolation(unsigned int log2Interp)
{
qDebug("LimeSDRMOThread::setLog2Interpolation: %u", log2Interp);
m_log2Interp = log2Interp;
}
unsigned int LimeSDRMOThread::getLog2Interpolation() const
{
return m_log2Interp;
}
void LimeSDRMOThread::run()
{
lms_stream_meta_t metadata; //Use metadata for additional control over sample receive function behaviour
metadata.flushPartialPacket = false; //Do not discard data remainder when read size differs from packet size
metadata.waitForTimestamp = false; //Do not wait for specific timestamps
m_running = true;
m_startWaiter.wakeAll();
int res[2];
while (m_running)
{
callback(m_buf, DeviceLimeSDR::blockSize);
res[0] = LMS_SendStream(m_stream0, (void *) &m_buf[0], DeviceLimeSDR::blockSize, &metadata, 1000000);
if (res[0] < 0)
{
qCritical("LimeSDROutputThread::run stream 0 write error: %s", strerror(errno));
break;
}
else if (res[0] != DeviceLimeSDR::blockSize)
{
qDebug("LimeSDROutputThread::run stream 0 written %d/%u samples", res[0], DeviceLimeSDR::blockSize);
}
if (m_stream1)
{
res[1] = LMS_SendStream(m_stream1, (void *) &m_buf[2*DeviceLimeSDR::blockSize], DeviceLimeSDR::blockSize, &metadata, 1000000);
if (res[1] < 0)
{
qCritical("LimeSDROutputThread::run stream 1 write error: %s", strerror(errno));
break;
}
else if (res[1] != DeviceLimeSDR::blockSize)
{
qDebug("LimeSDROutputThread::run stream 1 written %d/%u samples", res[1], DeviceLimeSDR::blockSize);
}
}
}
m_running = false;
}
void LimeSDRMOThread::callback(qint16* buf, qint32 samplesPerChannel)
{
unsigned int iPart1Begin, iPart1End, iPart2Begin, iPart2End;
m_sampleFifo->readSync(samplesPerChannel/(1<<m_log2Interp), iPart1Begin, iPart1End, iPart2Begin, iPart2End);
if (iPart1Begin != iPart1End)
{
callbackPart(buf, (iPart1End - iPart1Begin)*(1<<m_log2Interp), iPart1Begin);
}
if (iPart2Begin != iPart2End)
{
unsigned int shift = (iPart1End - iPart1Begin)*(1<<m_log2Interp);
callbackPart(buf + 2*shift, (iPart2End - iPart2Begin)*(1<<m_log2Interp), iPart2Begin);
}
}
// Interpolate according to specified log2 (ex: log2=4 => decim=16). len is a number of samples (not a number of I or Q)
void LimeSDRMOThread::callbackPart(qint16* buf, qint32 nSamples, int iBegin)
{
for (unsigned int channel = 0; channel < 2; channel++)
{
SampleVector::iterator begin = m_sampleFifo->getData(channel).begin() + iBegin;
if (m_log2Interp == 0)
{
m_interpolators[channel].interpolate1(&begin, &buf[channel*2*nSamples], 2*nSamples);
}
else
{
switch (m_log2Interp)
{
case 1:
m_interpolators[channel].interpolate2_cen(&begin, &buf[channel*2*nSamples], 2*nSamples);
break;
case 2:
m_interpolators[channel].interpolate4_cen(&begin, &buf[channel*2*nSamples], 2*nSamples);
break;
case 3:
m_interpolators[channel].interpolate8_cen(&begin, &buf[channel*2*nSamples], 2*nSamples);
break;
case 4:
m_interpolators[channel].interpolate16_cen(&begin, &buf[channel*2*nSamples], 2*nSamples);
break;
case 5:
m_interpolators[channel].interpolate32_cen(&begin, &buf[channel*2*nSamples], 2*nSamples);
break;
case 6:
m_interpolators[channel].interpolate64_cen(&begin, &buf[channel*2*nSamples], 2*nSamples);
break;
default:
break;
}
}
}
}

View File

@ -0,0 +1,67 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Edouard Griffiths, F4EXB //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMOTHREAD_H_
#define PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMOTHREAD_H_
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include "lime/LimeSuite.h"
#include "limesdr/devicelimesdr.h"
#include "dsp/interpolators.h"
class SampleMOFifo;
class LimeSDRMOThread : public QThread {
Q_OBJECT
public:
LimeSDRMOThread(lms_stream_t* stream0, lms_stream_t* stream1, QObject* parent = nullptr);
~LimeSDRMOThread();
void startWork();
void stopWork();
bool isRunning() const { return m_running; }
void setLog2Interpolation(unsigned int log2Interp);
unsigned int getLog2Interpolation() const;
void setFifo(SampleMOFifo *sampleFifo) { m_sampleFifo = sampleFifo; }
SampleMOFifo *getFifo() { return m_sampleFifo; }
private:
QMutex m_startWaitMutex;
QWaitCondition m_startWaiter;
bool m_running;
lms_stream_t* m_stream0;
lms_stream_t* m_stream1;
qint16 *m_buf; //!< Full buffer for SISO or MIMO operation
SampleMOFifo* m_sampleFifo;
Interpolators<qint16, SDR_TX_SAMP_SZ, 12> m_interpolators[2];
unsigned int m_log2Interp;
void run();
unsigned int getNbFifos();
void callbackPart(qint16* buf, qint32 nSamples, int iBegin);
void callback(qint16* buf, qint32 samplesPerChannel);
};
#endif /* PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMOTHREAD_H_ */

View File

@ -0,0 +1,239 @@
<h1>LimeSDR MIMO plugin</h1>
<h2>Introduction</h2>
This MIMO plugin sends and receives its samples to/from a [LimeSDR device](https://myriadrf.org/projects/limesdr/). It handles both input (Rx) and output (Tx) streams synchronously. There is no option to synchronize Rx with Tx streams.
<h2>Build</h2>
&#9758; LimeSuite 20.01.0 is used in the binary builds and the Docker image. You have to make sure the corresponding gateware version is loaded in the LimeSDR. Check LimeSDR documentation for information about gateware.
<h2>Interface</h2>
![LimeSDR MIMO plugin GUI](../../../doc/img/LimeSDRMIMO_plugin.png)
<h3>1. Rx/Tx settings selection</h3>
Use this combo to target UI to Rx or Tx streams for Rx/Tx specific items.
<h3>2. Stream settings selection</h3>
Use this combo to target UI to stream 0 or stream 1 for stream specific items.
<h3>3. Rx/Tx spectrum display selection</h3>
Use this combo to select Rx or Tx side for main spectrum display.
<h3>4. Stream spectrum display selection</h3>
Use this combo to select stream 0 or stream 1 for main spectrum display.
<h3>5. Start/Stop Rx</h3>
This button controls the start/stop of the Rx subsystem.
<h3>6. Start/Stop Tx</h3>
This button controls the start/stop of the Tx subsystem.
<h3>7. Record button</h3>
- Left click: record baseband I/Q stream toggle button (inactive: waiting for synchronous streams recording)
- Right click: choose record file
<h3>8. Center frequency</h3>
This controls the center frequency of Rx or Tx subsystems in kHz depending on the Rx/Tx settings selection (1). This frequency can effectively be different for Rx and Tx but is the same for both Rx or both Tx streams.
<h3>9. ADC/DAC sample rate</h3>
This is the sample rate at which the ADC or DAC runs in kS/s (k) or MS/s (M) before hardware decimation or after hardware interpolation. Thus this is the device to host sample rate (A.7) multiplied by the hardware decimation or interpolation factor (A.8).
<h3>10. Baseband sample rate</h3>
In device to host sample rate input mode (A.6) this is the baseband I/Q sample rate in kS/s. This is the device to host sample rate (A.7) divided by the software decimation or interpolation factor (A.9).
In baseband sample rate input mode (A.6) this is the device to host sample rate in kS/s. This is the baseband sample rate (A.7) multiplied by the software decimation or interpolation factor (A.9)
<h3>A. Section</h3>
![LimeSDR MIMO A section plugin GUI](../../../doc/img/LimeSDRMIMO_plugin_A.png)
<h4>A.1. NCO toggle</h4>
The button is lit when NCO is active and dark when inactive.
Use this button to activate/deactivate the TSP NCO. The LMS7002M chip has an independent NCO in each Rx channel that can span the bandwidth received by the ADC. This effectively allows non zero digital IF.
<h4>A.2. NCO frequency shift</h4>
This is the frequency shift applied when the NCO is engaged thus the actual LO frequency is the center frequency of reception minus this value. Use the thumbwheels to adjust frequency as done with the LO (8). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.
&#9758; Engaging the NCO shifts the center frequency of reception or transmission by the shift amount. You have to retune the center frequency (8) to get back to the frequency before the NCO was engaged. You may also select the NCO frequency and then tune the center frequency.
&#9758; In the LMS7002M TSP Rx block the NCO sits before the decimator (see Fig.14 of the [datasheet](http://www.limemicro.com/wp-content/uploads/2015/09/LMS7002M-Data-Sheet-v2.8.0.pdf) p.7) so it runs at the actual ADC rate. Hence the NCO limits are calculated as +/- half the device to host sample rate multiplied by the hardware decimation factor. For example with a 4 MS/s device to host sample rate (A.7) and a hardware decimation of 16 (A.8) you have +/- 32 MHz span around the LO for the NCO. In this example you can tune all HF frequencies with the center frequency set at its lowest (30 MHz).
A similar logic is used on the Tx / DAC side.
<h4>A.3. DC auto correction options</h4>
This button controls the local DSP DC auto remove DC component.
<h4>A.4. IQ auto correction options</h4>
This button controls the local DSP auto make I/Q balance. The DC correction must be enabled for this to be effective.
<h4>A.5. External clock control</h4>
Use this button to open a dialog that lets you choose the external clock frequency and enable or disable it. When disabled the internal 30.72 MHz VCTCXO is used.
![LimeSDR input plugin gain GUI](../../../doc/img/LimeSDR_plugin_extclock.png)
<h5>A.5.1. External clock frequency</h5>
Can be varied from 5 to 300 MHz
Use the thumbwheels to adjust frequency as done with the LO (1.1). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.
<h5>A.5.2. Enable/disable external clock input</h5>
Use this checkbox to enable or disable the external clock input
<h5>A.5.3. Confirm changes</h5>
Use the "OK" button to confirm your changes
<h5>A.5.4. Dismiss changes</h5>
Use the "Cancel" button to dismiss your changes
<h4>A.6. Device to host sample rate / Baseband sample rate input toggle</h4>
Use this toggle button to switch the sample rate input next (A.7) between device to host sample rate and baseband sample rate input. The button shows the current mode:
- **SR**: device to host sample rate input mode. The baseband sample rate (10) is the device to host sample rate (A.7) divided by the software decimation or interpolation factor (A.9).
- **BB**: baseband sample rate input mode. The device to host sample rate (A.7) is the baseband sample rate (10) multiplied by the software decimation or interpolation factor (A.9).
<h4>A.7. Sample rate</h4>
This is the LMS7002M device to/from host stream sample rate or baseband sample rate in samples per second (S/s). The control (A.6) is used to switch between the two input modes. The device to/from host stream sample rate is the same for the Rx and Tx systems.
The limits are adjusted automatically. In baseband input mode the limits are driven by the decimation or intepolation factor (A.9). You may need to increase this factor to be able to reach lower values.
Use the wheels to adjust the sample rate. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows.
The LMS7002M uses the same clock for both the ADCs and DACs therefore this sample rate affects all of the 2x2 MIMO channels.
<h4>A.8. Hardware decimation or interpolation factor</h4>
The TSP block in the LMS7002M hardware has a decimation/interpolation chain that acts on both Rx/Tx channels. It is composed of 5 halfband decimation/interpolation stages and therefore can achieve decimation/interpolation between 1 (no decimation/interpolation) and 32 in increasing powers of 2: 1, 2, 4, 8, 16, 32.
<h4>A.9. Software decimation factor</h4>
The I/Q stream from the LimeSDR is downsampled/upsampled by a power of two by software inside the plugin before being sent to the passband/device. Possible values are increasing powers of two: 1 (no decimation/interpolation), 2, 4, 8, 16, 32.
<h3>B. section</h3>
![LimeSDR MIMO B section plugin GUI](../../../doc/img/LimeSDRMIMO_plugin_B.png)
<h4>B.1. Analog filter bandwidth</h4>
This is the hardware filter bandwidth in kHz in the LMS7002M device for the given channel. Boundaries are updated automatically but generally are from 1.4 to 130 MHz in 1 kHz steps for Rx and 5.5 to 130 MHz in 1 kHz steps for Tx. Use the wheels to adjust the value. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.
<h4>B.2. TSP FIR filter toggle </h4>
The TSP in the LMS7002M chip has a FIR filter chain per channel. Use this button to activate or deactivate the TSP FIR filter.
<h4>B.3. TSP FIR filter bandwidth</h4>
Use the wheels to adjust the bandwidth of the hardware TSP FIR filter. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.
<h3>B.4. Transverter mode open dialog</h3>
This button opens a dialog to set the transverter mode frequency translation options. The details about this dialog can be found [here](../../../sdrgui/gui/transverterdialog.md)
<h4>B.5. Gain mode</h4>
This is the gain mode control that applies to Rx only:
- **automatic**: AGC based on a global gain (B.6)
- **manual**: Manual. Use LNA, TIA and PGA controls (B.7 to B.9) to adjust gain
<h4>B.6. Manual gain setting</h4>
- Rx: this sets the gain manually per stream if (B.5) is set to "Manual".
- Tx: this sets the gain
<h4>B.7. LNA gain</h4>
Rx only. This is the LNA gain stage in dB
<h4>B.8. TIA gain</h4>
Rx only. This is the TIA gain block settings in 3 increasing stages.
<h4>B.9. PGA gain</h4>
Rx only. This is the PGA gain stage in dB
<h4>A.10. Antenna path select</h4>
<h5>Rx side</h5>
Use this combo box to select the input path (network):
- **No**: None
- **NC**: Not connected
- **Lo**: Selects the low frequency input
- **LimeMini**: lower than 2 GHz
- **other**: lower than 1.5 GHz
- **Hi**: Selects the high frequency input (2 to 2.6 GHz)
- **LimeUSB**: higher than 2 GHz
- **other**: higher than 1.5 GHz
- **Wi**: Selects the wideband input
- **LimeUSB**: not connected
- **other**: full band
- **T1**: Selects loopback from TX #1 (experimental)
- **T1**: Selects loopback from TX #2 (experimental)
<h5>Tx side</h5>
Use this combo box to select the output path (network):
- **No**: None
- **NC**: Not connected
- **Lo**: Selects the "low" frequency output
- **LimeMini**: lower than 2 GHz
- **other**: "L" port full band
- **Hi**: Selects the "high" frequency output
- **LimeMini**: higher than 2 GHz
- **other**: "H" port full band
<h3>11. Stream status indicator</h3>
This label turns green when status can be obtained from the current stream. Usually this means that the stream is up and running but not necessarily streaming data. The various status elements appear next on the same line (13)
<h3>12. Stream warning indicators</h3>
- **U**: turns red if stream experiences underruns
- **O**: turns red if stream experiences overruns
- **P**: turns red if stream experiences packet drop outs
<h3>13. Stream global (all Rx or all Tx) throughput in MB/s</h3>
This is the stream throughput in MB/s and is about 6 times the sample rate for a for a dual Rx or Tx stream. This is due to the fact that 12 bits samples are used and although they are represented as 16 bit values only 12 bits travel on the USB link.
The Rx or Tx stream is displayed depending on the side display selection (3)
<h3>14. FIFO status</h3>
This is the fill percentage of the Rx or Tx FIFO in the LimeSuite interface. It should be zero most of the time.
The FIFO is selected with the side (3) and stream (4) display selectors.
<h3>15. Board temperature</h3>
This is the board temperature in degrees Celsius updated every ~5s. Before the first probe the display marks "00C" this is normal.
<h3>16. GPIO pins status</h3>
This is the hexadecimal representation of the 8 available GPIO pins of the on board LimeSDR GPIO header.

View File

@ -2,8 +2,6 @@
<h2>Introduction</h2>
This is a v5 only plugin.
This input sample source plugin is an internal continuous wave generator that can be used to carry out test of software internals.
<h2>Build</h2>

View File

@ -2,8 +2,6 @@
<h2>Introduction</h2>
This is a v5 only plugin.
This MO (Multiple Output) sample sink plugin sends its samples to a spectrum display. It features the synchronous pulling of samples from two baseband channels provided by a MIMO channel plugin (thus its "MO" part). Streams 0 and 1 are connected to streams 0 and 1 of the MIMO channel respectively.
<h2>Build</h2>
@ -46,4 +44,4 @@ Use the wheels to adjust the sample rate. Left click on a digit sets the cursor
<h3>7: Spectrum display</h3>
This is the final output stream spectrum display after interpolation (5). This would be sent to the hardware device. Controls on the bottom of the panel are identical to the ones of the main spectrum display.
This is the final output stream spectrum display after interpolation (5). This would be sent to the hardware device. Controls on the bottom of the panel are identical to the ones of the main spectrum display.

View File

@ -29,7 +29,7 @@
const PluginDescriptor TestMOSyncPlugin::m_pluginDescriptor = {
QString("TestMOSync"),
QString("Test Synchronous Multiple Output"),
QString("5.13.0"),
QString("6.0.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -3469,15 +3469,18 @@ margin-bottom: 20px;
"fileInputReport" : {
"$ref" : "#/definitions/FileInputReport"
},
"limeSdrInputReport" : {
"$ref" : "#/definitions/LimeSdrInputReport"
},
"kiwiSDRReport" : {
"$ref" : "#/definitions/KiwiSDRReport"
},
"limeSdrInputReport" : {
"$ref" : "#/definitions/LimeSdrInputReport"
},
"limeSdrOutputReport" : {
"$ref" : "#/definitions/LimeSdrOutputReport"
},
"limeSdrMIMOReport" : {
"$ref" : "#/definitions/LimeSdrMIMOReport"
},
"localInputReport" : {
"$ref" : "#/definitions/LocalInputReport"
},
@ -5461,6 +5464,82 @@ margin-bottom: 20px;
}
},
"description" : "LimeSDR"
};
defs.LimeSdrMIMOReport = {
"properties" : {
"hwTimestamp" : {
"type" : "integer",
"format" : "int64",
"description" : "Hardware timestamp"
},
"temperature" : {
"type" : "number",
"format" : "float"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
},
"successRx" : {
"type" : "integer",
"description" : "1 if Rx info was successfullt retrieved else 0"
},
"streamActiveRx" : {
"type" : "integer",
"description" : "1 if active else 0"
},
"fifoSizeRx" : {
"type" : "integer"
},
"fifoFillRx" : {
"type" : "integer"
},
"underrunCountRx" : {
"type" : "integer"
},
"overrunCountRx" : {
"type" : "integer"
},
"droppedPacketsCountRx" : {
"type" : "integer"
},
"linkRateRx" : {
"type" : "number",
"format" : "float"
},
"successTx" : {
"type" : "integer",
"description" : "1 if Tx info was successfullt retrieved else 0"
},
"streamActiveTx" : {
"type" : "integer",
"description" : "1 if active else 0"
},
"fifoSizeTx" : {
"type" : "integer"
},
"fifoFillTx" : {
"type" : "integer"
},
"underrunCountTx" : {
"type" : "integer"
},
"overrunCountTx" : {
"type" : "integer"
},
"droppedPacketsCountTx" : {
"type" : "integer"
},
"linkRateTx" : {
"type" : "number",
"format" : "float"
}
},
"description" : "LimeSDR"
};
defs.LimeSdrMIMOSettings = {
"properties" : {
@ -41375,7 +41454,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-11-10T22:27:11.499+01:00
Generated 2020-11-10T23:21:43.607+01:00
</div>
</div>
</div>

View File

@ -23,12 +23,14 @@ DeviceReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2MIMOReport"
fileInputReport:
$ref: "/doc/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
kiwiSDRReport:
$ref: "/doc/swagger/include/KiwiSDR.yaml#/KiwiSDRReport"
limeSdrInputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
limeSdrOutputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrOutputReport"
limeSdrMIMOReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrMIMOReport"
localInputReport:
$ref: "/doc/swagger/include/LocalInput.yaml#/LocalInputReport"
localOutputReport:

View File

@ -396,3 +396,58 @@ LimeSdrOutputReport:
gpioPins:
type: integer
format: int8
LimeSdrMIMOReport:
description: LimeSDR
properties:
hwTimestamp:
description: Hardware timestamp
type: integer
format: int64
temperature:
type: number
format: float
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
successRx:
description: 1 if Rx info was successfullt retrieved else 0
type: integer
streamActiveRx:
description: 1 if active else 0
type: integer
fifoSizeRx:
type: integer
fifoFillRx:
type: integer
underrunCountRx:
type: integer
overrunCountRx:
type: integer
droppedPacketsCountRx:
type: integer
linkRateRx:
type: number
format: float
successTx:
description: 1 if Tx info was successfullt retrieved else 0
type: integer
streamActiveTx:
description: 1 if active else 0
type: integer
fifoSizeTx:
type: integer
fifoFillTx:
type: integer
underrunCountTx:
type: integer
overrunCountTx:
type: integer
droppedPacketsCountTx:
type: integer
linkRateTx:
type: number
format: float

View File

@ -23,12 +23,14 @@ DeviceReport:
$ref: "http://swgserver:8081/api/swagger/include/BladeRF2.yaml#/BladeRF2MIMOReport"
fileInputReport:
$ref: "http://swgserver:8081/api/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
kiwiSDRReport:
$ref: "http://swgserver:8081/api/swagger/include/KiwiSDR.yaml#/KiwiSDRReport"
limeSdrInputReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
limeSdrOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrOutputReport"
limeSdrMIMOReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrMIMOReport"
localInputReport:
$ref: "http://swgserver:8081/api/swagger/include/LocalInput.yaml#/LocalInputReport"
localOutputReport:

View File

@ -396,3 +396,58 @@ LimeSdrOutputReport:
gpioPins:
type: integer
format: int8
LimeSdrMIMOReport:
description: LimeSDR
properties:
hwTimestamp:
description: Hardware timestamp
type: integer
format: int64
temperature:
type: number
format: float
gpioDir:
type: integer
format: int8
gpioPins:
type: integer
format: int8
successRx:
description: 1 if Rx info was successfullt retrieved else 0
type: integer
streamActiveRx:
description: 1 if active else 0
type: integer
fifoSizeRx:
type: integer
fifoFillRx:
type: integer
underrunCountRx:
type: integer
overrunCountRx:
type: integer
droppedPacketsCountRx:
type: integer
linkRateRx:
type: number
format: float
successTx:
description: 1 if Tx info was successfullt retrieved else 0
type: integer
streamActiveTx:
description: 1 if active else 0
type: integer
fifoSizeTx:
type: integer
fifoFillTx:
type: integer
underrunCountTx:
type: integer
overrunCountTx:
type: integer
droppedPacketsCountTx:
type: integer
linkRateTx:
type: number
format: float

View File

@ -3469,15 +3469,18 @@ margin-bottom: 20px;
"fileInputReport" : {
"$ref" : "#/definitions/FileInputReport"
},
"limeSdrInputReport" : {
"$ref" : "#/definitions/LimeSdrInputReport"
},
"kiwiSDRReport" : {
"$ref" : "#/definitions/KiwiSDRReport"
},
"limeSdrInputReport" : {
"$ref" : "#/definitions/LimeSdrInputReport"
},
"limeSdrOutputReport" : {
"$ref" : "#/definitions/LimeSdrOutputReport"
},
"limeSdrMIMOReport" : {
"$ref" : "#/definitions/LimeSdrMIMOReport"
},
"localInputReport" : {
"$ref" : "#/definitions/LocalInputReport"
},
@ -5461,6 +5464,82 @@ margin-bottom: 20px;
}
},
"description" : "LimeSDR"
};
defs.LimeSdrMIMOReport = {
"properties" : {
"hwTimestamp" : {
"type" : "integer",
"format" : "int64",
"description" : "Hardware timestamp"
},
"temperature" : {
"type" : "number",
"format" : "float"
},
"gpioDir" : {
"type" : "integer",
"format" : "int8"
},
"gpioPins" : {
"type" : "integer",
"format" : "int8"
},
"successRx" : {
"type" : "integer",
"description" : "1 if Rx info was successfullt retrieved else 0"
},
"streamActiveRx" : {
"type" : "integer",
"description" : "1 if active else 0"
},
"fifoSizeRx" : {
"type" : "integer"
},
"fifoFillRx" : {
"type" : "integer"
},
"underrunCountRx" : {
"type" : "integer"
},
"overrunCountRx" : {
"type" : "integer"
},
"droppedPacketsCountRx" : {
"type" : "integer"
},
"linkRateRx" : {
"type" : "number",
"format" : "float"
},
"successTx" : {
"type" : "integer",
"description" : "1 if Tx info was successfullt retrieved else 0"
},
"streamActiveTx" : {
"type" : "integer",
"description" : "1 if active else 0"
},
"fifoSizeTx" : {
"type" : "integer"
},
"fifoFillTx" : {
"type" : "integer"
},
"underrunCountTx" : {
"type" : "integer"
},
"overrunCountTx" : {
"type" : "integer"
},
"droppedPacketsCountTx" : {
"type" : "integer"
},
"linkRateTx" : {
"type" : "number",
"format" : "float"
}
},
"description" : "LimeSDR"
};
defs.LimeSdrMIMOSettings = {
"properties" : {
@ -41375,7 +41454,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-11-10T22:27:11.499+01:00
Generated 2020-11-10T23:21:43.607+01:00
</div>
</div>
</div>

View File

@ -44,12 +44,14 @@ SWGDeviceReport::SWGDeviceReport() {
m_blade_rf2_mimo_report_isSet = false;
file_input_report = nullptr;
m_file_input_report_isSet = false;
lime_sdr_input_report = nullptr;
m_lime_sdr_input_report_isSet = false;
kiwi_sdr_report = nullptr;
m_kiwi_sdr_report_isSet = false;
lime_sdr_input_report = nullptr;
m_lime_sdr_input_report_isSet = false;
lime_sdr_output_report = nullptr;
m_lime_sdr_output_report_isSet = false;
lime_sdr_mimo_report = nullptr;
m_lime_sdr_mimo_report_isSet = false;
local_input_report = nullptr;
m_local_input_report_isSet = false;
local_output_report = nullptr;
@ -106,12 +108,14 @@ SWGDeviceReport::init() {
m_blade_rf2_mimo_report_isSet = false;
file_input_report = new SWGFileInputReport();
m_file_input_report_isSet = false;
lime_sdr_input_report = new SWGLimeSdrInputReport();
m_lime_sdr_input_report_isSet = false;
kiwi_sdr_report = new SWGKiwiSDRReport();
m_kiwi_sdr_report_isSet = false;
lime_sdr_input_report = new SWGLimeSdrInputReport();
m_lime_sdr_input_report_isSet = false;
lime_sdr_output_report = new SWGLimeSdrOutputReport();
m_lime_sdr_output_report_isSet = false;
lime_sdr_mimo_report = new SWGLimeSdrMIMOReport();
m_lime_sdr_mimo_report_isSet = false;
local_input_report = new SWGLocalInputReport();
m_local_input_report_isSet = false;
local_output_report = new SWGLocalOutputReport();
@ -170,15 +174,18 @@ SWGDeviceReport::cleanup() {
if(file_input_report != nullptr) {
delete file_input_report;
}
if(lime_sdr_input_report != nullptr) {
delete lime_sdr_input_report;
}
if(kiwi_sdr_report != nullptr) {
delete kiwi_sdr_report;
}
if(lime_sdr_input_report != nullptr) {
delete lime_sdr_input_report;
}
if(lime_sdr_output_report != nullptr) {
delete lime_sdr_output_report;
}
if(lime_sdr_mimo_report != nullptr) {
delete lime_sdr_mimo_report;
}
if(local_input_report != nullptr) {
delete local_input_report;
}
@ -256,12 +263,14 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&file_input_report, pJson["fileInputReport"], "SWGFileInputReport", "SWGFileInputReport");
::SWGSDRangel::setValue(&lime_sdr_input_report, pJson["limeSdrInputReport"], "SWGLimeSdrInputReport", "SWGLimeSdrInputReport");
::SWGSDRangel::setValue(&kiwi_sdr_report, pJson["kiwiSDRReport"], "SWGKiwiSDRReport", "SWGKiwiSDRReport");
::SWGSDRangel::setValue(&lime_sdr_input_report, pJson["limeSdrInputReport"], "SWGLimeSdrInputReport", "SWGLimeSdrInputReport");
::SWGSDRangel::setValue(&lime_sdr_output_report, pJson["limeSdrOutputReport"], "SWGLimeSdrOutputReport", "SWGLimeSdrOutputReport");
::SWGSDRangel::setValue(&lime_sdr_mimo_report, pJson["limeSdrMIMOReport"], "SWGLimeSdrMIMOReport", "SWGLimeSdrMIMOReport");
::SWGSDRangel::setValue(&local_input_report, pJson["localInputReport"], "SWGLocalInputReport", "SWGLocalInputReport");
::SWGSDRangel::setValue(&local_output_report, pJson["localOutputReport"], "SWGLocalOutputReport", "SWGLocalOutputReport");
@ -334,15 +343,18 @@ SWGDeviceReport::asJsonObject() {
if((file_input_report != nullptr) && (file_input_report->isSet())){
toJsonValue(QString("fileInputReport"), file_input_report, obj, QString("SWGFileInputReport"));
}
if((lime_sdr_input_report != nullptr) && (lime_sdr_input_report->isSet())){
toJsonValue(QString("limeSdrInputReport"), lime_sdr_input_report, obj, QString("SWGLimeSdrInputReport"));
}
if((kiwi_sdr_report != nullptr) && (kiwi_sdr_report->isSet())){
toJsonValue(QString("kiwiSDRReport"), kiwi_sdr_report, obj, QString("SWGKiwiSDRReport"));
}
if((lime_sdr_input_report != nullptr) && (lime_sdr_input_report->isSet())){
toJsonValue(QString("limeSdrInputReport"), lime_sdr_input_report, obj, QString("SWGLimeSdrInputReport"));
}
if((lime_sdr_output_report != nullptr) && (lime_sdr_output_report->isSet())){
toJsonValue(QString("limeSdrOutputReport"), lime_sdr_output_report, obj, QString("SWGLimeSdrOutputReport"));
}
if((lime_sdr_mimo_report != nullptr) && (lime_sdr_mimo_report->isSet())){
toJsonValue(QString("limeSdrMIMOReport"), lime_sdr_mimo_report, obj, QString("SWGLimeSdrMIMOReport"));
}
if((local_input_report != nullptr) && (local_input_report->isSet())){
toJsonValue(QString("localInputReport"), local_input_report, obj, QString("SWGLocalInputReport"));
}
@ -475,16 +487,6 @@ SWGDeviceReport::setFileInputReport(SWGFileInputReport* file_input_report) {
this->m_file_input_report_isSet = true;
}
SWGLimeSdrInputReport*
SWGDeviceReport::getLimeSdrInputReport() {
return lime_sdr_input_report;
}
void
SWGDeviceReport::setLimeSdrInputReport(SWGLimeSdrInputReport* lime_sdr_input_report) {
this->lime_sdr_input_report = lime_sdr_input_report;
this->m_lime_sdr_input_report_isSet = true;
}
SWGKiwiSDRReport*
SWGDeviceReport::getKiwiSdrReport() {
return kiwi_sdr_report;
@ -495,6 +497,16 @@ SWGDeviceReport::setKiwiSdrReport(SWGKiwiSDRReport* kiwi_sdr_report) {
this->m_kiwi_sdr_report_isSet = true;
}
SWGLimeSdrInputReport*
SWGDeviceReport::getLimeSdrInputReport() {
return lime_sdr_input_report;
}
void
SWGDeviceReport::setLimeSdrInputReport(SWGLimeSdrInputReport* lime_sdr_input_report) {
this->lime_sdr_input_report = lime_sdr_input_report;
this->m_lime_sdr_input_report_isSet = true;
}
SWGLimeSdrOutputReport*
SWGDeviceReport::getLimeSdrOutputReport() {
return lime_sdr_output_report;
@ -505,6 +517,16 @@ SWGDeviceReport::setLimeSdrOutputReport(SWGLimeSdrOutputReport* lime_sdr_output_
this->m_lime_sdr_output_report_isSet = true;
}
SWGLimeSdrMIMOReport*
SWGDeviceReport::getLimeSdrMimoReport() {
return lime_sdr_mimo_report;
}
void
SWGDeviceReport::setLimeSdrMimoReport(SWGLimeSdrMIMOReport* lime_sdr_mimo_report) {
this->lime_sdr_mimo_report = lime_sdr_mimo_report;
this->m_lime_sdr_mimo_report_isSet = true;
}
SWGLocalInputReport*
SWGDeviceReport::getLocalInputReport() {
return local_input_report;
@ -694,15 +716,18 @@ SWGDeviceReport::isSet(){
if(file_input_report && file_input_report->isSet()){
isObjectUpdated = true; break;
}
if(lime_sdr_input_report && lime_sdr_input_report->isSet()){
isObjectUpdated = true; break;
}
if(kiwi_sdr_report && kiwi_sdr_report->isSet()){
isObjectUpdated = true; break;
}
if(lime_sdr_input_report && lime_sdr_input_report->isSet()){
isObjectUpdated = true; break;
}
if(lime_sdr_output_report && lime_sdr_output_report->isSet()){
isObjectUpdated = true; break;
}
if(lime_sdr_mimo_report && lime_sdr_mimo_report->isSet()){
isObjectUpdated = true; break;
}
if(local_input_report && local_input_report->isSet()){
isObjectUpdated = true; break;
}

View File

@ -30,6 +30,7 @@
#include "SWGFileInputReport.h"
#include "SWGKiwiSDRReport.h"
#include "SWGLimeSdrInputReport.h"
#include "SWGLimeSdrMIMOReport.h"
#include "SWGLimeSdrOutputReport.h"
#include "SWGLocalInputReport.h"
#include "SWGLocalOutputReport.h"
@ -90,15 +91,18 @@ public:
SWGFileInputReport* getFileInputReport();
void setFileInputReport(SWGFileInputReport* file_input_report);
SWGLimeSdrInputReport* getLimeSdrInputReport();
void setLimeSdrInputReport(SWGLimeSdrInputReport* lime_sdr_input_report);
SWGKiwiSDRReport* getKiwiSdrReport();
void setKiwiSdrReport(SWGKiwiSDRReport* kiwi_sdr_report);
SWGLimeSdrInputReport* getLimeSdrInputReport();
void setLimeSdrInputReport(SWGLimeSdrInputReport* lime_sdr_input_report);
SWGLimeSdrOutputReport* getLimeSdrOutputReport();
void setLimeSdrOutputReport(SWGLimeSdrOutputReport* lime_sdr_output_report);
SWGLimeSdrMIMOReport* getLimeSdrMimoReport();
void setLimeSdrMimoReport(SWGLimeSdrMIMOReport* lime_sdr_mimo_report);
SWGLocalInputReport* getLocalInputReport();
void setLocalInputReport(SWGLocalInputReport* local_input_report);
@ -175,15 +179,18 @@ private:
SWGFileInputReport* file_input_report;
bool m_file_input_report_isSet;
SWGLimeSdrInputReport* lime_sdr_input_report;
bool m_lime_sdr_input_report_isSet;
SWGKiwiSDRReport* kiwi_sdr_report;
bool m_kiwi_sdr_report_isSet;
SWGLimeSdrInputReport* lime_sdr_input_report;
bool m_lime_sdr_input_report_isSet;
SWGLimeSdrOutputReport* lime_sdr_output_report;
bool m_lime_sdr_output_report_isSet;
SWGLimeSdrMIMOReport* lime_sdr_mimo_report;
bool m_lime_sdr_mimo_report_isSet;
SWGLocalInputReport* local_input_report;
bool m_local_input_report_isSet;

View File

@ -0,0 +1,545 @@
/**
* 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, USRP 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: 4.15.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 "SWGLimeSdrMIMOReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGLimeSdrMIMOReport::SWGLimeSdrMIMOReport(QString* json) {
init();
this->fromJson(*json);
}
SWGLimeSdrMIMOReport::SWGLimeSdrMIMOReport() {
hw_timestamp = 0L;
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;
success_rx = 0;
m_success_rx_isSet = false;
stream_active_rx = 0;
m_stream_active_rx_isSet = false;
fifo_size_rx = 0;
m_fifo_size_rx_isSet = false;
fifo_fill_rx = 0;
m_fifo_fill_rx_isSet = false;
underrun_count_rx = 0;
m_underrun_count_rx_isSet = false;
overrun_count_rx = 0;
m_overrun_count_rx_isSet = false;
dropped_packets_count_rx = 0;
m_dropped_packets_count_rx_isSet = false;
link_rate_rx = 0.0f;
m_link_rate_rx_isSet = false;
success_tx = 0;
m_success_tx_isSet = false;
stream_active_tx = 0;
m_stream_active_tx_isSet = false;
fifo_size_tx = 0;
m_fifo_size_tx_isSet = false;
fifo_fill_tx = 0;
m_fifo_fill_tx_isSet = false;
underrun_count_tx = 0;
m_underrun_count_tx_isSet = false;
overrun_count_tx = 0;
m_overrun_count_tx_isSet = false;
dropped_packets_count_tx = 0;
m_dropped_packets_count_tx_isSet = false;
link_rate_tx = 0.0f;
m_link_rate_tx_isSet = false;
}
SWGLimeSdrMIMOReport::~SWGLimeSdrMIMOReport() {
this->cleanup();
}
void
SWGLimeSdrMIMOReport::init() {
hw_timestamp = 0L;
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;
success_rx = 0;
m_success_rx_isSet = false;
stream_active_rx = 0;
m_stream_active_rx_isSet = false;
fifo_size_rx = 0;
m_fifo_size_rx_isSet = false;
fifo_fill_rx = 0;
m_fifo_fill_rx_isSet = false;
underrun_count_rx = 0;
m_underrun_count_rx_isSet = false;
overrun_count_rx = 0;
m_overrun_count_rx_isSet = false;
dropped_packets_count_rx = 0;
m_dropped_packets_count_rx_isSet = false;
link_rate_rx = 0.0f;
m_link_rate_rx_isSet = false;
success_tx = 0;
m_success_tx_isSet = false;
stream_active_tx = 0;
m_stream_active_tx_isSet = false;
fifo_size_tx = 0;
m_fifo_size_tx_isSet = false;
fifo_fill_tx = 0;
m_fifo_fill_tx_isSet = false;
underrun_count_tx = 0;
m_underrun_count_tx_isSet = false;
overrun_count_tx = 0;
m_overrun_count_tx_isSet = false;
dropped_packets_count_tx = 0;
m_dropped_packets_count_tx_isSet = false;
link_rate_tx = 0.0f;
m_link_rate_tx_isSet = false;
}
void
SWGLimeSdrMIMOReport::cleanup() {
}
SWGLimeSdrMIMOReport*
SWGLimeSdrMIMOReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGLimeSdrMIMOReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&hw_timestamp, pJson["hwTimestamp"], "qint64", "");
::SWGSDRangel::setValue(&temperature, pJson["temperature"], "float", "");
::SWGSDRangel::setValue(&gpio_dir, pJson["gpioDir"], "qint32", "");
::SWGSDRangel::setValue(&gpio_pins, pJson["gpioPins"], "qint32", "");
::SWGSDRangel::setValue(&success_rx, pJson["successRx"], "qint32", "");
::SWGSDRangel::setValue(&stream_active_rx, pJson["streamActiveRx"], "qint32", "");
::SWGSDRangel::setValue(&fifo_size_rx, pJson["fifoSizeRx"], "qint32", "");
::SWGSDRangel::setValue(&fifo_fill_rx, pJson["fifoFillRx"], "qint32", "");
::SWGSDRangel::setValue(&underrun_count_rx, pJson["underrunCountRx"], "qint32", "");
::SWGSDRangel::setValue(&overrun_count_rx, pJson["overrunCountRx"], "qint32", "");
::SWGSDRangel::setValue(&dropped_packets_count_rx, pJson["droppedPacketsCountRx"], "qint32", "");
::SWGSDRangel::setValue(&link_rate_rx, pJson["linkRateRx"], "float", "");
::SWGSDRangel::setValue(&success_tx, pJson["successTx"], "qint32", "");
::SWGSDRangel::setValue(&stream_active_tx, pJson["streamActiveTx"], "qint32", "");
::SWGSDRangel::setValue(&fifo_size_tx, pJson["fifoSizeTx"], "qint32", "");
::SWGSDRangel::setValue(&fifo_fill_tx, pJson["fifoFillTx"], "qint32", "");
::SWGSDRangel::setValue(&underrun_count_tx, pJson["underrunCountTx"], "qint32", "");
::SWGSDRangel::setValue(&overrun_count_tx, pJson["overrunCountTx"], "qint32", "");
::SWGSDRangel::setValue(&dropped_packets_count_tx, pJson["droppedPacketsCountTx"], "qint32", "");
::SWGSDRangel::setValue(&link_rate_tx, pJson["linkRateTx"], "float", "");
}
QString
SWGLimeSdrMIMOReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGLimeSdrMIMOReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_hw_timestamp_isSet){
obj->insert("hwTimestamp", QJsonValue(hw_timestamp));
}
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));
}
if(m_success_rx_isSet){
obj->insert("successRx", QJsonValue(success_rx));
}
if(m_stream_active_rx_isSet){
obj->insert("streamActiveRx", QJsonValue(stream_active_rx));
}
if(m_fifo_size_rx_isSet){
obj->insert("fifoSizeRx", QJsonValue(fifo_size_rx));
}
if(m_fifo_fill_rx_isSet){
obj->insert("fifoFillRx", QJsonValue(fifo_fill_rx));
}
if(m_underrun_count_rx_isSet){
obj->insert("underrunCountRx", QJsonValue(underrun_count_rx));
}
if(m_overrun_count_rx_isSet){
obj->insert("overrunCountRx", QJsonValue(overrun_count_rx));
}
if(m_dropped_packets_count_rx_isSet){
obj->insert("droppedPacketsCountRx", QJsonValue(dropped_packets_count_rx));
}
if(m_link_rate_rx_isSet){
obj->insert("linkRateRx", QJsonValue(link_rate_rx));
}
if(m_success_tx_isSet){
obj->insert("successTx", QJsonValue(success_tx));
}
if(m_stream_active_tx_isSet){
obj->insert("streamActiveTx", QJsonValue(stream_active_tx));
}
if(m_fifo_size_tx_isSet){
obj->insert("fifoSizeTx", QJsonValue(fifo_size_tx));
}
if(m_fifo_fill_tx_isSet){
obj->insert("fifoFillTx", QJsonValue(fifo_fill_tx));
}
if(m_underrun_count_tx_isSet){
obj->insert("underrunCountTx", QJsonValue(underrun_count_tx));
}
if(m_overrun_count_tx_isSet){
obj->insert("overrunCountTx", QJsonValue(overrun_count_tx));
}
if(m_dropped_packets_count_tx_isSet){
obj->insert("droppedPacketsCountTx", QJsonValue(dropped_packets_count_tx));
}
if(m_link_rate_tx_isSet){
obj->insert("linkRateTx", QJsonValue(link_rate_tx));
}
return obj;
}
qint64
SWGLimeSdrMIMOReport::getHwTimestamp() {
return hw_timestamp;
}
void
SWGLimeSdrMIMOReport::setHwTimestamp(qint64 hw_timestamp) {
this->hw_timestamp = hw_timestamp;
this->m_hw_timestamp_isSet = true;
}
float
SWGLimeSdrMIMOReport::getTemperature() {
return temperature;
}
void
SWGLimeSdrMIMOReport::setTemperature(float temperature) {
this->temperature = temperature;
this->m_temperature_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getGpioDir() {
return gpio_dir;
}
void
SWGLimeSdrMIMOReport::setGpioDir(qint32 gpio_dir) {
this->gpio_dir = gpio_dir;
this->m_gpio_dir_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getGpioPins() {
return gpio_pins;
}
void
SWGLimeSdrMIMOReport::setGpioPins(qint32 gpio_pins) {
this->gpio_pins = gpio_pins;
this->m_gpio_pins_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getSuccessRx() {
return success_rx;
}
void
SWGLimeSdrMIMOReport::setSuccessRx(qint32 success_rx) {
this->success_rx = success_rx;
this->m_success_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getStreamActiveRx() {
return stream_active_rx;
}
void
SWGLimeSdrMIMOReport::setStreamActiveRx(qint32 stream_active_rx) {
this->stream_active_rx = stream_active_rx;
this->m_stream_active_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getFifoSizeRx() {
return fifo_size_rx;
}
void
SWGLimeSdrMIMOReport::setFifoSizeRx(qint32 fifo_size_rx) {
this->fifo_size_rx = fifo_size_rx;
this->m_fifo_size_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getFifoFillRx() {
return fifo_fill_rx;
}
void
SWGLimeSdrMIMOReport::setFifoFillRx(qint32 fifo_fill_rx) {
this->fifo_fill_rx = fifo_fill_rx;
this->m_fifo_fill_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getUnderrunCountRx() {
return underrun_count_rx;
}
void
SWGLimeSdrMIMOReport::setUnderrunCountRx(qint32 underrun_count_rx) {
this->underrun_count_rx = underrun_count_rx;
this->m_underrun_count_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getOverrunCountRx() {
return overrun_count_rx;
}
void
SWGLimeSdrMIMOReport::setOverrunCountRx(qint32 overrun_count_rx) {
this->overrun_count_rx = overrun_count_rx;
this->m_overrun_count_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getDroppedPacketsCountRx() {
return dropped_packets_count_rx;
}
void
SWGLimeSdrMIMOReport::setDroppedPacketsCountRx(qint32 dropped_packets_count_rx) {
this->dropped_packets_count_rx = dropped_packets_count_rx;
this->m_dropped_packets_count_rx_isSet = true;
}
float
SWGLimeSdrMIMOReport::getLinkRateRx() {
return link_rate_rx;
}
void
SWGLimeSdrMIMOReport::setLinkRateRx(float link_rate_rx) {
this->link_rate_rx = link_rate_rx;
this->m_link_rate_rx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getSuccessTx() {
return success_tx;
}
void
SWGLimeSdrMIMOReport::setSuccessTx(qint32 success_tx) {
this->success_tx = success_tx;
this->m_success_tx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getStreamActiveTx() {
return stream_active_tx;
}
void
SWGLimeSdrMIMOReport::setStreamActiveTx(qint32 stream_active_tx) {
this->stream_active_tx = stream_active_tx;
this->m_stream_active_tx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getFifoSizeTx() {
return fifo_size_tx;
}
void
SWGLimeSdrMIMOReport::setFifoSizeTx(qint32 fifo_size_tx) {
this->fifo_size_tx = fifo_size_tx;
this->m_fifo_size_tx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getFifoFillTx() {
return fifo_fill_tx;
}
void
SWGLimeSdrMIMOReport::setFifoFillTx(qint32 fifo_fill_tx) {
this->fifo_fill_tx = fifo_fill_tx;
this->m_fifo_fill_tx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getUnderrunCountTx() {
return underrun_count_tx;
}
void
SWGLimeSdrMIMOReport::setUnderrunCountTx(qint32 underrun_count_tx) {
this->underrun_count_tx = underrun_count_tx;
this->m_underrun_count_tx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getOverrunCountTx() {
return overrun_count_tx;
}
void
SWGLimeSdrMIMOReport::setOverrunCountTx(qint32 overrun_count_tx) {
this->overrun_count_tx = overrun_count_tx;
this->m_overrun_count_tx_isSet = true;
}
qint32
SWGLimeSdrMIMOReport::getDroppedPacketsCountTx() {
return dropped_packets_count_tx;
}
void
SWGLimeSdrMIMOReport::setDroppedPacketsCountTx(qint32 dropped_packets_count_tx) {
this->dropped_packets_count_tx = dropped_packets_count_tx;
this->m_dropped_packets_count_tx_isSet = true;
}
float
SWGLimeSdrMIMOReport::getLinkRateTx() {
return link_rate_tx;
}
void
SWGLimeSdrMIMOReport::setLinkRateTx(float link_rate_tx) {
this->link_rate_tx = link_rate_tx;
this->m_link_rate_tx_isSet = true;
}
bool
SWGLimeSdrMIMOReport::isSet(){
bool isObjectUpdated = false;
do{
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;
}
if(m_success_rx_isSet){
isObjectUpdated = true; break;
}
if(m_stream_active_rx_isSet){
isObjectUpdated = true; break;
}
if(m_fifo_size_rx_isSet){
isObjectUpdated = true; break;
}
if(m_fifo_fill_rx_isSet){
isObjectUpdated = true; break;
}
if(m_underrun_count_rx_isSet){
isObjectUpdated = true; break;
}
if(m_overrun_count_rx_isSet){
isObjectUpdated = true; break;
}
if(m_dropped_packets_count_rx_isSet){
isObjectUpdated = true; break;
}
if(m_link_rate_rx_isSet){
isObjectUpdated = true; break;
}
if(m_success_tx_isSet){
isObjectUpdated = true; break;
}
if(m_stream_active_tx_isSet){
isObjectUpdated = true; break;
}
if(m_fifo_size_tx_isSet){
isObjectUpdated = true; break;
}
if(m_fifo_fill_tx_isSet){
isObjectUpdated = true; break;
}
if(m_underrun_count_tx_isSet){
isObjectUpdated = true; break;
}
if(m_overrun_count_tx_isSet){
isObjectUpdated = true; break;
}
if(m_dropped_packets_count_tx_isSet){
isObjectUpdated = true; break;
}
if(m_link_rate_tx_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,172 @@
/**
* 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, USRP 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: 4.15.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.
*/
/*
* SWGLimeSdrMIMOReport.h
*
* LimeSDR
*/
#ifndef SWGLimeSdrMIMOReport_H_
#define SWGLimeSdrMIMOReport_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGLimeSdrMIMOReport: public SWGObject {
public:
SWGLimeSdrMIMOReport();
SWGLimeSdrMIMOReport(QString* json);
virtual ~SWGLimeSdrMIMOReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGLimeSdrMIMOReport* fromJson(QString &jsonString) override;
qint64 getHwTimestamp();
void setHwTimestamp(qint64 hw_timestamp);
float getTemperature();
void setTemperature(float temperature);
qint32 getGpioDir();
void setGpioDir(qint32 gpio_dir);
qint32 getGpioPins();
void setGpioPins(qint32 gpio_pins);
qint32 getSuccessRx();
void setSuccessRx(qint32 success_rx);
qint32 getStreamActiveRx();
void setStreamActiveRx(qint32 stream_active_rx);
qint32 getFifoSizeRx();
void setFifoSizeRx(qint32 fifo_size_rx);
qint32 getFifoFillRx();
void setFifoFillRx(qint32 fifo_fill_rx);
qint32 getUnderrunCountRx();
void setUnderrunCountRx(qint32 underrun_count_rx);
qint32 getOverrunCountRx();
void setOverrunCountRx(qint32 overrun_count_rx);
qint32 getDroppedPacketsCountRx();
void setDroppedPacketsCountRx(qint32 dropped_packets_count_rx);
float getLinkRateRx();
void setLinkRateRx(float link_rate_rx);
qint32 getSuccessTx();
void setSuccessTx(qint32 success_tx);
qint32 getStreamActiveTx();
void setStreamActiveTx(qint32 stream_active_tx);
qint32 getFifoSizeTx();
void setFifoSizeTx(qint32 fifo_size_tx);
qint32 getFifoFillTx();
void setFifoFillTx(qint32 fifo_fill_tx);
qint32 getUnderrunCountTx();
void setUnderrunCountTx(qint32 underrun_count_tx);
qint32 getOverrunCountTx();
void setOverrunCountTx(qint32 overrun_count_tx);
qint32 getDroppedPacketsCountTx();
void setDroppedPacketsCountTx(qint32 dropped_packets_count_tx);
float getLinkRateTx();
void setLinkRateTx(float link_rate_tx);
virtual bool isSet() override;
private:
qint64 hw_timestamp;
bool m_hw_timestamp_isSet;
float temperature;
bool m_temperature_isSet;
qint32 gpio_dir;
bool m_gpio_dir_isSet;
qint32 gpio_pins;
bool m_gpio_pins_isSet;
qint32 success_rx;
bool m_success_rx_isSet;
qint32 stream_active_rx;
bool m_stream_active_rx_isSet;
qint32 fifo_size_rx;
bool m_fifo_size_rx_isSet;
qint32 fifo_fill_rx;
bool m_fifo_fill_rx_isSet;
qint32 underrun_count_rx;
bool m_underrun_count_rx_isSet;
qint32 overrun_count_rx;
bool m_overrun_count_rx_isSet;
qint32 dropped_packets_count_rx;
bool m_dropped_packets_count_rx_isSet;
float link_rate_rx;
bool m_link_rate_rx_isSet;
qint32 success_tx;
bool m_success_tx_isSet;
qint32 stream_active_tx;
bool m_stream_active_tx_isSet;
qint32 fifo_size_tx;
bool m_fifo_size_tx_isSet;
qint32 fifo_fill_tx;
bool m_fifo_fill_tx_isSet;
qint32 underrun_count_tx;
bool m_underrun_count_tx_isSet;
qint32 overrun_count_tx;
bool m_overrun_count_tx_isSet;
qint32 dropped_packets_count_tx;
bool m_dropped_packets_count_tx_isSet;
float link_rate_tx;
bool m_link_rate_tx_isSet;
};
}
#endif /* SWGLimeSdrMIMOReport_H_ */

View File

@ -130,6 +130,7 @@
#include "SWGLimeRFESettings.h"
#include "SWGLimeSdrInputReport.h"
#include "SWGLimeSdrInputSettings.h"
#include "SWGLimeSdrMIMOReport.h"
#include "SWGLimeSdrMIMOSettings.h"
#include "SWGLimeSdrOutputReport.h"
#include "SWGLimeSdrOutputSettings.h"
@ -576,6 +577,9 @@ namespace SWGSDRangel {
if(QString("SWGLimeSdrInputSettings").compare(type) == 0) {
return new SWGLimeSdrInputSettings();
}
if(QString("SWGLimeSdrMIMOReport").compare(type) == 0) {
return new SWGLimeSdrMIMOReport();
}
if(QString("SWGLimeSdrMIMOSettings").compare(type) == 0) {
return new SWGLimeSdrMIMOSettings();
}