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
1ae1b0aa
Commit
1ae1b0aa
authored
Oct 19, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print RRC meas periodically
parent
6762342d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
15 deletions
+32
-15
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+32
-15
No files found.
openair2/RRC/NR/rrc_gNB.c
View file @
1ae1b0aa
...
@@ -2248,22 +2248,15 @@ static void rrc_gNB_process_MeasurementReport(rrc_gNB_ue_context_t *ue_context,
...
@@ -2248,22 +2248,15 @@ static void rrc_gNB_process_MeasurementReport(rrc_gNB_ue_context_t *ue_context,
DevAssert
(
measurementReport
->
criticalExtensions
.
present
==
NR_MeasurementReport__criticalExtensions_PR_measurementReport
DevAssert
(
measurementReport
->
criticalExtensions
.
present
==
NR_MeasurementReport__criticalExtensions_PR_measurementReport
&&
measurementReport
->
criticalExtensions
.
choice
.
measurementReport
!=
NULL
);
&&
measurementReport
->
criticalExtensions
.
choice
.
measurementReport
!=
NULL
);
const
NR_MeasResults_t
*
measresults
=
&
measurementReport
->
criticalExtensions
.
choice
.
measurementReport
->
measResults
;
gNB_RRC_UE_t
*
ue_ctxt
=
&
ue_context
->
ue_context
;
if
(
ue_ctxt
->
measResults
!=
NULL
)
{
AssertFatal
(
measresults
->
measId
==
1
,
"unexpected MeasResult for MeasurementId %ld received
\n
"
,
measresults
->
measId
);
ASN_STRUCT_FREE_CONTENTS_ONLY
(
asn_DEF_NR_MeasResults
,
ue_ctxt
->
measResults
);
DevAssert
(
measresults
->
measResultServingMOList
.
list
.
count
>=
1
);
ue_ctxt
->
measResults
=
NULL
;
if
(
measresults
->
measResultServingMOList
.
list
.
count
>
1
)
}
LOG_W
(
RRC
,
"Received %d MeasResultServMO, but handling only 1!
\n
"
,
measresults
->
measResultServingMOList
.
list
.
count
);
NR_MeasResultServMO_t
*
measresultservmo
=
measresults
->
measResultServingMOList
.
list
.
array
[
0
];
NR_MeasResultNR_t
*
measresultnr
=
&
measresultservmo
->
measResultServingCell
;
NR_MeasQuantityResults_t
*
mqr
=
measresultnr
->
measResult
.
cellResults
.
resultsSSB_Cell
;
LOG_I
(
RRC
,
"RNTI %04x servingCellId %ld MeasResultNR for phyCellId %ld:
\n
"
,
ue_context
->
ue_context
.
rnti
,
measresultservmo
->
servCellId
,
*
measresultnr
->
physCellId
);
const
NR_MeasId_t
id
=
measurementReport
->
criticalExtensions
.
choice
.
measurementReport
->
measResults
.
measId
;
if
(
mqr
!=
NULL
)
AssertFatal
(
id
,
"unexpected MeasResult for MeasurementId %ld received
\n
"
,
id
);
LOG_I
(
RRC
,
" resultSSB: RSRP %ld dBm RSRQ %.1f dB SINR %.1f dB
\n
"
,
*
mqr
->
rsrp
-
156
,
(
float
)
(
*
mqr
->
rsrq
-
87
)
/
2
.
0
f
,
(
float
)
(
*
mqr
->
sinr
-
46
)
/
2
.
0
f
);
asn1cCallocOne
(
ue_ctxt
->
measResults
,
measurementReport
->
criticalExtensions
.
choice
.
measurementReport
->
measResults
);
else
LOG_I
(
RRC
,
" resultSSB: NOT PROVIDED
\n
"
);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
@@ -3883,6 +3876,27 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
...
@@ -3883,6 +3876,27 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
}
}
}
}
static
void
print_rrc_meas
(
FILE
*
f
,
const
NR_MeasResults_t
*
measresults
)
{
DevAssert
(
measresults
->
measResultServingMOList
.
list
.
count
>=
1
);
if
(
measresults
->
measResultServingMOList
.
list
.
count
>
1
)
LOG_W
(
RRC
,
"Received %d MeasResultServMO, but handling only 1!
\n
"
,
measresults
->
measResultServingMOList
.
list
.
count
);
NR_MeasResultServMO_t
*
measresultservmo
=
measresults
->
measResultServingMOList
.
list
.
array
[
0
];
NR_MeasResultNR_t
*
measresultnr
=
&
measresultservmo
->
measResultServingCell
;
NR_MeasQuantityResults_t
*
mqr
=
measresultnr
->
measResult
.
cellResults
.
resultsSSB_Cell
;
fprintf
(
f
,
" servingCellId %ld MeasResultNR for phyCellId %ld:
\n
resultSSB:"
,
measresultservmo
->
servCellId
,
*
measresultnr
->
physCellId
);
if
(
mqr
!=
NULL
)
{
const
long
rrsrp
=
*
mqr
->
rsrp
-
156
;
const
float
rrsrq
=
(
float
)
(
*
mqr
->
rsrq
-
87
)
/
2
.
0
f
;
const
float
rsinr
=
(
float
)
(
*
mqr
->
sinr
-
46
)
/
2
.
0
f
;
fprintf
(
f
,
"RSRP %ld dBm RSRQ %.1f dB SINR %.1f dB
\n
"
,
rrsrp
,
rrsrq
,
rsinr
);
}
else
{
fprintf
(
f
,
"NOT PROVIDED
\n
"
);
}
}
static
void
write_rrc_stats
(
const
gNB_RRC_INST
*
rrc
)
static
void
write_rrc_stats
(
const
gNB_RRC_INST
*
rrc
)
{
{
const
char
*
filename
=
"nrRRC_stats.log"
;
const
char
*
filename
=
"nrRRC_stats.log"
;
...
@@ -3914,6 +3928,9 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc)
...
@@ -3914,6 +3928,9 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc)
get_ul_mimo_layersCB
(
rrc
,
ue_ctxt
->
UE_Capability_nr
),
get_ul_mimo_layersCB
(
rrc
,
ue_ctxt
->
UE_Capability_nr
),
get_ul_mimo_layers
(
rrc
,
ue_ctxt
->
UE_Capability_nr
));
get_ul_mimo_layers
(
rrc
,
ue_ctxt
->
UE_Capability_nr
));
}
}
if
(
ue_ctxt
->
measResults
)
print_rrc_meas
(
f
,
ue_ctxt
->
measResults
);
}
}
fclose
(
f
);
fclose
(
f
);
...
...
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