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
Michael Black
OpenXG-RAN
Commits
44d5b378
Commit
44d5b378
authored
Mar 27, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor get_initial_cellGroupConfig()
parent
88e6d9df
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
322 additions
and
309 deletions
+322
-309
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+5
-26
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+2
-272
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+4
-11
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+303
-0
openair2/RRC/NR/nr_rrc_config.h
openair2/RRC/NR/nr_rrc_config.h
+8
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
44d5b378
...
...
@@ -2884,24 +2884,16 @@ void send_initial_ul_rrc_message(gNB_MAC_INST *mac, int rnti, const uint8_t *sdu
NR_UE_info_t
*
UE
=
(
NR_UE_info_t
*
)
rawUE
;
uint8_t
du2cu_rrc_container
[
1024
];
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
UE
->
CellGroup
,
du2cu_rrc_container
,
sizeof
(
du2cu_rrc_container
));
AssertFatal
(
enc_rval
.
encoded
>
0
,
"Could not encode cellGroupConfig for UE %04x, failed element %s
\n
"
,
rnti
,
enc_rval
.
failed_type
->
name
);
uint8_t
du2cu
[
1024
];
int
encoded
=
encode_cellGroupConfig
(
UE
->
CellGroup
,
du2cu
,
sizeof
(
du2cu
));
const
f1ap_initial_ul_rrc_message_t
ul_rrc_msg
=
{
/* TODO: add mcc, mnc, cell_id, ..., is not available at MAC yet */
.
crnti
=
rnti
,
.
rrc_container
=
(
uint8_t
*
)
sdu
,
.
rrc_container_length
=
sdu_len
,
.
du2cu_rrc_container
=
(
uint8_t
*
)
du2cu
_rrc_container
,
.
du2cu_rrc_container_length
=
(
enc_rval
.
encoded
+
7
)
/
8
.
du2cu_rrc_container
=
(
uint8_t
*
)
du2cu
,
.
du2cu_rrc_container_length
=
encoded
};
mac
->
mac_rrc
.
initial_ul_rrc_message_transfer
(
0
,
&
ul_rrc_msg
);
}
...
...
@@ -2915,20 +2907,7 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
mod_id
];
const
NR_ServingCellConfigCommon_t
*
scc
=
rrc
->
carrier
.
servingcellconfigcommon
;
const
NR_ServingCellConfig_t
*
sccd
=
rrc
->
configuration
.
scd
;
NR_CellGroupConfig_t
*
cellGroupConfig
=
calloc
(
1
,
sizeof
(
*
cellGroupConfig
));
AssertFatal
(
cellGroupConfig
!=
NULL
,
"out of memory
\n
"
);
fill_initial_cellGroupConfig
(
UE
->
uid
,
cellGroupConfig
,
scc
,
sccd
,
&
rrc
->
configuration
);
uint8_t
du2cu_rrc_container
[
1024
];
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
cellGroupConfig
,
du2cu_rrc_container
,
sizeof
(
du2cu_rrc_container
));
AssertFatal
(
enc_rval
.
encoded
>
0
,
"Could not encode cellGroupConfig for UE %04x, failed element %s
\n
"
,
UE
->
rnti
,
enc_rval
.
failed_type
->
name
);
NR_CellGroupConfig_t
*
cellGroupConfig
=
get_initial_cellGroupConfig
(
UE
->
uid
,
scc
,
sccd
,
&
rrc
->
configuration
);
UE
->
CellGroup
=
cellGroupConfig
;
nr_mac_update_cellgroup
(
mac
,
UE
->
rnti
,
cellGroupConfig
);
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
44d5b378
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
44d5b378
...
...
@@ -64,17 +64,10 @@ void do_SpCellConfig(gNB_RRC_INST *rrc,
int
do_RRCReject
(
uint8_t
Mod_id
,
uint8_t
*
const
buffer
);
void
fill_initial_SpCellConfig
(
int
uid
,
NR_SpCellConfig_t
*
SpCellConfig
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
const
gNB_RrcConfigurationReq
*
configuration
);
void
fill_initial_cellGroupConfig
(
int
uid
,
NR_CellGroupConfig_t
*
cellGroupConfig
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
const
gNB_RrcConfigurationReq
*
configuration
);
NR_RLC_BearerConfig_t
*
get_SRB_RLC_BearerConfig
(
long
channelId
,
long
priority
,
e_NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration
bucketSizeDuration
);
void
update_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
const
int
uid
,
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
44d5b378
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_config.h
View file @
44d5b378
...
...
@@ -115,4 +115,12 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const gNB_RrcConfigurationReq *configurati
void
free_SIB1_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib1
);
int
encode_SIB1_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib1
,
uint8_t
*
buffer
,
int
max_buffer_size
);
NR_CellGroupConfig_t
*
get_initial_cellGroupConfig
(
int
uid
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
const
gNB_RrcConfigurationReq
*
configuration
);
void
free_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
);
int
encode_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
uint8_t
*
buffer
,
int
max_buffer_size
);
NR_CellGroupConfig_t
*
decode_cellGroupConfig
(
const
uint8_t
*
buffer
,
int
max_buffer_size
);
#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