Commit 2fa8c29f authored by Robert Schmidt's avatar Robert Schmidt

Put ue_config MAC and RRC parts in resp. CMs

parent 1fc631e2
...@@ -1372,6 +1372,30 @@ void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id, ...@@ -1372,6 +1372,30 @@ void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
} }
} }
void flexran_agent_fill_mac_ue_config(mid_t mod_id, mid_t ue_id,
Protocol__FlexUeConfig *ue_conf)
{
if (ue_conf->has_rnti && ue_conf->rnti != flexran_get_mac_ue_crnti(mod_id, ue_id)) {
LOG_E(FLEXRAN_AGENT, "ue_config existing RNTI %x does not match MAC RNTI %x\n",
ue_conf->rnti, flexran_get_mac_ue_crnti(mod_id, ue_id));
return;
}
ue_conf->rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
ue_conf->has_rnti = 1;
ue_conf->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id, ue_id);
ue_conf->has_ue_aggregated_max_bitrate_ul = 1;
ue_conf->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id, ue_id);
ue_conf->has_ue_aggregated_max_bitrate_dl = 1;
/* TODO update through RAN API */
//config->has_pcell_carrier_index = 1;
//config->pcell_carrier_index = UE_PCCID(mod_id, i);
//TODO: Set carrier aggregation support (boolean)
}
void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id, void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id,
Protocol__FlexLcUeConfig *lc_ue_conf) Protocol__FlexLcUeConfig *lc_ue_conf)
{ {
......
...@@ -87,6 +87,10 @@ void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMess ...@@ -87,6 +87,10 @@ void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMess
void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id, void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
Protocol__FlexCellConfig *conf); Protocol__FlexCellConfig *conf);
/* Fill the MAC part of a ue_config message */
void flexran_agent_fill_mac_ue_config(mid_t mod_id, mid_t ue_id,
Protocol__FlexUeConfig *ue_conf);
/* Fill the lc_ue_config->lc_config message */ /* Fill the lc_ue_config->lc_config message */
void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id, void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id,
Protocol__FlexLcUeConfig *lc_ue_conf); Protocol__FlexLcUeConfig *lc_ue_conf);
......
...@@ -68,153 +68,22 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch ...@@ -68,153 +68,22 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
goto error; goto error;
} }
protocol__flex_ue_config__init(config); protocol__flex_ue_config__init(config);
if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED) { switch (state_change) {
// Simply set the rnti of the UE case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED:
config->has_rnti = 1; config->has_rnti = 1;
config->rnti = rnti; config->rnti = rnti;
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED break;
|| state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) { case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED:
// TODO this goes into the MAC CM */ case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED:
//int i = find_UE_id(mod_id, rnti); flexran_agent_fill_rrc_ue_config(mod_id, rnti, config);
config->has_rnti = 1; /* we don't call into the MAC CM here; it will be called later through an
config->rnti = rnti; * ue_config_request */
/* RNTI correct */ break;
if(flexran_get_time_alignment_timer(mod_id, rnti) != -1) {
config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, rnti); case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED:
config->has_time_alignment_timer = 1; default:
} LOG_E(FLEXRAN_AGENT, "state change FLUESC_MOVED or unknown state occured for RNTI %x\n",
if(flexran_get_meas_gap_config(mod_id, rnti) != -1){ rnti);
config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, rnti);
config->has_meas_gap_config_pattern = 1;
}
if(config->has_meas_gap_config_pattern == 1 &&
config->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
config->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, rnti);
config->has_meas_gap_config_sf_offset = 1;
}
//TODO: Set the SPS configuration (Optional)
//Not supported for now, so we do not set it
//TODO: Set the SR configuration (Optional)
//We do not set it for now
//TODO: Set the CQI configuration (Optional)
//We do not set it for now
if(flexran_get_ue_transmission_mode(mod_id, rnti) != -1) {
config->transmission_mode = flexran_get_ue_transmission_mode(mod_id, rnti);
config->has_transmission_mode = 1;
}
/* TODO into MAC CM */
//config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i);
//config->has_ue_aggregated_max_bitrate_ul = 1;
/* TODO into MAC CM */
//config->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i);
//config->has_ue_aggregated_max_bitrate_dl = 1;
Protocol__FlexUeCapabilities *c_capabilities;
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
protocol__flex_ue_capabilities__init(c_capabilities);
c_capabilities->has_half_duplex = 1;
c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, rnti);
c_capabilities->has_intra_sf_hopping = 1;
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, rnti);
c_capabilities->has_type2_sb_1 = 1;
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, rnti);
c_capabilities->has_ue_category = 1;
c_capabilities->ue_category = flexran_get_ue_category(mod_id, rnti);
c_capabilities->has_res_alloc_type1 = 1;
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, rnti);
config->capabilities = c_capabilities;
if(flexran_get_ue_transmission_antenna(mod_id, rnti) != -1) {
config->has_ue_transmission_antenna = 1;
config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, rnti);
}
if (flexran_get_tti_bundling(mod_id, rnti) != -1) {
config->has_tti_bundling = 1;
config->tti_bundling = flexran_get_tti_bundling(mod_id, rnti);
}
if(flexran_get_maxHARQ_TX(mod_id, rnti) != -1){
config->has_max_harq_tx = 1;
config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, rnti);
}
if(flexran_get_beta_offset_ack_index(mod_id, rnti) != -1) {
config->has_beta_offset_ack_index = 1;
config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, rnti);
}
if(flexran_get_beta_offset_ri_index(mod_id, rnti) != -1) {
config->has_beta_offset_ri_index = 1;
config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, rnti);
}
if(flexran_get_beta_offset_cqi_index(mod_id, rnti) != -1) {
config->has_beta_offset_cqi_index = 1;
config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, rnti);
}
/* assume primary carrier */
if(flexran_get_ack_nack_simultaneous_trans(mod_id,0) != -1) {
config->has_ack_nack_simultaneous_trans = 1;
config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,0);
}
if(flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti) != -1) {
config->has_simultaneous_ack_nack_cqi = 1;
config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti);
}
if(flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti) != -1) {
config->has_aperiodic_cqi_rep_mode = 1;
config->aperiodic_cqi_rep_mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti);
}
if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti) != -1) {
config->has_tdd_ack_nack_feedback = 1;
config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti);
}
if(flexran_get_ack_nack_repetition_factor(mod_id, rnti) != -1) {
config->has_ack_nack_repetition_factor = 1;
config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, rnti);
}
if(flexran_get_extended_bsr_size(mod_id, rnti) != -1) {
config->has_extended_bsr_size = 1;
config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, rnti);
}
// TODO this goes into the MAC CM
//config->has_pcell_carrier_index = 1;
//config->pcell_carrier_index = UE_PCCID(mod_id, i);
//TODO: Set carrier aggregation support (boolean)
config->has_ca_support = 0;
config->ca_support = 0;
if(config->has_ca_support){
//TODO: Set cross carrier scheduling support (boolean)
config->has_cross_carrier_sched_support = 1;
config->cross_carrier_sched_support = 0;
//TODO: Set secondary cells configuration
// We do not set it for now. No carrier aggregation support
//TODO: Set deactivation timer for secondary cell
config->has_scell_deactivation_timer = 0;
config->scell_deactivation_timer = 0;
}
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED) {
// TODO: Not supported for now. Leave blank
} }
ue_state_change_msg->config = config; ue_state_change_msg->config = config;
...@@ -238,16 +107,18 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch ...@@ -238,16 +107,18 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
return; return;
error: error:
if (err_code != 0) if (err_code != 0)
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code); LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n",
err_code, rnti);
} }
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) { int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG) if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG)
goto error; goto error;
free(msg->ue_state_change_msg->header); free(msg->ue_state_change_msg->header);
//TODO: Free the contents of the UE config structure if (msg->ue_state_change_msg->config->capabilities)
free(msg->ue_state_change_msg->config->capabilities);
free(msg->ue_state_change_msg->config);
free(msg->ue_state_change_msg); free(msg->ue_state_change_msg);
free(msg); free(msg);
return 0; return 0;
...@@ -637,6 +508,135 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, ...@@ -637,6 +508,135 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
return -1; return -1;
} }
void flexran_agent_fill_rrc_ue_config(mid_t mod_id, rnti_t rnti,
Protocol__FlexUeConfig *ue_conf)
{
if (ue_conf->has_rnti && ue_conf->rnti != rnti) {
LOG_E(FLEXRAN_AGENT, "ue_config existing RNTI %x does not match RRC RNTI %x\n",
ue_conf->rnti, rnti);
return;
}
ue_conf->has_rnti = 1;
ue_conf->rnti = rnti;
ue_conf->imsi = flexran_get_ue_imsi(mod_id, rnti);
ue_conf->has_imsi = 1;
//TODO: Set the DRX configuration (optional)
//Not supported for now, so we do not set it
if(flexran_get_time_alignment_timer(mod_id, rnti) != -1) {
ue_conf->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, rnti);
ue_conf->has_time_alignment_timer = 1;
}
if(flexran_get_meas_gap_config(mod_id, rnti) != -1){
ue_conf->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, rnti);
ue_conf->has_meas_gap_config_pattern = 1;
}
if(ue_conf->has_meas_gap_config_pattern == 1 &&
ue_conf->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
ue_conf->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, rnti);
ue_conf->has_meas_gap_config_sf_offset = 1;
}
//TODO: Set the SPS configuration (Optional)
//Not supported for now, so we do not set it
//TODO: Set the SR configuration (Optional)
//We do not set it for now
//TODO: Set the CQI configuration (Optional)
//We do not set it for now
if(flexran_get_ue_transmission_mode(mod_id, rnti) != -1) {
ue_conf->transmission_mode = flexran_get_ue_transmission_mode(mod_id, rnti);
ue_conf->has_transmission_mode = 1;
}
Protocol__FlexUeCapabilities *c_capabilities;
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
if (c_capabilities) {
protocol__flex_ue_capabilities__init(c_capabilities);
c_capabilities->has_half_duplex = 1;
c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, rnti);
c_capabilities->has_intra_sf_hopping = 1;
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, rnti);
c_capabilities->has_type2_sb_1 = 1;
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, rnti);
c_capabilities->has_ue_category = 1;
c_capabilities->ue_category = flexran_get_ue_category(mod_id, rnti);
c_capabilities->has_res_alloc_type1 = 1;
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, rnti);
ue_conf->capabilities = c_capabilities;
}
if(flexran_get_ue_transmission_antenna(mod_id, rnti) != -1) {
ue_conf->has_ue_transmission_antenna = 1;
ue_conf->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, rnti);
}
if (flexran_get_tti_bundling(mod_id, rnti) != -1) {
ue_conf->has_tti_bundling = 1;
ue_conf->tti_bundling = flexran_get_tti_bundling(mod_id, rnti);
}
if(flexran_get_maxHARQ_TX(mod_id, rnti) != -1){
ue_conf->has_max_harq_tx = 1;
ue_conf->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, rnti);
}
if(flexran_get_beta_offset_ack_index(mod_id, rnti) != -1) {
ue_conf->has_beta_offset_ack_index = 1;
ue_conf->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, rnti);
}
if(flexran_get_beta_offset_ri_index(mod_id, rnti) != -1) {
ue_conf->has_beta_offset_ri_index = 1;
ue_conf->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, rnti);
}
if(flexran_get_beta_offset_cqi_index(mod_id, rnti) != -1) {
ue_conf->has_beta_offset_cqi_index = 1;
ue_conf->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, rnti);
}
/* assume primary carrier */
if(flexran_get_ack_nack_simultaneous_trans(mod_id,0) != -1) {
ue_conf->has_ack_nack_simultaneous_trans = 1;
ue_conf->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,0);
}
if(flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti) != -1) {
ue_conf->has_simultaneous_ack_nack_cqi = 1;
ue_conf->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti);
}
if(flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti) != -1) {
ue_conf->has_aperiodic_cqi_rep_mode = 1;
ue_conf->aperiodic_cqi_rep_mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti);
}
if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti) != -1) {
ue_conf->has_tdd_ack_nack_feedback = 1;
ue_conf->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti);
}
if(flexran_get_ack_nack_repetition_factor(mod_id, rnti) != -1) {
ue_conf->has_ack_nack_repetition_factor = 1;
ue_conf->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, rnti);
}
if(flexran_get_extended_bsr_size(mod_id, rnti) != -1) {
ue_conf->has_extended_bsr_size = 1;
ue_conf->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, rnti);
}
}
int flexran_agent_register_rrc_xface(mid_t mod_id) int flexran_agent_register_rrc_xface(mid_t mod_id)
{ {
......
...@@ -60,6 +60,10 @@ void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *); ...@@ -60,6 +60,10 @@ void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *);
int flexran_agent_rrc_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report); int flexran_agent_rrc_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexranMessage *msg); int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexranMessage *msg);
/* Fill the RRC part of a ue_config message */
void flexran_agent_fill_rrc_ue_config(mid_t mod_id, rnti_t rnti,
Protocol__FlexUeConfig *ue_conf);
/* Fill the RRC part of an cell_config message */ /* Fill the RRC part of an cell_config message */
void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id, void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id,
Protocol__FlexCellConfig *conf); Protocol__FlexCellConfig *conf);
......
...@@ -527,7 +527,17 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl ...@@ -527,7 +527,17 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
ue_config_reply_msg->header = header; ue_config_reply_msg->header = header;
ue_config_reply_msg->n_ue_config = flexran_get_rrc_num_ues(mod_id); 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)) {
LOG_E(FLEXRAN_AGENT, "different numbers of UEs in RRC and MAC\n");
goto error;
}
Protocol__FlexUeConfig **ue_config; Protocol__FlexUeConfig **ue_config;
if (ue_config_reply_msg->n_ue_config > 0) { if (ue_config_reply_msg->n_ue_config > 0) {
...@@ -542,143 +552,10 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl ...@@ -542,143 +552,10 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig)); ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig));
protocol__flex_ue_config__init(ue_config[i]); protocol__flex_ue_config__init(ue_config[i]);
/* correct RNTI */ if (flexran_agent_get_rrc_xface(mod_id))
ue_config[i]->rnti = rnti; flexran_agent_fill_rrc_ue_config(mod_id, rnti, ue_config[i]);
ue_config[i]->has_rnti = 1; if (flexran_agent_get_mac_xface(mod_id))
ue_config[i]->imsi = flexran_get_ue_imsi(mod_id, rnti); flexran_agent_fill_mac_ue_config(mod_id, i, ue_config[i]);
ue_config[i]->has_imsi = 1;
//TODO: Set the DRX configuration (optional)
//Not supported for now, so we do not set it
if (flexran_get_time_alignment_timer(mod_id, rnti) != -1) {
ue_config[i]->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, rnti);
ue_config[i]->has_time_alignment_timer = 1;
}
if (flexran_get_meas_gap_config(mod_id, rnti) != -1) {
ue_config[i]->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, rnti);
ue_config[i]->has_meas_gap_config_pattern = 1;
}
if (ue_config[i]->has_meas_gap_config_pattern == 1 &&
ue_config[i]->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
ue_config[i]->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, rnti);
ue_config[i]->has_meas_gap_config_sf_offset = 1;
}
//TODO: Set the SPS configuration (Optional)
//Not supported for noe, so we do not set it
//TODO: Set the SR configuration (Optional)
//We do not set it for now
//TODO: Set the CQI configuration (Optional)
//We do not set it for now
if (flexran_get_ue_transmission_mode(mod_id, rnti) != -1) {
ue_config[i]->transmission_mode = flexran_get_ue_transmission_mode(mod_id, rnti);
ue_config[i]->has_transmission_mode = 1;
}
/* into MAC CM */
//ue_config[i]->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i);
//ue_config[i]->has_ue_aggregated_max_bitrate_ul = 1;
//ue_config[i]->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i);
//ue_config[i]->has_ue_aggregated_max_bitrate_dl = 1;
Protocol__FlexUeCapabilities *capabilities;
capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
protocol__flex_ue_capabilities__init(capabilities);
capabilities->has_half_duplex = 1;
capabilities->half_duplex = flexran_get_half_duplex(mod_id, rnti);
capabilities->has_intra_sf_hopping = 1;
capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, rnti);
capabilities->has_type2_sb_1 = 1;
capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, rnti);
capabilities->has_ue_category = 1;
capabilities->ue_category = flexran_get_ue_category(mod_id, rnti);
capabilities->has_res_alloc_type1 = 1;
capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, rnti);
//Set the capabilites to the message
ue_config[i]->capabilities = capabilities;
if (flexran_get_ue_transmission_antenna(mod_id, rnti) != -1) {
ue_config[i]->has_ue_transmission_antenna = 1;
ue_config[i]->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, rnti);
}
if (flexran_get_tti_bundling(mod_id, rnti) != -1) {
ue_config[i]->has_tti_bundling = 1;
ue_config[i]->tti_bundling = flexran_get_tti_bundling(mod_id, rnti);
}
if (flexran_get_maxHARQ_TX(mod_id, rnti) != -1) {
ue_config[i]->has_max_harq_tx = 1;
ue_config[i]->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, rnti);
}
if (flexran_get_beta_offset_ack_index(mod_id, rnti) != -1) {
ue_config[i]->has_beta_offset_ack_index = 1;
ue_config[i]->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, rnti);
}
if (flexran_get_beta_offset_ri_index(mod_id, rnti) != -1) {
ue_config[i]->has_beta_offset_ri_index = 1;
ue_config[i]->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, rnti);
}
if (flexran_get_beta_offset_cqi_index(mod_id, rnti) != -1) {
ue_config[i]->has_beta_offset_cqi_index = 1;
ue_config[i]->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, rnti);
}
/* assume primary carrier */
if (flexran_get_ack_nack_simultaneous_trans(mod_id, 0) != -1) {
ue_config[i]->has_ack_nack_simultaneous_trans = 1;
ue_config[i]->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id, 0);
}
if (flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti) != -1) {
ue_config[i]->has_simultaneous_ack_nack_cqi = 1;
ue_config[i]->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti);
}
if (flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti) != -1) {
ue_config[i]->has_aperiodic_cqi_rep_mode = 1;
ue_config[i]->aperiodic_cqi_rep_mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti);
}
if (flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti) != -1) {
ue_config[i]->has_tdd_ack_nack_feedback = 1;
ue_config[i]->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti);
}
if(flexran_get_ack_nack_repetition_factor(mod_id, rnti) != -1) {
ue_config[i]->has_ack_nack_repetition_factor = 1;
ue_config[i]->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, rnti);
}
if (flexran_get_extended_bsr_size(mod_id, rnti) != -1) {
ue_config[i]->has_extended_bsr_size = 1;
ue_config[i]->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, rnti);
}
//TODO: Set carrier aggregation support (boolean)
ue_config[i]->has_ca_support = 0;
ue_config[i]->ca_support = 0;
/* into MAC CM */
//ue_config[i]->has_pcell_carrier_index = 1;
//ue_config[i]->pcell_carrier_index = UE_PCCID(mod_id, i);
if(ue_config[i]->has_ca_support){
//TODO: Set cross carrier scheduling support (boolean)
ue_config[i]->has_cross_carrier_sched_support = 0;
ue_config[i]->cross_carrier_sched_support = 0;
//TODO: Set secondary cells configuration
// We do not set it for now. No carrier aggregation support
//TODO: Set deactivation timer for secondary cell
ue_config[i]->has_scell_deactivation_timer = 0;
ue_config[i]->scell_deactivation_timer = 0;
}
} }
ue_config_reply_msg->ue_config = ue_config; ue_config_reply_msg->ue_config = ue_config;
} }
......
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