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
ab82d13d
Commit
ab82d13d
authored
Oct 17, 2019
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FlexRAN: helper function to get No. UEs
parent
d4347f70
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
30 deletions
+27
-30
openair2/ENB_APP/flexran_agent_common.c
openair2/ENB_APP/flexran_agent_common.c
+22
-15
openair2/ENB_APP/flexran_agent_common.h
openair2/ENB_APP/flexran_agent_common.h
+4
-0
openair2/ENB_APP/flexran_agent_handler.c
openair2/ENB_APP/flexran_agent_handler.c
+1
-15
No files found.
openair2/ENB_APP/flexran_agent_common.c
View file @
ab82d13d
...
...
@@ -598,21 +598,7 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
goto
error
;
ue_config_reply_msg
->
header
=
header
;
ue_config_reply_msg
->
n_ue_config
=
0
;
if
(
flexran_agent_get_rrc_xface
(
mod_id
))
ue_config_reply_msg
->
n_ue_config
=
flexran_get_rrc_num_ues
(
mod_id
);
else
if
(
flexran_agent_get_mac_xface
(
mod_id
))
ue_config_reply_msg
->
n_ue_config
=
flexran_get_mac_num_ues
(
mod_id
);
if
(
flexran_agent_get_rrc_xface
(
mod_id
)
&&
flexran_agent_get_mac_xface
(
mod_id
)
&&
flexran_get_rrc_num_ues
(
mod_id
)
!=
flexran_get_mac_num_ues
(
mod_id
))
{
const
int
nrrc
=
flexran_get_rrc_num_ues
(
mod_id
);
const
int
nmac
=
flexran_get_mac_num_ues
(
mod_id
);
ue_config_reply_msg
->
n_ue_config
=
nrrc
<
nmac
?
nrrc
:
nmac
;
LOG_E
(
FLEXRAN_AGENT
,
"%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %lu UEs
\n
"
,
__func__
,
nrrc
,
nmac
,
ue_config_reply_msg
->
n_ue_config
);
}
ue_config_reply_msg
->
n_ue_config
=
flexran_agent_get_num_ues
(
mod_id
);
Protocol__FlexUeConfig
**
ue_config
;
...
...
@@ -935,3 +921,24 @@ int flexran_agent_handle_ue_config_reply(mid_t mod_id, const void *params, Proto
*
msg
=
NULL
;
return
0
;
}
int
flexran_agent_get_num_ues
(
mid_t
mod_id
)
{
const
int
has_rrc
=
flexran_agent_get_rrc_xface
(
mod_id
)
!=
NULL
;
const
int
has_mac
=
flexran_agent_get_mac_xface
(
mod_id
)
!=
NULL
;
DevAssert
(
has_rrc
||
has_mac
);
if
(
has_rrc
&&
!
has_mac
)
return
flexran_get_rrc_num_ues
(
mod_id
);
if
(
!
has_rrc
&&
has_mac
)
return
flexran_get_mac_num_ues
(
mod_id
);
/* has both */
const
int
nrrc
=
flexran_get_rrc_num_ues
(
mod_id
);
const
int
nmac
=
flexran_get_mac_num_ues
(
mod_id
);
if
(
nrrc
!=
nmac
)
{
const
int
n_ue
=
nrrc
<
nmac
?
nrrc
:
nmac
;
LOG_E
(
FLEXRAN_AGENT
,
"%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %d UEs
\n
"
,
__func__
,
nrrc
,
nmac
,
n_ue
);
return
n_ue
;
}
return
nrrc
;
}
openair2/ENB_APP/flexran_agent_common.h
View file @
ab82d13d
...
...
@@ -179,4 +179,8 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void* params, Prot
* request message. */
int
flexran_agent_handle_ue_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__FlexranMessage
**
msg
);
/* Return the number of UEs in the BS of this agent across RRC/MAC. If they
* disagree, prints an error and returns the minimum of both. */
int
flexran_agent_get_num_ues
(
mid_t
mod_id
);
#endif
openair2/ENB_APP/flexran_agent_handler.c
View file @
ab82d13d
...
...
@@ -274,21 +274,7 @@ int flexran_agent_stats_reply(mid_t enb_id,
const
uint32_t
cell_flags
=
stats_req
->
complete_stats_request
->
cell_report_flags
;
const
uint32_t
ue_flags
=
stats_req
->
complete_stats_request
->
ue_report_flags
;
/* TODO: get_number in own function */
int
n_ue
=
0
;
if
(
flexran_agent_get_rrc_xface
(
enb_id
))
n_ue
=
flexran_get_rrc_num_ues
(
enb_id
);
else
if
(
flexran_agent_get_mac_xface
(
enb_id
))
n_ue
=
flexran_get_mac_num_ues
(
enb_id
);
if
(
flexran_agent_get_rrc_xface
(
enb_id
)
&&
flexran_agent_get_mac_xface
(
enb_id
)
&&
flexran_get_rrc_num_ues
(
enb_id
)
!=
flexran_get_mac_num_ues
(
enb_id
))
{
const
int
nrrc
=
flexran_get_rrc_num_ues
(
enb_id
);
const
int
nmac
=
flexran_get_mac_num_ues
(
enb_id
);
n_ue
=
nrrc
<
nmac
?
nrrc
:
nmac
;
LOG_E
(
FLEXRAN_AGENT
,
"%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %d UEs
\n
"
,
__func__
,
nrrc
,
nmac
,
n_ue
);
}
int
n_ue
=
flexran_agent_get_num_ues
(
enb_id
);
rnti_t
rntis
[
n_ue
];
if
(
flexran_agent_get_rrc_xface
(
enb_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