added platform config to emane models, to replace global config, moved core specific emane global configs to session options

This commit is contained in:
Blake Harnden 2021-05-18 21:29:38 -07:00
parent e2a9f6b1f4
commit 071023b1d9
4 changed files with 81 additions and 13 deletions

View file

@ -51,16 +51,25 @@ class EmaneCommEffectModel(emanemodel.EmaneModel):
@classmethod
def load(cls, emane_prefix: Path) -> None:
cls._load_platform_config(emane_prefix)
shim_xml_path = emane_prefix / "share/emane/manifest" / cls.shim_xml
cls.config_shim = emanemanifest.parse(shim_xml_path, cls.shim_defaults)
@classmethod
def configurations(cls) -> List[Configuration]:
return cls.config_shim
return cls.platform_config + cls.config_shim
@classmethod
def config_groups(cls) -> List[ConfigGroup]:
return [ConfigGroup("CommEffect SHIM Parameters", 1, len(cls.configurations()))]
platform_len = len(cls.platform_config)
return [
ConfigGroup("Platform Parameters", 1, platform_len),
ConfigGroup(
"CommEffect SHIM Parameters",
platform_len + 1,
len(cls.configurations()),
),
]
def build_xml_files(self, config: Dict[str, str], iface: CoreInterface) -> None:
"""