Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
7410e80d
Commit
7410e80d
authored
Apr 08, 2019
by
Konstantinos Alexandris
Committed by
Robert Schmidt
Jun 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add neighbouring cells (cgi,plmn), clean-up a bit current RRC CM
parent
aa51d3cd
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
189 additions
and
123 deletions
+189
-123
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
+76
-90
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+94
-24
openair2/ENB_APP/flexran_agent_ran_api.h
openair2/ENB_APP/flexran_agent_ran_api.h
+19
-9
No files found.
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
View file @
7410e80d
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file flexran_agent_
ma
c.c
/*! \file flexran_agent_
rr
c.c
* \brief FlexRAN agent Control Module RRC
* \brief FlexRAN agent Control Module RRC
* \author shahab SHARIAT BAGHERI
* \author shahab SHARIAT BAGHERI
* \date 2017
* \date 2017
...
@@ -381,7 +381,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -381,7 +381,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
/* Check flag for creation of buffer status report */
/* Check flag for creation of buffer status report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS
)
{
/*Source
Cell
*/
/*Source
cell EUTRA Measurements
*/
Protocol__FlexRrcMeasurements
*
rrc_measurements
;
Protocol__FlexRrcMeasurements
*
rrc_measurements
;
rrc_measurements
=
malloc
(
sizeof
(
Protocol__FlexRrcMeasurements
));
rrc_measurements
=
malloc
(
sizeof
(
Protocol__FlexRrcMeasurements
));
if
(
rrc_measurements
==
NULL
)
if
(
rrc_measurements
==
NULL
)
...
@@ -397,7 +397,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -397,7 +397,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
rrc_measurements
->
pcell_rsrq
=
flexran_get_rrc_pcell_rsrq
(
mod_id
,
rnti
);
rrc_measurements
->
pcell_rsrq
=
flexran_get_rrc_pcell_rsrq
(
mod_id
,
rnti
);
rrc_measurements
->
has_pcell_rsrq
=
1
;
rrc_measurements
->
has_pcell_rsrq
=
1
;
/*
Target Cell, Neghibouring
*/
/*
Neighbouring cells EUTRA Measurements
*/
Protocol__FlexNeighCellsMeasurements
*
neigh_meas
;
Protocol__FlexNeighCellsMeasurements
*
neigh_meas
;
neigh_meas
=
malloc
(
sizeof
(
Protocol__FlexNeighCellsMeasurements
));
neigh_meas
=
malloc
(
sizeof
(
Protocol__FlexNeighCellsMeasurements
));
if
(
neigh_meas
==
NULL
)
{
if
(
neigh_meas
==
NULL
)
{
...
@@ -407,12 +407,11 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -407,12 +407,11 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
}
}
protocol__flex_neigh_cells_measurements__init
(
neigh_meas
);
protocol__flex_neigh_cells_measurements__init
(
neigh_meas
);
neigh_meas
->
n_eutra_meas
=
flexran_get_rrc_num_ncell
(
mod_id
,
rnti
);
neigh_meas
->
n_eutra_meas
=
flexran_get_rrc_num_ncell
(
mod_id
,
rnti
);
Protocol__FlexEutraMeasurements
**
eutra_meas
=
NULL
;
Protocol__FlexEutraMeasurements
**
eutra_meas
=
NULL
;
if
(
neigh_meas
->
n_eutra_meas
>
0
){
if
(
neigh_meas
->
n_eutra_meas
>
0
)
{
eutra_meas
=
malloc
(
sizeof
(
Protocol__FlexEutraMeasurements
)
*
neigh_meas
->
n_eutra_meas
);
eutra_meas
=
malloc
(
sizeof
(
Protocol__FlexEutraMeasurements
)
*
neigh_meas
->
n_eutra_meas
);
if
(
eutra_meas
==
NULL
)
{
if
(
eutra_meas
==
NULL
)
{
...
@@ -422,28 +421,58 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -422,28 +421,58 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
goto
error
;
goto
error
;
}
}
for
(
int
j
=
0
;
j
<
neigh_meas
->
n_eutra_meas
;
j
++
){
for
(
int
j
=
0
;
j
<
neigh_meas
->
n_eutra_meas
;
j
++
)
{
eutra_meas
[
j
]
=
malloc
(
sizeof
(
Protocol__FlexEutraMeasurements
));
eutra_meas
[
j
]
=
malloc
(
sizeof
(
Protocol__FlexEutraMeasurements
));
if
(
eutra_meas
[
j
]
==
NULL
)
{
if
(
eutra_meas
[
j
]
==
NULL
)
{
for
(
int
k
=
0
;
k
<
j
;
k
++
)
{
for
(
int
k
=
0
;
k
<
j
;
k
++
)
free
(
eutra_meas
[
k
]);
free
(
eutra_meas
[
k
]);
}
free
(
eutra_meas
);
free
(
eutra_meas
);
free
(
neigh_meas
);
free
(
neigh_meas
);
free
(
rrc_measurements
);
free
(
rrc_measurements
);
rrc_measurements
=
NULL
;
rrc_measurements
=
NULL
;
goto
error
;
goto
error
;
}
}
protocol__flex_eutra_measurements__init
(
eutra_meas
[
j
]);
protocol__flex_eutra_measurements__init
(
eutra_meas
[
j
]);
/* Fill in the physical cell identifier. */
eutra_meas
[
j
]
->
phys_cell_id
=
flexran_get_rrc_neigh_phy_cell_id
(
mod_id
,
rnti
,
j
);
eutra_meas
[
j
]
->
phys_cell_id
=
flexran_get_rrc_neigh_phy_cell_id
(
mod_id
,
rnti
,
j
);
eutra_meas
[
j
]
->
has_phys_cell_id
=
1
;
eutra_meas
[
j
]
->
has_phys_cell_id
=
1
;
/* Initialize CGI measurements. */
Protocol__FlexEutraCgiMeasurements
*
cgi_meas
;
cgi_meas
=
malloc
(
sizeof
(
Protocol__FlexEutraCgiMeasurements
));
protocol__flex_eutra_cgi_measurements__init
(
cgi_meas
);
/* EUTRA Cell Global Identity (CGI) */
Protocol__FlexCellGlobalEutraId
*
cgi
;
cgi
=
malloc
(
sizeof
(
Protocol__FlexCellGlobalEutraId
));
protocol__flex_cell_global_eutra_id__init
(
cgi
);
cgi
->
cell_id
=
flexran_get_rrc_neigh_cgi_cell_id
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
);
cgi
->
has_cell_id
=
1
;
cgi_meas
->
tracking_area_code
=
flexran_get_rrc_neigh_cgi_tac
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
);
cgi_meas
->
has_tracking_area_code
=
1
;
/*TODO: Extend for CGI and PLMNID*/
/* PLMN for neighbouring cell */
Protocol__FlexPlmnIdentity
*
plmn_id
;
plmn_id
=
malloc
(
sizeof
(
Protocol__FlexPlmnIdentity
));
protocol__flex_plmn_identity__init
(
plmn_id
);
plmn_id
->
mcc
=
0
;
for
(
int
m
=
0
;
m
<
flexran_get_rrc_neigh_cgi_num_mcc
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
);
m
++
)
{
plmn_id
->
mcc
+=
flexran_get_rrc_neigh_cgi_mcc
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
,
m
);
}
plmn_id
->
mnc
=
0
;
for
(
int
m
=
0
;
m
<
flexran_get_rrc_neigh_cgi_num_mnc
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
);
m
++
)
{
plmn_id
->
mnc
+=
flexran_get_rrc_neigh_cgi_mnc
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
,
m
);
}
/*RSRP/RSRQ of the neighbouring cell */
Protocol__FlexEutraRefSignalMeas
*
meas_result
;
Protocol__FlexEutraRefSignalMeas
*
meas_result
;
meas_result
=
malloc
(
sizeof
(
Protocol__FlexEutraRefSignalMeas
));
meas_result
=
malloc
(
sizeof
(
Protocol__FlexEutraRefSignalMeas
));
...
@@ -455,74 +484,30 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -455,74 +484,30 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
meas_result
->
rsrq
=
flexran_get_rrc_neigh_rsrq
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
);
meas_result
->
rsrq
=
flexran_get_rrc_neigh_rsrq
(
mod_id
,
rnti
,
eutra_meas
[
j
]
->
phys_cell_id
);
meas_result
->
has_rsrq
=
1
;
meas_result
->
has_rsrq
=
1
;
eutra_meas
[
j
]
->
cgi_meas
=
cgi_meas
;
eutra_meas
[
j
]
->
meas_result
=
meas_result
;
eutra_meas
[
j
]
->
meas_result
=
meas_result
;
}
}
neigh_meas
->
eutra_meas
=
eutra_meas
;
neigh_meas
->
eutra_meas
=
eutra_meas
;
rrc_measurements
->
neigh_meas
=
neigh_meas
;
rrc_measurements
->
neigh_meas
=
neigh_meas
;
}
else
{
}
else
{
free
(
neigh_meas
);
free
(
neigh_meas
);
}
}
ue_report
[
i
]
->
rrc_measurements
=
rrc_measurements
;
ue_report
[
i
]
->
rrc_measurements
=
rrc_measurements
;
ue_report
[
i
]
->
flags
|=
PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS
;
ue_report
[
i
]
->
flags
|=
PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS
;
}
}
}
}
}
}
/* To be considered for RRC signaling of cell*/
// if (report_config->nr_cc > 0) {
// // Fill in the Cell reports
// for (i = 0; i < report_config->nr_cc; i++) {
// /* Check flag for creation of noise and interference report */
// if(report_config->cc_report_type[i].cc_report_flags & PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE) {
// // TODO: Fill in the actual noise and interference report for this cell
// Protocol__FlexNoiseInterferenceReport *ni_report;
// ni_report = malloc(sizeof(Protocol__FlexNoiseInterferenceReport));
// if(ni_report == NULL)
// goto error;
// protocol__flex_noise_interference_report__init(ni_report);
// // Current frame and subframe number
// ni_report->sfn_sf = flexran_get_sfn_sf(enb_id);
// ni_report->has_sfn_sf = 1;
// //TODO:Received interference power in dbm
// ni_report->rip = 0;
// ni_report->has_rip = 1;
// //TODO:Thermal noise power in dbm
// ni_report->tnp = 0;
// ni_report->has_tnp = 1;
// ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
// ni_report->has_p0_nominal_pucch = 1;
// cell_report[i]->noise_inter_report = ni_report;
// cell_report[i]->flags |= PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE;
// }
// }
// }
return
0
;
return
0
;
error:
error:
for
(
int
i
=
0
;
i
<
report_config
->
nr_ue
;
i
++
){
for
(
int
i
=
0
;
i
<
report_config
->
nr_ue
;
i
++
)
{
if
(
ue_report
[
i
]
->
rrc_measurements
&&
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
!=
NULL
)
{
if
(
ue_report
[
i
]
->
rrc_measurements
&&
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
!=
NULL
){
for
(
int
j
=
0
;
j
<
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
n_eutra_meas
;
j
++
)
{
for
(
int
j
=
0
;
j
<
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
n_eutra_meas
;
j
++
){
free
(
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]);
free
(
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]);
}
}
free
(
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
);
free
(
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
);
...
@@ -540,8 +525,9 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
...
@@ -540,8 +525,9 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
int
flexran_agent_rrc_destroy_stats_reply
(
Protocol__FlexStatsReply
*
reply
)
int
flexran_agent_rrc_destroy_stats_reply
(
Protocol__FlexStatsReply
*
reply
)
{
{
for
(
int
i
=
0
;
i
<
reply
->
n_ue_report
;
i
++
){
for
(
int
i
=
0
;
i
<
reply
->
n_ue_report
;
i
++
){
if
(
reply
->
ue_report
[
i
]
->
rrc_measurements
&&
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
){
if
(
reply
->
ue_report
[
i
]
->
rrc_measurements
&&
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
)
{
for
(
int
j
=
0
;
j
<
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
n_eutra_meas
;
j
++
){
for
(
int
j
=
0
;
j
<
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
n_eutra_meas
;
j
++
)
{
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]
->
cgi_meas
);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]
->
meas_result
);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]
->
meas_result
);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]);
}
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
7410e80d
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
7410e80d
...
@@ -510,23 +510,33 @@ float flexran_get_rrc_pcell_rsrq(mid_t mod_id, rnti_t rnti);
...
@@ -510,23 +510,33 @@ float flexran_get_rrc_pcell_rsrq(mid_t mod_id, rnti_t rnti);
/* Get RRC neighbouring measurement */
/* Get RRC neighbouring measurement */
int
flexran_get_rrc_num_ncell
(
mid_t
mod_id
,
rnti_t
rnti
);
int
flexran_get_rrc_num_ncell
(
mid_t
mod_id
,
rnti_t
rnti
);
/* Get physical cell id */
/* Get
neighbouring
physical cell id */
long
flexran_get_rrc_neigh_phy_cell_id
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
long
flexran_get_rrc_neigh_phy_cell_id
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/* Get neighbouring cgi info cell id */
uint32_t
flexran_get_rrc_neigh_cgi_cell_id
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/* Get neighbouring cgi info tac */
uint32_t
flexran_get_rrc_neigh_cgi_tac
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/* Get the number of neighbouring cgi mnc */
uint32_t
flexran_get_rrc_neigh_cgi_num_mnc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/* Get the number of neighbouring cgi mcc */
uint32_t
flexran_get_rrc_neigh_cgi_num_mcc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/* Get neighbouring cgi mnc */
uint32_t
flexran_get_rrc_neigh_cgi_mnc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
,
int
mnc_id
);
/* Get neighbouring cgi mcc */
uint32_t
flexran_get_rrc_neigh_cgi_mcc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
,
int
mcc_id
);
/* Get RSRP of neighbouring Cell */
/* Get RSRP of neighbouring Cell */
float
flexran_get_rrc_neigh_rsrp
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
float
flexran_get_rrc_neigh_rsrp
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/* Get RSRQ of neighbouring Cell */
/* Get RSRQ of neighbouring Cell */
float
flexran_get_rrc_neigh_rsrq
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
float
flexran_get_rrc_neigh_rsrq
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
);
/*Get MCC PLMN identity neighbouring Cell*/
/* currently not implemented
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, rnti_t rnti, int cell_id); */
/*Get MNC PLMN identity neighbouring Cell*/
/* currently not implemented
int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_id); */
/* Get number of PLMNs that is broadcasted in SIB1 */
/* Get number of PLMNs that is broadcasted in SIB1 */
uint8_t
flexran_get_rrc_num_plmn_ids
(
mid_t
mod_id
);
uint8_t
flexran_get_rrc_num_plmn_ids
(
mid_t
mod_id
);
...
...
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