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
littleBu
OpenXG-RAN
Commits
b5819904
Commit
b5819904
authored
1 year ago
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding timers and contants functions and further code improvements
parent
1268b27c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
661 additions
and
200 deletions
+661
-200
CMakeLists.txt
CMakeLists.txt
+1
-1
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+79
-80
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+147
-119
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+4
-0
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+8
-0
openair2/RRC/NR_UE/rrc_timers_and_constants.c
openair2/RRC/NR_UE/rrc_timers_and_constants.c
+422
-0
No files found.
CMakeLists.txt
View file @
b5819904
...
...
@@ -1445,7 +1445,7 @@ set(NR_L2_SRC_UE
${
NR_RRC_DIR
}
/nr_rrc_config.c
${
NR_UE_RRC_DIR
}
/rrc_UE.c
${
NR_UE_RRC_DIR
}
/rrc_nsa.c
${
NR_
RRC_DIR
}
/nr_rrc_config
.c
${
NR_
UE_RRC_DIR
}
/rrc_timers_and_constants
.c
)
set
(
MAC_SRC
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
b5819904
...
...
@@ -39,91 +39,90 @@
typedef
uint32_t
channel_t
;
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
frame_t
frame
,
const
sub_frame_t
sub_frame
,
const
rnti_t
rnti
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
){
sdu_size_t
sdu_size
=
0
;
switch
(
channel
){
case
NR_BCCH_BCH
:
AssertFatal
(
nr_rrc_ue_decode_NR_BCCH_BCH_Message
(
module_id
,
gNB_index
,
(
uint8_t
*
)
pduP
,
pdu_len
)
==
0
,
"UE decode BCCH-BCH error!
\n
"
);
break
;
case
NR_BCCH_DL_SCH
:
if
(
pdu_len
>
0
)
{
LOG_T
(
NR_RRC
,
"[UE %d] Received SDU for NR-BCCH-DL-SCH on SRB %u from gNB %d
\n
"
,
module_id
,
channel
&
RAB_OFFSET
,
gNB_index
);
MessageDef
*
message_p
;
int
msg_sdu_size
=
BCCH_SDU_SIZE
;
if
(
pdu_len
>
msg_sdu_size
)
{
LOG_E
(
NR_RRC
,
"SDU larger than NR-BCCH-DL-SCH SDU buffer size (%d, %d)"
,
sdu_size
,
msg_sdu_size
);
sdu_size
=
msg_sdu_size
;
}
else
{
sdu_size
=
pdu_len
;
}
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_BCCH_DATA_IND
);
memset
(
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu
,
0
,
BCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu
,
pduP
,
sdu_size
);
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
frame
=
frame
;
//frameP
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sub_frame
=
sub_frame
;
//sub_frameP
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_size
;
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
gnb_index
=
gNB_index
;
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
frame_t
frame
,
const
sub_frame_t
sub_frame
,
const
rnti_t
rnti
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
)
{
sdu_size_t
sdu_size
=
0
;
switch
(
channel
){
case
NR_BCCH_BCH
:
AssertFatal
(
nr_rrc_ue_decode_NR_BCCH_BCH_Message
(
module_id
,
gNB_index
,
(
uint8_t
*
)
pduP
,
pdu_len
)
==
0
,
"UE decode BCCH-BCH error!
\n
"
);
break
;
case
NR_BCCH_DL_SCH
:
if
(
pdu_len
>
0
)
{
LOG_T
(
NR_RRC
,
"[UE %d] Received SDU for NR-BCCH-DL-SCH on SRB %u from gNB %d
\n
"
,
module_id
,
channel
&
RAB_OFFSET
,
gNB_index
);
MessageDef
*
message_p
;
int
msg_sdu_size
=
BCCH_SDU_SIZE
;
if
(
pdu_len
>
msg_sdu_size
)
{
LOG_E
(
NR_RRC
,
"SDU larger than NR-BCCH-DL-SCH SDU buffer size (%d, %d)"
,
sdu_size
,
msg_sdu_size
);
sdu_size
=
msg_sdu_size
;
}
else
{
sdu_size
=
pdu_len
;
}
break
;
case
CCCH
:
if
(
pdu_len
>
0
)
{
LOG_T
(
NR_RRC
,
"[UE %d] Received SDU for CCCH on SRB %u from gNB %d
\n
"
,
module_id
,
channel
&
RAB_OFFSET
,
gNB_index
);
MessageDef
*
message_p
;
int
msg_sdu_size
=
CCCH_SDU_SIZE
;
if
(
pdu_len
>
msg_sdu_size
)
{
LOG_E
(
NR_RRC
,
"SDU larger than CCCH SDU buffer size (%d, %d)"
,
sdu_size
,
msg_sdu_size
);
sdu_size
=
msg_sdu_size
;
}
else
{
sdu_size
=
pdu_len
;
}
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_CCCH_DATA_IND
);
memset
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
0
,
CCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
pduP
,
sdu_size
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
frame
;
//frameP
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sub_frame
=
sub_frame
;
//sub_frameP
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_size
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
gnb_index
=
gNB_index
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
//rntiP
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_BCCH_DATA_IND
);
memset
(
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu
,
0
,
BCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu
,
pduP
,
sdu_size
);
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
frame
=
frame
;
//frameP
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sub_frame
=
sub_frame
;
//sub_frameP
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_size
;
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
gnb_index
=
gNB_index
;
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
}
break
;
case
CCCH
:
if
(
pdu_len
>
0
)
{
LOG_T
(
NR_RRC
,
"[UE %d] Received SDU for CCCH on SRB %u from gNB %d
\n
"
,
module_id
,
channel
&
RAB_OFFSET
,
gNB_index
);
MessageDef
*
message_p
;
int
msg_sdu_size
=
CCCH_SDU_SIZE
;
if
(
pdu_len
>
msg_sdu_size
)
{
LOG_E
(
NR_RRC
,
"SDU larger than CCCH SDU buffer size (%d, %d)"
,
sdu_size
,
msg_sdu_size
);
sdu_size
=
msg_sdu_size
;
}
else
{
sdu_size
=
pdu_len
;
}
break
;
default:
break
;
}
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_CCCH_DATA_IND
);
memset
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
0
,
CCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
pduP
,
sdu_size
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
frame
;
//frameP
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sub_frame
=
sub_frame
;
//sub_frameP
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_size
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
gnb_index
=
gNB_index
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
//rntiP
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
}
break
;
default:
break
;
}
return
(
0
);
return
(
0
);
}
int8_t
nr_mac_rrc_data_req_ue
(
const
module_id_t
Mod_idP
,
const
int
CC_id
,
const
uint8_t
gNB_id
,
const
frame_t
frameP
,
const
rb_id_t
Srb_id
,
uint8_t
*
buffer_pP
){
switch
(
Srb_id
){
const
int
CC_id
,
const
uint8_t
gNB_id
,
const
frame_t
frameP
,
const
rb_id_t
Srb_id
,
uint8_t
*
buffer_pP
)
{
switch
(
Srb_id
)
{
case
CCCH
:
...
...
@@ -148,9 +147,9 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
int8_t
nr_rrc_RA_succeeded
(
const
module_id_t
mod_id
,
const
uint8_t
gNB_index
)
{
if
(
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_active
==
1
)
{
if
(
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_active
==
true
)
{
LOG_W
(
NR_RRC
,
"T304 was stoped with value %i
\n
"
,
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_cnt
);
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_active
=
0
;
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_active
=
false
;
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_cnt
=
0
;
}
return
0
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_UE.c
View file @
b5819904
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_defs.h
View file @
b5819904
...
...
@@ -224,6 +224,10 @@ typedef struct NR_UE_RRC_INST_s {
NR_MIB_t
*
mib
;
// active BWPs
NR_BWP_DownlinkDedicated_t
*
bwpd
;
NR_BWP_UplinkDedicated_t
*
ubwpd
;
/* KeNB as computed from parameters within USIM card */
uint8_t
kgnb
[
32
];
/* Used integrity/ciphering algorithms */
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_proto.h
View file @
b5819904
...
...
@@ -169,6 +169,14 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len);
int
get_from_lte_ue_fd
();
void
configure_spcell
(
NR_UE_RRC_INST_t
*
rrc
,
NR_SpCellConfig_t
*
spcell_config
);
void
reset_rlf_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
set_default_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
nr_rrc_set_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_SIB1_t
*
sib1
);
void
nr_rrc_set_T304
(
NR_UE_Timers_Constants_t
*
tac
,
NR_ReconfigurationWithSync_t
*
reconfigurationWithSync
);
void
nr_rrc_handle_SetupRelease_RLF_TimersAndConstants
(
NR_UE_RRC_INST_t
*
rrc
,
struct
NR_SetupRelease_RLF_TimersAndConstants
*
rlf_TimersAndConstants
);
/** @}*/
#endif
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_timers_and_constants.c
0 → 100644
View file @
b5819904
This diff is collapsed.
Click to expand it.
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