Commit 6d6e1c86 authored by Xenofon Foukas's avatar Xenofon Foukas

Stability improvements for remote real-time control

parent 6337bc77
...@@ -657,6 +657,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, ...@@ -657,6 +657,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
full_ul_report->pucch_dbm[j]->p0_pucch_dbm = flexran_get_p0_pucch_dbm(enb_id,i,j); full_ul_report->pucch_dbm[j]->p0_pucch_dbm = flexran_get_p0_pucch_dbm(enb_id,i,j);
full_ul_report->pucch_dbm[j]->has_p0_pucch_dbm = 1; full_ul_report->pucch_dbm[j]->has_p0_pucch_dbm = 1;
} }
full_ul_report->pucch_dbm[j]->has_p0_pucch_updated = 1;
full_ul_report->pucch_dbm[j]->p0_pucch_updated = flexran_get_p0_pucch_status(enb_id, i, j);
} }
//Add full UL CQI report to the UE report //Add full UL CQI report to the UE report
...@@ -944,14 +946,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -944,14 +946,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
subframe = ((subframe + ahead_of_time) % 10); subframe = ((subframe + ahead_of_time) % 10);
int full_frames_ahead = ((ahead_of_time / 10) % 10);
frame = frame + full_frames_ahead;
if (subframe < flexran_get_current_subframe(mod_id)) { if (subframe < flexran_get_current_subframe(mod_id)) {
frame++; frame = (frame + 1) % 1024;
} }
int additional_frames = ahead_of_time / 10;
frame = (frame + additional_frames) % 1024;
sf_trigger_msg->header = header; sf_trigger_msg->header = header;
sf_trigger_msg->has_sfn_sf = 1; sf_trigger_msg->has_sfn_sf = 1;
sf_trigger_msg->sfn_sf = flexran_get_future_sfn_sf(mod_id, 1); sf_trigger_msg->sfn_sf = flexran_get_future_sfn_sf(mod_id, 1);
...@@ -976,8 +977,8 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -976,8 +977,8 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
dl_info[i]->rnti = flexran_get_ue_crnti(mod_id, i); dl_info[i]->rnti = flexran_get_ue_crnti(mod_id, i);
dl_info[i]->has_rnti = 1; dl_info[i]->has_rnti = 1;
/*Fill in the right id of this round's HARQ process for this UE*/ /*Fill in the right id of this round's HARQ process for this UE*/
unsigned char harq_id; uint8_t harq_id;
unsigned char harq_status; uint8_t harq_status;
flexran_get_harq(mod_id, UE_PCCID(mod_id,i), i, frame, subframe, &harq_id, &harq_status); flexran_get_harq(mod_id, UE_PCCID(mod_id,i), i, frame, subframe, &harq_id, &harq_status);
dl_info[i]->harq_process_id = harq_id; dl_info[i]->harq_process_id = harq_id;
dl_info[i]->has_harq_process_id = 1; dl_info[i]->has_harq_process_id = 1;
...@@ -985,12 +986,14 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -985,12 +986,14 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
dl_info[i]->n_harq_status = 2; dl_info[i]->n_harq_status = 2;
dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status); dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status);
for (j = 0; j < dl_info[i]->n_harq_status; j++) { for (j = 0; j < dl_info[i]->n_harq_status; j++) {
dl_info[i]->harq_status[j] = harq_status;
// TODO: This should be different per TB // TODO: This should be different per TB
if(harq_status == 0) if(harq_status == 0) {
dl_info[i]->harq_status[j] = PROTOCOL__FLEX_HARQ_STATUS__FLHS_ACK; dl_info[i]->harq_status[j] = PROTOCOL__FLEX_HARQ_STATUS__FLHS_ACK;
else if (harq_status > 0) } else {
dl_info[i]->harq_status[j] = PROTOCOL__FLEX_HARQ_STATUS__FLHS_NACK; dl_info[i]->harq_status[j] = PROTOCOL__FLEX_HARQ_STATUS__FLHS_NACK;
} }
}
/*Fill in the serving cell index for this UE */ /*Fill in the serving cell index for this UE */
dl_info[i]->serv_cell_index = UE_PCCID(mod_id,i); dl_info[i]->serv_cell_index = UE_PCCID(mod_id,i);
dl_info[i]->has_serv_cell_index = 1; dl_info[i]->has_serv_cell_index = 1;
......
...@@ -166,6 +166,7 @@ message flex_ul_cqi_report { ...@@ -166,6 +166,7 @@ message flex_ul_cqi_report {
message flex_pucch_dbm { message flex_pucch_dbm {
optional int32 p0_pucch_dbm = 1; optional int32 p0_pucch_dbm = 1;
optional uint32 serv_cell_index = 2; optional uint32 serv_cell_index = 2;
optional uint32 p0_pucch_updated = 3;
} }
// //
......
...@@ -517,14 +517,13 @@ uint16_t flexran_get_future_sfn_sf (mid_t mod_id, int ahead_of_time) { ...@@ -517,14 +517,13 @@ uint16_t flexran_get_future_sfn_sf (mid_t mod_id, int ahead_of_time) {
subframe = ((subframe + ahead_of_time) % 10); subframe = ((subframe + ahead_of_time) % 10);
int full_frames_ahead = ((ahead_of_time / 10) % 10);
frame = frame + full_frames_ahead;
if (subframe < flexran_get_current_subframe(mod_id)) { if (subframe < flexran_get_current_subframe(mod_id)) {
frame++; frame = (frame + 1) % 1024;
} }
int additional_frames = ahead_of_time / 10;
frame = (frame + additional_frames) % 1024;
frame_mask = ((1<<12) - 1); frame_mask = ((1<<12) - 1);
sf_mask = ((1<<4) - 1); sf_mask = ((1<<4) - 1);
sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4); sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4);
......
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