Commit 456329b5 authored by Xue Song's avatar Xue Song

modify RRCRelease

parent 4843f907
......@@ -922,8 +922,8 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
}
uint8_t do_NR_RRCConnectionRelease(uint8_t *buffer,
uint8_t Transaction_id) {
uint8_t do_NR_RRCRelease(uint8_t *buffer,
uint8_t Transaction_id) {
asn_enc_rval_t enc_rval;
NR_DL_DCCH_Message_t dl_dcch_msg;
NR_RRCRelease_t *rrcConnectionRelease;
......@@ -931,17 +931,31 @@ uint8_t do_NR_RRCConnectionRelease(uint8_t *buffer,
dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1;
dl_dcch_msg.message.choice.c1=CALLOC(1,sizeof(struct NR_DL_DCCH_MessageType__c1));
dl_dcch_msg.message.choice.c1->present = NR_DL_DCCH_MessageType__c1_PR_rrcRelease;
dl_dcch_msg.message.choice.c1->choice.rrcRelease = CALLOC(1, sizeof(struct NR_RRCRelease));
dl_dcch_msg.message.choice.c1->choice.rrcRelease = CALLOC(1, sizeof(NR_RRCRelease_t));
rrcConnectionRelease = dl_dcch_msg.message.choice.c1->choice.rrcRelease;
// RRCConnectionRelease
rrcConnectionRelease->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionRelease->criticalExtensions.present = NR_RRCRelease__criticalExtensions_PR_rrcRelease;
rrcConnectionRelease->criticalExtensions.choice.rrcRelease = NULL;
rrcConnectionRelease->criticalExtensions.choice.rrcRelease = CALLOC(1, sizeof(NR_RRCRelease_IEs_t));
rrcConnectionRelease->criticalExtensions.choice.rrcRelease->deprioritisationReq =
CALLOC(1, sizeof(struct NR_RRCRelease_IEs__deprioritisationReq));
rrcConnectionRelease->criticalExtensions.choice.rrcRelease->deprioritisationReq->deprioritisationType =
NR_RRCRelease_IEs__deprioritisationReq__deprioritisationType_nr;
rrcConnectionRelease->criticalExtensions.choice.rrcRelease->deprioritisationReq->deprioritisationTimer =
NR_RRCRelease_IEs__deprioritisationReq__deprioritisationTimer_min10;
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message,
NULL,
(void *)&dl_dcch_msg,
buffer,
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
return((enc_rval.encoded+7)/8);
}
......
......@@ -103,8 +103,8 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
uint8_t *const buffer,
const uint8_t Transaction_id);
uint8_t do_NR_RRCConnectionRelease(uint8_t *buffer,
uint8_t Transaction_id);
uint8_t do_NR_RRCRelease(uint8_t *buffer,
uint8_t Transaction_id);
uint16_t do_RRCReconfiguration(
const protocol_ctxt_t *const ctxt_pP,
rrc_gNB_ue_context_t *const ue_context_pP,
......
......@@ -1523,9 +1523,9 @@ rrc_gNB_generate_UECapabilityEnquiry(
* If received, UE should switch to RRC_IDLE mode.
*/
void
rrc_gNB_generate_RRCConnectionRelease(
rrc_gNB_generate_RRCRelease(
const protocol_ctxt_t *const ctxt_pP,
rrc_gNB_ue_context_t *const ue_context_pP
rrc_gNB_ue_context_t *const ue_context_pP
)
//-----------------------------------------------------------------------------
{
......@@ -1534,16 +1534,16 @@ rrc_gNB_generate_RRCConnectionRelease(
memset(buffer, 0, RRC_BUF_SIZE);
size = do_NR_RRCConnectionRelease(buffer,rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id));
size = do_NR_RRCRelease(buffer,rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id));
ue_context_pP->ue_context.ue_reestablishment_timer = 0;
ue_context_pP->ue_context.ue_release_timer = 0;
LOG_I(NR_RRC,
PROTOCOL_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate RRCConnectionRelease (bytes %d)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
PROTOCOL_NR_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate RRCRelease (bytes %d)\n",
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
size);
LOG_D(NR_RRC,
PROTOCOL_RRC_CTXT_UE_FMT" --- PDCP_DATA_REQ/%d Bytes (rrcConnectionRelease MUI %d) --->[PDCP][RB %u]\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
PROTOCOL_NR_RRC_CTXT_UE_FMT" --- PDCP_DATA_REQ/%d Bytes (rrcRelease MUI %d) --->[PDCP][RB %u]\n",
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
size,
rrc_gNB_mui,
DCCH);
......@@ -1552,7 +1552,7 @@ rrc_gNB_generate_RRCConnectionRelease(
MSC_RRC_UE,
buffer,
size,
MSC_AS_TIME_FMT" LTE_RRCConnectionRelease UE %x MUI %d size %u",
MSC_AS_TIME_FMT" NR_RRCRelease UE %x MUI %d size %u",
MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_pP->ue_context.rnti,
rrc_gNB_mui,
......
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