Commit 988d98a4 authored by Bing-Kai Hong's avatar Bing-Kai Hong

send UL RRC MESSAGE TRANSFER

parent b1313aaf
......@@ -213,7 +213,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie->value.choice.GNB_DU_UE_F1AP_ID = du_ue_f1ap_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_dl_rrc->gNB_DU_ue_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* optional */
......
......@@ -152,7 +152,13 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
//void DU_send_UL_RRC_MESSAGE_TRANSFER(F1AP_ULRRCMessageTransfer_t *ULRRCMessageTransfer) {
int DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
uint8_t *sduP,
sdu_size_t sdu_lenP) {
printf("DU_send_UL_RRC_MESSAGE_TRANSFER \n");
F1AP_F1AP_PDU_t pdu;
F1AP_ULRRCMessageTransfer_t *out;
F1AP_ULRRCMessageTransferIEs_t *ie;
......@@ -185,7 +191,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie->value.choice.GNB_DU_UE_F1AP_ID = 651L;
ie->value.choice.GNB_DU_UE_F1AP_ID = F1AP_get_UE_identifier(module_idP, CC_idP, 0);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
......@@ -204,8 +210,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, "asdsa1d32sa1d31asd31as",
strlen("asdsa1d32sa1d31asd31as"));
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, sduP, sdu_lenP);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* encode */
......@@ -227,14 +232,13 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(void) {
}
/* UL RRC Message Transfer */
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
uint8_t *sduP,
sdu_size_t sdu_lenP
) {
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
uint8_t *sduP,
sdu_size_t sdu_lenP) {
F1AP_F1AP_PDU_t pdu;
F1AP_InitialULRRCMessageTransfer_t *out;
F1AP_InitialULRRCMessageTransferIEs_t *ie;
......
......@@ -39,14 +39,16 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_UL_RRC_MESSAGE_TRANSFER(void);
int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
uint8_t *sduP,
sdu_size_t sdu_lenP);
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
uint8_t *sduP,
sdu_size_t sdu_lenP);
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
uint8_t *sduP,
sdu_size_t sdu_lenP);
#endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */
......@@ -37,6 +37,8 @@
#include "assertions.h"
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
extern boolean_t pdcp_data_ind(
const protocol_ctxt_t* const ctxt_pP,
......@@ -689,13 +691,40 @@ void rlc_data_ind (
else
#endif /*UETARGET*/
{
pdcp_data_ind (
ctxt_pP,
srb_flagP,
MBMS_flagP,
rb_idP,
sdu_sizeP,
sdu_pP);
switch (RC.rrc[ctxt_pP->module_id]->node_type){
case ngran_eNB_CU :
case ngran_ng_eNB_CU :
case ngran_gNB_CU :
pdcp_data_ind (
ctxt_pP,
1, // srb_flagP,
0, // MBMS_flagP,
rb_idP,
sdu_sizeP,
sdu_pP);
break;
case ngran_eNB_DU :
case ngran_gNB_DU :
DU_send_UL_RRC_MESSAGE_TRANSFER(
ctxt_pP->module_id,
rb_idP,
sdu_pP,
sdu_sizeP
);
break;
default:
pdcp_data_ind (
ctxt_pP,
srb_flagP,
MBMS_flagP,
rb_idP,
sdu_sizeP,
sdu_pP);
break;
}
}
}
//-----------------------------------------------------------------------------
......
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