nr-{ue,}softmodem: Check for correct modes

THere are four possibilities, for the three options (phy_test, do_ra,
nsa):

- None is set -> SA
- Only one is set of each -> corresponding mode

Introduce a function softmodem_verify_mode() to check for these.
This commit is contained in:
Robert Schmidt
2024-11-12 13:55:49 +01:00
parent e0e1ca6583
commit 5d2a1ace17
4 changed files with 23 additions and 11 deletions
+3 -6
View File
@@ -407,6 +407,9 @@ int main(int argc, char **argv)
get_common_options(uniqCfg, SOFTMODEM_5GUE_BIT);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
softmodem_verify_mode(get_softmodem_params());
#if T_TRACER
T_Config_Init();
#endif
@@ -461,12 +464,6 @@ int main(int argc, char **argv)
get_channel_model_mode(uniqCfg);
}
if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
if (get_softmodem_params()->sa)
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
if (!get_softmodem_params()->nsa && get_softmodem_params()->emulate_l1)
start_oai_nrue_threads();