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
fffb682f
Commit
fffb682f
authored
Feb 24, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added continuous update support
parent
906e9072
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
19 deletions
+34
-19
openair2/ENB_APP/enb_agent_mac.c
openair2/ENB_APP/enb_agent_mac.c
+33
-19
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+1
-0
No files found.
openair2/ENB_APP/enb_agent_mac.c
View file @
fffb682f
...
...
@@ -168,6 +168,18 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
request_config
.
report_type
=
PROTOCOL__PRP_STATS_TYPE__PRST_COMPLETE_STATS
;
request_config
.
report_frequency
=
PROTOCOL__PRP_STATS_REPORT_FREQ__PRSRF_ONCE
;
request_config
.
period
=
0
;
/* 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
));
if
(
report_config
.
ue_report_type
==
NULL
)
{
// TODO: Add appropriate error code
err_code
=
-
100
;
goto
error
;
}
report_config
.
ue_report_type
[
0
].
ue_rnti
=
0
;
// Dummy value
report_config
.
ue_report_type
[
0
].
ue_report_flags
=
ue_flags
;
}
request_config
.
config
=
&
report_config
;
enb_agent_enable_cont_mac_stats_update
(
enb_id
,
xid
,
&
request_config
);
}
...
...
@@ -1204,44 +1216,46 @@ void enb_agent_send_sf_trigger(mid_t mod_id) {
void
enb_agent_send_update_mac_stats
(
mid_t
mod_id
)
{
Protocol__ProgranMessage
*
current_report
,
*
msg
;
Protocol__ProgranMessage
*
current_report
=
NULL
,
*
msg
;
void
*
data
;
int
size
;
err_code_t
err_code
;
int
priority
;
mac_stats_updates_context_t
stats_context
=
mac_stats_context
[
mod_id
];
if
(
pthread_mutex_lock
(
mac_stats_context
[
mod_id
].
mutex
))
{
goto
error
;
}
/*Create a fresh report with the required flags*/
err_code
=
enb_agent_mac_handle_stats
(
mod_id
,
(
void
*
)
mac_stats_context
[
mod_id
].
stats_req
,
&
current_report
);
if
(
err_code
<
0
)
{
goto
error
;
if
(
mac_stats_context
[
mod_id
].
cont_update
==
1
)
{
/*Create a fresh report with the required flags*/
err_code
=
enb_agent_mac_handle_stats
(
mod_id
,
(
void
*
)
mac_stats_context
[
mod_id
].
stats_req
,
&
current_report
);
if
(
err_code
<
0
)
{
goto
error
;
}
}
/* /\*TODO:Check if a previous reports exists and if yes, generate a report */
/* *that is the diff between the old and the new report, */
/* *respecting the thresholds. Otherwise send the new report*\/ */
/* if (mac_stats_context[mod_id].prev_stats_reply != NULL) { */
/*TODO:Check if a previous reports exists and if yes, generate a report
*that is the diff between the old and the new report,
*respecting the thresholds. Otherwise send the new report*/
if
(
mac_stats_context
[
mod_id
].
prev_stats_reply
!=
NULL
)
{
msg
=
enb_agent_generate_diff_mac_stats_report
(
current_report
,
mac_stats_context
[
mod_id
].
prev_stats_reply
);
/* msg = enb_agent_generate_diff_mac_stats_report(current_report, mac_stats_context[mod_id].prev_stats_reply); */
/*Destroy the old stats
*/
enb_agent_destroy_progran_message
(
mac_stats_context
[
mod_id
].
prev_stats_reply
);
}
/*
Use the current report for future comparissons
*/
mac_stats_context
[
mod_id
].
prev_stats_reply
=
current_report
;
/* /\*Destroy the old stats*\/
*/
/* enb_agent_destroy_progran_message(mac_stats_context[mod_id].prev_stats_reply); */
/* } */
/*
/\*Use the current report for future comparissons*\/
*/
/* mac_stats_context[mod_id].prev_stats_reply = current_report; */
if
(
pthread_mutex_unlock
(
mac_stats_context
[
mod_id
].
mutex
))
{
goto
error
;
}
if
(
msg
!=
NULL
){
data
=
enb_agent_pack_message
(
msg
,
&
size
);
if
(
current_report
!=
NULL
){
data
=
enb_agent_pack_message
(
current_report
,
&
size
);
/*Send any stats updates using the MAC channel of the eNB*/
if
(
enb_agent_msg_send
(
mod_id
,
ENB_AGENT_MAC
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__PROGRAN_ERR__MSG_ENQUEUING
;
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
fffb682f
...
...
@@ -219,6 +219,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
//Send subframe trigger to the controller
if
(
mac_agent_registered
[
module_idP
])
{
agent_mac_xface
[
module_idP
]
->
enb_agent_send_sf_trigger
(
module_idP
);
agent_mac_xface
[
module_idP
]
->
enb_agent_send_update_mac_stats
(
module_idP
);
}
#endif
...
...
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