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
c96ca78b
Commit
c96ca78b
authored
Feb 11, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor TDD/FDD config reading into functions
parent
d379a788
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
15 deletions
+31
-15
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+31
-15
No files found.
openair2/GNB_APP/gnb_config.c
View file @
c96ca78b
...
@@ -1104,6 +1104,35 @@ static int read_du_cell_info(configmodule_interface_t *cfg,
...
@@ -1104,6 +1104,35 @@ static int read_du_cell_info(configmodule_interface_t *cfg,
return
1
;
return
1
;
}
}
static
f1ap_tdd_info_t
read_tdd_config
(
const
NR_ServingCellConfigCommon_t
*
scc
)
{
const
NR_FrequencyInfoDL_t
*
dl
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
;
f1ap_tdd_info_t
tdd
=
{
.
freqinfo
.
arfcn
=
dl
->
absoluteFrequencyPointA
,
.
freqinfo
.
band
=
*
dl
->
frequencyBandList
.
list
.
array
[
0
],
.
tbw
.
scs
=
dl
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
,
.
tbw
.
nrb
=
dl
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
};
return
tdd
;
}
static
f1ap_fdd_info_t
read_fdd_config
(
const
NR_ServingCellConfigCommon_t
*
scc
)
{
const
NR_FrequencyInfoDL_t
*
dl
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
;
const
NR_FrequencyInfoUL_t
*
ul
=
scc
->
uplinkConfigCommon
->
frequencyInfoUL
;
f1ap_fdd_info_t
fdd
=
{
.
dl_freqinfo
.
arfcn
=
dl
->
absoluteFrequencyPointA
,
.
ul_freqinfo
.
arfcn
=
*
ul
->
absoluteFrequencyPointA
,
.
dl_tbw
.
scs
=
dl
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
,
.
ul_tbw
.
scs
=
ul
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
,
.
dl_tbw
.
nrb
=
dl
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
.
ul_tbw
.
nrb
=
ul
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
.
dl_freqinfo
.
band
=
*
dl
->
frequencyBandList
.
list
.
array
[
0
],
.
ul_freqinfo
.
band
=
*
ul
->
frequencyBandList
->
list
.
array
[
0
],
};
return
fdd
;
}
static
f1ap_setup_req_t
*
RC_read_F1Setup
(
uint64_t
id
,
static
f1ap_setup_req_t
*
RC_read_F1Setup
(
uint64_t
id
,
const
char
*
name
,
const
char
*
name
,
const
f1ap_served_cell_info_t
*
info
,
const
f1ap_served_cell_info_t
*
info
,
...
@@ -1129,27 +1158,14 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
...
@@ -1129,27 +1158,14 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
req
->
cell
[
0
].
info
.
nr_cellid
);
req
->
cell
[
0
].
info
.
nr_cellid
);
req
->
cell
[
0
].
info
.
nr_pci
=
*
scc
->
physCellId
;
req
->
cell
[
0
].
info
.
nr_pci
=
*
scc
->
physCellId
;
struct
NR_FrequencyInfoDL
*
frequencyInfoDL
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
;
if
(
scc
->
tdd_UL_DL_ConfigurationCommon
)
{
if
(
scc
->
tdd_UL_DL_ConfigurationCommon
)
{
LOG_I
(
GNB_APP
,
"ngran_DU: Configuring Cell %d for TDD
\n
"
,
0
);
LOG_I
(
GNB_APP
,
"ngran_DU: Configuring Cell %d for TDD
\n
"
,
0
);
req
->
cell
[
0
].
info
.
mode
=
F1AP_MODE_TDD
;
req
->
cell
[
0
].
info
.
mode
=
F1AP_MODE_TDD
;
f1ap_tdd_info_t
*
tdd
=
&
req
->
cell
[
0
].
info
.
tdd
;
req
->
cell
[
0
].
info
.
tdd
=
read_tdd_config
(
scc
);
tdd
->
freqinfo
.
arfcn
=
frequencyInfoDL
->
absoluteFrequencyPointA
;
tdd
->
tbw
.
scs
=
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
tdd
->
tbw
.
nrb
=
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
;
tdd
->
freqinfo
.
band
=
*
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
}
else
{
}
else
{
LOG_I
(
GNB_APP
,
"ngran_DU: Configuring Cell %d for FDD
\n
"
,
0
);
LOG_I
(
GNB_APP
,
"ngran_DU: Configuring Cell %d for FDD
\n
"
,
0
);
req
->
cell
[
0
].
info
.
mode
=
F1AP_MODE_FDD
;
req
->
cell
[
0
].
info
.
mode
=
F1AP_MODE_FDD
;
f1ap_fdd_info_t
*
fdd
=
&
req
->
cell
[
0
].
info
.
fdd
;
req
->
cell
[
0
].
info
.
fdd
=
read_fdd_config
(
scc
);
fdd
->
dl_freqinfo
.
arfcn
=
frequencyInfoDL
->
absoluteFrequencyPointA
;
fdd
->
ul_freqinfo
.
arfcn
=
*
scc
->
uplinkConfigCommon
->
frequencyInfoUL
->
absoluteFrequencyPointA
;
fdd
->
dl_tbw
.
scs
=
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
fdd
->
ul_tbw
.
scs
=
scc
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
fdd
->
dl_tbw
.
nrb
=
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
;
fdd
->
ul_tbw
.
nrb
=
scc
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
;
fdd
->
dl_freqinfo
.
band
=
*
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
fdd
->
ul_freqinfo
.
band
=
*
scc
->
uplinkConfigCommon
->
frequencyInfoUL
->
frequencyBandList
->
list
.
array
[
0
];
}
}
req
->
cell
[
0
].
info
.
measurement_timing_information
=
"0"
;
req
->
cell
[
0
].
info
.
measurement_timing_information
=
"0"
;
...
...
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