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
常顺宇
OpenXG-RAN
Commits
96cf622e
Commit
96cf622e
authored
Dec 15, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix errors and add RRCReestablishmentComplete of UE
parent
40e3c0ce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
5 deletions
+91
-5
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+1
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+38
-2
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+6
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+2
-2
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+44
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
96cf622e
...
...
@@ -377,6 +377,7 @@ typedef struct gNB_MAC_INST_s {
/// UL handle
uint32_t
ul_handle
;
UE_info_t
UE_info
;
// MAC function execution peformance profiler
/// processing time of eNB scheduler
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
96cf622e
...
...
@@ -1295,7 +1295,7 @@ uint8_t do_RRCReestablishmentRequest(uint8_t Mod_id, uint8_t *buffer, uint16_t c
buffer
,
100
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_D
(
NR_RRC
,
"[UE] RRC
Setup
Request Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
LOG_D
(
NR_RRC
,
"[UE] RRC
Reestablishment
Request Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
...
...
@@ -1331,9 +1331,10 @@ const uint8_t Transaction_id
*
SRB_configList2
=
CALLOC
(
1
,
sizeof
(
NR_SRB_ToAddModList_t
));
memset
((
void
*
)
&
dl_dcch_msg
,
0
,
sizeof
(
NR_DL_DCCH_Message_t
));
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_rrcReestablishment
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReestablishment
=
CALLOC
(
1
,
sizeof
(
NR_RRCReestablishment_t
));
rrcReestablishment
=
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReestablishment
;
rrcReestablishment
=
CALLOC
(
1
,
sizeof
(
NR_RRCReestablishment_t
));
/*
// RRCReestablishment
// Configure SRB1
...
...
@@ -1406,6 +1407,7 @@ const uint8_t Transaction_id
// copy KgNB_star to ue_context_pP->ue_context.kgnb
memcpy
(
ue_context_pP
->
ue_context
.
kgnb
,
KgNB_star
,
32
);
ue_context_pP
->
ue_context
.
kgnb_ncc
=
0
;
rrcReestablishment
->
criticalExtensions
.
choice
.
rrcReestablishment
->
lateNonCriticalExtension
=
NULL
;
rrcReestablishment
->
criticalExtensions
.
choice
.
rrcReestablishment
->
nonCriticalExtension
=
NULL
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
...
...
@@ -1429,3 +1431,37 @@ const uint8_t Transaction_id
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
uint8_t
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
int64_t
rrc_TransactionIdentifier
)
{
asn_enc_rval_t
enc_rval
;
NR_UL_DCCH_Message_t
ul_dcch_msg
;
NR_RRCReestablishmentComplete_t
*
rrcReestablishmentComplete
;
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_UL_DCCH_MessageType__c1
));
ul_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_UL_DCCH_MessageType__c1_PR_rrcReestablishmentComplete
;
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReestablishmentComplete
=
CALLOC
(
1
,
sizeof
(
NR_RRCReestablishmentComplete_t
));
rrcReestablishmentComplete
=
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReestablishmentComplete
;
rrcReestablishmentComplete
->
rrc_TransactionIdentifier
=
rrc_TransactionIdentifier
;
rrcReestablishmentComplete
->
criticalExtensions
.
present
=
NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete
;
rrcReestablishmentComplete
->
criticalExtensions
.
choice
.
rrcReestablishmentComplete
=
CALLOC
(
1
,
sizeof
(
NR_RRCReestablishmentComplete_IEs_t
));
rrcReestablishmentComplete
->
criticalExtensions
.
choice
.
rrcReestablishmentComplete
->
lateNonCriticalExtension
=
NULL
;
rrcReestablishmentComplete
->
criticalExtensions
.
choice
.
rrcReestablishmentComplete
->
nonCriticalExtension
=
NULL
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_CCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_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
(
NR_RRC
,
"[UE] RRCReestablishmentComplete 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 @
96cf622e
...
...
@@ -160,3 +160,9 @@ do_RRCReestablishment(
//NR_SRB_ToAddModList_t **SRB_configList,
//struct LTE_PhysicalConfigDedicated **physicalConfigDedicated
);
uint8_t
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
int64_t
rrc_TransactionIdentifier
);
openair2/RRC/NR/rrc_gNB.c
View file @
96cf622e
...
...
@@ -1032,7 +1032,7 @@ rrc_gNB_generate_RRCReestablishment(
LOG_I
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" [RAPROC] Logical Channel DL-DCCH, Generating NR_RRCReestablishment (bytes %d)
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_context
->
Srb0
.
Tx_buffer
.
payload_size
);
UE_id
=
find_UE_id
(
module_id
,
rnti
);
UE_id
=
find_
nr_
UE_id
(
module_id
,
rnti
);
if
(
UE_id
!=
-
1
)
{
/* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */
...
...
@@ -2175,7 +2175,7 @@ rrc_gNB_decode_dcch(
}
//clear
int
UE_id
=
find_UE_id
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
int
UE_id
=
find_
nr_
UE_id
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
if
(
UE_id
==
-
1
)
{
LOG_E
(
NR_RRC
,
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
96cf622e
...
...
@@ -117,6 +117,15 @@ uint8_t do_NR_RRCReconfigurationComplete(
const
uint8_t
Transaction_id
);
void
rrc_ue_generate_RRCReestablishmentRequest
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
);
void
nr_rrc_ue_generate_rrcReestablishmentComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_RRCReestablishment_t
*
rrcReestablishment
,
uint8_t
gNB_index
);
mui_t
nr_rrc_mui
=
0
;
uint8_t
first_rrcreconfigurationcomplete
=
0
;
uint8_t
rrcReestablishmentRequest_flag
=
1
;
...
...
@@ -2386,7 +2395,7 @@ nr_rrc_ue_decode_dcch(
if
(
rrcReestablishmentRequest_flag
==
1
)
{
rrcReestablishmentRequest_flag
=
0
;
rnti
=
2
;
rrc_ue_generate_RRCReestablishmentRequest
(
ctxt_pP
,
gNB_indexP
,
rnti
);
rrc_ue_generate_RRCReestablishmentRequest
(
ctxt_pP
,
gNB_indexP
);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_indexP
].
State
=
NR_RRC_SI_RECEIVED
;
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_indexP
].
rnti
=
rnti
;
}
...
...
@@ -2421,6 +2430,14 @@ nr_rrc_ue_decode_dcch(
gNB_indexP
);
break
;
case
NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment
:
LOG_I
(
NR_RRC
,
"[UE%d] Frame %d : Logical Channel DL-DCCH (SRB1), Received RRCReestablishment
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
);
nr_rrc_ue_generate_rrcReestablishmentComplete
(
ctxt_pP
,
dl_dcch_msg
->
message
.
choice
.
c1
->
choice
.
rrcReestablishment
,
gNB_indexP
);
break
;
case
NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer
:
{
...
...
@@ -2804,3 +2821,29 @@ void rrc_ue_generate_RRCReestablishmentRequest( const protocol_ctxt_t *const ctx
itti_send_msg_to_task
(
TASK_RRC_GNB_SIM
,
ctxt_pP
->
instance
,
message_p
);
#endif
}
void
nr_rrc_ue_generate_rrcReestablishmentComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_RRCReestablishment_t
*
rrcReestablishment
,
uint8_t
gNB_index
)
//-----------------------------------------------------------------------------
{
uint32_t
length
;
uint8_t
buffer
[
100
];
length
=
do_RRCReestablishmentComplete
(
buffer
,
rrcReestablishment
->
rrc_TransactionIdentifier
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_NRUE
,
TASK_RRC_GNB_SIM
,
length
);
memcpy
(
message_buffer
,
buffer
,
length
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_NRUE
,
UE_RRC_DCCH_DATA_IND
);
UE_RRC_DCCH_DATA_IND
(
message_p
).
rbid
=
DCCH
;
UE_RRC_DCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
UE_RRC_DCCH_DATA_IND
(
message_p
).
size
=
length
;
itti_send_msg_to_task
(
TASK_RRC_GNB_SIM
,
ctxt_pP
->
instance
,
message_p
);
#endif
}
\ No newline at end of file
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