2017-04-25 08:45:34 -07:00
|
|
|
"""
|
2018-03-28 13:58:49 -07:00
|
|
|
EMANE Bypass model for CORE
|
2017-04-25 08:45:34 -07:00
|
|
|
"""
|
2021-05-18 21:29:38 -07:00
|
|
|
from pathlib import Path
|
2020-06-12 09:52:01 -07:00
|
|
|
from typing import List, Set
|
2020-01-14 16:27:08 -08:00
|
|
|
|
2021-11-15 16:40:30 -08:00
|
|
|
from core.config import ConfigBool, Configuration
|
2018-03-29 14:38:32 -07:00
|
|
|
from core.emane import emanemodel
|
2013-08-29 14:21:13 +00:00
|
|
|
|
|
|
|
|
2018-03-29 14:38:32 -07:00
|
|
|
class EmaneBypassModel(emanemodel.EmaneModel):
|
2020-06-12 09:52:01 -07:00
|
|
|
name: str = "emane_bypass"
|
2018-03-29 13:32:06 -07:00
|
|
|
|
2018-03-30 12:08:33 -07:00
|
|
|
# values to ignore, when writing xml files
|
2020-06-12 09:52:01 -07:00
|
|
|
config_ignore: Set[str] = {"none"}
|
2018-03-30 12:08:33 -07:00
|
|
|
|
|
|
|
# mac definitions
|
2020-06-12 09:52:01 -07:00
|
|
|
mac_library: str = "bypassmaclayer"
|
|
|
|
mac_config: List[Configuration] = [
|
2021-11-15 16:40:30 -08:00
|
|
|
ConfigBool(
|
2021-03-31 11:13:40 -07:00
|
|
|
id="none",
|
2018-06-06 14:51:45 -07:00
|
|
|
default="0",
|
2019-09-10 15:10:24 -07:00
|
|
|
label="There are no parameters for the bypass model.",
|
2018-06-06 14:51:45 -07:00
|
|
|
)
|
2013-08-29 14:21:13 +00:00
|
|
|
]
|
2018-03-29 15:13:16 -07:00
|
|
|
|
2018-03-30 12:08:33 -07:00
|
|
|
# phy definitions
|
2020-06-12 09:52:01 -07:00
|
|
|
phy_library: str = "bypassphylayer"
|
|
|
|
phy_config: List[Configuration] = []
|
2018-03-30 12:08:33 -07:00
|
|
|
|
2019-04-08 09:49:37 -07:00
|
|
|
@classmethod
|
2021-05-18 21:29:38 -07:00
|
|
|
def load(cls, emane_prefix: Path) -> None:
|
|
|
|
cls._load_platform_config(emane_prefix)
|