Commit dadff785 authored by Raymond Knopp's avatar Raymond Knopp

Messages based on 3GPP Release 14 for RAN

parent 652ee248
...@@ -2456,7 +2456,8 @@ rrc_ue_decode_dcch( ...@@ -2456,7 +2456,8 @@ rrc_ue_decode_dcch(
const char siWindowLength[8][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","ERR"}; const char siWindowLength[8][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","ERR"};
const char siWindowLength_int[7] = {1,2,5,10,15,20,40}; const char siWindowLength_int[7] = {1,2,5,10,15,20,40};
const char SIBType[13][6] = {"SIB3","SIB4","SIB5","SIB6","SIB7","SIB8","SIB9","SIB10","SIB11","SIB12","SIB13","SIB19","Spare"}; //Sidelink SI temporarily out
const char SIBType[12][6] = {"SIB3","SIB4","SIB5","SIB6","SIB7","SIB8","SIB9","SIB10","SIB11","SIB12","SIB13","Spare"}; //,"SIB19"
const char SIBPeriod[8][6]= {"rf8","rf16","rf32","rf64","rf128","rf256","rf512","ERR"}; const char SIBPeriod[8][6]= {"rf8","rf16","rf32","rf64","rf128","rf256","rf512","ERR"};
int siPeriod_int[7] = {80,160,320,640,1280,2560,5120}; int siPeriod_int[7] = {80,160,320,640,1280,2560,5120};
......
...@@ -369,11 +369,11 @@ int esm_msg_encode(ESM_msg *msg, uint8_t *buffer, uint32_t len) ...@@ -369,11 +369,11 @@ int esm_msg_encode(ESM_msg *msg, uint8_t *buffer, uint32_t len)
break; break;
case REMOTE_UE_REPORT: case REMOTE_UE_REPORT:
encode_result = encode_esm_status(&msg->remote_ue_report, buffer, len); encode_result = encode_remote_ue_report(&msg->remote_ue_report, buffer, len);
break; break;
case REMOTE_UE_REPORT_RESPONSE: case REMOTE_UE_REPORT_RESPONSE:
encode_result = encode_esm_status(&msg->remote_ue_report_response, buffer, len); encode_result = encode_remote_ue_report_response(&msg->remote_ue_report_response, buffer, len);
break; break;
default: default:
......
...@@ -81,9 +81,11 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti) ...@@ -81,9 +81,11 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti)
LOG_FUNC_IN; LOG_FUNC_IN;
int rc = RETURNerror; int rc = RETURNerror;
int pid = cid - 1; int pid = cid - 1;
if (pti != NULL) {
esm_data_t *esm_data = user-> esm_data; esm_data_t *esm_data = user-> esm_data;
esm_pt_data_t *esm_pt_data = user-> esm_pt_data; esm_pt_data_t *esm_pt_data = user-> esm_pt_data;
if (pti != NULL)
{
LOG_TRACE(INFO, "ESM-PROC - Assign new procedure transaction identity "); LOG_TRACE(INFO, "ESM-PROC - Assign new procedure transaction identity ");
/* Assign new procedure transaction identity */ /* Assign new procedure transaction identity */
*pti = esm_pt_assign(esm_pt_data); *pti = esm_pt_assign(esm_pt_data);
...@@ -93,6 +95,7 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti) ...@@ -93,6 +95,7 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti)
LOG_FUNC_RETURN (RETURNerror); LOG_FUNC_RETURN (RETURNerror);
} }
//static int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti); //static int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti);
/* Update the PDN connection data */ /* Update the PDN connection data */
rc = _pdn_connectivity_set_pti(esm_data, pid, *pti); rc = _pdn_connectivity_set_pti(esm_data, pid, *pti);
......
...@@ -95,6 +95,8 @@ static const char *_esm_sap_primitive_str[] = { ...@@ -95,6 +95,8 @@ static const char *_esm_sap_primitive_str[] = {
"ESM_BEARER_RESOURCE_MODIFY_REQ", "ESM_BEARER_RESOURCE_MODIFY_REQ",
"ESM_BEARER_RESOURCE_MODIFY_REJ", "ESM_BEARER_RESOURCE_MODIFY_REJ",
"ESM_UNITDATA_IND", "ESM_UNITDATA_IND",
"ESM_REMOTE_UE_REPORT_REQ",
"ESM_REMOTE_UE_REPORT",
}; };
return _esm_sap_primitive_str[esmsapp]; return _esm_sap_primitive_str[esmsapp];
} }
...@@ -683,7 +685,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone, ...@@ -683,7 +685,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
** ** ** **
** Name: _esm_sap_send() ** ** Name: _esm_sap_send() **
** ** ** **
** Description: Processes ESM messages to send onto the network: Encoded ** ** Description: Processes ESM messages to send onto the network: Encode **
** the message and execute the relevant ESM procedure. ** ** the message and execute the relevant ESM procedure. **
** ** ** **
** Inputs: msg_type: Type of the ESM message to be sent ** ** Inputs: msg_type: Type of the ESM message to be sent **
...@@ -772,6 +774,7 @@ static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone, ...@@ -772,6 +774,7 @@ static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone,
break; break;
case REMOTE_UE_REPORT: case REMOTE_UE_REPORT:
esm_msg.header.message_type = REMOTE_UE_REPORT;
rc = esm_send_remote_ue_report(ebi, &esm_msg.remote_ue_report); rc = esm_send_remote_ue_report(ebi, &esm_msg.remote_ue_report);
//#error "TODO"// //#error "TODO"//
break; break;
......
...@@ -1400,7 +1400,11 @@ static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all) ...@@ -1400,7 +1400,11 @@ static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all)
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
static int _nas_proc_remote_ue_report(nas_user_t *user, int cid) int nas_proc_remote_ue_report_test(nas_user_t *user, int cid)
{
_nas_proc_remote_ue_report(user, cid);
}
int _nas_proc_remote_ue_report(nas_user_t *user, int cid)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
......
...@@ -106,7 +106,7 @@ int nas_proc_get_pdn_addr(nas_user_t *user, int cid, int *cids, const char **add ...@@ -106,7 +106,7 @@ int nas_proc_get_pdn_addr(nas_user_t *user, int cid, int *cids, const char **add
int nas_proc_deactivate_pdn(nas_user_t *user, int cid); int nas_proc_deactivate_pdn(nas_user_t *user, int cid);
int nas_proc_activate_pdn(nas_user_t *user, int cid); int nas_proc_activate_pdn(nas_user_t *user, int cid);
int nas_proc_remote_ue_report(nas_user_t *user, int cid); int nas_proc_remote_ue_report(nas_user_t *user, int cid);
int nas_proc_remote_ue_report_test(nas_user_t *user, int cid);
/* /*
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* NAS procedures triggered by the network * NAS procedures triggered by the network
......
...@@ -204,13 +204,19 @@ void *nas_ue_task(void *args_p) ...@@ -204,13 +204,19 @@ void *nas_ue_task(void *args_p)
break; break;
//for Remote UE Report //for Remote UE Report
case NAS_REMOTE_UE_REPORT:
LOG_I(NAS, "[UE %d] Received %s: \n", Mod_id, ITTI_MSG_NAME (msg_p));
// To send remote ue report to be sent by RRC UE to CN case NAS_REMOTE_UE_REPORT: {
int nas_itti_ul_data_req(const uint32_t ue_id, void *const data, const uint32_t length, int user_id); int cid = 0; // unused now
int UEid = 0;
int ret = nas_proc_remote_ue_report_test(user, cid); // generate NAS PDU (remote ue report)
// To send remote ue report to be sent by RRC UE to CN
//int nas_itti_ul_data_req(const uint32_t ue_id, void *const data, const uint32_t length, int user_id);
uint8_t testdata [] = {0,1,2,3};
nas_itti_ul_data_req(UEid, testdata, sizeof(testdata));
LOG_I(NAS, "[UE %d] Received NAS REMOTE UE REPORT %s: \n", Mod_id, ITTI_MSG_NAME (msg_p));
/* TODO not processed by NAS currently */ /* TODO not processed by NAS currently */
}
break; break;
case NAS_CONN_ESTABLI_CNF: case NAS_CONN_ESTABLI_CNF:
...@@ -222,7 +228,7 @@ void *nas_ue_task(void *args_p) ...@@ -222,7 +228,7 @@ void *nas_ue_task(void *args_p)
nas_proc_establish_cnf(user, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.data, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length); nas_proc_establish_cnf(user, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.data, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length);
/* TODO checks if NAS will free the nas message, better to do it there anyway! */ /* TODO checks if NAS will free the nas message, better to do it there anyway! */
// result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.data); // result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), LI_CNF(mNAS_CONN_ESTABsg_p).nasMsg.data);
// AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); // AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
} }
......
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