add HK enable and disable cmd
This commit is contained in:
parent
14f7c39e02
commit
9493cdaabf
2
deps/tmtccmd
vendored
2
deps/tmtccmd
vendored
@ -1 +1 @@
|
||||
Subproject commit fbd39a2bd0a5b007c421aace1791029ddf98639d
|
||||
Subproject commit 229a2b5032b0c1becd93fe37f34ddc93a6b425c4
|
@ -11,6 +11,8 @@ from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
make_sid,
|
||||
generate_one_diag_command,
|
||||
enable_periodic_hk_command_with_interval,
|
||||
disable_periodic_hk_command,
|
||||
)
|
||||
from tmtccmd.tc.pus_11_tc_sched import (
|
||||
generate_enable_tc_sched_cmd,
|
||||
@ -40,7 +42,9 @@ class OpCodes:
|
||||
NORMAL_MPA = ["8", "nml_mpa"]
|
||||
NORMAL_HPA = ["9", "nml_hpa"]
|
||||
|
||||
REQ_OS_HK = ["8", "hk_os"]
|
||||
ENABLE_HK = ["enable_hk"]
|
||||
DISABLE_HK = ["disable_hk"]
|
||||
REQ_OS_HK = ["hk_os"]
|
||||
|
||||
INJECT_SSR_TO_DRO_FAILURE = ["10", "inject_ssr_dro_fault"]
|
||||
INJECT_DRO_TO_X8_FAILURE = ["11", "inject_dro_x8_fault"]
|
||||
@ -62,6 +66,8 @@ class Info:
|
||||
NORMAL_MPA = f"{NORMAL}, MPA on"
|
||||
NORMAL_HPA = f"{NORMAL}, HPA on"
|
||||
REQ_OS_HK = "Request One Shot HK"
|
||||
ENABLE_HK = "Enable HK"
|
||||
DISABLE_HK = "Disable HK"
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
@ -128,6 +134,7 @@ def add_pl_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add(keys=OpCodes.NORMAL_MPA, info=Info.NORMAL_MPA)
|
||||
oce.add(keys=OpCodes.NORMAL_HPA, info=Info.NORMAL_HPA)
|
||||
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_HK, info=Info.ENABLE_HK)
|
||||
oce.add(
|
||||
keys=OpCodes.INJECT_SSR_TO_DRO_FAILURE,
|
||||
info="Inject failure SSR to DRO transition",
|
||||
@ -157,6 +164,22 @@ def pack_pl_pcdu_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_pl_pcdu_mode_cmd(q=q, info=Info.SWITCH_ON, mode=Modes.ON, submode=0)
|
||||
if op_code in OpCodes.SWITCH_OFF:
|
||||
pack_pl_pcdu_mode_cmd(q=q, info=Info.SWITCH_OFF, mode=Modes.OFF, submode=0)
|
||||
if op_code in OpCodes.ENABLE_HK:
|
||||
interval = float(
|
||||
input("Please enter HK collection interval in floating point seconds: ")
|
||||
)
|
||||
cmds = enable_periodic_hk_command_with_interval(
|
||||
diag=True, sid=make_sid(PL_PCDU_ID, SetIds.ADC), interval_seconds=interval
|
||||
)
|
||||
q.add_log_cmd(f"Enable PL PCDU HK with interval of {interval} seconds")
|
||||
for cmd in cmds:
|
||||
q.add_pus_tc(cmd)
|
||||
if op_code in OpCodes.DISABLE_HK:
|
||||
cmd = disable_periodic_hk_command(
|
||||
diag=True, sid=make_sid(PL_PCDU_ID, SetIds.ADC)
|
||||
)
|
||||
q.add_log_cmd("Disabling PL PCDU HK")
|
||||
q.add_pus_tc(cmd)
|
||||
if op_code in OpCodes.NORMAL_SSR:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
|
Loading…
Reference in New Issue
Block a user