Commit 465168d2 authored by Xenofon Foukas's avatar Xenofon Foukas

Integrated sf triggering to MAC layer and fixed bugs in creation of sf trigger message

parent 991e9950
......@@ -918,7 +918,7 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
if(dl_info == NULL)
goto error;
//Fill the status of the current HARQ process for each UE
for(i = 0; i++; i < sf_trigger_msg->n_dl_info) {
for(i = 0; i < sf_trigger_msg->n_dl_info; i++) {
dl_info[i] = malloc(sizeof(Protocol__PrpDlInfo));
if(dl_info[i] == NULL)
goto error;
......@@ -934,7 +934,7 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
/*TODO: fill in the status of the HARQ process (2 TBs)*/
dl_info[i]->n_harq_status = 2;
dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status);
for (j = 0; j < dl_info[j]->n_harq_status; j++) {
for (j = 0; j < dl_info[i]->n_harq_status; j++) {
// TODO: This should be different per TB
dl_info[i]->harq_status[j] = harq_status;
}
......@@ -958,7 +958,7 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
if(ul_info == NULL)
goto error;
//Fill the reception info for each transmitting UE
for(i = 0; i++; i < sf_trigger_msg->n_ul_info) {
for(i = 0; i < sf_trigger_msg->n_ul_info; i++) {
ul_info[i] = malloc(sizeof(Protocol__PrpUlInfo));
if(ul_info[i] == NULL)
goto error;
......@@ -978,7 +978,7 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
given logical channel*/
ul_info[i]->n_ul_reception = 11;
ul_info[i]->ul_reception = malloc(sizeof(uint32_t) * ul_info[i]->n_ul_reception);
for (j = 0; j < ul_info[j]->n_ul_reception; j++) {
for (j = 0; j < ul_info[i]->n_ul_reception; j++) {
ul_info[i]->ul_reception[j] = 100;
}
/*TODO: Fill in the reception status for each UEs data*/
......
......@@ -71,6 +71,7 @@
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
#define ENABLE_ENB_AGENT_DL_SCHEDULER
//#define DISABLE_SF_TRIGGER
//#define DEBUG_HEADER_PARSING 1
//#define DEBUG_PACKET_TRACE 1
......@@ -207,7 +208,14 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
}
#ifndef DISABLE_SF_TRIGGER
//Send subframe trigger to the controller
if (mac_agent_registered[module_idP]) {
agent_mac_xface[module_idP]->enb_agent_send_sf_trigger(module_idP);
}
#endif
//if (subframeP%5 == 0)
//#ifdef EXMIMO
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, 0,module_idP);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment