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
canghaiwuhen
OpenXG-RAN
Commits
9ec157d9
Commit
9ec157d9
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
67293964
Changes
3
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 @
9ec157d9
...
@@ -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 @
9ec157d9
...
@@ -1435,8 +1435,7 @@ uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid)
...
@@ -1435,8 +1435,7 @@ uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid)
/******************** RRC *****************************/
/******************** RRC *****************************/
LTE_MeasId_t
flexran_get_rrc_pcell_measid
(
mid_t
mod_id
,
rnti_t
rnti
)
LTE_MeasId_t
flexran_get_rrc_pcell_measid
(
mid_t
mod_id
,
rnti_t
rnti
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
)
return
-
1
;
...
@@ -1444,27 +1443,32 @@ LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, rnti_t rnti)
...
@@ -1444,27 +1443,32 @@ LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, rnti_t rnti)
return
ue_context_p
->
ue_context
.
measResults
->
measId
;
return
ue_context_p
->
ue_context
.
measResults
->
measId
;
}
}
float
flexran_get_rrc_pcell_rsrp
(
mid_t
mod_id
,
rnti_t
rnti
)
float
flexran_get_rrc_pcell_rsrp
(
mid_t
mod_id
,
rnti_t
rnti
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
return
RSRP_meas_mapping
[
ue_context_p
->
ue_context
.
measResults
->
measResultPCell
.
rsrpResult
];
return
RSRP_meas_mapping
[
ue_context_p
->
ue_context
.
measResults
->
measResultPCell
.
rsrpResult
];
#else
return
RSRP_meas_mapping
[
ue_context_p
->
ue_context
.
measResults
->
measResultServCell
.
rsrpResult
];
#endif
}
}
float
flexran_get_rrc_pcell_rsrq
(
mid_t
mod_id
,
rnti_t
rnti
)
float
flexran_get_rrc_pcell_rsrq
(
mid_t
mod_id
,
rnti_t
rnti
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
return
RSRQ_meas_mapping
[
ue_context_p
->
ue_context
.
measResults
->
measResultPCell
.
rsrqResult
];
return
RSRQ_meas_mapping
[
ue_context_p
->
ue_context
.
measResults
->
measResultPCell
.
rsrqResult
];
#else
return
RSRQ_meas_mapping
[
ue_context_p
->
ue_context
.
measResults
->
measResultServCell
.
rsrqResult
];
#endif
}
}
/*Number of neighbouring cells for specific UE*/
/*Number of neighbouring cells for specific UE*/
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
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
0
;
if
(
!
ue_context_p
)
return
0
;
...
@@ -1474,8 +1478,7 @@ int flexran_get_rrc_num_ncell(mid_t mod_id, rnti_t rnti)
...
@@ -1474,8 +1478,7 @@ int flexran_get_rrc_num_ncell(mid_t mod_id, rnti_t rnti)
return
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
count
;
return
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
count
;
}
}
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
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
)
return
-
1
;
...
@@ -1486,8 +1489,80 @@ long flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, rnti_t rnti, long cell_id)
...
@@ -1486,8 +1489,80 @@ long flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, rnti_t rnti, long cell_id)
return
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
physCellId
;
return
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
physCellId
;
}
}
float
flexran_get_rrc_neigh_rsrp
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
)
uint32_t
flexran_get_rrc_neigh_cgi_cell_id
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
)
return
-
1
;
if
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
present
!=
LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
])
return
-
1
;
uint8_t
*
cId
=
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
cellIdentity
.
buf
;
return
((
cId
[
0
]
<<
20
)
+
(
cId
[
1
]
<<
12
)
+
(
cId
[
2
]
<<
4
)
+
(
cId
[
3
]
>>
4
));
}
uint32_t
flexran_get_rrc_neigh_cgi_tac
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
)
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
)
return
-
1
;
if
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
present
!=
LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
])
return
-
1
;
uint8_t
*
tac
=
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
trackingAreaCode
.
buf
;
return
(
tac
[
0
]
<<
8
)
+
(
tac
[
1
]);
}
uint32_t
flexran_get_rrc_neigh_cgi_num_mnc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
)
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
)
return
-
1
;
if
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
present
!=
LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
])
return
-
1
;
return
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
plmn_Identity
.
mnc
.
list
.
count
;
}
uint32_t
flexran_get_rrc_neigh_cgi_num_mcc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
)
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
)
return
-
1
;
if
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
present
!=
LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
])
return
-
1
;
return
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
plmn_Identity
.
mcc
->
list
.
count
;
}
uint32_t
flexran_get_rrc_neigh_cgi_mnc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
,
int
mnc_id
)
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
)
return
-
1
;
if
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
present
!=
LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
])
return
-
1
;
int
num_mnc
=
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
plmn_Identity
.
mnc
.
list
.
count
;
return
*
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
plmn_Identity
.
mnc
.
list
.
array
[
mnc_id
])
*
((
uint32_t
)
pow
(
10
,
num_mnc
-
mnc_id
-
1
));
}
uint32_t
flexran_get_rrc_neigh_cgi_mcc
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
,
int
mcc_id
)
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
)
return
-
1
;
if
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
present
!=
LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA
)
return
-
1
;
if
(
!
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
])
return
-
1
;
int
num_mcc
=
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
plmn_Identity
.
mcc
->
list
.
count
;
return
*
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
cgi_Info
->
cellGlobalId
.
plmn_Identity
.
mcc
->
list
.
array
[
mcc_id
])
*
((
uint32_t
)
pow
(
10
,
num_mcc
-
mcc_id
-
1
));
}
float
flexran_get_rrc_neigh_rsrp
(
mid_t
mod_id
,
rnti_t
rnti
,
long
cell_id
)
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
)
return
-
1
;
...
@@ -1499,8 +1574,7 @@ float flexran_get_rrc_neigh_rsrp(mid_t mod_id, rnti_t rnti, long cell_id)
...
@@ -1499,8 +1574,7 @@ float flexran_get_rrc_neigh_rsrp(mid_t mod_id, rnti_t rnti, long cell_id)
return
RSRP_meas_mapping
[
*
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
measResult
.
rsrpResult
)];
return
RSRP_meas_mapping
[
*
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
measResult
.
rsrpResult
)];
}
}
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
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
if
(
!
rrc_is_present
(
mod_id
))
return
-
1
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
mod_id
],
rnti
);
if
(
!
ue_context_p
)
return
-
1
;
if
(
!
ue_context_p
)
return
-
1
;
...
@@ -1511,26 +1585,22 @@ float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id)
...
@@ -1511,26 +1585,22 @@ float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id)
return
RSRQ_meas_mapping
[
*
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
measResult
.
rsrqResult
)];
return
RSRQ_meas_mapping
[
*
(
ue_context_p
->
ue_context
.
measResults
->
measResultNeighCells
->
choice
.
measResultListEUTRA
.
list
.
array
[
cell_id
]
->
measResult
.
rsrqResult
)];
}
}
uint8_t
flexran_get_rrc_num_plmn_ids
(
mid_t
mod_id
)
uint8_t
flexran_get_rrc_num_plmn_ids
(
mid_t
mod_id
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
return
RC
.
rrc
[
mod_id
]
->
configuration
.
num_plmn
;
return
RC
.
rrc
[
mod_id
]
->
configuration
.
num_plmn
;
}
}
uint16_t
flexran_get_rrc_mcc
(
mid_t
mod_id
,
uint8_t
index
)
uint16_t
flexran_get_rrc_mcc
(
mid_t
mod_id
,
uint8_t
index
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
return
RC
.
rrc
[
mod_id
]
->
configuration
.
mcc
[
index
];
return
RC
.
rrc
[
mod_id
]
->
configuration
.
mcc
[
index
];
}
}
uint16_t
flexran_get_rrc_mnc
(
mid_t
mod_id
,
uint8_t
index
)
uint16_t
flexran_get_rrc_mnc
(
mid_t
mod_id
,
uint8_t
index
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
return
RC
.
rrc
[
mod_id
]
->
configuration
.
mnc
[
index
];
return
RC
.
rrc
[
mod_id
]
->
configuration
.
mnc
[
index
];
}
}
uint8_t
flexran_get_rrc_mnc_digit_length
(
mid_t
mod_id
,
uint8_t
index
)
uint8_t
flexran_get_rrc_mnc_digit_length
(
mid_t
mod_id
,
uint8_t
index
)
{
{
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
if
(
!
rrc_is_present
(
mod_id
))
return
0
;
return
RC
.
rrc
[
mod_id
]
->
configuration
.
mnc_digit_length
[
index
];
return
RC
.
rrc
[
mod_id
]
->
configuration
.
mnc_digit_length
[
index
];
}
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
9ec157d9
...
@@ -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