Commit a299cad9 authored by cucengineer's avatar cucengineer

rrc_nrue_task.c

parent fe4f120d
...@@ -799,6 +799,18 @@ int main( int argc, char **argv ) { ...@@ -799,6 +799,18 @@ int main( int argc, char **argv ) {
printf("cannot create ITTI tasks\n"); printf("cannot create ITTI tasks\n");
exit(-1); // need a softer mode exit(-1); // need a softer mode
} }
MessageDef *msg_p;
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CELL_SELECTION_CNF);
NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
NAS_CELL_SELECTION_CNF (msg_p).cellID = 0;
NAS_CELL_SELECTION_CNF (msg_p).tac = 0;
NAS_CELL_SELECTION_CNF (msg_p).rat = 0xFF;
NAS_CELL_SELECTION_CNF (msg_p).rsrq = 0;
NAS_CELL_SELECTION_CNF (msg_p).rsrp = 0;
itti_send_msg_to_task(TASK_NAS_UE, 0, msg_p);
while(true) while(true)
sleep(3600); sleep(3600);
......
...@@ -126,3 +126,9 @@ uint8_t do_NR_RRCReconfigurationComplete( ...@@ -126,3 +126,9 @@ uint8_t do_NR_RRCReconfigurationComplete(
uint8_t *buffer, uint8_t *buffer,
const uint8_t Transaction_id const uint8_t Transaction_id
); );
uint8_t do_NR_ULInformationTransfer(
uint8_t **buffer,
uint32_t pdu_length,
uint8_t *pdu_buffer
);
...@@ -1534,7 +1534,23 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message( ...@@ -1534,7 +1534,23 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment: case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment:
case NR_DL_DCCH_MessageType__c1_PR_securityModeCommand: case NR_DL_DCCH_MessageType__c1_PR_securityModeCommand:
case NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer: case NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer: {
if(nr_dl_dcch_msg->message.choice.c1->choice.dlInformationTransfer->criticalExtensions.present == NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer) {
uint32_t pdu_length;
uint8_t *pdu_buffer;
MessageDef *msg_p;
pdu_length = nr_dl_dcch_msg->message.choice.c1->choice.dlInformationTransfer->criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message->size;
pdu_buffer = nr_dl_dcch_msg->message.choice.c1->choice.dlInformationTransfer->criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message->buf;
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_DOWNLINK_DATA_IND);
// NAS_DOWNLINK_DATA_IND(msg_p).UEid = ctxt_pP->module_id; // TODO set the UEid to something else ?
NAS_DOWNLINK_DATA_IND(msg_p).UEid = 0;
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = pdu_length;
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = pdu_buffer;
// itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
itti_send_msg_to_task(TASK_NAS_UE, 0, msg_p);
}
break;
}
case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry: case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
case NR_DL_DCCH_MessageType__c1_PR_counterCheck: case NR_DL_DCCH_MessageType__c1_PR_counterCheck:
case NR_DL_DCCH_MessageType__c1_PR_mobilityFromNRCommand: case NR_DL_DCCH_MessageType__c1_PR_mobilityFromNRCommand:
...@@ -2560,6 +2576,21 @@ void *rrc_nrue_task( void *args_p ) { ...@@ -2560,6 +2576,21 @@ void *rrc_nrue_task( void *args_p ) {
NR_RRC_DCCH_DATA_IND (msg_p).gNB_index); NR_RRC_DCCH_DATA_IND (msg_p).gNB_index);
break; break;
case NAS_CONN_ESTABLI_REQ:
LOG_D(RRC, "[UE %d] Received %s: cause %d, type %d, s_tmsi (mme code %"PRIu8", m-tmsi %"PRIu32"), plmnID (%d%d%d.%d%d%d)\n", ue_mod_id, ITTI_MSG_NAME (msg_p), NAS_CONN_ESTABLI_REQ (msg_p).cause,
NAS_CONN_ESTABLI_REQ (msg_p).type,
NAS_CONN_ESTABLI_REQ (msg_p).s_tmsi.MMEcode,
NAS_CONN_ESTABLI_REQ (msg_p).s_tmsi.m_tmsi,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MCCdigit1,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MCCdigit2,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MCCdigit3,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit1,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit2,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit3);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, 0, 0, 0);
UE_rrc_inst[ue_mod_id].initialNasMsg = NAS_CONN_ESTABLI_REQ (msg_p).initialNasMsg;
break;
case NAS_UPLINK_DATA_REQ: { case NAS_UPLINK_DATA_REQ: {
uint32_t length; uint32_t length;
uint8_t *buffer; uint8_t *buffer;
......
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