|
|
|
@@ -43,40 +43,9 @@
|
|
|
|
|
|
|
|
|
|
#include "T.h"
|
|
|
|
|
|
|
|
|
|
/* This structure describes association of a DU to a CU */
|
|
|
|
|
typedef struct f1ap_info {
|
|
|
|
|
static f1ap_setup_req_t *f1ap_du_data;
|
|
|
|
|
|
|
|
|
|
module_id_t enb_mod_idP;
|
|
|
|
|
module_id_t cu_mod_idP;
|
|
|
|
|
|
|
|
|
|
/* Unique eNB_id to identify the eNB within EPC.
|
|
|
|
|
* In our case the eNB is a macro eNB so the id will be 20 bits long.
|
|
|
|
|
* For Home eNB id, this field should be 28 bits long.
|
|
|
|
|
*/
|
|
|
|
|
uint32_t GNB_DU_ID;
|
|
|
|
|
|
|
|
|
|
/* This is the optional name provided by the MME */
|
|
|
|
|
char *GNB_DU_Name;
|
|
|
|
|
f1ap_net_ip_address_t mme_net_ip_address; // useful for joining assoc_id and ip address of packets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Number of input/ouput streams */
|
|
|
|
|
uint16_t in_streams;
|
|
|
|
|
uint16_t out_streams;
|
|
|
|
|
|
|
|
|
|
/* Connexion id used between SCTP/S1AP */
|
|
|
|
|
uint16_t cnx_id;
|
|
|
|
|
|
|
|
|
|
/* SCTP association id */
|
|
|
|
|
int32_t assoc_id;
|
|
|
|
|
|
|
|
|
|
uint16_t mcc;
|
|
|
|
|
uint16_t mnc;
|
|
|
|
|
uint8_t mnc_digit_length;
|
|
|
|
|
|
|
|
|
|
} f1ap_info_t;
|
|
|
|
|
|
|
|
|
|
void DU_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
|
|
|
|
|
void DU_handle_sctp_association_resp(instance_t instance,sctp_new_association_resp_t *sctp_new_association_resp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t F1AP_get_UE_identifier(module_id_t enb_mod_idP, int CC_idP, int UE_id) {
|
|
|
|
@@ -104,7 +73,6 @@ void DU_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind)
|
|
|
|
|
void *F1AP_DU_task(void *arg) {
|
|
|
|
|
|
|
|
|
|
//sctp_cu_init();
|
|
|
|
|
|
|
|
|
|
MessageDef *received_msg = NULL;
|
|
|
|
|
int result;
|
|
|
|
|
|
|
|
|
@@ -141,7 +109,7 @@ void *F1AP_DU_task(void *arg) {
|
|
|
|
|
LOG_I(DU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
|
|
|
|
|
LOG_I(DU_F1AP, "--------------1--------------\n");
|
|
|
|
|
DU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
|
|
|
|
&received_msg->ittiMsg.sctp_new_association_resp);
|
|
|
|
|
&received_msg->ittiMsg.sctp_new_association_resp);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case SCTP_DATA_IND:
|
|
|
|
@@ -172,81 +140,62 @@ void *F1AP_DU_task(void *arg) {
|
|
|
|
|
|
|
|
|
|
// ==============================================================================
|
|
|
|
|
|
|
|
|
|
static void du_f1ap_register(du_f1ap_instance_t *instance_p,
|
|
|
|
|
f1ap_net_ip_address_t *remote_address, // CU
|
|
|
|
|
f1ap_net_ip_address_t *local_address, // DU
|
|
|
|
|
uint16_t in_streams,
|
|
|
|
|
uint16_t out_streams)
|
|
|
|
|
{
|
|
|
|
|
void DU_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
|
|
|
|
|
|
|
|
|
|
DevAssert(f1ap_setup_req != NULL);
|
|
|
|
|
|
|
|
|
|
MessageDef *message_p = NULL;
|
|
|
|
|
sctp_new_association_req_t *sctp_new_association_req_p = NULL;
|
|
|
|
|
|
|
|
|
|
message_p = itti_alloc_new_message(TASK_DU_F1, SCTP_NEW_ASSOCIATION_REQ);
|
|
|
|
|
|
|
|
|
|
sctp_new_association_req_p = &message_p->ittiMsg.sctp_new_association_req;
|
|
|
|
|
sctp_new_association_req_p->ulp_cnx_id = instance_p->instance;
|
|
|
|
|
sctp_new_association_req_p->ulp_cnx_id = instance;
|
|
|
|
|
sctp_new_association_req_p->port = F1AP_PORT_NUMBER;
|
|
|
|
|
sctp_new_association_req_p->ppid = F1AP_SCTP_PPID;
|
|
|
|
|
|
|
|
|
|
sctp_new_association_req_p->in_streams = in_streams;
|
|
|
|
|
sctp_new_association_req_p->out_streams = out_streams;
|
|
|
|
|
sctp_new_association_req_p->in_streams = f1ap_setup_req->sctp_in_streams;
|
|
|
|
|
sctp_new_association_req_p->out_streams = f1ap_setup_req->sctp_out_streams;
|
|
|
|
|
|
|
|
|
|
// remote
|
|
|
|
|
memcpy(&sctp_new_association_req_p->remote_address,
|
|
|
|
|
remote_address,
|
|
|
|
|
sizeof(*remote_address));
|
|
|
|
|
&f1ap_setup_req->CU_f1_ip_address,
|
|
|
|
|
sizeof(f1ap_setup_req->CU_f1_ip_address));
|
|
|
|
|
|
|
|
|
|
// local
|
|
|
|
|
memcpy(&sctp_new_association_req_p->local_address,
|
|
|
|
|
local_address,
|
|
|
|
|
sizeof(*local_address));
|
|
|
|
|
&f1ap_setup_req->DU_f1_ip_address,
|
|
|
|
|
sizeof(f1ap_setup_req->DU_f1_ip_address));
|
|
|
|
|
|
|
|
|
|
itti_send_msg_to_task(TASK_SCTP, instance_p->instance, message_p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DU_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
|
|
|
|
|
du_f1ap_instance_t *new_instance;
|
|
|
|
|
//uint8_t index;
|
|
|
|
|
|
|
|
|
|
DevAssert(f1ap_setup_req != NULL);
|
|
|
|
|
|
|
|
|
|
/* Look if the provided instance already exists */
|
|
|
|
|
//new_instance = s1ap_eNB_get_instance(instance);
|
|
|
|
|
|
|
|
|
|
// @Todo
|
|
|
|
|
// if (new_instance != NULL) {
|
|
|
|
|
// /* Checks if it is a retry on the same eNB */
|
|
|
|
|
// DevCheck(new_instance->gNB_DU_id == f1ap_setup_req->gNB_DU_id, new_instance->gNB_DU_id, f1ap_setup_req->gNB_DU_id, 0);
|
|
|
|
|
// DevCheck(new_instance->cell_type == f1ap_setup_req->cell_type, new_instance->cell_type, f1ap_setup_req->cell_type, 0);
|
|
|
|
|
// DevCheck(new_instance->tac == f1ap_setup_req->tac, new_instance->tac, f1ap_setup_req->tac, 0);
|
|
|
|
|
// DevCheck(new_instance->mcc == f1ap_setup_req->mcc, new_instance->mcc, f1ap_setup_req->mcc, 0);
|
|
|
|
|
// DevCheck(new_instance->mnc == f1ap_setup_req->mnc, new_instance->mnc, f1ap_setup_req->mnc, 0);
|
|
|
|
|
// DevCheck(new_instance->mnc_digit_length == f1ap_setup_req->mnc_digit_length, new_instance->mnc_digit_length, f1ap_setup_req->mnc_digit_length, 0);
|
|
|
|
|
// DevCheck(new_instance->default_drx == f1ap_setup_req->default_drx, new_instance->default_drx, f1ap_setup_req->default_drx, 0);
|
|
|
|
|
// } else {
|
|
|
|
|
new_instance = calloc(1, sizeof(du_f1ap_instance_t));
|
|
|
|
|
DevAssert(new_instance != NULL);
|
|
|
|
|
|
|
|
|
|
/* Copy usefull parameters */
|
|
|
|
|
new_instance->instance = instance;
|
|
|
|
|
new_instance->gNB_DU_id = f1ap_setup_req->gNB_DU_id;
|
|
|
|
|
new_instance->gNB_DU_name = f1ap_setup_req->gNB_DU_name;
|
|
|
|
|
new_instance->tac = f1ap_setup_req->tac[0];
|
|
|
|
|
new_instance->mcc = f1ap_setup_req->mcc[0];
|
|
|
|
|
new_instance->mnc = f1ap_setup_req->mnc[0];
|
|
|
|
|
new_instance->mnc_digit_length = f1ap_setup_req->mnc_digit_length;
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
du_f1ap_register(new_instance,
|
|
|
|
|
&f1ap_setup_req->CU_f1_ip_address, // remote
|
|
|
|
|
&f1ap_setup_req->DU_f1_ip_address, // local
|
|
|
|
|
f1ap_setup_req->sctp_in_streams,
|
|
|
|
|
f1ap_setup_req->sctp_out_streams);
|
|
|
|
|
// store data
|
|
|
|
|
f1ap_du_data = (f1ap_setup_req_t *)calloc(1, sizeof(f1ap_setup_req_t));
|
|
|
|
|
*f1ap_du_data = *f1ap_setup_req;
|
|
|
|
|
|
|
|
|
|
//du_f1ap_register_to_sctp
|
|
|
|
|
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DU_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) {
|
|
|
|
|
DU_send_F1_SETUP_REQUEST(instance, sctp_new_association_resp);
|
|
|
|
|
|
|
|
|
|
DevAssert(sctp_new_association_resp != NULL);
|
|
|
|
|
|
|
|
|
|
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
|
|
|
|
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
|
|
|
|
sctp_new_association_resp->sctp_state,
|
|
|
|
|
instance,
|
|
|
|
|
sctp_new_association_resp->ulp_cnx_id);
|
|
|
|
|
|
|
|
|
|
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
|
|
|
|
|
return; // exit -1 for debugging
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// save the assoc id
|
|
|
|
|
f1ap_du_data->assoc_id = sctp_new_association_resp->assoc_id;
|
|
|
|
|
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
|
|
|
|
|
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DU_send_F1_SETUP_REQUEST(instance);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -254,8 +203,7 @@ void DU_handle_sctp_association_resp(instance_t instance, sctp_new_association_r
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SETUP REQUEST
|
|
|
|
|
//void DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
|
|
|
|
|
void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *f1ap_setup_req) {
|
|
|
|
|
void DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
|
|
|
|
module_id_t enb_mod_idP;
|
|
|
|
|
module_id_t du_mod_idP;
|
|
|
|
|
|
|
|
|
@@ -266,14 +214,7 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
uint8_t *buffer;
|
|
|
|
|
uint32_t len;
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
// for test
|
|
|
|
|
f1ap_info_t f1ap_info;
|
|
|
|
|
f1ap_info.GNB_DU_ID = 789;
|
|
|
|
|
f1ap_info.GNB_DU_Name = "ABC";
|
|
|
|
|
f1ap_info.mcc = 208;
|
|
|
|
|
f1ap_info.mnc = 93;
|
|
|
|
|
f1ap_info.mnc_digit_length = 3;
|
|
|
|
|
int j = 0;
|
|
|
|
|
|
|
|
|
|
/* Create */
|
|
|
|
|
/* 0. pdu Type */
|
|
|
|
@@ -300,18 +241,18 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_ID;
|
|
|
|
|
ie->criticality = F1AP_Criticality_reject;
|
|
|
|
|
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_ID;
|
|
|
|
|
asn_int642INTEGER(&ie->value.choice.GNB_DU_ID, f1ap_info.GNB_DU_ID);
|
|
|
|
|
asn_int642INTEGER(&ie->value.choice.GNB_DU_ID, f1ap_du_data->gNB_DU_id);
|
|
|
|
|
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* optional */
|
|
|
|
|
/* c3. GNB_DU_Name */
|
|
|
|
|
if (f1ap_info.GNB_DU_Name != NULL) {
|
|
|
|
|
if (f1ap_du_data->gNB_DU_name != NULL) {
|
|
|
|
|
ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
|
|
|
|
|
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_Name;
|
|
|
|
|
ie->criticality = F1AP_Criticality_ignore;
|
|
|
|
|
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Name;
|
|
|
|
|
OCTET_STRING_fromBuf(&ie->value.choice.GNB_DU_Name, f1ap_info.GNB_DU_Name,
|
|
|
|
|
strlen(f1ap_info.GNB_DU_Name));
|
|
|
|
|
OCTET_STRING_fromBuf(&ie->value.choice.GNB_DU_Name, f1ap_du_data->gNB_DU_name,
|
|
|
|
|
strlen(f1ap_du_data->gNB_DU_name));
|
|
|
|
|
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -322,8 +263,10 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
ie->criticality = F1AP_Criticality_reject;
|
|
|
|
|
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
|
|
|
|
|
|
|
|
|
|
int num_cells_available = f1ap_du_data->num_cells_available;
|
|
|
|
|
printf("num_cells_available = %d \n", num_cells_available);
|
|
|
|
|
for (i=0;
|
|
|
|
|
i<1;
|
|
|
|
|
i<num_cells_available;
|
|
|
|
|
i++) {
|
|
|
|
|
/* mandatory */
|
|
|
|
|
/* 4.1 serverd cells item */
|
|
|
|
@@ -344,30 +287,25 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
memset((void *)&served_cell_information, 0, sizeof(F1AP_Served_Cell_Information_t));
|
|
|
|
|
/* - nRCGI */
|
|
|
|
|
F1AP_NRCGI_t nRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length, &nRCGI.pLMN_Identity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//INT32_TO_BIT_STRING(123, &nRCGI.nRCellIdentity);
|
|
|
|
|
nRCGI.nRCellIdentity.buf = malloc((36+7)/8);
|
|
|
|
|
|
|
|
|
|
nRCGI.nRCellIdentity.size = (36+7)/8;
|
|
|
|
|
nRCGI.nRCellIdentity.bits_unused = 4;
|
|
|
|
|
|
|
|
|
|
nRCGI.nRCellIdentity.buf[0] = 123;
|
|
|
|
|
|
|
|
|
|
//nRCGI.nRCellIdentity = 15;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
|
|
|
|
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity);
|
|
|
|
|
served_cell_information.nRCGI = nRCGI;
|
|
|
|
|
|
|
|
|
|
/* - nRPCI */
|
|
|
|
|
served_cell_information.nRPCI = 321; // int 0..1007
|
|
|
|
|
served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007
|
|
|
|
|
|
|
|
|
|
/* - fiveGS_TAC */
|
|
|
|
|
OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC,
|
|
|
|
|
"10",
|
|
|
|
|
3);
|
|
|
|
|
f1ap_du_data->tac[i],
|
|
|
|
|
sizeof(f1ap_du_data->tac[i]));
|
|
|
|
|
|
|
|
|
|
// OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC,
|
|
|
|
|
// "10",
|
|
|
|
|
// 3);
|
|
|
|
|
|
|
|
|
|
/* - Configured_EPS_TAC */
|
|
|
|
|
if(1){
|
|
|
|
|
if(0){
|
|
|
|
|
served_cell_information.configured_EPS_TAC = (F1AP_Configured_EPS_TAC_t *)calloc(1, sizeof(F1AP_Configured_EPS_TAC_t));
|
|
|
|
|
OCTET_STRING_fromBuf(served_cell_information.configured_EPS_TAC,
|
|
|
|
|
"2",
|
|
|
|
@@ -375,30 +313,33 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* - broadcast PLMNs */
|
|
|
|
|
int maxnoofBPLMNS = 1;
|
|
|
|
|
for (i=0;
|
|
|
|
|
i<maxnoofBPLMNS;
|
|
|
|
|
i++) {
|
|
|
|
|
// RK: add the num_available_broadcast_PLMNs to the message
|
|
|
|
|
int num_available_broadcast_PLMNs = 1; //f1ap_du_data->num_available_broadcast_PLMNs;
|
|
|
|
|
printf("num_available_broadcast_PLMNs = %d \n", num_available_broadcast_PLMNs);
|
|
|
|
|
for (j=0;
|
|
|
|
|
j<num_available_broadcast_PLMNs; // num_available_broadcast_PLMNs
|
|
|
|
|
j++) {
|
|
|
|
|
/* > PLMN BroadcastPLMNs Item */
|
|
|
|
|
F1AP_BroadcastPLMNs_Item_t *broadcastPLMNs_Item = (F1AP_BroadcastPLMNs_Item_t *)calloc(1, sizeof(F1AP_BroadcastPLMNs_Item_t));
|
|
|
|
|
//memset((void *)&broadcastPLMNs_Item, 0, sizeof(F1AP_BroadcastPLMNs_Item_t));
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length, &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
//MCC_MNC_TO_PLMNID(208, 95, 2, &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, broadcastPLMNs_Item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// // /* - CHOICE NR-MODE-Info */
|
|
|
|
|
F1AP_NR_Mode_Info_t nR_Mode_Info;
|
|
|
|
|
|
|
|
|
|
if ("FDD") {
|
|
|
|
|
//f1ap_du_data->fdd_flag = 1;
|
|
|
|
|
if (f1ap_du_data->fdd_flag) { // 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));
|
|
|
|
|
/* >>> UL NRFreqInfo */
|
|
|
|
|
fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
|
|
|
|
|
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 = 888L;
|
|
|
|
|
ul_freqBandNrItem.freqBandIndicatorNr = 777L;
|
|
|
|
|
|
|
|
|
|
F1AP_SupportedSULFreqBandItem_t ul_supportedSULFreqBandItem;
|
|
|
|
|
memset((void *)&ul_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
|
|
|
|
@@ -408,25 +349,25 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
ASN_SEQUENCE_ADD(&fDD_Info->uL_NRFreqInfo.freqBandListNr.list, &ul_freqBandNrItem);
|
|
|
|
|
|
|
|
|
|
/* >>> DL NRFreqInfo */
|
|
|
|
|
fDD_Info->dL_NRFreqInfo.nRARFCN = 666L;
|
|
|
|
|
fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_arfcn;
|
|
|
|
|
|
|
|
|
|
F1AP_FreqBandNrItem_t dl_freqBandNrItem;
|
|
|
|
|
memset((void *)&dl_freqBandNrItem, 0, sizeof(F1AP_FreqBandNrItem_t));
|
|
|
|
|
dl_freqBandNrItem.freqBandIndicatorNr = 555L;
|
|
|
|
|
dl_freqBandNrItem.freqBandIndicatorNr = 777L;
|
|
|
|
|
|
|
|
|
|
F1AP_SupportedSULFreqBandItem_t dl_supportedSULFreqBandItem;
|
|
|
|
|
memset((void *)&dl_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
|
|
|
|
|
dl_supportedSULFreqBandItem.freqBandIndicatorNr = 444L;
|
|
|
|
|
dl_supportedSULFreqBandItem.freqBandIndicatorNr = 777L;
|
|
|
|
|
ASN_SEQUENCE_ADD(&dl_freqBandNrItem.supportedSULBandList.list, &dl_supportedSULFreqBandItem);
|
|
|
|
|
|
|
|
|
|
ASN_SEQUENCE_ADD(&fDD_Info->dL_NRFreqInfo.freqBandListNr.list, &dl_freqBandNrItem);
|
|
|
|
|
|
|
|
|
|
/* >>> UL Transmission Bandwidth */
|
|
|
|
|
fDD_Info->uL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
|
|
|
|
|
fDD_Info->uL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
|
|
|
|
|
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;
|
|
|
|
|
/* >>> DL Transmission Bandwidth */
|
|
|
|
|
fDD_Info->dL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
|
|
|
|
|
fDD_Info->dL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
nR_Mode_Info.choice.fDD = fDD_Info;
|
|
|
|
|
} else { // TDD
|
|
|
|
@@ -435,9 +376,10 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
/* > TDD >> TDD Info */
|
|
|
|
|
F1AP_TDD_Info_t *tDD_Info = (F1AP_TDD_Info_t *)calloc(1, sizeof(F1AP_TDD_Info_t));
|
|
|
|
|
/* >>> ARFCN */
|
|
|
|
|
tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
|
|
|
|
|
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;
|
|
|
|
@@ -447,8 +389,8 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
|
|
|
|
|
ASN_SEQUENCE_ADD(&tDD_Info->nRFreqInfo.freqBandListNr.list, &nr_freqBandNrItem);
|
|
|
|
|
|
|
|
|
|
tDD_Info->transmission_Bandwidth.nRSCS= F1AP_NRSCS_scs15;
|
|
|
|
|
tDD_Info->transmission_Bandwidth.nRNRB= F1AP_NRNRB_nrb11;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@@ -467,12 +409,20 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t));
|
|
|
|
|
|
|
|
|
|
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
|
|
|
|
|
"1",//f1ap_setup_req->mib,
|
|
|
|
|
sizeof("1"));
|
|
|
|
|
f1ap_du_data->mib[i],//f1ap_du_data->mib,
|
|
|
|
|
f1ap_du_data->mib_length[i]);
|
|
|
|
|
|
|
|
|
|
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
|
|
|
|
|
"1",
|
|
|
|
|
sizeof("1"));
|
|
|
|
|
f1ap_du_data->sib1[i],
|
|
|
|
|
f1ap_du_data->sib1_length[i]);
|
|
|
|
|
// OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
|
|
|
|
|
// "1",//f1ap_setup_req->mib,
|
|
|
|
|
// sizeof("1"));
|
|
|
|
|
|
|
|
|
|
// OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
|
|
|
|
|
// "1",
|
|
|
|
|
// sizeof("1"));
|
|
|
|
|
|
|
|
|
|
gnb_du_served_cells_item.gNB_DU_System_Information = gNB_DU_System_Information; //
|
|
|
|
|
|
|
|
|
|
/* ADD */
|
|
|
|
@@ -489,7 +439,7 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
|
|
|
|
printf("Failed to encode F1 setup request\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
|
|
|
|
|
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -510,27 +460,16 @@ void DU_handle_F1_SETUP_RESPONSE() {
|
|
|
|
|
// SETUP FAILURE
|
|
|
|
|
void DU_handle_F1_SETUP_FAILURE(struct F1AP_F1AP_PDU_t *pdu_p) {
|
|
|
|
|
AssertFatal(1==0,"Not implemented yet\n");
|
|
|
|
|
|
|
|
|
|
//F1AP_F1SetupFailureIEs_t *f1_setup_failure_p;
|
|
|
|
|
//f1_setup_failure_p = &pdu_p.choice.unsuccessfulOutcome.value.choice.F1SetupFailureIEs.protocolIEs;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DU_send_ERROR_INDICATION(struct F1AP_F1AP_PDU_t *pdu_p) {
|
|
|
|
|
AssertFatal(1==0,"Not implemented yet\n");
|
|
|
|
|
|
|
|
|
|
//F1AP_F1ErrorIndicationIEs_t *f1_error_indication_p;
|
|
|
|
|
//f1_error_indication_p = &pdu_p.choice.successfulOutcome.value.choice.F1ErrorIndicationIEs.protocolIEs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DU_handle_ERROR_INDICATION(F1AP_ErrorIndication_t *ErrorIndication) {
|
|
|
|
|
AssertFatal(1==0,"Not implemented yet\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DU_handle_RESET(F1AP_Reset_t *Reset) {
|
|
|
|
|
AssertFatal(1==0,"Not implemented yet\n");
|
|
|
|
|
}
|
|
|
|
@@ -547,8 +486,6 @@ void DU_handle_RESET_ACKKNOWLEDGE(F1AP_ResetAcknowledge_t *ResetAcknowledge) {
|
|
|
|
|
AssertFatal(1==0,"Not implemented yet\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(F1AP_ULRRCMessageTransfer_t *ULRRCMessageTransfer) {
|
|
|
|
|
//void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER() {
|
|
|
|
|
void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
|
|
|
|
|
module_id_t module_idP,
|
|
|
|
|
int CC_idP,
|
|
|
|
@@ -565,14 +502,6 @@ void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
|
|
|
|
|
uint8_t *buffer;
|
|
|
|
|
uint32_t len;
|
|
|
|
|
|
|
|
|
|
// for test
|
|
|
|
|
f1ap_info_t f1ap_info;
|
|
|
|
|
f1ap_info.GNB_DU_ID = 789;
|
|
|
|
|
f1ap_info.GNB_DU_Name = "ABC";
|
|
|
|
|
f1ap_info.mcc = 208;
|
|
|
|
|
f1ap_info.mnc = 93;
|
|
|
|
|
f1ap_info.mnc_digit_length = 3;
|
|
|
|
|
|
|
|
|
|
/* Create */
|
|
|
|
|
/* 0. Message Type */
|
|
|
|
|
memset(&pdu, 0, sizeof(pdu));
|
|
|
|
@@ -601,7 +530,7 @@ void DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
|
|
|
|
|
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
|
|
|
|
|
|
|
|
|
|
F1AP_NRCGI_t nRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length,
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[0], f1ap_du_data->mnc[0], f1ap_du_data->mnc_digit_length[0],
|
|
|
|
|
&nRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
|
|
|
|
ie->value.choice.NRCGI = nRCGI;
|
|
|
|
@@ -732,7 +661,7 @@ void DU_handle_DL_RRC_MESSAGE_TRANSFER(F1AP_DLRRCMessageTransfer_t *DLRRCMessage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//void DU_send_gNB_DU_CONFIGURATION_UPDATE(F1AP_GNBDUConfigurationUpdate_t *GNBDUConfigurationUpdate) {
|
|
|
|
|
void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du_mod_idP) {
|
|
|
|
|
void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du_mod_idP, f1ap_setup_req_t *f1ap_du_data) {
|
|
|
|
|
F1AP_F1AP_PDU_t pdu;
|
|
|
|
|
F1AP_GNBDUConfigurationUpdate_t *out;
|
|
|
|
|
F1AP_GNBDUConfigurationUpdateIEs_t *ie;
|
|
|
|
@@ -740,14 +669,8 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
uint8_t *buffer;
|
|
|
|
|
uint32_t len;
|
|
|
|
|
int i = 0;
|
|
|
|
|
int j = 0;
|
|
|
|
|
|
|
|
|
|
// for test
|
|
|
|
|
f1ap_info_t f1ap_info;
|
|
|
|
|
f1ap_info.GNB_DU_ID = 789;
|
|
|
|
|
f1ap_info.GNB_DU_Name = "ABC";
|
|
|
|
|
f1ap_info.mcc = 208;
|
|
|
|
|
f1ap_info.mnc = 93;
|
|
|
|
|
f1ap_info.mnc_digit_length = 3;
|
|
|
|
|
/* Create */
|
|
|
|
|
/* 0. Message Type */
|
|
|
|
|
memset(&pdu, 0, sizeof(pdu));
|
|
|
|
@@ -775,9 +698,9 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
ie->criticality = F1AP_Criticality_reject;
|
|
|
|
|
ie->value.present = F1AP_GNBDUConfigurationUpdateIEs__value_PR_Served_Cells_To_Add_List;
|
|
|
|
|
|
|
|
|
|
for (i=0;
|
|
|
|
|
i<1;
|
|
|
|
|
i++) {
|
|
|
|
|
for (j=0;
|
|
|
|
|
j<1;
|
|
|
|
|
j++) {
|
|
|
|
|
//
|
|
|
|
|
F1AP_Served_Cells_To_Add_ItemIEs_t *served_cells_to_add_item_ies;
|
|
|
|
|
served_cells_to_add_item_ies = (F1AP_Served_Cells_To_Add_ItemIEs_t *)calloc(1, sizeof(F1AP_Served_Cells_To_Add_ItemIEs_t));
|
|
|
|
@@ -794,22 +717,12 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
memset((void *)&served_cell_information, 0, sizeof(F1AP_Served_Cell_Information_t));
|
|
|
|
|
/* - nRCGI */
|
|
|
|
|
F1AP_NRCGI_t nRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length, &nRCGI.pLMN_Identity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//INT32_TO_BIT_STRING(123, &nRCGI.nRCellIdentity);
|
|
|
|
|
nRCGI.nRCellIdentity.buf = malloc((36+7)/8);
|
|
|
|
|
|
|
|
|
|
nRCGI.nRCellIdentity.size = (36+7)/8;
|
|
|
|
|
nRCGI.nRCellIdentity.bits_unused = 4;
|
|
|
|
|
|
|
|
|
|
nRCGI.nRCellIdentity.buf[0] = 123;
|
|
|
|
|
|
|
|
|
|
//nRCGI.nRCellIdentity = 15;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
|
|
|
|
served_cell_information.nRCGI = nRCGI;
|
|
|
|
|
|
|
|
|
|
/* - nRPCI */
|
|
|
|
|
served_cell_information.nRPCI = 321; // int 0..1007
|
|
|
|
|
served_cell_information.nRPCI = 321L; // int 0..1007
|
|
|
|
|
|
|
|
|
|
/* - fiveGS_TAC */
|
|
|
|
|
OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC,
|
|
|
|
@@ -832,7 +745,7 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
/* > PLMN BroadcastPLMNs Item */
|
|
|
|
|
F1AP_BroadcastPLMNs_Item_t *broadcastPLMNs_Item = (F1AP_BroadcastPLMNs_Item_t *)calloc(1, sizeof(F1AP_BroadcastPLMNs_Item_t));
|
|
|
|
|
//memset((void *)&broadcastPLMNs_Item, 0, sizeof(F1AP_BroadcastPLMNs_Item_t));
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length, &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, broadcastPLMNs_Item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -957,7 +870,7 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
|
|
|
|
|
/* 3.1 oldNRCGI */
|
|
|
|
|
F1AP_NRCGI_t oldNRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length,
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
|
|
|
|
&oldNRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &oldNRCGI.nRCellIdentity);
|
|
|
|
|
served_cells_to_modify_item.oldNRCGI = oldNRCGI;
|
|
|
|
@@ -969,14 +882,13 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
|
|
|
|
|
/* - nRCGI */
|
|
|
|
|
F1AP_NRCGI_t nRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length,
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
|
|
|
|
&nRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
|
|
|
|
|
|
|
|
|
served_cell_information.nRCGI = nRCGI;
|
|
|
|
|
|
|
|
|
|
/* - nRPCI */
|
|
|
|
|
served_cell_information.nRPCI = 321; // int 0..1007
|
|
|
|
|
served_cell_information.nRPCI = 321L; // int 0..1007
|
|
|
|
|
|
|
|
|
|
/* - fiveGS_TAC */
|
|
|
|
|
OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC,
|
|
|
|
@@ -999,7 +911,7 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
/* > PLMN BroadcastPLMNs Item */
|
|
|
|
|
F1AP_BroadcastPLMNs_Item_t *broadcastPLMNs_Item = (F1AP_BroadcastPLMNs_Item_t *)calloc(1, sizeof(F1AP_BroadcastPLMNs_Item_t));
|
|
|
|
|
//memset((void *)&broadcastPLMNs_Item, 0, sizeof(F1AP_BroadcastPLMNs_Item_t));
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length, &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &broadcastPLMNs_Item->pLMN_Identity);
|
|
|
|
|
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, broadcastPLMNs_Item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1124,7 +1036,7 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
|
|
|
|
|
/* 3.1 oldNRCGI */
|
|
|
|
|
F1AP_NRCGI_t oldNRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length,
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
|
|
|
|
&oldNRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &oldNRCGI.nRCellIdentity);
|
|
|
|
|
served_cells_to_delete_item.oldNRCGI = oldNRCGI;
|
|
|
|
@@ -1160,7 +1072,7 @@ void DU_send_gNB_DU_CONFIGURATION_UPDATE(module_id_t enb_mod_idP, module_id_t du
|
|
|
|
|
|
|
|
|
|
/* 3.1 oldNRCGI */
|
|
|
|
|
F1AP_NRCGI_t nRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length,
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
|
|
|
|
&nRCGI.pLMN_Identity);
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
|
|
|
|
active_cells_item.nRCGI = nRCGI;
|
|
|
|
@@ -1224,12 +1136,6 @@ void DU_send_UE_CONTEXT_SETUP_RESPONSE(void) {
|
|
|
|
|
uint32_t len;
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
f1ap_info_t f1ap_info;
|
|
|
|
|
f1ap_info.GNB_DU_Name = "ABC";
|
|
|
|
|
f1ap_info.mcc = 208;
|
|
|
|
|
f1ap_info.mnc = 93;
|
|
|
|
|
f1ap_info.mnc_digit_length = 8;
|
|
|
|
|
|
|
|
|
|
/* Create */
|
|
|
|
|
/* 0. Message Type */
|
|
|
|
|
memset(&pdu, 0, sizeof(pdu));
|
|
|
|
@@ -1435,7 +1341,7 @@ void DU_send_UE_CONTEXT_SETUP_RESPONSE(void) {
|
|
|
|
|
|
|
|
|
|
/* - nRCGI */
|
|
|
|
|
F1AP_NRCGI_t nRCGI; // issue here
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length, &nRCGI.pLMN_Identity);
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
|
|
|
|
//
|
|
|
|
|
// INT32_TO_BIT_STRING(123, &nRCGI.nRCellIdentity);
|
|
|
|
|
// nRCGI.nRCellIdentity.buf = malloc((36+7)/8);
|
|
|
|
@@ -1529,12 +1435,6 @@ void DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(void) {
|
|
|
|
|
uint32_t len;
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
f1ap_info_t f1ap_info;
|
|
|
|
|
f1ap_info.GNB_DU_Name = "ABC";
|
|
|
|
|
f1ap_info.mcc = 208;
|
|
|
|
|
f1ap_info.mnc = 93;
|
|
|
|
|
f1ap_info.mnc_digit_length = 8;
|
|
|
|
|
|
|
|
|
|
/* Create */
|
|
|
|
|
/* 0. Message Type */
|
|
|
|
|
memset(&pdu, 0, sizeof(pdu));
|
|
|
|
@@ -1797,7 +1697,7 @@ void DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(void) {
|
|
|
|
|
|
|
|
|
|
/* - sCell_ID */
|
|
|
|
|
F1AP_NRCGI_t nRCGI;
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_info.mcc, f1ap_info.mnc, f1ap_info.mnc_digit_length,
|
|
|
|
|
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
|
|
|
|
&nRCGI.pLMN_Identity);
|
|
|
|
|
|
|
|
|
|
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
|
|
|
|