Commit 3d1d4687 authored by Thomas Schlichter's avatar Thomas Schlichter

changes from review and updated indentation with clang-format

parent 4b15a77a
This diff is collapsed.
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#ifndef QT_SCOPE_MAINWINDOW_H #ifndef QT_SCOPE_MAINWINDOW_H
#define QT_SCOPE_MAINWINDOW_H #define QT_SCOPE_MAINWINDOW_H
#include <set>
#include <QtCharts> #include <QtCharts>
extern "C" { extern "C" {
...@@ -94,7 +95,8 @@ class ValueProvider { ...@@ -94,7 +95,8 @@ class ValueProvider {
class ValueProviderUE : public ValueProvider { class ValueProviderUE : public ValueProvider {
public: public:
/// This pure virtual function is meant to provide the graph values to be plotted /// This pure virtual function is meant to provide the graph values to be plotted
virtual scopeGraphData_t *getPlotValue() { virtual scopeGraphData_t *getPlotValue()
{
return nullptr; return nullptr;
} }
}; };
...@@ -234,7 +236,9 @@ class CIRPlotUE : public CIRPlot { ...@@ -234,7 +236,9 @@ class CIRPlotUE : public CIRPlot {
Q_OBJECT Q_OBJECT
public: public:
CIRPlotUE(complex16 *data, int len, ValueProviderUE *valueProvider) : CIRPlot(data, len), valueProvider(valueProvider) {} CIRPlotUE(complex16 *data, int len, ValueProviderUE *valueProvider) : CIRPlot(data, len), valueProvider(valueProvider)
{
}
protected: protected:
/// This function is triggered when the own timer expires. It updates the plotted CIR /// This function is triggered when the own timer expires. It updates the plotted CIR
...@@ -254,54 +258,26 @@ class NewDataHere : public QObject { ...@@ -254,54 +258,26 @@ class NewDataHere : public QObject {
}; };
/// Chart class for plotting LLRs /// Chart class for plotting LLRs
class LLRPlotGnb : public QChart { class LLRPlot : public QChart {
Q_OBJECT Q_OBJECT
public: public:
/// Constructor /// Constructor
/// \param data Pointer to the LLR data /// \param data Pointer to the LLR data
/// \param len Length of the LLR data /// \param len Length of the LLR data
LLRPlotGnb(int16_t *data, int len, PlotTypeGnb plotType); /// \param interval update interval in ms (0 means no timer-triggered updates)
~LLRPlotGnb(); /// \param notificationSet pointer to a std::set for update notifications
LLRPlot(int16_t *data, int len, int interval = 1000, std::set<LLRPlot *> *notificationSet = nullptr);
public slots:
void updatePlot();
public:
/// Length of the LLR data
int len;
NewDataHere *newData;
private: /// Destructor
/// Pointer to the LLR data ~LLRPlot();
int16_t *data;
/// Scatter series used to plot the LLR in the chart
QScatterSeries *series;
/// Horizontal axis of the chart
QValueAxis *axisX;
/// Vertical axis of the chart public slots:
QValueAxis *axisY; /// This function updates the plotted LLR
void updatePlot(int len);
/// Currently plotted KPI type
PlotTypeGnb plotType;
};
/// Chart class for plotting LLRs
class LLRPlot : public QChart {
Q_OBJECT
public:
/// Constructor
/// \param data Pointer to the LLR data
/// \param len Length of the LLR data
LLRPlot(int16_t *data, int len);
protected: protected:
/// This function is triggered when the own timer expires. It updates the plotted LLR /// This function is triggered when the own timer expires. It calls updatePlot() to update the plotted LLR
/// \param event Pointer to the timer event /// \param event Pointer to the timer event
virtual void timerEvent(QTimerEvent *event) override; virtual void timerEvent(QTimerEvent *event) override;
...@@ -311,6 +287,9 @@ class LLRPlot : public QChart { ...@@ -311,6 +287,9 @@ class LLRPlot : public QChart {
/// Length of the LLR data /// Length of the LLR data
int len; int len;
/// Pointer to a std::set for update notifications
std::set<LLRPlot *> *notificationSet;
/// Scatter series used to plot the LLR in the chart /// Scatter series used to plot the LLR in the chart
QScatterSeries *series; QScatterSeries *series;
...@@ -325,7 +304,9 @@ class LLRPlotUE : public LLRPlot { ...@@ -325,7 +304,9 @@ class LLRPlotUE : public LLRPlot {
Q_OBJECT Q_OBJECT
public: public:
LLRPlotUE(int16_t *data, int len, ValueProviderUE *valueProvider) : LLRPlot(data, len), valueProvider(valueProvider) {} LLRPlotUE(int16_t *data, int len, ValueProviderUE *valueProvider) : LLRPlot(data, len), valueProvider(valueProvider)
{
}
protected: protected:
/// This function is triggered when the own timer expires. It updates the plotted I/Q constellation diagram /// This function is triggered when the own timer expires. It updates the plotted I/Q constellation diagram
...@@ -337,53 +318,26 @@ class LLRPlotUE : public LLRPlot { ...@@ -337,53 +318,26 @@ class LLRPlotUE : public LLRPlot {
}; };
/// Chart class for plotting the I/Q constellation diagram /// Chart class for plotting the I/Q constellation diagram
class IQPlotGnb : public QChart { class IQPlot : public QChart {
Q_OBJECT Q_OBJECT
public: public:
/// Constructor /// Constructor
/// \param data Pointer to the complex I/Q data /// \param data Pointer to the complex I/Q data
/// \param len Length of the I/Q data /// \param len Length of the I/Q data
IQPlotGnb(complex16 *data, int len, PlotTypeGnb plotType); /// \param interval update interval in ms (0 means no timer-triggered updates)
~IQPlotGnb(); /// \param notificationSet pointer to a std::set for update notifications
IQPlot(complex16 *data, int len, int interval = 1000, std::set<IQPlot *> *notificationSet = nullptr);
/// Length of the I/Q data
int len;
NewDataHere *newData; /// Destructor
~IQPlot();
public slots: public slots:
void updatePlot(); /// This function updates the plotted I/Q constellation diagram
void updatePlot(int len);
private:
/// Pointer to the I/Q data
complex16 *data;
/// Scatter series used to plot the I/Q constellation diagram
QScatterSeries *series;
/// Horizontal axis of the chart
QValueAxis *axisX;
/// Vertical axis of the chart
QValueAxis *axisY;
/// Currently plotted KPI type
PlotTypeGnb plotType;
};
/// Chart class for plotting the I/Q constellation diagram
class IQPlot : public QChart {
Q_OBJECT
public:
/// Constructor
/// \param data Pointer to the complex I/Q data
/// \param len Length of the I/Q data
IQPlot(complex16 *data, int len);
protected: protected:
/// This function is triggered when the own timer expires. It updates the plotted I/Q constellation diagram /// This function is triggered when the own timer expires. It calls updatePlot() to update the plotted I/Q constellation diagram
/// \param event Pointer to the timer event /// \param event Pointer to the timer event
virtual void timerEvent(QTimerEvent *event) override; virtual void timerEvent(QTimerEvent *event) override;
...@@ -393,6 +347,9 @@ class IQPlot : public QChart { ...@@ -393,6 +347,9 @@ class IQPlot : public QChart {
/// Length of the I/Q data /// Length of the I/Q data
int len; int len;
/// Pointer to a std::set for update notifications
std::set<IQPlot *> *notificationSet;
/// Scatter series used to plot the I/Q constellation diagram /// Scatter series used to plot the I/Q constellation diagram
QScatterSeries *series; QScatterSeries *series;
...@@ -407,7 +364,9 @@ class IQPlotUE : public IQPlot { ...@@ -407,7 +364,9 @@ class IQPlotUE : public IQPlot {
Q_OBJECT Q_OBJECT
public: public:
IQPlotUE(complex16 *data, int len, ValueProviderUE *valueProvider) : IQPlot(data, len), valueProvider(valueProvider) {} IQPlotUE(complex16 *data, int len, ValueProviderUE *valueProvider) : IQPlot(data, len), valueProvider(valueProvider)
{
}
protected: protected:
/// This function is triggered when the own timer expires. It updates the plotted I/Q constellation diagram /// This function is triggered when the own timer expires. It updates the plotted I/Q constellation diagram
......
...@@ -71,23 +71,8 @@ enum scopeDataType { ...@@ -71,23 +71,8 @@ enum scopeDataType {
}; };
enum PlotTypeGnbIf { enum PlotTypeGnbIf {
empty,
waterFall,
CIR,
puschLLRe, puschLLRe,
puschIQe, puschIQe,
puschSNR,
puschBLER,
puschMCS,
puschRETX,
puschThroughput,
pdschSNR,
pdschBLER,
pdschMCS,
pdschRETX,
pdschThroughput,
pdschRBs,
config
}; };
#define COPIES_MEM 4 #define COPIES_MEM 4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment