daemon: updated emane model platform configuration to remove controlportendpoint option, as this will be something core itself will define
This commit is contained in:
parent
3fcefc4d79
commit
b51200e397
2 changed files with 12 additions and 2 deletions
|
@ -27,6 +27,7 @@ class EmaneModel(WirelessModel):
|
|||
"""
|
||||
|
||||
# default platform configuration settings
|
||||
platform_controlport: str = "controlportendpoint"
|
||||
platform_xml: str = "nemmanager.xml"
|
||||
platform_defaults: Dict[str, str] = {
|
||||
"eventservicedevice": DEFAULT_DEV,
|
||||
|
@ -88,6 +89,14 @@ class EmaneModel(WirelessModel):
|
|||
cls.platform_config = emanemanifest.parse(
|
||||
platform_xml_path, cls.platform_defaults
|
||||
)
|
||||
# remove controlport configuration, since core will set this directly
|
||||
controlport_index = None
|
||||
for index, configuration in enumerate(cls.platform_config):
|
||||
if configuration.id == cls.platform_controlport:
|
||||
controlport_index = index
|
||||
break
|
||||
if controlport_index is not None:
|
||||
cls.platform_config.pop(controlport_index)
|
||||
|
||||
@classmethod
|
||||
def configurations(cls) -> List[Configuration]:
|
||||
|
|
|
@ -165,9 +165,10 @@ def build_platform_xml(
|
|||
for configuration in emane_net.model.platform_config:
|
||||
name = configuration.id
|
||||
value = config[configuration.id]
|
||||
if name == "controlportendpoint":
|
||||
value = f"0.0.0.0:{nem_port}"
|
||||
add_param(platform_element, name, value)
|
||||
add_param(
|
||||
platform_element, emane_net.model.platform_controlport, f"0.0.0.0:{nem_port}"
|
||||
)
|
||||
|
||||
# build nem xml
|
||||
nem_definition = nem_file_name(iface)
|
||||
|
|
Loading…
Reference in a new issue