add WDT module
This commit is contained in:
parent
ec8febf623
commit
7cd1b0070a
@ -78,3 +78,4 @@ class CustomServiceList(str, enum.Enum):
|
||||
SYSTEM = "system"
|
||||
PWR_CTRL = "pwr_ctrl"
|
||||
EPS_SS = "eps_subsystem"
|
||||
XIPHOS_WDT = "xiphos_wdt"
|
||||
|
@ -159,6 +159,7 @@ TCS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x01])
|
||||
ACS_CONTROLLER = bytes([0x43, 0x00, 0x00, 0x02])
|
||||
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
||||
PWR_CONTROLLER = bytes([0x43, 0x00, 0x00, 0x04])
|
||||
XIPHOS_WDT_ID = bytes([0x43, 0x00, 0x00, 0x07])
|
||||
|
||||
MISC_TM_STORE = bytes([0x73, 0x02, 0x00, 0x01])
|
||||
OK_TM_STORE = bytes([0x73, 0x02, 0x00, 0x02])
|
||||
|
43
eive_tmtc/tmtc/wdt.py
Normal file
43
eive_tmtc/tmtc/wdt.py
Normal file
@ -0,0 +1,43 @@
|
||||
import enum
|
||||
from tmtccmd.config.tmtc import (
|
||||
OpCodeEntry,
|
||||
TmtcDefinitionWrapper,
|
||||
tmtc_definitions_provider,
|
||||
)
|
||||
from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.config.object_ids import XIPHOS_WDT_ID
|
||||
|
||||
|
||||
class OpCode:
|
||||
ENABLE = "enable"
|
||||
DISBALE = "disable"
|
||||
|
||||
|
||||
class Info:
|
||||
ENABLE = "Enable WDT"
|
||||
DISABLE = "Disable WDT"
|
||||
|
||||
|
||||
class ActionId(enum.IntEnum):
|
||||
ENABLE = 0
|
||||
DISABLE = 1
|
||||
|
||||
|
||||
def pack_wdt_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code == OpCode.ENABLE:
|
||||
q.add_pus_tc(create_action_cmd(XIPHOS_WDT_ID, ActionId.ENABLE))
|
||||
if op_code == OpCode.DISBALE:
|
||||
q.add_pus_tc(create_action_cmd(XIPHOS_WDT_ID, ActionId.DISABLE))
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_health_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCode.ENABLE, info=Info.ENABLE)
|
||||
oce.add(keys=OpCode.ENABLE, info=Info.DISABLE)
|
||||
defs.add_service(
|
||||
CustomServiceList.XIPHOS_WDT, info="Xiphos Watchdog Timer", op_code_entry=oce
|
||||
)
|
Loading…
Reference in New Issue
Block a user