daemon: refactoring to load emane models one time during startup, updates to account for this change

This commit is contained in:
Blake Harnden 2021-05-07 10:40:18 -07:00
parent 1ddb7b7b24
commit 50e3aadc6b
32 changed files with 271 additions and 332 deletions

View file

@ -0,0 +1,35 @@
"""
EMANE Bypass model for CORE
"""
from typing import List, Set
from core.config import Configuration
from core.emane import emanemodel
from core.emulator.enumerations import ConfigDataTypes
class EmaneBypassModel(emanemodel.EmaneModel):
name: str = "emane_bypass"
# values to ignore, when writing xml files
config_ignore: Set[str] = {"none"}
# mac definitions
mac_library: str = "bypassmaclayer"
mac_config: List[Configuration] = [
Configuration(
id="none",
type=ConfigDataTypes.BOOL,
default="0",
label="There are no parameters for the bypass model.",
)
]
# phy definitions
phy_library: str = "bypassphylayer"
phy_config: List[Configuration] = []
@classmethod
def load(cls, emane_prefix: str) -> None:
# ignore default logic
pass