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
lizhongxiao
OpenXG-RAN
Commits
c06fdfa3
Commit
c06fdfa3
authored
Oct 17, 2023
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coarse grain ue rrc cleaning
parent
3a3f9e33
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
853 additions
and
1057 deletions
+853
-1057
executables/nr-ue.c
executables/nr-ue.c
+1
-0
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-2
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+1
-2
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-3
openair2/COMMON/rrc_messages_def.h
openair2/COMMON/rrc_messages_def.h
+4
-1
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+7
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+2
-0
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+1
-1
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+0
-1
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+0
-5
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+35
-56
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+2
-7
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+32
-12
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+746
-874
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+15
-20
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+4
-30
openair2/RRC/NR_UE/rrc_timers_and_constants.c
openair2/RRC/NR_UE/rrc_timers_and_constants.c
+1
-1
openair2/RRC/NR_UE/rrc_vars.h
openair2/RRC/NR_UE/rrc_vars.h
+0
-42
No files found.
executables/nr-ue.c
View file @
c06fdfa3
...
...
@@ -599,6 +599,7 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
UE
->
target_Nid_cell
=
-
1
;
}
nr_mac_process_rrc_msg
(
0
);
/* send tick to RLC and PDCP every ms */
if
(
proc
->
nr_slot_rx
%
UE
->
frame_parms
.
slots_per_subframe
==
0
)
{
void
nr_rlc_tick
(
int
frame
,
int
subframe
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
c06fdfa3
...
...
@@ -102,8 +102,7 @@ void nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t
}
int
dummy_nr_ue_ul_indication
(
nr_uplink_indication_t
*
ul_info
)
{
return
(
0
);
}
void
nr_rrc_ue_generate_RRCSetupRequest
(
module_id_t
module_id
,
const
uint8_t
gNB_index
)
void
nr_rrc_ue_generate_ra_msg
(
instance_t
instance
,
RA_trigger_t
trigger
,
uint8_t
gNB_index
)
{
return
;
}
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
c06fdfa3
...
...
@@ -102,8 +102,7 @@ void deref_sched_response(int _)
void
nr_derive_key_ng_ran_star
(
uint16_t
pci
,
uint64_t
nr_arfcn_dl
,
const
uint8_t
key
[
32
],
uint8_t
*
key_ng_ran_star
)
{
}
void
nr_rrc_ue_generate_RRCSetupRequest
(
module_id_t
module_id
,
const
uint8_t
gNB_index
)
void
nr_rrc_ue_generate_ra_msg
(
instance_t
instance
,
RA_trigger_t
trigger
,
uint8_t
gNB_index
)
{
return
;
}
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
c06fdfa3
...
...
@@ -98,8 +98,7 @@ void nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t
}
extern
void
fix_scd
(
NR_ServingCellConfig_t
*
scd
);
// forward declaration
void
nr_rrc_ue_generate_RRCSetupRequest
(
module_id_t
module_id
,
const
uint8_t
gNB_index
)
void
nr_rrc_ue_generate_ra_msg
(
instance_t
instance
,
RA_trigger_t
trigger
,
uint8_t
gNB_index
)
{
return
;
}
...
...
@@ -701,7 +700,6 @@ int main(int argc, char *argv[])
//Configure UE
NR_UE_RRC_INST_t
rrcue
=
{
0
};
rrcue
.
mib
=
mib
->
message
.
choice
.
mib
;
rrcue
.
scell_group_config
=
secondaryCellGroup
;
nr_l2_init_ue
(
&
rrcue
);
...
...
openair2/COMMON/rrc_messages_def.h
View file @
c06fdfa3
...
...
@@ -76,7 +76,10 @@ MESSAGE_DEF(NAS_CONN_RELEASE_IND, MESSAGE_PRIORITY_MED, NasConnRelea
MESSAGE_DEF
(
NAS_UPLINK_DATA_CNF
,
MESSAGE_PRIORITY_MED
,
NasUlDataCnf
,
nas_ul_data_cnf
)
MESSAGE_DEF
(
NAS_DOWNLINK_DATA_IND
,
MESSAGE_PRIORITY_MED
,
NasDlDataInd
,
nas_dl_data_ind
)
// eNB: realtime -> RRC messages
// NR UE: RRC -> NAS messages
MESSAGE_DEF
(
MAC_MIB_REQ
,
MESSAGE_PRIORITY_MED
,
mac_mib_req_t
,
macMibReq
)
// xNB: realtime -> RRC messages
MESSAGE_DEF
(
RRC_SUBFRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
RrcSubframeProcess
,
rrc_subframe_process
)
MESSAGE_DEF
(
NRRRC_FRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
NRRrcFrameProcess
,
nr_rrc_frame_process
)
...
...
openair2/COMMON/rrc_messages_types.h
View file @
c06fdfa3
...
...
@@ -459,4 +459,11 @@ typedef struct rlc_sdu_indication_s {
int
message_id
;
}
RlcSduIndication
;
typedef
struct
{
instance_t
module_id
;
int
cc_idP
;
void
*
mib
;
int
sched_sib
;
}
mac_mib_req_t
;
#endif
/* RRC_MESSAGES_TYPES_H_ */
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
c06fdfa3
...
...
@@ -421,5 +421,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
RAR_grant_t
*
rar_grant
,
uint16_t
rnti
,
const
nr_dci_format_t
dci_format
);
void
nr_mac_process_rrc_msg
(
instance_t
instance
);
#endif
/** @}*/
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
c06fdfa3
...
...
@@ -676,7 +676,7 @@ uint8_t nr_ue_get_rach(module_id_t mod_id,
pdu
+=
sh_size
;
// initialisation by RRC
nr_rrc_ue_generate_
RRCSetupRequest
(
mod_id
,
gNB_id
);
nr_rrc_ue_generate_
ra_msg
(
mod_id
,
INITIAL_ACCESS_FROM_RRC_IDLE
,
gNB_id
);
// CCCH PDU
size_sdu
=
nr_mac_rrc_data_req_ue
(
mod_id
,
CC_id
,
gNB_id
,
frame
,
CCCH
,
pdu
);
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
c06fdfa3
...
...
@@ -42,7 +42,6 @@
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
#include "executables/softmodem-common.h"
#include "openair2/RRC/NR_UE/rrc_proto.h"
#include "openair2/RRC/NR_UE/rrc_vars.h"
#include "openair2/GNB_APP/L1_nr_paramdef.h"
#include "openair2/GNB_APP/gnb_paramdef.h"
#include "radio/ETHERNET/if_defs.h"
...
...
openair2/RRC/LTE/rrc_UE.c
View file @
c06fdfa3
...
...
@@ -5380,8 +5380,6 @@ openair_rrc_top_init_ue(
for
(
module_id
=
0
;
module_id
<
NB_UE_INST
;
module_id
++
)
{
UE_rrc_inst
[
module_id
].
UECap
=
UECap
;
UE_rrc_inst
[
module_id
].
UECapability
=
UECap
->
sdu
;
UE_rrc_inst
[
module_id
].
UECapability_size
=
UECap
->
sdu_size
;
}
LOG_I
(
RRC
,
"[UE] eMBMS active state is %d
\n
"
,
eMBMS_active
);
...
...
@@ -6596,9 +6594,6 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
{
fill_ue_capability
(
NULL
,
received_nr_msg
);
UE_rrc_inst
[
module_id
].
UECap
=
UE_rrc_inst
->
UECap
;
UE_rrc_inst
[
module_id
].
UECapability
=
UE_rrc_inst
->
UECap
->
sdu
;
UE_rrc_inst
[
module_id
].
UECapability_size
=
UE_rrc_inst
->
UECap
->
sdu_size
;
if
(
!
is_en_dc_supported
(
UE_rrc_inst
->
UECap
->
UE_EUTRA_Capability
))
{
LOG_E
(
RRC
,
"en_dc is NOT supported! Not sending RRC_DCCH_DATA_COPY_IND to update UE_Capability_INFO
\n
"
);
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
c06fdfa3
...
...
@@ -771,40 +771,37 @@ int16_t do_RRCReconfiguration(const gNB_RRC_UE_t *UE,
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
uint8_t
do_RRCSetupRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
*
rv
)
{
asn_enc_rval_t
enc_rval
;
uint8_t
buf
[
5
],
buf2
=
0
;
NR_UL_CCCH_Message_t
ul_ccch_msg
;
NR_RRCSetupRequest_t
*
rrcSetupRequest
;
memset
((
void
*
)
&
ul_ccch_msg
,
0
,
sizeof
(
NR_UL_CCCH_Message_t
));
int
do_RRCSetupRequest
(
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
*
rv
)
{
NR_UL_CCCH_Message_t
ul_ccch_msg
=
{
0
};
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_rrcSetupRequest
;
ul_ccch_msg
.
message
.
choice
.
c1
->
choice
.
rrcSetupRequest
=
CALLOC
(
1
,
sizeof
(
NR_RRCSetupRequest_t
));
rrcSetupRequest
=
ul_ccch_msg
.
message
.
choice
.
c1
->
choice
.
rrcSetupRequest
;
asn1cCalloc
(
ul_ccch_msg
.
message
.
choice
.
c1
,
c1
);
c1
->
present
=
NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest
;
asn1cCalloc
(
c1
->
choice
.
rrcSetupRequest
,
rrcSetupRequest
);
if
(
1
)
{
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
present
=
NR_InitialUE_Identity_PR_randomValue
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
size
=
5
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
bits_unused
=
1
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
=
buf
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
0
]
=
rv
[
0
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
1
]
=
rv
[
1
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
2
]
=
rv
[
2
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
3
]
=
rv
[
3
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
4
]
=
rv
[
4
]
&
0xfe
;
BIT_STRING_t
*
str
=
&
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
;
str
->
size
=
5
;
str
->
bits_unused
=
1
;
str
->
buf
=
CALLOC
(
1
,
str
->
size
);
str
->
buf
[
0
]
=
rv
[
0
];
str
->
buf
[
1
]
=
rv
[
1
];
str
->
buf
[
2
]
=
rv
[
2
];
str
->
buf
[
3
]
=
rv
[
3
];
str
->
buf
[
4
]
=
rv
[
4
]
&
0xfe
;
}
else
{
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
present
=
NR_InitialUE_Identity_PR_ng_5G_S_TMSI_Part1
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
size
=
1
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
bits_unused
=
0
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
buf
=
buf
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
buf
[
0
]
=
0x12
;
BIT_STRING_t
*
str
=
&
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
;
str
->
size
=
1
;
str
->
bits_unused
=
0
;
str
->
buf
=
CALLOC
(
1
,
str
->
size
);
str
->
buf
[
0
]
=
0x12
;
}
rrcSetupRequest
->
rrcSetupRequest
.
establishmentCause
=
NR_EstablishmentCause_mo_Signalling
;
//EstablishmentCause_mo_Data;
rrcSetupRequest
->
rrcSetupRequest
.
spare
.
buf
=
&
buf2
;
rrcSetupRequest
->
rrcSetupRequest
.
spare
.
buf
=
CALLOC
(
1
,
1
);
rrcSetupRequest
->
rrcSetupRequest
.
spare
.
buf
[
0
]
=
0
;
// spare not used
rrcSetupRequest
->
rrcSetupRequest
.
spare
.
size
=
1
;
rrcSetupRequest
->
rrcSetupRequest
.
spare
.
bits_unused
=
7
;
...
...
@@ -812,13 +809,10 @@ uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
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
,
buffer_size
);
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_CCCH_Message
,
NULL
,
(
void
*
)
&
ul_ccch_msg
,
buffer
,
buffer_size
);
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
);
ASN_STRUCT_FREE_CONTENTS_ONLY
(
asn_DEF_NR_UL_CCCH_Message
,
&
ul_ccch_msg
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
...
...
@@ -856,39 +850,24 @@ do_NR_RRCReconfigurationComplete_for_nsa(
}
//------------------------------------------------------------------------------
uint8_t
do_NR_RRCReconfigurationComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
*
buffer
,
size_t
buffer_size
,
const
uint8_t
Transaction_id
)
uint8_t
do_NR_RRCReconfigurationComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
const
uint8_t
Transaction_id
)
//------------------------------------------------------------------------------
{
asn_enc_rval_t
enc_rval
;
NR_UL_DCCH_Message_t
ul_dcch_msg
;
NR_RRCReconfigurationComplete_t
*
rrcReconfigurationComplete
;
memset
((
void
*
)
&
ul_dcch_msg
,
0
,
sizeof
(
NR_UL_DCCH_Message_t
));
NR_UL_DCCH_Message_t
ul_dcch_msg
=
{
0
};
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_rrcReconfigurationComplete
;
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReconfigurationComplete
=
CALLOC
(
1
,
sizeof
(
NR_RRCReconfigurationComplete_t
));
rrcReconfigurationComplete
=
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReconfigurationComplete
;
rrcReconfigurationComplete
->
rrc_TransactionIdentifier
=
Transaction_id
;
rrcReconfigurationComplete
->
criticalExtensions
.
choice
.
rrcReconfigurationComplete
=
CALLOC
(
1
,
sizeof
(
NR_RRCReconfigurationComplete_IEs_t
));
rrcReconfigurationComplete
->
criticalExtensions
.
present
=
NR_RRCReconfigurationComplete__criticalExtensions_PR_rrcReconfigurationComplete
;
rrcReconfigurationComplete
->
criticalExtensions
.
choice
.
rrcReconfigurationComplete
->
nonCriticalExtension
=
NULL
;
rrcReconfigurationComplete
->
criticalExtensions
.
choice
.
rrcReconfigurationComplete
->
lateNonCriticalExtension
=
NULL
;
asn1cCalloc
(
ul_dcch_msg
.
message
.
choice
.
c1
,
c1
);
c1
->
present
=
NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete
;
asn1cCalloc
(
c1
->
choice
.
rrcReconfigurationComplete
,
reconfComplete
);
reconfComplete
->
rrc_TransactionIdentifier
=
Transaction_id
;
reconfComplete
->
criticalExtensions
.
present
=
NR_RRCReconfigurationComplete__criticalExtensions_PR_rrcReconfigurationComplete
;
asn1cCalloc
(
reconfComplete
->
criticalExtensions
.
choice
.
rrcReconfigurationComplete
,
extension
);
extension
->
nonCriticalExtension
=
NULL
;
extension
->
lateNonCriticalExtension
=
NULL
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer_size
);
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_I
(
NR_RRC
,
"rrcReconfigurationComplete Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
c06fdfa3
...
...
@@ -117,16 +117,11 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id,
const
int
dedicatedInfoNASLength
,
const
char
*
dedicatedInfoNAS
);
uint8_t
do_RRCSetupRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
*
rv
);
int
do_RRCSetupRequest
(
uint8_t
*
buffer
,
size_t
buffer_size
,
uint8_t
*
rv
);
uint8_t
do_NR_RRCReconfigurationComplete_for_nsa
(
uint8_t
*
buffer
,
size_t
buffer_size
,
NR_RRC_TransactionIdentifier_t
Transaction_id
);
uint8_t
do_NR_RRCReconfigurationComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
*
buffer
,
size_t
buffer_size
,
const
uint8_t
Transaction_id
);
uint8_t
do_NR_RRCReconfigurationComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
const
uint8_t
Transaction_id
);
uint8_t
do_NR_DLInformationTransfer
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
...
...
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
c06fdfa3
...
...
@@ -33,9 +33,9 @@
#include "rrc_defs.h"
#include "rrc_proto.h"
#include "assertions.h"
#include "rrc_vars.h"
#include "MAC/mac.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
typedef
uint32_t
channel_t
;
...
...
@@ -133,17 +133,7 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
switch
(
Srb_id
)
{
case
CCCH
:
LOG_D
(
NR_RRC
,
"nr_mac_rrc_data_req_ue: Payload size = %i
\n
"
,
NR_UE_rrc_inst
[
Mod_idP
].
Srb
[
gNB_id
][
0
].
srb_buffers
.
Tx_buffer
.
payload_size
);
NR_UE_RRC_SRB_INFO_t
*
Srb0
=
&
NR_UE_rrc_inst
[
Mod_idP
].
Srb
[
gNB_id
][
0
];
memcpy
(
buffer_pP
,
(
uint8_t
*
)
Srb0
->
srb_buffers
.
Tx_buffer
.
Payload
,
Srb0
->
srb_buffers
.
Tx_buffer
.
payload_size
);
for
(
int
i
=
0
;
i
<
Srb0
->
srb_buffers
.
Tx_buffer
.
payload_size
;
i
++
)
{
LOG_D
(
NR_RRC
,
"(%i): %i
\n
"
,
i
,
buffer_pP
[
i
]);
}
return
Srb0
->
srb_buffers
.
Tx_buffer
.
payload_size
;
return
mac_rrc_srb0_req
(
Mod_idP
,
gNB_id
,
buffer_pP
);
case
DCCH
:
AssertFatal
(
1
==
0
,
"SRB1 not implemented yet!
\n
"
);
case
DCCH1
:
...
...
@@ -155,6 +145,36 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
return
0
;
}
void
nr_mac_process_rrc_msg
(
instance_t
instance
)
{
MessageDef
*
msg
;
do
{
// Checks if a message has been sent to MAC sub-task
itti_poll_msg
(
TASK_MAC_UE
,
&
msg
);
if
(
!
msg
)
return
;
LOG_I
(
NR_MAC
,
"Received %s from %s: instance %ld
\n
"
,
ITTI_MSG_NAME
(
msg
),
ITTI_MSG_ORIGIN_NAME
(
msg
),
ITTI_MSG_DESTINATION_INSTANCE
(
msg
));
switch
(
ITTI_MSG_ID
(
msg
))
{
case
MAC_MIB_REQ
:
{
mac_mib_req_t
*
req
=
&
msg
->
ittiMsg
.
macMibReq
;
nr_rrc_mac_config_req_mib
(
req
->
module_id
,
req
->
cc_idP
,
req
->
mib
,
req
->
sched_sib
);
}
break
;
default:
LOG_E
(
NR_MAC
,
"Received unexpected message %s
\n
"
,
ITTI_MSG_NAME
(
msg
));
break
;
}
int
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg
),
msg
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
}
while
(
msg
!=
NULL
);
}
void
nr_mac_rrc_ra_ind
(
const
module_id_t
mod_id
,
int
frame
,
bool
success
)
{
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_RA_IND
);
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
c06fdfa3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
openair2/RRC/NR_UE/rrc_defs.h
View file @
c06fdfa3
...
...
@@ -185,6 +185,18 @@ typedef struct NR_UE_RRC_SRB_INFO_s {
NR_SRB_INFO
srb_buffers
;
}
NR_UE_RRC_SRB_INFO_t
;
typedef
struct
rrcPerNB
{
NR_MeasObjectToAddMod_t
*
MeasObj
[
MAX_MEAS_OBJ
];
NR_ReportConfigToAddMod_t
*
ReportConfig
[
MAX_MEAS_CONFIG
];
NR_QuantityConfig_t
*
QuantityConfig
;
NR_MeasIdToAddMod_t
*
MeasId
[
MAX_MEAS_ID
];
NR_MeasGapConfig_t
*
measGapConfig
;
NR_UE_RRC_SRB_INFO_t
Srb
[
NR_NUM_SRB
];
bool
active_DRBs
[
MAX_DRBS_PER_UE
];
bool
active_RLC_entity
[
NR_MAX_NUM_LCID
];
NR_UE_RRC_SI_INFO
SInfo
;
NR_RSRP_Range_t
s_measure
;
}
rrcPerNB_t
;
typedef
struct
NR_UE_RRC_INST_s
{
NR_MeasConfig_t
*
meas_config
;
NR_CellGroupConfig_t
*
cell_group_config
;
...
...
@@ -192,33 +204,16 @@ typedef struct NR_UE_RRC_INST_s {
NR_CellGroupConfig_t
*
scell_group_config
;
NR_RadioBearerConfig_t
*
radio_bearer_config
;
NR_MeasObjectToAddMod_t
*
MeasObj
[
NB_CNX_UE
][
MAX_MEAS_OBJ
];
NR_ReportConfigToAddMod_t
*
ReportConfig
[
NB_CNX_UE
][
MAX_MEAS_CONFIG
];
NR_QuantityConfig_t
*
QuantityConfig
[
NB_CNX_UE
];
NR_MeasIdToAddMod_t
*
MeasId
[
NB_CNX_UE
][
MAX_MEAS_ID
];
NR_MeasGapConfig_t
*
measGapConfig
[
NB_CNX_UE
];
NR_RSRP_Range_t
s_measure
;
rrcPerNB_t
perNB
[
NB_CNX_UE
];
char
*
uecap_file
;
rnti_t
rnti
;
NR_UE_RRC_SRB_INFO_t
Srb
[
NB_CNX_UE
][
NR_NUM_SRB
];
bool
active_DRBs
[
NB_CNX_UE
][
MAX_DRBS_PER_UE
];
bool
active_RLC_entity
[
NB_CNX_UE
][
NR_MAX_NUM_LCID
];
OAI_NR_UECapability_t
*
UECap
;
uint8_t
*
UECapability
;
uint16_t
UECapability_size
;
OAI_NR_UECapability_t
UECap
;
NR_UE_Timers_Constants_t
timers_and_constants
;
RA_trigger_t
ra_trigger
;
plmn_t
plmnID
;
NR_UE_RRC_SI_INFO
SInfo
[
NB_CNX_UE
];
NR_MIB_t
*
mib
;
// NR_MIB_t *mib;
// active BWPs
NR_BWP_DownlinkDedicated_t
*
bwpd
;
...
...
openair2/RRC/NR_UE/rrc_proto.h
View file @
c06fdfa3
...
...
@@ -65,27 +65,6 @@ NR_UE_RRC_INST_t *nr_l3_init_ue(char *, char *, char *);
/**\brief Initial the top level RRC structure instance*/
NR_UE_RRC_INST_t
*
openair_rrc_top_init_ue_nr
(
char
*
,
char
*
,
char
*
);
/**\brief Process NR RRC connection reconfiguration via SRB3
\param rrcReconfiguration decoded rrc connection reconfiguration*/
int8_t
nr_rrc_ue_process_rrcReconfiguration
(
const
module_id_t
module_id
,
NR_RRCReconfiguration_t
*
rrcReconfiguration
);
/**\prief Process measurement config from NR RRC connection reconfiguration message
\param meas_config measurement configuration*/
int8_t
nr_rrc_ue_process_meas_config
(
NR_MeasConfig_t
*
meas_config
);
void
nr_rrc_ue_process_RadioBearerConfig
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
gNB_index
,
NR_RadioBearerConfig_t
*
const
radioBearerConfig
);
/**\brief decode NR BCCH-BCH (MIB) message
\param module_idP module id
\param gNB_index gNB index
\param sduP pointer to buffer of ASN message BCCH-BCH
\param sdu_len length of buffer*/
int8_t
nr_rrc_ue_decode_NR_BCCH_BCH_Message
(
const
module_id_t
module_id
,
const
uint8_t
gNB_index
,
uint8_t
*
const
bufferP
,
const
uint8_t
buffer_len
);
int8_t
nr_rrc_ue_decode_NR_DL_DCCH_Message
(
const
module_id_t
module_id
,
const
uint8_t
gNB_index
,
const
uint8_t
*
buffer
,
const
uint32_t
size
);
/**\brief interface between MAC and RRC thru SRB0 (RLC TM/no PDCP)
\param module_id module id
\param CC_id component carrier id
...
...
@@ -143,9 +122,7 @@ void start_oai_nrue_threads(void);
/**\brief RRC UE generate RRCSetupRequest message.
\param module_id module id
\param gNB_index gNB index */
void
nr_rrc_ue_generate_RRCSetupRequest
(
module_id_t
module_id
,
const
uint8_t
gNB_index
);
void
process_lte_nsa_msg
(
nsa_msg_t
*
msg
,
int
msg_len
);
void
nr_rrc_ue_generate_ra_msg
(
instance_t
instance
,
RA_trigger_t
trigger
,
uint8_t
gNB_index
);
int
get_from_lte_ue_fd
();
...
...
@@ -163,13 +140,10 @@ void handle_rlf_sync(NR_UE_Timers_Constants_t *tac,
void
nr_rrc_handle_SetupRelease_RLF_TimersAndConstants
(
NR_UE_RRC_INST_t
*
rrc
,
struct
NR_SetupRelease_RLF_TimersAndConstants
*
rlf_TimersAndConstants
);
void
nr_rrc_manage_rlc_bearers
(
const
NR_CellGroupConfig_t
*
cellGroupConfig
,
NR_UE_RRC_INST_t
*
rrc
,
int
gNB_index
,
module_id_t
module_id
,
int
rnti
);
int
configure_NR_SL_Preconfig
(
int
sync_source
);
int
mac_rrc_srb0_req
(
const
instance_t
Mod_idP
,
const
uint8_t
gNB_id
,
uint8_t
*
output
);
/** @}*/
#endif
openair2/RRC/NR_UE/rrc_timers_and_constants.c
View file @
c06fdfa3
...
...
@@ -374,7 +374,7 @@ void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
switch
(
rlf_TimersAndConstants
->
present
){
case
NR_SetupRelease_RLF_TimersAndConstants_PR_release
:
// use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1
set_rlf_sib1_timers_and_constants
(
tac
,
rrc
->
SInfo
[
0
]
.
sib1
);
set_rlf_sib1_timers_and_constants
(
tac
,
rrc
->
perNB
[
0
].
SInfo
.
sib1
);
break
;
case
NR_SetupRelease_RLF_TimersAndConstants_PR_setup
:
rlf_tac
=
rlf_TimersAndConstants
->
choice
.
setup
;
...
...
openair2/RRC/NR_UE/rrc_vars.h
deleted
100644 → 0
View file @
3a3f9e33
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/* \file vars.h
* \brief RRC layer variables
* \author R. Knopp, K.H. HSU
* \date 2018
* \version 0.1
* \company Eurecom / NTUST
* \email: knopp@eurecom.fr, kai-hsiang.hsu@eurecom.fr
* \note
* \warning
*/
#ifndef __OPENAIR_NR_RRC_VARS_H__
#define __OPENAIR_NR_RRC_VARS_H__
#include "rrc_defs.h"
extern
NR_UE_RRC_INST_t
*
NR_UE_rrc_inst
;
extern
uint16_t
ue_id_g
;
#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