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 @@
#ifndef QT_SCOPE_MAINWINDOW_H
#define QT_SCOPE_MAINWINDOW_H
#include <set>
#include <QtCharts>
extern "C" {
......@@ -94,7 +95,8 @@ class ValueProvider {
class ValueProviderUE : public ValueProvider {
public:
/// This pure virtual function is meant to provide the graph values to be plotted
virtual scopeGraphData_t *getPlotValue() {
virtual scopeGraphData_t *getPlotValue()
{
return nullptr;
}
};
......@@ -234,7 +236,9 @@ class CIRPlotUE : public CIRPlot {
Q_OBJECT
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:
/// This function is triggered when the own timer expires. It updates the plotted CIR
......@@ -254,54 +258,26 @@ class NewDataHere : public QObject {
};
/// Chart class for plotting LLRs
class LLRPlotGnb : public QChart {
class LLRPlot : public QChart {
Q_OBJECT
public:
/// Constructor
/// \param data Pointer to the LLR data
/// \param len Length of the LLR data
LLRPlotGnb(int16_t *data, int len, PlotTypeGnb plotType);
~LLRPlotGnb();
public slots:
void updatePlot();
public:
/// Length of the LLR data
int len;
NewDataHere *newData;
/// \param interval update interval in ms (0 means no timer-triggered updates)
/// \param notificationSet pointer to a std::set for update notifications
LLRPlot(int16_t *data, int len, int interval = 1000, std::set<LLRPlot *> *notificationSet = nullptr);
private:
/// Pointer to the LLR data
int16_t *data;
/// Scatter series used to plot the LLR in the chart
QScatterSeries *series;
/// Horizontal axis of the chart
QValueAxis *axisX;
/// Destructor
~LLRPlot();
/// Vertical axis of the chart
QValueAxis *axisY;
/// 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);
public slots:
/// This function updates the plotted LLR
void updatePlot(int len);
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
virtual void timerEvent(QTimerEvent *event) override;
......@@ -311,6 +287,9 @@ class LLRPlot : public QChart {
/// Length of the LLR data
int len;
/// Pointer to a std::set for update notifications
std::set<LLRPlot *> *notificationSet;
/// Scatter series used to plot the LLR in the chart
QScatterSeries *series;
......@@ -325,7 +304,9 @@ class LLRPlotUE : public LLRPlot {
Q_OBJECT
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:
/// 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 {
};
/// Chart class for plotting the I/Q constellation diagram
class IQPlotGnb : public QChart {
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
IQPlotGnb(complex16 *data, int len, PlotTypeGnb plotType);
~IQPlotGnb();
/// Length of the I/Q data
int len;
/// \param interval update interval in ms (0 means no timer-triggered updates)
/// \param notificationSet pointer to a std::set for update notifications
IQPlot(complex16 *data, int len, int interval = 1000, std::set<IQPlot *> *notificationSet = nullptr);
NewDataHere *newData;
/// Destructor
~IQPlot();
public slots:
void updatePlot();
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);
/// This function updates the plotted I/Q constellation diagram
void updatePlot(int len);
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
virtual void timerEvent(QTimerEvent *event) override;
......@@ -393,6 +347,9 @@ class IQPlot : public QChart {
/// Length of the I/Q data
int len;
/// Pointer to a std::set for update notifications
std::set<IQPlot *> *notificationSet;
/// Scatter series used to plot the I/Q constellation diagram
QScatterSeries *series;
......@@ -407,7 +364,9 @@ class IQPlotUE : public IQPlot {
Q_OBJECT
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:
/// This function is triggered when the own timer expires. It updates the plotted I/Q constellation diagram
......
......@@ -71,23 +71,8 @@ enum scopeDataType {
};
enum PlotTypeGnbIf {
empty,
waterFall,
CIR,
puschLLRe,
puschIQe,
puschSNR,
puschBLER,
puschMCS,
puschRETX,
puschThroughput,
pdschSNR,
pdschBLER,
pdschMCS,
pdschRETX,
pdschThroughput,
pdschRBs,
config
};
#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