Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
c36d81a0
Commit
c36d81a0
authored
Jul 26, 2023
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace std::set<> for active plots with PlotUpdater emitting queued signals
parent
3d1d4687
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
40 deletions
+33
-40
openair1/PHY/TOOLS/nr_phy_qt_scope.cpp
openair1/PHY/TOOLS/nr_phy_qt_scope.cpp
+17
-23
openair1/PHY/TOOLS/nr_phy_qt_scope.h
openair1/PHY/TOOLS/nr_phy_qt_scope.h
+16
-17
No files found.
openair1/PHY/TOOLS/nr_phy_qt_scope.cpp
View file @
c36d81a0
...
...
@@ -70,22 +70,18 @@ float Limits_KPI_ue[2][2] = {
{
0.2
,
10
}
// Throughput in Mbs
};
//
Holds status of active plots
std
::
set
<
LLRPlot
*>
puschLlrSet
;
std
::
set
<
IQPlot
*>
puschIqSet
;
//
Plot updater
PlotUpdater
puschLlrUpdater
;
PlotUpdater
puschIqUpdater
;
void
scopeUpdaterGnb
(
enum
PlotTypeGnbIf
plotType
,
int
numElt
)
{
switch
(
plotType
)
{
case
puschLLRe
:
for
(
auto
puschLlr
=
puschLlrSet
.
begin
();
puschLlr
!=
puschLlrSet
.
end
();
puschLlr
++
)
{
(
*
puschLlr
)
->
updatePlot
(
numElt
);
}
puschLlrUpdater
.
updatePlot
(
numElt
);
break
;
case
puschIQe
:
for
(
auto
puschIq
=
puschIqSet
.
begin
();
puschIq
!=
puschIqSet
.
end
();
puschIq
++
)
{
(
*
puschIq
)
->
updatePlot
(
numElt
);
}
puschIqUpdater
.
updatePlot
(
numElt
);
break
;
}
}
...
...
@@ -366,8 +362,7 @@ void CIRPlotUE::timerEvent(QTimerEvent *event)
}
}
LLRPlot
::
LLRPlot
(
int16_t
*
data
,
int
len
,
int
interval
,
std
::
set
<
LLRPlot
*>
*
notificationSet
)
:
data
(
data
),
len
(
len
),
notificationSet
(
notificationSet
)
LLRPlot
::
LLRPlot
(
int16_t
*
data
,
int
len
,
int
interval
,
PlotUpdater
*
plotUpdater
)
:
data
(
data
),
len
(
len
),
plotUpdater
(
plotUpdater
)
{
this
->
legend
()
->
hide
();
...
...
@@ -393,14 +388,14 @@ LLRPlot::LLRPlot(int16_t *data, int len, int interval, std::set<LLRPlot *> *noti
if
(
interval
)
startTimer
(
interval
);
if
(
notificationSet
)
notificationSet
->
insert
(
this
);
if
(
plotUpdater
)
connect
(
plotUpdater
,
&
PlotUpdater
::
updatePlot
,
this
,
&
LLRPlot
::
updatePlot
,
Qt
::
QueuedConnection
);
}
LLRPlot
::~
LLRPlot
()
{
if
(
this
->
notificationSet
)
this
->
notificationSet
->
erase
(
this
);
if
(
this
->
plotUpdater
)
disconnect
(
this
->
plotUpdater
,
&
PlotUpdater
::
updatePlot
,
this
,
&
LLRPlot
::
updatePlot
);
}
void
LLRPlot
::
updatePlot
(
int
len
)
...
...
@@ -450,8 +445,7 @@ void LLRPlotUE::timerEvent(QTimerEvent *event)
}
}
IQPlot
::
IQPlot
(
complex16
*
data
,
int
len
,
int
interval
,
std
::
set
<
IQPlot
*>
*
notificationSet
)
:
data
(
data
),
len
(
len
),
notificationSet
(
notificationSet
)
IQPlot
::
IQPlot
(
complex16
*
data
,
int
len
,
int
interval
,
PlotUpdater
*
plotUpdater
)
:
data
(
data
),
len
(
len
),
plotUpdater
(
plotUpdater
)
{
this
->
legend
()
->
hide
();
...
...
@@ -476,14 +470,14 @@ IQPlot::IQPlot(complex16 *data, int len, int interval, std::set<IQPlot *> *notif
if
(
interval
)
startTimer
(
interval
);
if
(
notificationSet
)
notificationSet
->
insert
(
this
);
if
(
plotUpdater
)
connect
(
plotUpdater
,
&
PlotUpdater
::
updatePlot
,
this
,
&
IQPlot
::
updatePlot
,
Qt
::
QueuedConnection
);
}
IQPlot
::~
IQPlot
()
{
if
(
this
->
notificationSet
)
this
->
notificationSet
->
erase
(
this
);
if
(
this
->
plotUpdater
)
disconnect
(
this
->
plotUpdater
,
&
PlotUpdater
::
updatePlot
,
this
,
&
IQPlot
::
updatePlot
);
}
void
IQPlot
::
updatePlot
(
int
len
)
...
...
@@ -839,12 +833,12 @@ void PainterWidgetGnb::makeConnections(int type)
case
PlotTypeGnb
:
:
puschLLR
:
{
int
init_coded_bits_per_codeword
=
100
;
newChart
=
new
LLRPlot
((
int16_t
*
)
p
->
gNB
->
pusch_vars
[
0
].
llr
,
init_coded_bits_per_codeword
,
0
,
&
puschLlr
Set
);
newChart
=
new
LLRPlot
((
int16_t
*
)
p
->
gNB
->
pusch_vars
[
0
].
llr
,
init_coded_bits_per_codeword
,
0
,
&
puschLlr
Updater
);
break
;
}
case
PlotTypeGnb
:
:
puschIQ
:
{
int
init_num_re
=
100
;
newChart
=
new
IQPlot
((
complex16
*
)
p
->
gNB
->
pusch_vars
[
0
].
rxdataF_comp
[
0
],
init_num_re
,
0
,
&
puschIq
Set
);
newChart
=
new
IQPlot
((
complex16
*
)
p
->
gNB
->
pusch_vars
[
0
].
rxdataF_comp
[
0
],
init_num_re
,
0
,
&
puschIq
Updater
);
break
;
}
case
PlotTypeGnb
:
:
puschSNR
:
{
...
...
openair1/PHY/TOOLS/nr_phy_qt_scope.h
View file @
c36d81a0
...
...
@@ -24,7 +24,6 @@
#ifndef QT_SCOPE_MAINWINDOW_H
#define QT_SCOPE_MAINWINDOW_H
#include <set>
#include <QtCharts>
extern
"C"
{
...
...
@@ -101,6 +100,14 @@ class ValueProviderUE : public ValueProvider {
}
};
/// Class for emitting a queued signal to update plots
class
PlotUpdater
:
public
QObject
{
Q_OBJECT
signals:
void
updatePlot
(
int
numElt
);
};
/// An editable GUI field for a dialog box to set certain KPI configurations
class
ConfigBoxFloat
:
public
QLineEdit
{
Q_OBJECT
...
...
@@ -249,14 +256,6 @@ class CIRPlotUE : public CIRPlot {
ValueProviderUE
*
valueProvider
;
};
/// New data signal emiter
class
NewDataHere
:
public
QObject
{
Q_OBJECT
signals:
void
updateScope
();
};
/// Chart class for plotting LLRs
class
LLRPlot
:
public
QChart
{
Q_OBJECT
...
...
@@ -266,8 +265,8 @@ class LLRPlot : public QChart {
/// \param data Pointer to the LLR data
/// \param len Length of the LLR data
/// \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
);
/// \param
plotUpdater pointer to a PlotUpdater
for update notifications
LLRPlot
(
int16_t
*
data
,
int
len
,
int
interval
=
1000
,
PlotUpdater
*
plotUpdater
=
nullptr
);
/// Destructor
~
LLRPlot
();
...
...
@@ -287,8 +286,8 @@ class LLRPlot : public QChart {
/// Length of the LLR data
int
len
;
/// Pointer to a
std::set
for update notifications
std
::
set
<
LLRPlot
*>
*
notificationSet
;
/// Pointer to a
PlotUpdater
for update notifications
PlotUpdater
*
plotUpdater
;
/// Scatter series used to plot the LLR in the chart
QScatterSeries
*
series
;
...
...
@@ -326,8 +325,8 @@ class IQPlot : public QChart {
/// \param data Pointer to the complex I/Q data
/// \param len Length of the I/Q data
/// \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
);
/// \param
plotUpdater pointer to a PlotUpdater
for update notifications
IQPlot
(
complex16
*
data
,
int
len
,
int
interval
=
1000
,
PlotUpdater
*
plotUpdater
=
nullptr
);
/// Destructor
~
IQPlot
();
...
...
@@ -347,8 +346,8 @@ class IQPlot : public QChart {
/// Length of the I/Q data
int
len
;
/// Pointer to a
std::set
for update notifications
std
::
set
<
IQPlot
*>
*
notificationSet
;
/// Pointer to a
PlotUpdater
for update notifications
PlotUpdater
*
plotUpdater
;
/// Scatter series used to plot the I/Q constellation diagram
QScatterSeries
*
series
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment