Commit 92a3b07b authored by Robert Schmidt's avatar Robert Schmidt
Browse files

FlexRAN: send slice ID to which UE belongs + reformat

- flexran_agent_ue_config_reply() and flexran_agent_ue_state_change() send
  slice_id
parent fcaf2371
......@@ -76,147 +76,147 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
config->has_rnti = 1;
config->rnti = rnti;
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED
|| state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) {
int i = find_UE_id(mod_id, rnti);
config->has_rnti = 1;
config->rnti = rnti;
if(flexran_get_time_alignment_timer(mod_id,i) != -1) {
config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i);
config->has_time_alignment_timer = 1;
}
if(flexran_get_meas_gap_config(mod_id,i) != -1){
config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i);
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,i);
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,i) != -1) {
config->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i);
config->has_transmission_mode = 1;
}
config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i);
config->has_ue_aggregated_max_bitrate_ul = 1;
config->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i);
config->has_ue_aggregated_max_bitrate_dl = 1;
//TODO: Set the UE capabilities
Protocol__FlexUeCapabilities *c_capabilities;
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
protocol__flex_ue_capabilities__init(c_capabilities);
//TODO: Set half duplex (FDD operation)
c_capabilities->has_half_duplex = 0;
c_capabilities->half_duplex = 1;//flexran_get_half_duplex(i);
//TODO: Set intra-frame hopping flag
c_capabilities->has_intra_sf_hopping = 0;
c_capabilities->intra_sf_hopping = 1;//flexran_get_intra_sf_hopping(i);
//TODO: Set support for type 2 hopping with n_sb > 1
c_capabilities->has_type2_sb_1 = 0;
c_capabilities->type2_sb_1 = 1;//flexran_get_type2_sb_1(i);
//TODO: Set ue category
c_capabilities->has_ue_category = 0;
c_capabilities->ue_category = 1;//flexran_get_ue_category(i);
//TODO: Set UE support for resource allocation type 1
c_capabilities->has_res_alloc_type1 = 0;
c_capabilities->res_alloc_type1 = 1;//flexran_get_res_alloc_type1(i);
//Set the capabilites to the message
config->capabilities = c_capabilities;
if(flexran_get_ue_transmission_antenna(mod_id,i) != -1) {
config->has_ue_transmission_antenna = 1;
config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i);
}
if(flexran_get_tti_bundling(mod_id,i) != -1) {
config->has_tti_bundling = 1;
config->tti_bundling = flexran_get_tti_bundling(mod_id,i);
}
if(flexran_get_maxHARQ_TX(mod_id,i) != -1){
config->has_max_harq_tx = 1;
config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i);
}
if(flexran_get_beta_offset_ack_index(mod_id,i) != -1) {
config->has_beta_offset_ack_index = 1;
config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i);
}
if(flexran_get_beta_offset_ri_index(mod_id,i) != -1) {
config->has_beta_offset_ri_index = 1;
config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i);
}
if(flexran_get_beta_offset_cqi_index(mod_id,i) != -1) {
config->has_beta_offset_cqi_index = 1;
config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i);
}
/* assume primary carrier */
if(flexran_get_ack_nack_simultaneous_trans(mod_id,i,0) != -1) {
config->has_ack_nack_simultaneous_trans = 1;
config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,i,0);
}
if(flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) {
config->has_simultaneous_ack_nack_cqi = 1;
config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i);
}
if(flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) {
config->has_aperiodic_cqi_rep_mode = 1;
int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i);
if (mode > 4) {
config->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
} else {
config->aperiodic_cqi_rep_mode = mode;
}
}
if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) {
config->has_tdd_ack_nack_feedback = 1;
config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i);
}
if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) {
config->has_ack_nack_repetition_factor = 1;
config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i);
}
if(flexran_get_extended_bsr_size(mod_id, i) != -1) {
config->has_extended_bsr_size = 1;
config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i);
}
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;
}
|| state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) {
int i = find_UE_id(mod_id, rnti);
config->has_rnti = 1;
config->rnti = rnti;
config->imsi = flexran_get_ue_imsi(mod_id, i);
config->has_imsi = 1;
config->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, i);
config->has_dl_slice_id = 1;
config->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, i);
config->has_ul_slice_id = 1;
if(flexran_get_time_alignment_timer(mod_id,i) != -1) {
config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i);
config->has_time_alignment_timer = 1;
}
if(flexran_get_meas_gap_config(mod_id,i) != -1){
config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i);
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,i);
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,i) != -1) {
config->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i);
config->has_transmission_mode = 1;
}
config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i);
config->has_ue_aggregated_max_bitrate_ul = 1;
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, i);
c_capabilities->has_intra_sf_hopping = 1;
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, i);
c_capabilities->has_type2_sb_1 = 1;
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, i);
c_capabilities->has_ue_category = 1;
c_capabilities->ue_category = flexran_get_ue_category(mod_id, i);
c_capabilities->has_res_alloc_type1 = 1;
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, i);
//Set the capabilites to the message
config->capabilities = c_capabilities;
if(flexran_get_ue_transmission_antenna(mod_id,i) != -1) {
config->has_ue_transmission_antenna = 1;
config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i);
}
if(flexran_get_tti_bundling(mod_id,i) != -1) {
config->has_tti_bundling = 1;
config->tti_bundling = flexran_get_tti_bundling(mod_id,i);
}
if(flexran_get_maxHARQ_TX(mod_id,i) != -1){
config->has_max_harq_tx = 1;
config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i);
}
if(flexran_get_beta_offset_ack_index(mod_id,i) != -1) {
config->has_beta_offset_ack_index = 1;
config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i);
}
if(flexran_get_beta_offset_ri_index(mod_id,i) != -1) {
config->has_beta_offset_ri_index = 1;
config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i);
}
if(flexran_get_beta_offset_cqi_index(mod_id,i) != -1) {
config->has_beta_offset_cqi_index = 1;
config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i);
}
/* assume primary carrier */
if(flexran_get_ack_nack_simultaneous_trans(mod_id,i,0) != -1) {
config->has_ack_nack_simultaneous_trans = 1;
config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,i,0);
}
if(flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) {
config->has_simultaneous_ack_nack_cqi = 1;
config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i);
}
if(flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) {
config->has_aperiodic_cqi_rep_mode = 1;
int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i);
if (mode > 4) {
config->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
} else {
config->aperiodic_cqi_rep_mode = mode;
}
}
if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) {
config->has_tdd_ack_nack_feedback = 1;
config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i);
}
if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) {
config->has_ack_nack_repetition_factor = 1;
config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i);
}
if(flexran_get_extended_bsr_size(mod_id, i) != -1) {
config->has_extended_bsr_size = 1;
config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i);
}
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
}
......
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