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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
2f43b343
Commit
2f43b343
authored
Dec 19, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gnb_config: Replace AssertFatal with static_assert
See parent commit
parent
f02bd8b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+16
-0
No files found.
openair2/GNB_APP/gnb_config.c
View file @
2f43b343
...
...
@@ -1118,6 +1118,8 @@ static int read_du_cell_info(configmodule_interface_t *cfg,
paramdef_t
PLMNParams
[]
=
GNBPLMNPARAMS_DESC
;
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t
config_check_PLMNParams
[]
=
PLMNPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_PLMNParams
)
==
sizeofArray
(
PLMNParams
),
"config_check_PLMNParams and PLMNParams should have the same size"
);
for
(
int
I
=
0
;
I
<
sizeof
(
PLMNParams
)
/
sizeof
(
paramdef_t
);
++
I
)
PLMNParams
[
I
].
chkPptr
=
&
(
config_check_PLMNParams
[
I
]);
paramlist_def_t
PLMNParamList
=
{
GNB_CONFIG_STRING_PLMN_LIST
,
NULL
,
0
};
...
...
@@ -1151,6 +1153,8 @@ static int read_du_cell_info(configmodule_interface_t *cfg,
paramdef_t
SNSSAIParams
[]
=
GNBSNSSAIPARAMS_DESC
;
paramlist_def_t
SNSSAIParamList
=
{
GNB_CONFIG_STRING_SNSSAI_LIST
,
NULL
,
0
};
checkedparam_t
config_check_SNSSAIParams
[]
=
SNSSAIPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_SNSSAIParams
)
==
sizeofArray
(
SNSSAIParams
),
"config_check_SNSSAIParams and SNSSAIParams should have the same size"
);
for
(
int
J
=
0
;
J
<
sizeofArray
(
SNSSAIParams
);
++
J
)
SNSSAIParams
[
J
].
chkPptr
=
&
(
config_check_SNSSAIParams
[
J
]);
char
snssaistr
[
MAX_OPTNAME_SIZE
*
2
+
8
];
...
...
@@ -1288,6 +1292,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
paramdef_t
GNBParams
[]
=
GNBPARAMS_DESC
;
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t
config_check_GNBParams
[]
=
GNBPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_GNBParams
)
==
sizeofArray
(
GNBParams
),
"config_check_GNBParams and GNBParams should have the same size"
);
for
(
int
i
=
0
;
i
<
sizeofArray
(
GNBParams
);
++
i
)
GNBParams
[
i
].
chkPptr
=
&
(
config_check_GNBParams
[
i
]);
config_getlist
(
cfg
,
&
GNBParamList
,
GNBParams
,
sizeofArray
(
GNBParams
),
NULL
);
...
...
@@ -1296,6 +1302,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
paramlist_def_t
MacRLC_ParamList
=
{
CONFIG_STRING_MACRLC_LIST
,
NULL
,
0
};
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t
config_check_MacRLCParams
[]
=
MACRLCPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_MacRLCParams
)
==
sizeofArray
(
MacRLC_Params
),
"config_check_MacRLCParams and MacRLC_Params should have the same size"
);
for
(
int
i
=
0
;
i
<
sizeofArray
(
MacRLC_Params
);
++
i
)
MacRLC_Params
[
i
].
chkPptr
=
&
(
config_check_MacRLCParams
[
i
]);
config_getlist
(
config_get_if
(),
&
MacRLC_ParamList
,
MacRLC_Params
,
sizeofArray
(
MacRLC_Params
),
NULL
);
...
...
@@ -1906,6 +1914,8 @@ gNB_RRC_INST *RCconfig_NRRRC()
paramlist_def_t
PLMNParamList
=
{
GNB_CONFIG_STRING_PLMN_LIST
,
NULL
,
0
};
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t
config_check_PLMNParams
[]
=
PLMNPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_PLMNParams
)
==
sizeofArray
(
PLMNParams
),
"config_check_PLMNParams and PLMNParams should have the same size"
);
for
(
int
I
=
0
;
I
<
sizeofArray
(
PLMNParams
);
++
I
)
PLMNParams
[
I
].
chkPptr
=
&
(
config_check_PLMNParams
[
I
]);
...
...
@@ -2013,7 +2023,11 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
paramlist_def_t
SNSSAIParamList
=
{
GNB_CONFIG_STRING_SNSSAI_LIST
,
NULL
,
0
};
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t
config_check_PLMNParams
[]
=
PLMNPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_PLMNParams
)
==
sizeofArray
(
PLMNParams
),
"config_check_PLMNParams and PLMNParams should have the same size"
);
checkedparam_t
config_check_SNSSAIParams
[]
=
SNSSAIPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_SNSSAIParams
)
==
sizeofArray
(
SNSSAIParams
),
"config_check_SNSSAIParams and SNSSAIParams should have the same size"
);
for
(
int
I
=
0
;
I
<
sizeofArray
(
PLMNParams
);
++
I
)
PLMNParams
[
I
].
chkPptr
=
&
(
config_check_PLMNParams
[
I
]);
...
...
@@ -2277,6 +2291,8 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
paramlist_def_t
PLMNParamList
=
{
GNB_CONFIG_STRING_PLMN_LIST
,
NULL
,
0
};
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t
config_check_PLMNParams
[]
=
PLMNPARAMS_CHECK
;
static_assert
(
sizeofArray
(
config_check_PLMNParams
)
==
sizeofArray
(
PLMNParams
),
"config_check_PLMNParams and PLMNParams should have the same size"
);
for
(
int
I
=
0
;
I
<
sizeofArray
(
PLMNParams
);
++
I
)
PLMNParams
[
I
].
chkPptr
=
&
(
config_check_PLMNParams
[
I
]);
...
...
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