Commit 90dc22ae authored by heshanyun's avatar heshanyun

add rrc_nrue_task

parent aa8e695d
...@@ -331,6 +331,7 @@ void * rrc_enb_process_msg(void*); ...@@ -331,6 +331,7 @@ void * rrc_enb_process_msg(void*);
TASK_DEF(TASK_RLC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RLC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_PDCP_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\ TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\
......
...@@ -1290,5 +1290,41 @@ static void rrc_ue_generate_RRCSetupComplete( ...@@ -1290,5 +1290,41 @@ static void rrc_ue_generate_RRCSetupComplete(
size, size,
buffer, buffer,
PDCP_TRANSMISSION_MODE_CONTROL); PDCP_TRANSMISSION_MODE_CONTROL);
}
//-----------------------------------------------------------------------------
void *rrc_nrue_task( void *args_p ) {
MessageDef *msg_p;
instance_t instance;
unsigned int ue_mod_id;
int result;
itti_mark_task_ready (TASK_RRC_NRUE);
while(1) {
// Wait for a message
itti_receive_msg (TASK_RRC_NRUE, &msg_p);
instance = ITTI_MSG_INSTANCE (msg_p);
ue_mod_id = UE_INSTANCE_TO_MODULE_ID(instance);
switch (ITTI_MSG_ID(msg_p)) {
case TERMINATE_MESSAGE:
LOG_W(RRC, " *** Exiting RRC thread\n");
itti_exit_task ();
break;
case MESSAGE_TEST:
LOG_D(RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
break;
default:
LOG_E(RRC, "[UE %d] Received unexpected message %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
break;
} }
result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
msg_p = NULL;
}
}
...@@ -114,6 +114,10 @@ int8_t mac_rrc_nr_data_req_ue(const module_id_t Mod_idP, ...@@ -114,6 +114,10 @@ int8_t mac_rrc_nr_data_req_ue(const module_id_t Mod_idP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
uint8_t *const buffer_pP); uint8_t *const buffer_pP);
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
void *rrc_nrue_task(void *args_p);
/** @}*/ /** @}*/
#endif #endif
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