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
promise
OpenXG-RAN
Commits
9dce92ea
Commit
9dce92ea
authored
Dec 11, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement rrcReestablishmentRequest
parent
ec48bb89
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
307 additions
and
12 deletions
+307
-12
common/utils/msc/msc.h
common/utils/msc/msc.h
+1
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+38
-0
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+3
-1
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+2
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+230
-9
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+32
-0
openair2/SIMULATION/NR_RRC/itti_sim.c
openair2/SIMULATION/NR_RRC/itti_sim.c
+1
-1
No files found.
common/utils/msc/msc.h
View file @
9dce92ea
...
...
@@ -48,6 +48,7 @@ typedef enum {
MSC_MAC_ENB
,
MSC_RLC_ENB
,
MSC_PDCP_ENB
,
MSC_PDCP_GNB
,
MSC_RRC_ENB
,
MSC_RRC_GNB
,
MSC_IP_ENB
,
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
9dce92ea
...
...
@@ -69,6 +69,7 @@
#include "NR_RRCReconfigurationComplete.h"
#include "NR_RRCReconfigurationComplete-IEs.h"
#include "NR_DLInformationTransfer.h"
#include "NR_RRCReestablishmentRequest.h"
#if defined(NR_Rel16)
#include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h"
...
...
@@ -1260,3 +1261,40 @@ uint8_t do_NR_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8
return
encoded
;
}
uint8_t
do_RRCReestablishmentRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
)
{
asn_enc_rval_t
enc_rval
;
NR_UL_CCCH_Message_t
ul_ccch_msg
;
NR_RRCReestablishmentRequest_t
*
rrcReestablishmentRequest
;
uint8_t
buf
[
2
];
memset
((
void
*
)
&
ul_ccch_msg
,
0
,
sizeof
(
NR_UL_CCCH_Message_t
));
ul_ccch_msg
.
message
.
present
=
NR_UL_CCCH_MessageType_PR_c1
;
ul_ccch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_UL_CCCH_MessageType__c1
));
ul_ccch_msg
.
message
.
choice
.
c1
->
present
=
NR_UL_CCCH_MessageType__c1_PR_rrcReestablishmentRequest
;
ul_ccch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReestablishmentRequest
=
CALLOC
(
1
,
sizeof
(
NR_RRCReestablishmentRequest_t
));
rrcReestablishmentRequest
=
ul_ccch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReestablishmentRequest
;
// test
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
reestablishmentCause
=
NR_ReestablishmentCause_reconfigurationFailure
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
c_RNTI
=
0x1234
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
physCellId
=
0
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
shortMAC_I
.
buf
=
buf
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
shortMAC_I
.
buf
[
0
]
=
0x08
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
shortMAC_I
.
buf
[
1
]
=
0x32
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
shortMAC_I
.
size
=
2
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_CCCH_Message
,
(
void
*
)
&
ul_ccch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_CCCH_Message
,
NULL
,
(
void
*
)
&
ul_ccch_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] RRCSetupRequest 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 @
9dce92ea
...
...
@@ -146,3 +146,5 @@ do_NR_DLInformationTransfer(
uint8_t
do_NR_ULInformationTransfer
(
uint8_t
**
buffer
,
uint32_t
pdu_length
,
uint8_t
*
pdu_buffer
);
uint8_t
do_RRCReestablishmentRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
);
openair2/RRC/NR/nr_rrc_defs.h
View file @
9dce92ea
...
...
@@ -439,6 +439,7 @@ typedef struct {
NR_SRB_INFO
SI
;
NR_SRB_INFO
Srb0
;
int
initial_csi_index
[
MAX_NR_RRC_UE_CONTEXTS
];
int
physCellId
;
}
rrc_gNB_carrier_data_t
;
//---------------------------------------------------
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
9dce92ea
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_UE.c
View file @
9dce92ea
...
...
@@ -2740,3 +2740,35 @@ nr_rrc_ue_process_ueCapabilityEnquiry(
}
}
}
//-----------------------------------------------------------------------------
void
rrc_ue_generate_RRCReestablishmentRequest
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
)
{
if
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
==
0
)
{
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
=
do_RRCReestablishmentRequest
(
ctxt_pP
->
module_id
,
(
uint8_t
*
)
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
Payload
);
LOG_I
(
NR_RRC
,
"[UE %d] : Frame %d, Logical Channel UL-CCCH (SRB0), Generating RRCReestablishmentRequest (bytes %d, gNB %d)
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
,
gNB_index
);
for
(
int
i
=
0
;
i
<
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
;
i
++
)
{
LOG_T
(
NR_RRC
,
"%x."
,
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
Payload
[
i
]);
}
LOG_T
(
NR_RRC
,
"
\n
"
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_NRUE
,
TASK_RRC_GNB_SIM
,
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
);
memcpy
(
message_buffer
,
(
uint8_t
*
)
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
Payload
,
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_NRUE
,
UE_RRC_CCCH_DATA_IND
);
GNB_RRC_CCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
GNB_RRC_CCCH_DATA_IND
(
message_p
).
size
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
payload_size
;
itti_send_msg_to_task
(
TASK_RRC_GNB_SIM
,
ctxt_pP
->
instance
,
message_p
);
#endif
}
}
openair2/SIMULATION/NR_RRC/itti_sim.c
View file @
9dce92ea
...
...
@@ -84,7 +84,7 @@ int config_sync_var=-1;
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
volatile
int
start_gNB
=
0
;
//
volatile int start_gNB = 0;
volatile
int
oai_exit
=
0
;
//static int wait_for_sync = 0;
...
...
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