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