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
27544159
Commit
27544159
authored
Dec 14, 2017
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check whether RRC instance is present in RAN API
parent
b25fb9ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
9 deletions
+64
-9
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+64
-9
No files found.
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
27544159
...
...
@@ -65,17 +65,27 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
error:
LOG_E
(
FLEXRAN_AGENT
,
"unknown RAN name %d
\n
"
,
ran
);
}
static
int
mac_xface_not_ready
(
void
);
static
int
mac_xface_not_ready
(
void
){
if
(
mac_xface
==
NULL
)
static
int
mac_xface_not_ready
(
void
)
{
if
(
mac_xface
==
NULL
)
{
return
1
;
}
else
{
//printf("max_xface %p %d \n", mac_xface, mac_xface->active);
return
0
;
// !mac_xface->active;
}
}
static
int
eNB_rrc_inst_not_ready
(
void
)
{
if
(
NULL
==
eNB_rrc_inst
)
{
return
1
;
}
else
{
return
0
;
}
}
int
flexran_get_current_time_ms
(
mid_t
mod_id
,
int
subframe_flag
){
if
(
enb
[
mod_id
]
==
NULL
)
return
0
;
...
...
@@ -682,6 +692,8 @@ int flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
mac_MainConfig
!=
NULL
)
{
...
...
@@ -698,6 +710,8 @@ int flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
measGapConfig
!=
NULL
)
{
...
...
@@ -720,6 +734,8 @@ int flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
...
...
@@ -741,6 +757,8 @@ int flexran_get_rrc_status(const mid_t mod_id, const rnti_t rntiP){
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
...
...
@@ -806,6 +824,8 @@ int flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
...
...
@@ -823,6 +843,8 @@ int flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
mac_MainConfig
!=
NULL
){
...
...
@@ -840,6 +862,8 @@ int flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
mac_MainConfig
!=
NULL
){
...
...
@@ -853,6 +877,8 @@ int flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
physicalConfigDedicated
!=
NULL
){
...
...
@@ -869,6 +895,8 @@ int flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
physicalConfigDedicated
!=
NULL
){
...
...
@@ -885,6 +913,8 @@ int flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
physicalConfigDedicated
!=
NULL
){
...
...
@@ -902,6 +932,8 @@ int flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
physicalConfigDedicated
!=
NULL
){
...
...
@@ -914,6 +946,9 @@ int flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id) {
}
int
flexran_get_ack_nack_simultaneous_trans
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
return
(
&
eNB_rrc_inst
[
mod_id
])
->
carrier
[
0
].
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
ackNackSRS_SimultaneousTransmission
;
}
...
...
@@ -921,6 +956,8 @@ int flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
...
...
@@ -935,6 +972,8 @@ int flexran_get_tdd_ack_nack_feedback(mid_t mod_id, mid_t ue_id) {
// TODO: This needs fixing
return
-
1
;
/* if (eNB_rrc_inst_not_ready()) return -1; */
/* struct rrc_eNB_ue_context_s* ue_context_p = NULL; */
/* uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); */
...
...
@@ -955,6 +994,8 @@ int flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
physicalConfigDedicated
!=
NULL
){
...
...
@@ -972,6 +1013,8 @@ int flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
mac_MainConfig
!=
NULL
){
...
...
@@ -990,6 +1033,8 @@ int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
...
...
@@ -1035,6 +1080,8 @@ int flexran_get_antenna_ports(mid_t mod_id, int CC_id){
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
(
frame_parms
==
NULL
)
?
0
:
frame_parms
->
nb_antenna_ports_eNB
;
...
...
@@ -1172,6 +1219,8 @@ int flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
measResults
!=
NULL
)
{
...
...
@@ -1187,6 +1236,8 @@ int flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
measResults
!=
NULL
)
{
...
...
@@ -1202,6 +1253,8 @@ int flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id) {
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
uint32_t
rntiP
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
eNB_rrc_inst_not_ready
())
return
-
1
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
measResults
!=
NULL
)
{
...
...
@@ -1218,6 +1271,8 @@ void* flexran_get_rrc_ncell_measresult_eutra(mid_t mod_id, mid_t ue_id) {
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id);
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP);
if(ue_context_p != NULL) {
if(ue_context_p->ue_context.measResults != NULL) {
...
...
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