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
ff78412d
Commit
ff78412d
authored
Oct 29, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat flexran_agent_handle_stats() for better readability
parent
1365d271
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
77 deletions
+78
-77
openair2/ENB_APP/flexran_agent_handler.c
openair2/ENB_APP/flexran_agent_handler.c
+78
-77
No files found.
openair2/ENB_APP/flexran_agent_handler.c
View file @
ff78412d
...
...
@@ -242,7 +242,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
//Set the number of UEs and create list with their RNTIs stats configs
report_config
.
nr_ue
=
flexran_get_mac_num_ues
(
mod_id
);
report_config
.
ue_report_type
=
(
ue_report_type_t
*
)
malloc
(
sizeof
(
ue_report_type_t
)
*
report_config
.
nr_ue
);
report_config
.
ue_report_type
=
malloc
(
sizeof
(
ue_report_type_t
)
*
report_config
.
nr_ue
);
if
(
report_config
.
ue_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
...
...
@@ -254,7 +254,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
}
//Set the number of CCs and create a list with the cell stats configs
report_config
.
nr_cc
=
MAX_NUM_CCs
;
report_config
.
cc_report_type
=
(
cc_report_type_t
*
)
malloc
(
sizeof
(
cc_report_type_t
)
*
report_config
.
nr_cc
);
report_config
.
cc_report_type
=
malloc
(
sizeof
(
cc_report_type_t
)
*
report_config
.
nr_cc
);
if
(
report_config
.
cc_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
...
...
@@ -276,7 +276,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
/* Need to make sure that the ue flags are saved (Bug) */
if
(
report_config
.
nr_ue
==
0
)
{
report_config
.
nr_ue
=
1
;
report_config
.
ue_report_type
=
(
ue_report_type_t
*
)
malloc
(
sizeof
(
ue_report_type_t
));
report_config
.
ue_report_type
=
malloc
(
sizeof
(
ue_report_type_t
));
if
(
report_config
.
ue_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
...
...
@@ -289,8 +289,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
flexran_agent_stats_request
(
enb_id
,
xid
,
&
request_config
,
&
timer_msg
);
/* Create a timer */
long
timer_id
=
0
;
flexran_agent_timer_args_t
*
timer_args
;
timer_args
=
malloc
(
sizeof
(
flexran_agent_timer_args_t
));
flexran_agent_timer_args_t
*
timer_args
=
malloc
(
sizeof
(
flexran_agent_timer_args_t
));
memset
(
timer_args
,
0
,
sizeof
(
flexran_agent_timer_args_t
));
timer_args
->
mod_id
=
enb_id
;
timer_args
->
msg
=
timer_msg
;
...
...
@@ -302,7 +301,9 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
sec_interval
=
usec_interval
/
(
1000
*
1000
);
usec_interval
=
usec_interval
%
(
1000
*
1000
);
}
flexran_agent_create_timer
(
sec_interval
,
usec_interval
,
FLEXRAN_AGENT_DEFAULT
,
enb_id
,
FLEXRAN_AGENT_TIMER_TYPE_PERIODIC
,
xid
,
flexran_agent_handle_timed_task
,(
void
*
)
timer_args
,
&
timer_id
);
flexran_agent_create_timer
(
sec_interval
,
usec_interval
,
FLEXRAN_AGENT_DEFAULT
,
enb_id
,
FLEXRAN_AGENT_TIMER_TYPE_PERIODIC
,
xid
,
flexran_agent_handle_timed_task
,(
void
*
)
timer_args
,
&
timer_id
);
}
else
if
(
comp_req
->
report_frequency
==
PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_CONTINUOUS
)
{
/*If request was for continuous updates, disable the previous configuration and
set up a new one*/
...
...
@@ -314,7 +315,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
/* Need to make sure that the ue flags are saved (Bug) */
if
(
report_config
.
nr_ue
==
0
)
{
report_config
.
nr_ue
=
1
;
report_config
.
ue_report_type
=
(
ue_report_type_t
*
)
malloc
(
sizeof
(
ue_report_type_t
));
report_config
.
ue_report_type
=
malloc
(
sizeof
(
ue_report_type_t
));
if
(
report_config
.
ue_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
...
...
@@ -334,7 +335,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
report_config
.
nr_ue
=
0
;
report_config
.
ue_report_type
=
NULL
;
report_config
.
nr_cc
=
cell_req
->
n_cell
;
report_config
.
cc_report_type
=
(
cc_report_type_t
*
)
malloc
(
sizeof
(
cc_report_type_t
)
*
report_config
.
nr_cc
);
report_config
.
cc_report_type
=
malloc
(
sizeof
(
cc_report_type_t
)
*
report_config
.
nr_cc
);
if
(
report_config
.
cc_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
...
...
@@ -352,7 +353,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
report_config
.
nr_cc
=
0
;
report_config
.
cc_report_type
=
NULL
;
report_config
.
nr_ue
=
ue_req
->
n_rnti
;
report_config
.
ue_report_type
=
(
ue_report_type_t
*
)
malloc
(
sizeof
(
ue_report_type_t
)
*
report_config
.
nr_ue
);
report_config
.
ue_report_type
=
malloc
(
sizeof
(
ue_report_type_t
)
*
report_config
.
nr_ue
);
if
(
report_config
.
ue_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
...
...
@@ -369,7 +370,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
goto
error
;
}
if
(
flexran_agent_stats_reply
(
enb_id
,
xid
,
&
report_config
,
msg
)){
if
(
flexran_agent_stats_reply
(
enb_id
,
xid
,
&
report_config
,
msg
))
{
err_code
=
PROTOCOL__FLEXRAN_ERR__MSG_BUILD
;
goto
error
;
}
...
...
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