hopefully soon done
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good

This commit is contained in:
2023-11-29 17:04:30 +01:00
parent 6f86e72042
commit 1660e27ec1
9 changed files with 266 additions and 41 deletions

View File

@ -1,6 +1,6 @@
import enum
import struct
from typing import List
from typing import List, Tuple
from eive_tmtc.gomspace.gomspace_common import (
pack_set_u8_param_command,
@ -14,8 +14,7 @@ from eive_tmtc.gomspace.gomspace_common import (
pack_reboot_command,
)
from eive_tmtc.gomspace.gomspace_pdu_definitions import OUT_ENABLE_LIST
from spacepackets.ecss import PusTelecommand
from tmtccmd.config import OpCodeEntry
from tmtccmd.config import CmdTreeNode, OpCodeEntry
from tmtccmd.tmtc import DefaultPusQueueHelper
from tmtccmd.pus.tc.s3_fsfw_hk import (
make_sid,
@ -258,7 +257,7 @@ def req_hk_cmds(
q: DefaultPusQueueHelper,
op_code: str,
obj_id: bytes,
set_id_pair: [int, int],
set_id_pair: Tuple[int, int],
):
if op_code in PowerOpCodes.REQUEST_CORE_HK_ONCE:
q.add_log_cmd(f"{prefix}: {PowerInfo.REQUEST_CORE_HK_ONCE}")
@ -270,10 +269,6 @@ def req_hk_cmds(
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
def pack_pdu_disable_safe_off_cmd() -> PusTelecommand:
pass
def generic_on_cmd(
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
):
@ -311,6 +306,54 @@ def add_common_power_defs(oce: OpCodeEntry):
oce.add(keys=PowerOpCodes.DISABLE_INFO_HK, info=PowerInfo.DISABLE_INFO_HK)
def add_gomspace_nodes(node: CmdTreeNode):
node.add_child(
CmdTreeNode(
PowerOpCodes.REQUEST_CORE_HK_ONCE[0], PowerInfo.REQUEST_CORE_HK_ONCE
)
)
node.add_child(
CmdTreeNode(PowerOpCodes.REQUEST_AUX_HK_ONCE[0], PowerInfo.REQUEST_AUX_HK_ONCE)
)
node.add_child(
CmdTreeNode(PowerOpCodes.ENABLE_INFO_HK[0], PowerInfo.ENABLE_INFO_HK)
)
node.add_child(
CmdTreeNode(PowerOpCodes.DISABLE_INFO_HK[0], PowerInfo.DISABLE_INFO_HK)
)
node.add_child(
CmdTreeNode(
PowerOpCodes.REQUEST_CORE_HK_ONCE[0],
PowerInfo.REQUEST_CORE_HK_ONCE,
)
)
node.add_child(
CmdTreeNode(
PowerOpCodes.REQUEST_AUX_HK_ONCE[0],
PowerInfo.REQUEST_AUX_HK_ONCE,
)
)
node.add_child(
CmdTreeNode(PowerOpCodes.PRINT_LATCHUPS[0], PowerInfo.PRINT_LATCHUPS)
)
node.add_child(CmdTreeNode(GomspaceOpCode.GET_PARAM[0], GsInfo.GET_PARAMETER))
node.add_child(CmdTreeNode(GomspaceOpCode.REBOOT[0], GsInfo.REBOOT))
node.add_child(
CmdTreeNode(GomspaceOpCode.SET_INTEGER_PARAM[0], GsInfo.SET_PARAMETER)
)
node.add_child(
CmdTreeNode(GomspaceOpCode.REQUEST_CONFIG_TABLE[0], GsInfo.REQUEST_CONFIG_TABLE)
)
node.add_child(CmdTreeNode(GomspaceOpCode.SAVE_TABLE[0], GsInfo.SAVE_TABLE))
node.add_child(
CmdTreeNode(GomspaceOpCode.SAVE_TABLE_DEFAULT[0], GsInfo.SAVE_TABLE_DEFAULT)
)
node.add_child(CmdTreeNode(GomspaceOpCode.LOAD_TABLE[0], GsInfo.LOAD_TABLE))
node.add_child(
CmdTreeNode(GomspaceOpCode.RESET_GND_WATCHDOG[0], GsInfo.RESET_GND_WATCHDOG)
)
def add_gomspace_cmd_defs(oce: OpCodeEntry):
oce.add(
keys=PowerOpCodes.REQUEST_CORE_HK_ONCE,