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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
40e3c0ce
Commit
40e3c0ce
authored
Dec 14, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify rrcReestablishmentRequest
parent
7fa06a3a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
170 additions
and
65 deletions
+170
-65
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+2
-2
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+104
-36
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+57
-25
openair2/SIMULATION/NR_RRC/itti_sim.c
openair2/SIMULATION/NR_RRC/itti_sim.c
+6
-1
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
40e3c0ce
...
...
@@ -1262,7 +1262,7 @@ 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
)
{
uint8_t
do_RRCReestablishmentRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint16_t
c_rnti
)
{
asn_enc_rval_t
enc_rval
;
NR_UL_CCCH_Message_t
ul_ccch_msg
;
NR_RRCReestablishmentRequest_t
*
rrcReestablishmentRequest
;
...
...
@@ -1277,7 +1277,7 @@ uint8_t do_RRCReestablishmentRequest(uint8_t Mod_id, uint8_t *buffer) {
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
.
c_RNTI
=
c_rnti
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
physCellId
=
0
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
shortMAC_I
.
buf
=
buf
;
rrcReestablishmentRequest
->
rrcReestablishmentRequest
.
ue_Identity
.
shortMAC_I
.
buf
[
0
]
=
0x08
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
40e3c0ce
...
...
@@ -147,7 +147,7 @@ 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
);
uint8_t
do_RRCReestablishmentRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint16_t
c_rnti
);
uint8_t
do_RRCReestablishment
(
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
40e3c0ce
...
...
@@ -416,6 +416,82 @@ rrc_gNB_generate_RRCSetup(
#endif
}
//-----------------------------------------------------------------------------
void
rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
int
CC_id
)
//-----------------------------------------------------------------------------
{
LOG_I
(
NR_RRC
,
"generate RRCSetup for RRCReestablishmentRequest
\n
"
);
NR_SRB_ToAddModList_t
*
SRB_configList
=
NULL
;
rrc_gNB_ue_context_t
*
ue_context_pP
=
NULL
;
gNB_RRC_INST
*
rrc_instance_p
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
ue_context_pP
=
rrc_gNB_get_next_free_ue_context
(
ctxt_pP
,
rrc_instance_p
,
0
);
gNB_RRC_UE_t
*
ue_p
=
&
ue_context_pP
->
ue_context
;
SRB_configList
=
ue_p
->
SRB_configList
;
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
=
do_RRCSetup
(
ctxt_pP
,
ue_context_pP
,
CC_id
,
(
uint8_t
*
)
ue_p
->
Srb0
.
Tx_buffer
.
Payload
,
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
),
SRB_configList
);
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,
(
char
*
)(
ue_p
->
Srb0
.
Tx_buffer
.
Payload
),
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
,
"[MSG] RRC Setup
\n
"
);
LOG_D
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RRC_gNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_gNB
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
rrc_mac_config_req_gNB
(
rrc_instance_p
->
module_id
,
rrc_instance_p
->
carrier
.
ssb_SubcarrierOffset
,
rrc_instance_p
->
carrier
.
pdsch_AntennaPorts
,
rrc_instance_p
->
carrier
.
pusch_TargetSNRx10
,
rrc_instance_p
->
carrier
.
pucch_TargetSNRx10
,
(
NR_ServingCellConfigCommon_t
*
)
rrc_instance_p
->
carrier
.
servingcellconfigcommon
,
0
,
ue_context_pP
->
ue_context
.
rnti
,
(
NR_CellGroupConfig_t
*
)
NULL
);
MSC_LOG_TX_MESSAGE
(
MSC_RRC_GNB
,
MSC_RRC_UE
,
ue_p
->
Srb0
.
Tx_buffer
.
Header
,
// LG WARNING
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
,
MSC_AS_TIME_FMT
" RRCSetup UE %x size %u"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_pP
->
ue_context
.
rnti
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
LOG_I
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
// activate release timer, if RRCSetupComplete not received after 100 frames, remove UE
ue_context_pP
->
ue_context
.
ue_release_timer
=
1
;
// remove UE after 10 frames after RRCConnectionRelease is triggered
ue_context_pP
->
ue_context
.
ue_release_timer_thres
=
1000
;
/* init timers */
// ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_GNB
,
TASK_RRC_UE_SIM
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
memcpy
(
message_buffer
,
(
uint8_t
*
)
ue_p
->
Srb0
.
Tx_buffer
.
Payload
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
GNB_RRC_CCCH_DATA_IND
);
GNB_RRC_CCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
GNB_RRC_CCCH_DATA_IND
(
message_p
).
size
=
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#endif
}
void
rrc_gNB_generate_RRCReject
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
...
@@ -1271,6 +1347,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
break
;
case
NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest
:
LOG_I
(
NR_RRC
,
"Received RRCSetupRequest on UL-CCCH-Message (UE rnti %x)
\n
"
,
ctxt_pP
->
rnti
);
ue_context_p
=
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
);
if
(
ue_context_p
!=
NULL
)
{
rrc_gNB_free_mem_UE_context
(
ctxt_pP
,
ue_context_p
);
...
...
@@ -1417,9 +1494,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
rrcReestablishmentRequest
.
ue_Identity
.
physCellId
,
RC
.
nrrrc
[
ctxt_pP
->
module_id
]
->
carrier
.
physCellId
);
rrc_gNB_generate_RRCSetup
(
ctxt_pP
,
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
),
CC_id
);
rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest
(
ctxt_pP
,
CC_id
);
break
;
}
...
...
@@ -1436,34 +1511,29 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
LOG_E
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" NR_RRCReestablishmentRequest c_RNTI range error, fallback to RRC establishment
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
rrc_gNB_generate_RRCSetup
(
ctxt_pP
,
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
),
CC_id
);
rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest
(
ctxt_pP
,
CC_id
);
break
;
}
LOG_D
(
NR_RRC
,
"c_rnti is %x
\n
"
,
c_rnti
);
ue_context_p
=
rrc_gNB_get_ue_context
(
RC
.
nrrrc
[
ctxt_pP
->
module_id
],
c_rnti
);
c_rnti
=
rrcReestablishmentRequest
.
ue_Identity
.
c_RNTI
;
LOG_I
(
NR_RRC
,
"c_rnti is %x
\n
"
,
c_rnti
);
ue_context_p
=
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
c_rnti
);
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" NR_RRCReestablishmentRequest without UE context, fallback to RRC establishment
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
rrc_gNB_generate_RRCSetup
(
ctxt_pP
,
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
),
CC_id
);
rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest
(
ctxt_pP
,
CC_id
);
break
;
}
#if(0)
int
UE_id
=
find_nr_UE_id
(
ctxt_pP
->
module_id
,
c_rnti
);
if
(
UE_id
==
-
1
)
{
LOG_E
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" NR_RRCReestablishmentRequest without UE_id(MAC) rnti %x, fallback to RRC establishment
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
c_rnti
);
rrc_gNB_generate_RRCSetup
(
ctxt_pP
,
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
),
CC_id
);
rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest
(
ctxt_pP
,
CC_id
);
break
;
}
...
...
@@ -1484,21 +1554,17 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
LOG_E
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" RRCReestablishmentRequest without UE_id(MAC) previous rnti %x, fallback to RRC establishment
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
previous_rnti
);
rrc_gNB_generate_RRCSetup
(
ctxt_pP
,
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
),
CC_id
);
rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest
(
ctxt_pP
,
CC_id
);
break
;
}
}
#endif
//c-plane not end
if
((
ue_context_p
->
ue_context
.
Status
!=
NR_RRC_RECONFIGURED
)
&&
(
ue_context_p
->
ue_context
.
reestablishment_cause
==
NR_ReestablishmentCause_spare1
))
{
LOG_E
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" NR_RRCReestablishmentRequest (UE %x c-plane is not end),
fallback to RRC establishment
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" NR_RRCReestablishmentRequest (UE %x c-plane is not end),
RRC establishment failed
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
c_rnti
);
rrc_gNB_generate_RRCSetup
(
ctxt_pP
,
rrc_gNB_get_ue_context
(
gnb_rrc_inst
,
ctxt_pP
->
rnti
),
CC_id
);
/* TODO RRC Release ? */
break
;
}
...
...
@@ -1579,7 +1645,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
memcpy
(
&
ue_context_p
->
ue_context
.
Srb2
.
Srb_info
.
Lchan_desc
[
1
],
&
DCCH_LCHAN_DESC
,
LCHAN_DESC_SIZE
);
rrc_gNB_generate_RRCReestablishment
(
ctxt_pP
,
ue_context_p
,
CC_id
);
LOG_I
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
"CALLING RLC CONFIG SRB1 (rbid %d)
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
Idx
);
...
...
@@ -1864,7 +1932,7 @@ rrc_gNB_decode_dcch(
ctxt_pP
,
ue_context_p
,
ul_dcch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
);
LOG_I
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" UE State = RRC_CONNECTED
\n
"
,
LOG_I
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" UE State =
NR_
RRC_CONNECTED
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
}
...
...
@@ -2172,12 +2240,12 @@ void *rrc_gnb_task(void *args_p) {
/* Messages from MAC */
case
NR_RRC_MAC_CCCH_DATA_IND
:
//
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
//
NR_RRC_MAC_CCCH_DATA_IND(msg_p).gnb_index,
//
GNB_FLAG_YES,
//
NR_RRC_MAC_CCCH_DATA_IND(msg_p).rnti,
//
msg_p->ittiMsgHeader.lte_time.frame,
//
msg_p->ittiMsgHeader.lte_time.slot);
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
,
GNB_FLAG_YES
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
msg_p
->
ittiMsgHeader
.
lte_time
.
frame
,
msg_p
->
ittiMsgHeader
.
lte_time
.
slot
);
LOG_I
(
NR_RRC
,
"Decoding CCCH : inst %d, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d
\n
"
,
instance
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
CC_id
,
...
...
@@ -2198,12 +2266,12 @@ void *rrc_gnb_task(void *args_p) {
/* Messages from PDCP */
case
NR_RRC_DCCH_DATA_IND
:
//
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
//
instance,
// E
NB_FLAG_YES,
//
RRC_DCCH_DATA_IND(msg_p).rnti,
//
msg_p->ittiMsgHeader.lte_time.frame,
//
msg_p->ittiMsgHeader.lte_time.slot);
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
G
NB_FLAG_YES
,
NR_
RRC_DCCH_DATA_IND
(
msg_p
).
rnti
,
msg_p
->
ittiMsgHeader
.
lte_time
.
frame
,
msg_p
->
ittiMsgHeader
.
lte_time
.
slot
);
LOG_D
(
NR_RRC
,
PROTOCOL_NR_RRC_CTXT_UE_FMT
" Received on DCCH %d %s
\n
"
,
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
&
ctxt
),
NR_RRC_DCCH_DATA_IND
(
msg_p
).
dcch_index
,
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
40e3c0ce
...
...
@@ -119,6 +119,8 @@ uint8_t do_NR_RRCReconfigurationComplete(
mui_t
nr_rrc_mui
=
0
;
uint8_t
first_rrcreconfigurationcomplete
=
0
;
uint8_t
rrcReestablishmentRequest_flag
=
1
;
extern
uint16_t
rnti
;
static
Rrc_State_NR_t
nr_rrc_get_state
(
module_id_t
ue_mod_idP
)
{
return
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
;
...
...
@@ -1444,6 +1446,27 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ctxt_pP
->
rnti
);
if
(
rrcReestablishmentRequest_flag
==
1
)
{
free
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
=
NULL
;
free
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
SRB1_config
[
gNB_index
]);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
SRB1_config
[
gNB_index
]
=
NULL
;
free
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
SRB2_config
[
gNB_index
]);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
SRB2_config
[
gNB_index
]
=
NULL
;
free
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
defaultDRB
);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
defaultDRB
=
NULL
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
DRB_config
[
gNB_index
][
i
]
!=
NULL
)
{
free
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
DRB_config
[
gNB_index
][
i
]);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
DRB_config
[
gNB_index
][
i
]
=
NULL
;
}
}
}
// Get configuration
// Release T300 timer
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
T300_active
=
0
;
...
...
@@ -2261,6 +2284,7 @@ void nr_rrc_ue_generate_RRCReconfigurationComplete( const protocol_ctxt_t *const
UE_RRC_DCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
UE_RRC_DCCH_DATA_IND
(
message_p
).
size
=
size
;
itti_send_msg_to_task
(
TASK_RRC_GNB_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
rrc_data_req_ue
(
ctxt_pP
,
...
...
@@ -2332,6 +2356,7 @@ nr_rrc_ue_decode_dcch(
if
(
first_rrcreconfigurationcomplete
==
0
)
{
first_rrcreconfigurationcomplete
=
1
;
#ifdef ITTI_SIM
if
(
AMF_MODE_ENABLED
)
{
as_nas_info_t
initialNasMsg
;
memset
(
&
initialNasMsg
,
0
,
sizeof
(
as_nas_info_t
));
generateRegistrationComplete
(
&
initialNasMsg
,
NULL
);
...
...
@@ -2356,6 +2381,15 @@ nr_rrc_ue_decode_dcch(
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
ctxt_pP
->
instance
,
message_p
);
LOG_I
(
NR_RRC
,
" Send NAS_UPLINK_DATA_REQ message(PduSessionEstablishRequest)
\n
"
);
}
}
if
(
rrcReestablishmentRequest_flag
==
1
)
{
rrcReestablishmentRequest_flag
=
0
;
rnti
=
2
;
rrc_ue_generate_RRCReestablishmentRequest
(
ctxt_pP
,
gNB_indexP
,
rnti
);
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
;
}
#endif
}
}
...
...
@@ -2527,8 +2561,8 @@ void *rrc_nrue_task( void *args_p ) {
memcpy
(
srb_info_p
->
Rx_buffer
.
Payload
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
srb_info_p
->
Rx_buffer
.
payload_size
=
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
;
// PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, RRC_MAC_CCCH_DATA_IND (msg_p).rnti,
RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
GNB_FLAG_NO
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
);
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
GNB_FLAG_NO
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
0
);
//
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0, NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index);
nr_rrc_ue_decode_ccch
(
&
ctxt
,
srb_info_p
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
);
...
...
@@ -2744,11 +2778,10 @@ 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
);
(
uint8_t
*
)
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
gNB_index
].
Tx_buffer
.
Payload
,
1
);
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
);
...
...
@@ -2766,9 +2799,8 @@ void rrc_ue_generate_RRCReestablishmentRequest( const protocol_ctxt_t *const ctx
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
;
UE
_RRC_CCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
UE
_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 @
40e3c0ce
...
...
@@ -71,6 +71,7 @@ uint32_t target_dl_mcs = 28;
uint32_t
target_ul_mcs
=
20
;
uint32_t
timing_advance
=
0
;
uint64_t
num_missed_slots
=
0
;
uint16_t
rnti
=
1
;
int
split73
=
0
;
void
sendFs6Ul
(
PHY_VARS_eNB
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
segmentID
,
int16_t
*
data
,
int
dataLen
,
int
r_offset
)
{
...
...
@@ -427,6 +428,7 @@ void *itti_sim_ue_rrc_task( void *args_p) {
memset
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
0
,
CCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
GNB_RRC_CCCH_DATA_IND
(
msg_p
).
sdu
,
GNB_RRC_CCCH_DATA_IND
(
msg_p
).
size
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
GNB_RRC_CCCH_DATA_IND
(
msg_p
).
size
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
instance
,
message_p
);
break
;
case
GNB_RRC_DCCH_DATA_IND
:
...
...
@@ -435,6 +437,7 @@ void *itti_sim_ue_rrc_task( void *args_p) {
NR_RRC_DCCH_DATA_IND
(
message_p
).
dcch_index
=
GNB_RRC_DCCH_DATA_IND
(
msg_p
).
rbid
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_size
=
GNB_RRC_DCCH_DATA_IND
(
msg_p
).
size
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
=
GNB_RRC_DCCH_DATA_IND
(
msg_p
).
sdu
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
instance
,
message_p
);
break
;
default:
...
...
@@ -476,6 +479,7 @@ void *itti_sim_gnb_rrc_task( void *args_p) {
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
UE_RRC_CCCH_DATA_IND
(
msg_p
).
size
;
memset
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
0
,
CCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
UE_RRC_CCCH_DATA_IND
(
msg_p
).
sdu
,
UE_RRC_CCCH_DATA_IND
(
msg_p
).
size
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
message_p
);
break
;
case
UE_RRC_DCCH_DATA_IND
:
...
...
@@ -483,6 +487,7 @@ void *itti_sim_gnb_rrc_task( void *args_p) {
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_size
=
UE_RRC_DCCH_DATA_IND
(
msg_p
).
size
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
dcch_index
=
UE_RRC_DCCH_DATA_IND
(
msg_p
).
rbid
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
=
UE_RRC_DCCH_DATA_IND
(
msg_p
).
sdu
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
message_p
);
break
;
...
...
@@ -523,7 +528,7 @@ int main( int argc, char **argv )
}
AMF_MODE_ENABLED
=
!
IS_SOFTMODEM_NOS1
;
//
AMF_MODE_ENABLED = 0;
//
AMF_MODE_ENABLED = 0;
NGAP_CONF_MODE
=
!
IS_SOFTMODEM_NOS1
;
//!get_softmodem_params()->phy_test;
#if T_TRACER
...
...
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