Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
ad1f8a37
Commit
ad1f8a37
authored
Oct 08, 2020
by
Qiu Dezhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RrcSetupComplete
parent
97dd024c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
0 deletions
+78
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+35
-0
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+7
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+36
-0
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
ad1f8a37
...
@@ -1153,3 +1153,38 @@ do_NR_RRCReconfigurationComplete(
...
@@ -1153,3 +1153,38 @@ do_NR_RRCReconfigurationComplete(
return
((
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
}
uint8_t
do_RRCSetupComplete
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
const
uint8_t
Transaction_id
,
uint8_t
sel_plmn_id
,
const
int
dedicatedInfoNASLength
,
const
char
*
dedicatedInfoNAS
){
asn_enc_rval_t
enc_rval
;
NR_UL_DCCH_Message_t
ul_dcch_msg
;
NR_RRCSetupComplete_t
*
RrcSetupComplete
;
memset
((
void
*
)
&
ul_dcch_msg
,
0
,
sizeof
(
NR_UL_DCCH_Message_t
));
ul_dcch_msg
.
message
.
present
=
NR_UL_DCCH_MessageType_PR_c1
;
ul_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_DL_DCCH_MessageType__c1
));
ul_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
;
RrcSetupComplete
=
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcSetupComplete
;
RrcSetupComplete
->
rrc_TransactionIdentifier
=
Transaction_id
;
RrcSetupComplete
->
criticalExtensions
.
present
=
NR_RRCSetupComplete__criticalExtensions_PR_rrcSetupComplete
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
nonCriticalExtension
=
CALLOC
(
1
,
sizeof
(
*
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
nonCriticalExtension
));
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
selectedPLMN_Identity
=
sel_plmn_id
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
registeredAMF
=
NULL
;
memset
(
&
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
dedicatedNAS_Message
,
0
,
sizeof
(
OCTET_STRING_t
));
OCTET_STRING_fromBuf
(
&
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
dedicatedNAS_Message
,
dedicatedInfoNAS
,
dedicatedInfoNASLength
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_DL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
100
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_D
(
RRC
,
"RRCConnectionSetupComplete Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
ad1f8a37
...
@@ -111,3 +111,10 @@ uint16_t do_RRCReconfiguration(
...
@@ -111,3 +111,10 @@ uint16_t do_RRCReconfiguration(
uint8_t
*
buffer
,
uint8_t
*
buffer
,
uint8_t
Transaction_id
,
uint8_t
Transaction_id
,
gNB_RRC_INST
*
gnb_rrc_inst
);
gNB_RRC_INST
*
gnb_rrc_inst
);
uint8_t
do_RRCSetupComplete
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
const
uint8_t
Transaction_id
,
uint8_t
sel_plmn_id
,
const
int
dedicatedInfoNASLength
,
const
char
*
dedicatedInfoNAS
);
\ No newline at end of file
openair2/RRC/NR_UE/rrc_UE.c
View file @
ad1f8a37
...
@@ -1243,3 +1243,39 @@ void nr_rrc_ue_generate_RRCReconfigurationComplete( const protocol_ctxt_t *const
...
@@ -1243,3 +1243,39 @@ void nr_rrc_ue_generate_RRCReconfigurationComplete( const protocol_ctxt_t *const
buffer
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
PDCP_TRANSMISSION_MODE_CONTROL
);
}
}
/*--------------------------------------------------*/
static
void
rrc_ue_generate_RRCSetupComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNb_index
,
const
uint8_t
Transaction_id
,
uint8_t
sel_plmn_id
){
uint8_t
buffer
[
100
];
uint8_t
size
;
const
char
*
nas_msg
;
int
nas_msg_length
;
/*
if (EPC_MODE_ENABLED) {
nas_msg = (char *) UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
} else {
nas_msg = nas_attach_req_imsi;
nas_msg_length = sizeof(nas_attach_req_imsi);
}
*/
size
=
do_RRCSetupComplete
(
ctxt_pP
->
module_id
,
buffer
,
Transaction_id
,
sel_plmn_id
,
nas_msg_length
,
nas_msg
);
LOG_I
(
RRC
,
"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, gNB %d)
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
size
,
gNB_index
);
LOG_D
(
RLC
,
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to gNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]
\n
"
,
ctxt_pP
->
frame
,
ctxt_pP
->
module_id
+
NB_RN_INST
,
size
,
gNB_index
,
rrc_mui
,
ctxt_pP
->
module_id
+
NB_eNB_INST
,
DCCH
);
ctxt_pP_local
.
rnti
=
ctxt_pP
->
rnti
;
rrc_data_req_ue
(
ctxt_pP
,
DCCH
,
rrc_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment