Commit 62a5d903 authored by Bing-Kai Hong's avatar Bing-Kai Hong

Update complete the NR_Mode_Info structure for F1 SETUP REQUEST

parent 30977ecc
...@@ -127,10 +127,15 @@ typedef struct f1ap_setup_req_s { ...@@ -127,10 +127,15 @@ typedef struct f1ap_setup_req_s {
uint8_t sul_scs; uint8_t sul_scs;
uint8_t sul_nrb; uint8_t sul_nrb;
uint8_t num_frequency_bands; uint8_t ul_num_frequency_bands;
uint16_t nr_band[32]; uint16_t ul_nr_band[32];
uint8_t num_sul_frequency_bands; uint8_t ul_num_sul_frequency_bands;
uint16_t nr_sul_band[32]; uint16_t ul_nr_sul_band[32];
uint8_t dl_num_frequency_bands;
uint16_t dl_nr_band[32];
uint8_t dl_num_sul_frequency_bands;
uint16_t dl_nr_sul_band[32];
} fdd; } fdd;
struct { struct {
......
...@@ -2473,8 +2473,18 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2473,8 +2473,18 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
// use nrb field to hold LTE N_RB_DL (0...5) // use nrb field to hold LTE N_RB_DL (0...5)
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth; F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth; F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator; // RK: we need to check there value for FDD's frequency_bands DL/UL
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_num_sul_frequency_bands = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_sul_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_num_sul_frequency_bands = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_sul_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0; F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
} }
F1AP_SETUP_REQ (msg_p).measurement_timing_information[k] = "0"; F1AP_SETUP_REQ (msg_p).measurement_timing_information[k] = "0";
......
...@@ -199,68 +199,152 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -199,68 +199,152 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance) {
//f1ap_du_data->fdd_flag = 1; //f1ap_du_data->fdd_flag = 1;
if (f1ap_du_data->fdd_flag) { // FDD if (f1ap_du_data->fdd_flag) { // FDD
nR_Mode_Info.present = F1AP_NR_Mode_Info_PR_fDD; nR_Mode_Info.present = F1AP_NR_Mode_Info_PR_fDD;
/* > FDD >> FDD Info */
F1AP_FDD_Info_t *fDD_Info = (F1AP_FDD_Info_t *)calloc(1, sizeof(F1AP_FDD_Info_t)); F1AP_FDD_Info_t *fDD_Info = (F1AP_FDD_Info_t *)calloc(1, sizeof(F1AP_FDD_Info_t));
/* >>> UL NRFreqInfo */
fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_arfcn;
F1AP_FreqBandNrItem_t ul_freqBandNrItem;
memset((void *)&ul_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t));
ul_freqBandNrItem.freqBandIndicatorNr = 777L;
F1AP_SupportedSULFreqBandItem_t ul_supportedSULFreqBandItem;
memset((void *)&ul_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
ul_supportedSULFreqBandItem.freqBandIndicatorNr = 777L;
ASN_SEQUENCE_ADD(&ul_freqBandNrItem.supportedSULBandList.list, &ul_supportedSULFreqBandItem);
ASN_SEQUENCE_ADD(&fDD_Info->uL_NRFreqInfo.freqBandListNr.list, &ul_freqBandNrItem); /* FDD.1 UL NRFreqInfo */
/* FDD.1.1 UL NRFreqInfo ARFCN */
/* >>> DL NRFreqInfo */ fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_arfcn;
/* FDD.1.2 F1AP_SUL_Information */
F1AP_FreqBandNrItem_t dl_freqBandNrItem; if(0) { // Optional
memset((void *)&dl_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t)); F1AP_SUL_Information_t *fdd_sul_info = (F1AP_SUL_Information_t *)calloc(1, sizeof(F1AP_SUL_Information_t));
dl_freqBandNrItem.freqBandIndicatorNr = 777L; fdd_sul_info->sUL_NRARFCN = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
F1AP_SupportedSULFreqBandItem_t dl_supportedSULFreqBandItem; fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
memset((void *)&dl_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t)); fDD_Info->uL_NRFreqInfo.sul_Information = fdd_sul_info;
dl_supportedSULFreqBandItem.freqBandIndicatorNr = 777L; }
ASN_SEQUENCE_ADD(&dl_freqBandNrItem.supportedSULBandList.list, &dl_supportedSULFreqBandItem);
/* FDD.1.3 freqBandListNr */
ASN_SEQUENCE_ADD(&fDD_Info->dL_NRFreqInfo.freqBandListNr.list, &dl_freqBandNrItem); int fdd_ul_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_frequency_bands;
printf("fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);
/* >>> UL Transmission Bandwidth */ int fdd_ul_j;
for (fdd_ul_j=0;
fdd_ul_j<fdd_ul_num_available_freq_Bands;
fdd_ul_j++) {
F1AP_FreqBandNrItem_t nr_freqBandNrItem;
memset((void *)&nr_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t));
/* FDD.1.3.1 freqBandIndicatorNr*/
nr_freqBandNrItem.freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_band[fdd_ul_j]; //
/* FDD.1.3.2 supportedSULBandList*/
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_sul_frequency_bands;
printf("num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
int fdd_ul_k;
for (fdd_ul_k=0;
fdd_ul_k<num_available_supported_SULBands;
fdd_ul_k++) {
F1AP_SupportedSULFreqBandItem_t nr_supportedSULFreqBandItem;
memset((void *)&nr_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
/* FDD.1.3.2.1 freqBandIndicatorNr */
nr_supportedSULFreqBandItem.freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_sul_band[fdd_ul_k]; //
ASN_SEQUENCE_ADD(&nr_freqBandNrItem.supportedSULBandList.list, &nr_supportedSULFreqBandItem);
} // for FDD : UL supported_SULBands
ASN_SEQUENCE_ADD(&fDD_Info->uL_NRFreqInfo.freqBandListNr.list, &nr_freqBandNrItem);
} // for FDD : UL freq_Bands
/* FDD.2 DL NRFreqInfo */
/* FDD.2.1 DL NRFreqInfo ARFCN */
fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_arfcn; // Integer
/* FDD.2.2 F1AP_SUL_Information */
if(0) { // Optional
F1AP_SUL_Information_t *fdd_sul_info = (F1AP_SUL_Information_t *)calloc(1, sizeof(F1AP_SUL_Information_t));
fdd_sul_info->sUL_NRARFCN = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
fDD_Info->dL_NRFreqInfo.sul_Information = fdd_sul_info;
}
/* FDD.2.3 freqBandListNr */
int fdd_dl_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_frequency_bands;
printf("fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);
int fdd_dl_j;
for (fdd_dl_j=0;
fdd_dl_j<fdd_dl_num_available_freq_Bands;
fdd_dl_j++) {
F1AP_FreqBandNrItem_t nr_freqBandNrItem;
memset((void *)&nr_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t));
/* FDD.2.3.1 freqBandIndicatorNr*/
nr_freqBandNrItem.freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_band[fdd_dl_j]; //
/* FDD.2.3.2 supportedSULBandList*/
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_sul_frequency_bands;
printf("num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
int fdd_dl_k;
for (fdd_dl_k=0;
fdd_dl_k<num_available_supported_SULBands;
fdd_dl_k++) {
F1AP_SupportedSULFreqBandItem_t nr_supportedSULFreqBandItem;
memset((void *)&nr_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
/* FDD.2.3.2.1 freqBandIndicatorNr */
nr_supportedSULFreqBandItem.freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_sul_band[fdd_dl_k]; //
ASN_SEQUENCE_ADD(&nr_freqBandNrItem.supportedSULBandList.list, &nr_supportedSULFreqBandItem);
} // for FDD : DL supported_SULBands
ASN_SEQUENCE_ADD(&fDD_Info->dL_NRFreqInfo.freqBandListNr.list, &nr_freqBandNrItem);
} // for FDD : DL freq_Bands
/* FDD.3 UL Transmission Bandwidth */
fDD_Info->uL_Transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].fdd.ul_scs; fDD_Info->uL_Transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].fdd.ul_scs;
fDD_Info->uL_Transmission_Bandwidth.nRNRB = f1ap_du_data->nr_mode_info[i].fdd.ul_nrb; fDD_Info->uL_Transmission_Bandwidth.nRNRB = f1ap_du_data->nr_mode_info[i].fdd.ul_nrb;
/* >>> DL Transmission Bandwidth */ /* FDD.4 DL Transmission Bandwidth */
fDD_Info->dL_Transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].fdd.dl_scs; fDD_Info->dL_Transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].fdd.dl_scs;
fDD_Info->dL_Transmission_Bandwidth.nRNRB = f1ap_du_data->nr_mode_info[i].fdd.dl_nrb; fDD_Info->dL_Transmission_Bandwidth.nRNRB = f1ap_du_data->nr_mode_info[i].fdd.dl_nrb;
nR_Mode_Info.choice.fDD = fDD_Info; nR_Mode_Info.choice.fDD = fDD_Info;
} else { // TDD } else { // TDD
nR_Mode_Info.present = F1AP_NR_Mode_Info_PR_tDD; nR_Mode_Info.present = F1AP_NR_Mode_Info_PR_tDD;
/* > TDD >> TDD Info */
F1AP_TDD_Info_t *tDD_Info = (F1AP_TDD_Info_t *)calloc(1, sizeof(F1AP_TDD_Info_t)); F1AP_TDD_Info_t *tDD_Info = (F1AP_TDD_Info_t *)calloc(1, sizeof(F1AP_TDD_Info_t));
/* >>> ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].tdd.nr_arfcn; // Integer
F1AP_FreqBandNrItem_t nr_freqBandNrItem;
memset((void *)&nr_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t));
// RK: missing params
nr_freqBandNrItem.freqBandIndicatorNr = 555L;
F1AP_SupportedSULFreqBandItem_t nr_supportedSULFreqBandItem; /* TDD.1 nRFreqInfo */
memset((void *)&nr_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t)); /* TDD.1.1 nRFreqInfo ARFCN */
nr_supportedSULFreqBandItem.freqBandIndicatorNr = 444L; tDD_Info->nRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].tdd.nr_arfcn; // Integer
ASN_SEQUENCE_ADD(&nr_freqBandNrItem.supportedSULBandList.list, &nr_supportedSULFreqBandItem);
/* TDD.1.2 F1AP_SUL_Information */
ASN_SEQUENCE_ADD(&tDD_Info->nRFreqInfo.freqBandListNr.list, &nr_freqBandNrItem); if(0) { // Optional
F1AP_SUL_Information_t *tdd_sul_info = (F1AP_SUL_Information_t *)calloc(1, sizeof(F1AP_SUL_Information_t));
tDD_Info->transmission_Bandwidth.nRSCS= f1ap_du_data->nr_mode_info[i].tdd.scs; tdd_sul_info->sUL_NRARFCN = 0;
tDD_Info->transmission_Bandwidth.nRNRB= f1ap_du_data->nr_mode_info[i].tdd.nrb; tdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
tdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
tDD_Info->nRFreqInfo.sul_Information = tdd_sul_info;
}
/* TDD.1.3 freqBandListNr */
int tdd_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].tdd.num_frequency_bands;
printf("tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
int j;
for (j=0;
j<tdd_num_available_freq_Bands;
j++) {
F1AP_FreqBandNrItem_t nr_freqBandNrItem;
memset((void *)&nr_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t));
/* TDD.1.3.1 freqBandIndicatorNr*/
nr_freqBandNrItem.freqBandIndicatorNr = *f1ap_du_data->nr_mode_info[i].tdd.nr_band; //
/* TDD.1.3.2 supportedSULBandList*/
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].tdd.num_sul_frequency_bands;
printf("num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
int k;
for (k=0;
k<num_available_supported_SULBands;
k++) {
F1AP_SupportedSULFreqBandItem_t nr_supportedSULFreqBandItem;
memset((void *)&nr_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
/* TDD.1.3.2.1 freqBandIndicatorNr */
nr_supportedSULFreqBandItem.freqBandIndicatorNr = *f1ap_du_data->nr_mode_info[i].tdd.nr_sul_band; //
ASN_SEQUENCE_ADD(&nr_freqBandNrItem.supportedSULBandList.list, &nr_supportedSULFreqBandItem);
} // for TDD : supported_SULBands
ASN_SEQUENCE_ADD(&tDD_Info->nRFreqInfo.freqBandListNr.list, &nr_freqBandNrItem);
} // for TDD : freq_Bands
/* TDD.2 transmission_Bandwidth */
tDD_Info->transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].tdd.scs;
tDD_Info->transmission_Bandwidth.nRNRB = f1ap_du_data->nr_mode_info[i].tdd.nrb;
nR_Mode_Info.choice.tDD = tDD_Info; nR_Mode_Info.choice.tDD = tDD_Info;
} } // if nR_Mode_Info
served_cell_information.nR_Mode_Info = nR_Mode_Info; served_cell_information.nR_Mode_Info = nR_Mode_Info;
......
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