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
ZhouShuya
OpenXG-RAN
Commits
602424f6
Commit
602424f6
authored
Oct 13, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle bcch message in rrc_nrue_task
parent
e344a7bd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
250 additions
and
63 deletions
+250
-63
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair2/COMMON/mac_messages_def.h
openair2/COMMON/mac_messages_def.h
+6
-3
openair2/COMMON/mac_messages_types.h
openair2/COMMON/mac_messages_types.h
+10
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+226
-58
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+7
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
602424f6
...
...
@@ -2911,7 +2911,7 @@ add_executable(nr-uesoftmodem
target_link_libraries
(
nr-uesoftmodem
-Wl,--start-group
RRC_LIB NR_RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB
SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB S1AP_LIB S1AP_ENB
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
LFDS7
${
ATLAS_LIBRARIES
}
...
...
openair2/COMMON/mac_messages_def.h
View file @
602424f6
...
...
@@ -41,8 +41,6 @@ MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDat
MESSAGE_DEF
(
RRC_MAC_CCCH_DATA_CNF
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacCcchDataCnf
,
rrc_mac_ccch_data_cnf
)
MESSAGE_DEF
(
RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacCcchDataInd
,
rrc_mac_ccch_data_ind
)
// gNB
MESSAGE_DEF
(
NR_RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacCcchDataInd
,
nr_rrc_mac_ccch_data_ind
)
MESSAGE_DEF
(
RRC_MAC_MCCH_DATA_REQ
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacMcchDataReq
,
rrc_mac_mcch_data_req
)
MESSAGE_DEF
(
RRC_MAC_MCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacMcchDataInd
,
rrc_mac_mcch_data_ind
)
...
...
@@ -51,3 +49,8 @@ MESSAGE_DEF(RRC_MAC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacPcchDat
/* RRC configures DRX context (MAC timers) of a UE */
MESSAGE_DEF
(
RRC_MAC_DRX_CONFIG_REQ
,
MESSAGE_PRIORITY_MED
,
rrc_mac_drx_config_req_t
,
rrc_mac_drx_config_req
)
// gNB
MESSAGE_DEF
(
NR_RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacCcchDataInd
,
nr_rrc_mac_ccch_data_ind
)
MESSAGE_DEF
(
NR_RRC_MAC_BCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacBcchDataInd
,
nr_rrc_mac_bcch_data_ind
)
openair2/COMMON/mac_messages_types.h
View file @
602424f6
...
...
@@ -38,6 +38,7 @@
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
#define NR_RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_bcch_data_ind
#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req
#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind
...
...
@@ -87,6 +88,15 @@ typedef struct RrcMacBcchDataInd_s {
uint8_t
rsrp
;
}
RrcMacBcchDataInd
;
typedef
struct
NRRrcMacBcchDataInd_s
{
uint32_t
frame
;
uint8_t
sub_frame
;
uint32_t
sdu_size
;
uint8_t
sdu
[
BCCH_SDU_SIZE
];
uint8_t
gnb_index
;
uint8_t
rsrq
;
uint8_t
rsrp
;
}
NRRrcMacBcchDataInd
;
typedef
struct
RrcMacBcchMbmsDataReq_s
{
uint32_t
frame
;
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
602424f6
...
...
@@ -36,6 +36,7 @@
#include "NR_DL-DCCH-Message.h" //asn_DEF_NR_DL_DCCH_Message
#include "NR_DL-CCCH-Message.h" //asn_DEF_NR_DL_CCCH_Message
#include "NR_BCCH-BCH-Message.h" //asn_DEF_NR_BCCH_BCH_Message
#include "NR_BCCH-DL-SCH-Message.h" //asn_DEF_NR_BCCH_DL_SCH_Message
#include "NR_CellGroupConfig.h" //asn_DEF_NR_CellGroupConfig
#include "NR_BWP-Downlink.h" //asn_DEF_NR_BWP_Downlink
#include "NR_RRCReconfiguration.h"
...
...
@@ -48,6 +49,8 @@
#include "rrc_vars.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "intertask_interface.h"
#include "executables/softmodem-common.h"
#include "pdcp.h"
#include "UTIL/OSA/osa_defs.h"
...
...
@@ -56,6 +59,55 @@
mui_t
nr_rrc_mui
=
0
;
static
Rrc_State_t
nr_rrc_get_state
(
module_id_t
ue_mod_idP
)
{
return
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
;
}
static
Rrc_Sub_State_t
nr_rrc_get_sub_state
(
module_id_t
ue_mod_idP
)
{
return
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcSubState
;
}
static
int
nr_rrc_set_state
(
module_id_t
ue_mod_idP
,
Rrc_State_t
state
)
{
AssertFatal
((
RRC_STATE_FIRST
<=
state
)
&&
(
state
<=
RRC_STATE_LAST
),
"Invalid state %d!
\n
"
,
state
);
if
(
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
!=
state
)
{
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
=
state
;
return
(
1
);
}
return
(
0
);
}
static
int
nr_rrc_set_sub_state
(
module_id_t
ue_mod_idP
,
Rrc_Sub_State_NR_t
subState
)
{
if
(
AMF_MODE_ENABLED
)
{
switch
(
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
)
{
case
RRC_STATE_INACTIVE_NR
:
AssertFatal
((
RRC_SUB_STATE_INACTIVE_FIRST_NR
<=
subState
)
&&
(
subState
<=
RRC_SUB_STATE_INACTIVE_LAST_NR
),
"Invalid nr sub state %d for state %d!
\n
"
,
subState
,
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
);
break
;
case
RRC_STATE_IDLE_NR
:
AssertFatal
((
RRC_SUB_STATE_IDLE_FIRST_NR
<=
subState
)
&&
(
subState
<=
RRC_SUB_STATE_IDLE_LAST_NR
),
"Invalid nr sub state %d for state %d!
\n
"
,
subState
,
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
);
break
;
case
RRC_STATE_CONNECTED_NR
:
AssertFatal
((
RRC_SUB_STATE_CONNECTED_FIRST_NR
<=
subState
)
&&
(
subState
<=
RRC_SUB_STATE_CONNECTED_LAST_NR
),
"Invalid nr sub state %d for state %d!
\n
"
,
subState
,
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
);
break
;
}
}
if
(
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcSubState
!=
subState
)
{
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcSubState
=
subState
;
return
(
1
);
}
return
(
0
);
}
extern
boolean_t
nr_rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_SRB_ToAddModList_t
*
const
srb2add_list
,
...
...
@@ -462,6 +514,104 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
return
0
;
}
int
nr_decode_SI
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
)
{
return
0
;
}
int
nr_decode_SIB1
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
,
const
uint8_t
rsrq
,
const
uint8_t
rsrp
)
{
return
0
;
}
int
nr_decode_BCCH_DLSCH_Message
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
,
uint8_t
*
const
Sdu
,
const
uint8_t
Sdu_len
,
const
uint8_t
rsrq
,
const
uint8_t
rsrp
)
{
NR_BCCH_DL_SCH_Message_t
*
bcch_message
=
NULL
;
NR_SIB1_t
*
sib1
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
sib1
[
gNB_index
];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_IN
);
if
(((
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIStatus
&
1
)
==
1
)
&&
// SIB1 received
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIcnt
==
sib1
->
si_SchedulingInfo
->
schedulingInfoList
.
list
.
count
))
{
// to prevent memory bloating
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
0
;
}
nr_rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NR
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,(
void
*
)
bcch_message
);
}
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
(
void
**
)
&
bcch_message
,
(
const
void
*
)
Sdu
,
Sdu_len
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
RRC
,
"[UE %"
PRIu8
"] Failed to decode BCCH_DLSCH_MESSAGE (%zu bits)
\n
"
,
ctxt_pP
->
module_id
,
dec_rval
.
consumed
);
log_dump
(
RRC
,
Sdu
,
Sdu_len
,
LOG_DUMP_CHAR
,
" Received bytes:
\n
"
);
// free the memory
SEQUENCE_free
(
&
asn_DEF_LTE_BCCH_DL_SCH_Message
,
(
void
*
)
bcch_message
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
-
1
;
}
if
(
bcch_message
->
message
.
present
==
NR_BCCH_DL_SCH_MessageType_PR_c1
)
{
switch
(
bcch_message
->
message
.
choice
.
c1
->
present
)
{
case
NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1
:
if
((
ctxt_pP
->
frame
%
2
)
==
0
)
{
// even frame
if
((
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIStatus
&
1
)
==
0
)
{
NR_SIB1_t
*
sib1
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
sib1
[
gNB_index
];
memcpy
(
(
void
*
)
sib1
,
(
void
*
)
bcch_message
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
,
sizeof
(
NR_SIB1_t
)
);
LOG_D
(
RRC
,
"[UE %"
PRIu8
"] Decoding First SIB1
\n
"
,
ctxt_pP
->
module_id
);
nr_decode_SIB1
(
ctxt_pP
,
gNB_index
,
rsrq
,
rsrp
);
}
}
break
;
case
NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation
:
if
((
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
SIStatus
&
1
)
==
1
)
{
// SIB1 with schedulingInfoList is available
NR_SystemInformation_t
*
si
=
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
si
[
gNB_index
];
memcpy
(
si
,
bcch_message
->
message
.
choice
.
c1
->
choice
.
systemInformation
,
sizeof
(
NR_SystemInformation_t
)
);
LOG_I
(
RRC
,
"[UE %"
PRIu8
"] Decoding SI for frameP %"
PRIu32
"
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
);
nr_decode_SI
(
ctxt_pP
,
gNB_index
);
//if (nfapi_mode == 3)
//UE_mac_inst[ctxt_pP->module_id].SI_Decoded = 1;
}
break
;
case
NR_BCCH_DL_SCH_MessageType__c1_PR_NOTHING
:
default:
break
;
}
}
if
(
nr_rrc_get_sub_state
(
ctxt_pP
->
module_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR
)
{
//if ( (NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data != NULL) || (!AMF_MODE_ENABLED)) {
rrc_ue_generate_RRCSetupRequest
(
ctxt_pP
,
0
);
nr_rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
//}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
0
;
}
//-----------------------------------------------------------------------------
void
...
...
@@ -495,6 +645,12 @@ nr_rrc_ue_process_masterCellGroup(
}
if
(
cellGroupConfig
->
spCellConfig
!=
NULL
){
if
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
->
spCellConfig
)
{
memcpy
(
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
->
spCellConfig
,
cellGroupConfig
->
spCellConfig
,
sizeof
(
struct
NR_SpCellConfig
));
}
else
{
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
cell_group_config
->
spCellConfig
=
cellGroupConfig
->
spCellConfig
;
}
//TODO (configure the SpCell as specified in 5.3.5.5.7)
}
...
...
@@ -512,6 +668,42 @@ nr_rrc_ue_process_masterCellGroup(
}
/*--------------------------------------------------*/
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
,
nr_rrc_mui
,
ctxt_pP
->
module_id
+
NB_eNB_INST
,
DCCH
);
// ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue
(
ctxt_pP
,
DCCH
,
nr_rrc_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
int8_t
nr_rrc_ue_decode_ccch
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
SRB_INFO
*
const
Srb_info
,
const
uint8_t
gNB_index
){
NR_DL_CCCH_Message_t
*
dl_ccch_msg
=
NULL
;
asn_dec_rval_t
dec_rval
;
...
...
@@ -571,14 +763,14 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const SRB_IN
ctxt_pP
,
gNB_index
,
&
dl_ccch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetup
->
criticalExtensions
.
choice
.
rrcSetup
->
radioBearerConfig
);
//
nr_rrc_set_state (ctxt_pP->module_id, RRC_STATE_CONNECTED);
//
nr_rrc_set_sub_state (ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED);
nr_rrc_set_state
(
ctxt_pP
->
module_id
,
RRC_STATE_CONNECTED
);
nr_rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_CONNECTED
);
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
gNB_index
].
rnti
=
ctxt_pP
->
rnti
;
/*
rrc_ue_generate_RRCSetupComplete(
rrc_ue_generate_RRCSetupComplete
(
ctxt_pP
,
gNB_index
,
dl_ccch_msg->message.choice.c1
.choice.rrcSetup.
rrc_TransactionIdentifier,
NR_UE_rrc_inst[ctxt_pP->module_id].selected_plmn_identity);
*/
dl_ccch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetup
->
rrc_TransactionIdentifier
,
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
].
selected_plmn_identity
);
rval
=
0
;
break
;
...
...
@@ -936,7 +1128,7 @@ nr_rrc_ue_establish_drb(
LOG_I
(
NR_RRC
,
"[UE %d] Frame %d: processing RRCReconfiguration: reconfiguring DRB %ld
\n
"
,
ue_mod_idP
,
frameP
,
DRB_config
->
drb_Identity
);
//
if(!AMF_MODE_ENABLED) {
if
(
!
AMF_MODE_ENABLED
)
{
ip_addr_offset3
=
0
;
ip_addr_offset4
=
1
;
LOG_I
(
OIP
,
"[UE %d] trying to bring up the OAI interface %d, IP X.Y.%d.%d
\n
"
,
ue_mod_idP
,
ip_addr_offset3
+
ue_mod_idP
,
...
...
@@ -960,7 +1152,7 @@ nr_rrc_ue_establish_drb(
ipv4_address
(
ip_addr_offset3
+
ue_mod_idP
+
1
,
gNB_index
+
1
));
//daddr
LOG_D
(
NR_RRC
,
"[UE %d] State = Attached (gNB %d)
\n
"
,
ue_mod_idP
,
gNB_index
);
}
//
}
}
return
(
0
);
}
...
...
@@ -1400,42 +1592,6 @@ nr_rrc_ue_decode_dcch(
return
0
;
}
/*--------------------------------------------------*/
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
,
nr_rrc_mui
,
ctxt_pP
->
module_id
+
NB_eNB_INST
,
DCCH
);
// ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue
(
ctxt_pP
,
DCCH
,
nr_rrc_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
//-----------------------------------------------------------------------------
void
*
rrc_nrue_task
(
void
*
args_p
)
{
MessageDef
*
msg_p
;
...
...
@@ -1462,22 +1618,34 @@ void *rrc_nrue_task( void *args_p ) {
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
case
RRC_MAC_CCCH_DATA_IND
:
case
NR_RRC_MAC_BCCH_DATA_IND
:
LOG_D
(
RRC
,
"[UE %d] Received %s: frameP %d, gNB %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
frame
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
);
// PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
GNB_FLAG_NO
,
NOT_A_RNTI
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
);
nr_decode_BCCH_DLSCH_Message
(
&
ctxt
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu_size
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrq
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrp
);
case
NR_RRC_MAC_CCCH_DATA_IND
:
LOG_D
(
RRC
,
"[UE %d] RNTI %x Received %s: frameP %d, gNB %d
\n
"
,
ue_mod_id
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
ITTI_MSG_NAME
(
msg_p
),
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
);
srb_info_p
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
Srb0
[
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
];
memcpy
(
srb_info_p
->
Rx_buffer
.
Payload
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
srb_info_p
->
Rx_buffer
.
payload_size
=
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
;
NR_
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
);
srb_info_p
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
Srb0
[
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
];
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
,
ENB_FLAG_NO
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
0
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
);
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
).
g
nb_index
);
nr_rrc_ue_decode_ccch
(
&
ctxt
,
srb_info_p
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
e
nb_index
);
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
g
nb_index
);
break
;
/* PDCP messages */
...
...
openair2/RRC/NR_UE/rrc_defs.h
View file @
602424f6
...
...
@@ -91,6 +91,9 @@ typedef struct NR_UE_RRC_INST_s {
NR_SRB_INFO_TABLE_ENTRY
Srb1
[
NB_CNX_UE
];
NR_SRB_INFO_TABLE_ENTRY
Srb2
[
NB_CNX_UE
];
NR_SIB1_t
*
sib1
[
NB_CNX_UE
];
NR_SystemInformation_t
*
si
[
NB_CNX_UE
];
NR_UE_RRC_INFO
Info
[
NB_SIG_CNX_UE
];
NR_MIB_t
*
mib
;
...
...
@@ -151,6 +154,9 @@ typedef struct NR_UE_RRC_INST_s {
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_ReportConfig_t
,
NR_maxNrofCSI_ReportConfigurations
)
CSI_ReportConfig_list
;
long
selected_plmn_identity
;
Rrc_State_NR_t
nrRrcState
;
Rrc_Sub_State_NR_t
nrRrcSubState
;
}
NR_UE_RRC_INST_t
;
#endif
...
...
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