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(
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 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"};
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)
break;
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;
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;
default:
......
......@@ -81,19 +81,22 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti)
LOG_FUNC_IN;
int rc = RETURNerror;
int pid = cid - 1;
if (pti != NULL) {
esm_data_t *esm_data = user-> esm_data;
esm_pt_data_t *esm_pt_data = user-> esm_pt_data;
LOG_TRACE(INFO, "ESM-PROC - Assign new procedure transaction identity ");
/* Assign new procedure transaction identity */
*pti = esm_pt_assign(esm_pt_data);
if (*pti == ESM_PT_UNASSIGNED) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to assign new procedure transaction identity");
LOG_FUNC_RETURN (RETURNerror);
esm_data_t *esm_data = user-> esm_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 ");
/* Assign new procedure transaction identity */
*pti = esm_pt_assign(esm_pt_data);
if (*pti == ESM_PT_UNASSIGNED) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to assign new procedure transaction identity");
LOG_FUNC_RETURN (RETURNerror);
}
//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);
if (rc != RETURNok) {
......
......@@ -95,6 +95,8 @@ static const char *_esm_sap_primitive_str[] = {
"ESM_BEARER_RESOURCE_MODIFY_REQ",
"ESM_BEARER_RESOURCE_MODIFY_REJ",
"ESM_UNITDATA_IND",
"ESM_REMOTE_UE_REPORT_REQ",
"ESM_REMOTE_UE_REPORT",
};
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,
** **
** 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. **
** **
** 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,
break;
case REMOTE_UE_REPORT:
esm_msg.header.message_type = REMOTE_UE_REPORT;
rc = esm_send_remote_ue_report(ebi, &esm_msg.remote_ue_report);
//#error "TODO"//
break;
......
......@@ -66,7 +66,7 @@ Description Defines internal private data handled by EPS Session
*/
typedef struct {
int ebi; /* EPS bearer identity of the default EPS bearer associated
* to the PDN connection to be activated */
* to the PDN connection to be activated */
} default_eps_bearer_context_data_t;
/*
......
......@@ -1400,7 +1400,11 @@ static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all)
** 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;
......
......@@ -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_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_test(nas_user_t *user, int cid);
/*
* --------------------------------------------------------------------------
* NAS procedures triggered by the network
......
......@@ -204,13 +204,19 @@ void *nas_ue_task(void *args_p)
break;
//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
int nas_itti_ul_data_req(const uint32_t ue_id, void *const data, const uint32_t length, int user_id);
case NAS_REMOTE_UE_REPORT: {
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 */
}
break;
case NAS_CONN_ESTABLI_CNF:
......@@ -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);
/* 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);
}
......
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