continuing node setup
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good

This commit is contained in:
2023-11-28 17:24:25 +01:00
parent d2fc53c1fa
commit 76fee820e9
6 changed files with 165 additions and 51 deletions

View File

@ -10,6 +10,8 @@ import logging
import struct
from typing import List
from tmtccmd.config import CmdTreeNode
from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.pus_tm.defs import PrintWrapper
from spacepackets.ecss.tc import PusTelecommand
@ -91,6 +93,74 @@ class ImtqActionId:
read_self_test_results = bytearray([0x0, 0x0, 0x0, 0x0D])
CTN = CmdTreeNode
def create_mgt_node() -> CmdTreeNode:
node = CmdTreeNode(
"mgt", "iMTQ MGT device node", hide_children_which_are_leaves=True
)
node.add_child(CmdTreeNode(OpCode.OFF, "Mode OFF"))
node.add_child(CmdTreeNode(OpCode.ON, "Mode ON"))
node.add_child(CmdTreeNode(OpCode.NORMAL, "Mode Normal"))
node.add_child(CmdTreeNode(OpCode.OFF, "Mode OFF"))
node.add_child(
CmdTreeNode(OpCode.REQUEST_ENG_HK_NO_TORQUE, "Request Engineering HK One Shot")
)
node.add_child(
CmdTreeNode(
OpCode.REQUEST_ENG_HK_WITH_TORQUE,
"Request Engineering HK One Shot during Torque",
)
)
node.add_child(
CmdTreeNode(OpCode.ENABLE_ENG_HK_NO_TORQUE, "Enable ENG HK not torque")
)
node.add_child(
CmdTreeNode(OpCode.ENABLE_ENG_HK_WITH_TORQUE, "Enable ENG HK with torque")
)
node.add_child(
CmdTreeNode(OpCode.DISABLE_ENG_HK_NO_TORQUE, "Disable ENG HK not torque")
)
node.add_child(
CmdTreeNode(OpCode.DISABLE_ENG_HK_WITH_TORQUE, "Disable ENG HK with torque")
)
node.add_child(
CmdTreeNode(
OpCode.REQUEST_MGM_RAW_NO_TORQUE,
"Request MGM Raw Without Torque HK One Shot",
)
)
node.add_child(
CmdTreeNode(OpCode.ENABLE_MGM_RAW_NO_TORQUE, "Enable MGM Raw Without Torque HK")
)
node.add_child(
CmdTreeNode(
OpCode.DISABLE_MGM_RAW_NO_TORQUE, "Disable MGM Raw Without Torque HK"
)
)
node.add_child(
CmdTreeNode(
OpCode.REQUEST_MGM_RAW_WITH_TORQUE,
"Request MGM Raw With Torque HK One Shot",
)
)
node.add_child(
CmdTreeNode(OpCode.ENABLE_MGM_RAW_WITH_TORQUE, "Enable MGM Raw With Torque HK")
)
node.add_child(
CTN(OpCode.DISABLE_MGM_RAW_WITH_TORQUE, "Disable MGM Raw With Torque HK")
)
node.add_child(CTN(OpCode.POS_X_SELF_TEST, "IMTQ perform pos X self test"))
node.add_child(CTN(OpCode.NEG_X_SELF_TEST, "IMTQ perform neg X self test"))
node.add_child(CTN(OpCode.POS_Y_SELF_TEST, "IMTQ perform pos Y self test"))
node.add_child(CTN(OpCode.NEG_Y_SELF_TEST, "IMTQ perform neg Y self test"))
node.add_child(CTN(OpCode.POS_Z_SELF_TEST, "IMTQ perform pos Z self test"))
node.add_child(CTN(OpCode.NEG_Z_SELF_TEST, "IMTQ perform neg Z self test"))
node.add_child(CTN(OpCode.SET_DIPOLE, "IMTQ command dipole"))
return node
@tmtc_definitions_provider
def add_imtq_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()