added DUtoCURRCContainer IE in UL INITIAL RRC MESSAGE TRANSFER

added generation of initial Master Cell Group Configuration for both CU/DU and monolithic gNB.

Tested until transmission of RRCSetupComplete from UE
This commit is contained in:
Raymond Knopp
2021-03-23 21:52:57 +01:00
parent 9dd6e3bb82
commit f6d53094c4
12 changed files with 306 additions and 127 deletions
+13 -1
View File
@@ -114,7 +114,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* RRC Container */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, true);
AssertFatal(ie!=NULL,"RRCContainer is missing\n");
// create an ITTI message and copy SDU
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
message_p = itti_alloc_new_message (TASK_CU_F1, 0, NR_RRC_MAC_CCCH_DATA_IND);
@@ -136,6 +136,18 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
printf("\n");
/* DUtoCURRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true);
if (ie) {
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t));
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->size = ie->value.choice.DUtoCURRCContainer.size;
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf = malloc(ie->value.choice.DUtoCURRCContainer.size);
memcpy(NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf,
ie->value.choice.DUtoCURRCContainer.buf,
ie->value.choice.DUtoCURRCContainer.size);
}
// Find instance from nr_cellid
int rrc_inst = -1;
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
+9 -5
View File
@@ -798,7 +798,9 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int UE_id,
rnti_t rntiP,
const uint8_t *sduP,
sdu_size_t sdu_lenP) {
sdu_size_t sdu_lenP,
const uint8_t *sdu2P,
sdu_size_t sdu2_lenP) {
F1AP_F1AP_PDU_t pdu;
F1AP_InitialULRRCMessageTransfer_t *out;
F1AP_InitialULRRCMessageTransferIEs_t *ie;
@@ -868,15 +870,17 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
/* optional */
/* c5. DUtoCURRCContainer */
if (0) {
if (sdu2P) {
ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, "dummy_val",
strlen("dummy_val"));
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer,
sdu2P,
sdu2_lenP);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
}
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
+3 -1
View File
@@ -49,6 +49,8 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int UE_id,
rnti_t rntiP,
const uint8_t *sduP,
sdu_size_t sdu_lenP);
sdu_size_t sdu_lenP,
const uint8_t *sdu2P,
sdu_size_t sdu2_lenP);
#endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */
+4 -1
View File
@@ -189,7 +189,10 @@ void *F1AP_DU_task(void *arg) {
f1ap_initial_ul_rrc_message_t *msg = &F1AP_INITIAL_UL_RRC_MESSAGE(received_msg);
DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(0,0,0,msg->crnti,
msg->rrc_container,
msg->rrc_container_length);
msg->rrc_container_length,
msg->du2cu_rrc_container,
msg->du2cu_rrc_container_length
);
break;
case F1AP_UL_RRC_MESSAGE: // to rrc