This commit is contained in:
parent
6f86e72042
commit
1660e27ec1
@ -24,6 +24,11 @@ from eive_tmtc.tmtc.payload.ploc_supervisor import create_ploc_supv_node
|
||||
from eive_tmtc.tmtc.payload.plpcdu import create_pl_pcdu_node
|
||||
from eive_tmtc.tmtc.payload.scex import create_scex_node
|
||||
from eive_tmtc.tmtc.payload.subsystem import create_payload_subsystem_node
|
||||
from eive_tmtc.tmtc.power.p60dock import create_p60_dock_node
|
||||
from eive_tmtc.tmtc.power.power import create_power_node
|
||||
from eive_tmtc.tmtc.power.acu import create_acu_node
|
||||
from eive_tmtc.tmtc.power.pdu1 import create_pdu1_node
|
||||
from eive_tmtc.tmtc.power.pdu2 import create_pdu2_node
|
||||
from eive_tmtc.tmtc.power.bpx_batt import create_bpx_batt_node
|
||||
from eive_tmtc.tmtc.power.pwr_ctrl import create_pwr_ctrl_node
|
||||
from eive_tmtc.tmtc.power.subsystem import create_eps_subsystem_node
|
||||
@ -110,15 +115,12 @@ class EiveHookObject(HookBase):
|
||||
com_node.add_child(create_ccsds_node())
|
||||
|
||||
eps_node = create_eps_subsystem_node()
|
||||
acu_node = CmdTreeNode("acu", "PCDU ACU component")
|
||||
pdu_1_node = CmdTreeNode("pdu1", "PCDU PDU 1 component")
|
||||
pdu_2_node = CmdTreeNode("pdu2", "PCDU PDU 2 component")
|
||||
p60_dock_node = CmdTreeNode("p60_dock", "PCDU P60 Dock component")
|
||||
eps_node.add_child(create_pwr_ctrl_node())
|
||||
eps_node.add_child(acu_node)
|
||||
eps_node.add_child(pdu_1_node)
|
||||
eps_node.add_child(pdu_2_node)
|
||||
eps_node.add_child(p60_dock_node)
|
||||
eps_node.add_child(create_power_node())
|
||||
eps_node.add_child(create_acu_node())
|
||||
eps_node.add_child(create_pdu1_node())
|
||||
eps_node.add_child(create_pdu2_node())
|
||||
eps_node.add_child(create_p60_dock_node())
|
||||
eps_node.add_child(create_bpx_batt_node())
|
||||
|
||||
payload_node = create_payload_subsystem_node()
|
||||
|
@ -1159,35 +1159,35 @@ def create_str_node() -> CmdTreeNode:
|
||||
node = CmdTreeNode(
|
||||
"str", "Star Tracker Device", hide_children_which_are_leaves=True
|
||||
)
|
||||
node.add_child(CmdTreeNode(OpCodes.ON_BOOTLOADER, "Mode On, Submode Bootloader"))
|
||||
node.add_child(CmdTreeNode(OpCodes.ON_FIRMWARE, "Mode On, Submode Firmware"))
|
||||
node.add_child(CmdTreeNode(OpCodes.NORMAL, "Mode Normal"))
|
||||
node.add_child(CmdTreeNode(OpCodes.OFF, "Mode Off"))
|
||||
node.add_child(CmdTreeNode(OpCodes.PING, "Star Tracker: Ping"))
|
||||
node.add_child(CmdTreeNode(OpCodes.TAKE_IMAGE, "Take Image"))
|
||||
node.add_child(CmdTreeNode(OpCodes.UPLOAD_IMAGE, Info.UPLOAD_IMAGE))
|
||||
node.add_child(CmdTreeNode(OpCodes.DOWNLOAD_IMAGE, Info.DOWNLOAD_IMAGE))
|
||||
node.add_child(CmdTreeNode(OpCodes.ONE_SHOOT_HK, Info.ONE_SHOOT_HK))
|
||||
node.add_child(CmdTreeNode(OpCodes.ENABLE_HK, Info.ENABLE_HK))
|
||||
node.add_child(CmdTreeNode(OpCodes.DISABLE_HK, Info.DISABLE_HK))
|
||||
node.add_child(CmdTreeNode(OpCode.ON_BOOTLOADER, "Mode On, Submode Bootloader"))
|
||||
node.add_child(CmdTreeNode(OpCode.ON_FIRMWARE, "Mode On, Submode Firmware"))
|
||||
node.add_child(CmdTreeNode(OpCode.NORMAL, "Mode Normal"))
|
||||
node.add_child(CmdTreeNode(OpCode.OFF, "Mode Off"))
|
||||
node.add_child(CmdTreeNode(OpCode.PING, "Star Tracker: Ping"))
|
||||
node.add_child(CmdTreeNode(OpCode.TAKE_IMAGE, "Take Image"))
|
||||
node.add_child(CmdTreeNode(OpCode.UPLOAD_IMAGE, Info.UPLOAD_IMAGE))
|
||||
node.add_child(CmdTreeNode(OpCode.DOWNLOAD_IMAGE, Info.DOWNLOAD_IMAGE))
|
||||
node.add_child(CmdTreeNode(OpCode.ONE_SHOOT_HK, Info.ONE_SHOOT_HK))
|
||||
node.add_child(CmdTreeNode(OpCode.ENABLE_HK, Info.ENABLE_HK))
|
||||
node.add_child(CmdTreeNode(OpCode.DISABLE_HK, Info.DISABLE_HK))
|
||||
node.add_child(
|
||||
CmdTreeNode(OpCodes.SET_IMG_PROCESSOR_MODE, Info.SET_IMG_PROCESSOR_MODE)
|
||||
CmdTreeNode(OpCode.SET_IMG_PROCESSOR_MODE, Info.SET_IMG_PROCESSOR_MODE)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
OpCodes.ADD_SECONDARY_TM_TO_NORMAL_MODE,
|
||||
OpCode.ADD_SECONDARY_TM_TO_NORMAL_MODE,
|
||||
Info.ADD_SECONDARY_TM_TO_NORMAL_MODE,
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(OpCodes.READ_SECONDARY_TM_SET, Info.READ_SECONDARY_TM_SET)
|
||||
CmdTreeNode(OpCode.READ_SECONDARY_TM_SET, Info.READ_SECONDARY_TM_SET)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(OpCodes.RESET_SECONDARY_TM_SET, Info.RESET_SECONDARY_TM_SET)
|
||||
CmdTreeNode(OpCode.RESET_SECONDARY_TM_SET, Info.RESET_SECONDARY_TM_SET)
|
||||
)
|
||||
node.add_child(CmdTreeNode(OpCodes.FW_UPDATE, Info.FW_UPDATE))
|
||||
node.add_child(CmdTreeNode(OpCode.FW_UPDATE, Info.FW_UPDATE))
|
||||
node.add_child(
|
||||
CmdTreeNode(OpCodes.SET_TIME_FROM_SYS_TIME, Info.SET_TIME_FROM_SYS_TIME)
|
||||
CmdTreeNode(OpCode.SET_TIME_FROM_SYS_TIME, Info.SET_TIME_FROM_SYS_TIME)
|
||||
)
|
||||
return node
|
||||
|
||||
|
@ -148,7 +148,7 @@ class Info(str, enum.Enum):
|
||||
value: str
|
||||
OFF = "Switch Off"
|
||||
ON = "Switch On"
|
||||
NML = "Switch Normal"
|
||||
NORMAL = "Switch Normal"
|
||||
HK_TO_OBC = "Request HK from PLOC SUPV"
|
||||
START_MPSOC = "Start MPSoC"
|
||||
SHUTDOWN_MPSOC = "Shutdown MPSoC"
|
||||
|
@ -8,6 +8,7 @@ import struct
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.tmtc.power.common_power import (
|
||||
add_gomspace_nodes,
|
||||
pack_common_gomspace_cmds,
|
||||
add_gomspace_cmd_defs,
|
||||
req_hk_cmds,
|
||||
@ -16,7 +17,7 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
OBC_ENDIANNESS,
|
||||
unpack_array_in_data,
|
||||
)
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config import CmdTreeNode, TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
|
||||
from tmtccmd.tmtc import DefaultPusQueueHelper
|
||||
@ -50,6 +51,15 @@ class Info:
|
||||
TEST = "ACU Test"
|
||||
|
||||
|
||||
def create_acu_node() -> CmdTreeNode:
|
||||
node = CmdTreeNode(
|
||||
"acu", "P60 PCDU ACU device", hide_children_which_are_leaves=True
|
||||
)
|
||||
add_gomspace_nodes(node)
|
||||
node.add_child(CmdTreeNode(OpCode.TEST[0], Info.TEST))
|
||||
return node
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_acu_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
|
@ -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,
|
||||
|
@ -5,7 +5,9 @@
|
||||
@author J. Meier
|
||||
@date 13.12.2020
|
||||
"""
|
||||
from tmtccmd.config import CmdTreeNode
|
||||
from eive_tmtc.tmtc.power.common_power import (
|
||||
add_gomspace_nodes,
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
pack_common_power_cmds,
|
||||
@ -243,5 +245,18 @@ def pack_p60dock_cmds( # noqa C901: Complexity okay here.
|
||||
q.add_pus_tc(pack_set_u16_param_command(objb, invalid_address, parameter))
|
||||
|
||||
|
||||
def create_p60_dock_node() -> CmdTreeNode:
|
||||
node = CmdTreeNode(
|
||||
"p60_dock", "P60 PCDU dock device", hide_children_which_are_leaves=True
|
||||
)
|
||||
add_gomspace_nodes(node)
|
||||
node.add_child(CmdTreeNode(CmdString.STACK_3V3_ON, CmdInfo.STACK_3V3_ON))
|
||||
node.add_child(CmdTreeNode(CmdString.STACK_3V3_OFF, CmdInfo.STACK_3V3_OFF))
|
||||
node.add_child(CmdTreeNode(CmdString.STACK_5V_ON, CmdInfo.STACK_5V_ON))
|
||||
node.add_child(CmdTreeNode(CmdString.STACK_5V_OFF, CmdInfo.STACK_5V_OFF))
|
||||
node.add_child(CmdTreeNode(CmdString.TEST, "P60 Tests"))
|
||||
return node
|
||||
|
||||
|
||||
def p60_dock_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
req_hk_cmds("P60 Dock", q, op_code, P60_DOCK_HANDLER, [SetId.CORE, SetId.AUX])
|
||||
|
@ -14,6 +14,7 @@ from eive_tmtc.gomspace.gomspace_common import (
|
||||
)
|
||||
from eive_tmtc.gomspace.gomspace_pdu_definitions import PduHkTable
|
||||
from eive_tmtc.tmtc.power.common_power import (
|
||||
add_gomspace_nodes,
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
PowerOpCodes,
|
||||
@ -23,14 +24,12 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
create_generic_on_cmd,
|
||||
create_generic_off_cmd,
|
||||
pack_common_power_cmds,
|
||||
GomspaceOpCode,
|
||||
GsInfo,
|
||||
add_common_power_defs,
|
||||
SetId,
|
||||
)
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
|
||||
from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper
|
||||
from tmtccmd.config import CmdTreeNode, OpCodeEntry, TmtcDefinitionWrapper
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tmtc import DefaultPusQueueHelper
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
@ -166,6 +165,67 @@ def add_pdu1_common_defs(oce: OpCodeEntry):
|
||||
oce.add(keys=PowerOpCodes.SCEX_OFF, info=info_off_pdu1(Pdu1InfoBase.SCEX))
|
||||
|
||||
|
||||
def add_pdu1_subnodes(node: CmdTreeNode):
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.TCS_ON[0], info_on_pdu1(Pdu1InfoBase.TCS)))
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.TCS_OFF[0], info_off_pdu1(Pdu1InfoBase.TCS))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.STAR_TRACKER_ON[0], info_on_pdu1(Pdu1InfoBase.STR))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.STAR_TRACKER_OFF[0], info_off_pdu1(Pdu1InfoBase.STR))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SUS_N_ON[0], info_on_pdu1(Pdu1InfoBase.SUS_N))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SUS_N_OFF[0], info_off_pdu1(Pdu1InfoBase.SUS_N))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.ACS_A_ON[0], info_on_pdu1(Pdu1InfoBase.ACS_A))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.ACS_A_OFF[0], info_off_pdu1(Pdu1InfoBase.ACS_A))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SYRLINKS_ON[0], info_on_pdu1(Pdu1InfoBase.SYRLINKS))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SYRLINKS_OFF[0], info_off_pdu1(Pdu1InfoBase.SYRLINKS))
|
||||
)
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.MGT_ON[0], info_on_pdu1(Pdu1InfoBase.MGT)))
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.MGT_OFF[0], info_off_pdu1(Pdu1InfoBase.MGT))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.PLOC_ON[0], info_on_pdu1(Pdu1InfoBase.PLOC))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.PLOC_OFF[0], info_off_pdu1(Pdu1InfoBase.PLOC))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SCEX_ON[0], info_on_pdu1(Pdu1InfoBase.SCEX))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SCEX_OFF[0], info_off_pdu1(Pdu1InfoBase.SCEX))
|
||||
)
|
||||
|
||||
|
||||
def create_pdu1_node() -> CmdTreeNode:
|
||||
node = CmdTreeNode(
|
||||
"pdu1", "P60 PCDU PDU1 device", hide_children_which_are_leaves=True
|
||||
)
|
||||
add_gomspace_nodes(node)
|
||||
add_pdu1_subnodes(node)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.PRINT_SWITCH_V_I[0], "PDU1: Print Switches, Voltages, Currents"
|
||||
)
|
||||
)
|
||||
return node
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
@ -176,7 +236,6 @@ def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
keys=PowerOpCodes.PRINT_SWITCH_V_I,
|
||||
info="PDU1: Print Switches, Voltages, Currents",
|
||||
)
|
||||
oce.add(keys=GomspaceOpCode.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
|
||||
defs.add_service(
|
||||
name=CustomServiceList.PDU1.value,
|
||||
|
@ -19,6 +19,7 @@ from eive_tmtc.gomspace.gomspace_common import (
|
||||
)
|
||||
from eive_tmtc.gomspace.gomspace_pdu_definitions import PduHkTable, PduConfigTable
|
||||
from eive_tmtc.tmtc.power.common_power import (
|
||||
add_gomspace_nodes,
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
PowerOpCodes,
|
||||
@ -32,7 +33,7 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
add_common_power_defs,
|
||||
)
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper
|
||||
from tmtccmd.config import CmdTreeNode, OpCodeEntry, TmtcDefinitionWrapper
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tmtc import DefaultPusQueueHelper
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
@ -171,6 +172,85 @@ def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
|
||||
)
|
||||
|
||||
|
||||
def add_pdu2_subnodes(node: CmdTreeNode):
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.ACS_B_ON[0], info_on_pdu2(Pdu2InfoBase.ACS_B))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.ACS_B_OFF[0], info_off_pdu2(Pdu2InfoBase.ACS_B))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SUS_R_ON[0], info_on_pdu2(Pdu2InfoBase.SUS_R))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.SUS_R_OFF[0], info_off_pdu2(Pdu2InfoBase.SUS_R))
|
||||
)
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.RW_ON[0], info_on_pdu2(Pdu2InfoBase.RW)))
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.RW_OFF[0], info_off_pdu2(Pdu2InfoBase.RW)))
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.PL_PCDU_VBAT_NOM_ON[0],
|
||||
info_on_pdu2(Pdu2InfoBase.PL_PCDU_BAT_NOM),
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.PL_PCDU_VBAT_NOM_OFF[0],
|
||||
info_off_pdu2(Pdu2InfoBase.PL_PCDU_BAT_NOM),
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.PL_PCDU_VBAT_RED_ON[0],
|
||||
info_on_pdu2(Pdu2InfoBase.PL_PCDU_BAT_RED),
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.PL_PCDU_VBAT_RED_OFF[0],
|
||||
info_off_pdu2(Pdu2InfoBase.PL_PCDU_BAT_RED),
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.HEATER_ON[0], info_on_pdu2(Pdu2InfoBase.HEATER))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.HEATER_OFF[0], info_off_pdu2(Pdu2InfoBase.HEATER))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.SOLAR_ARRAY_DEPL_ON[0],
|
||||
info_on_pdu2(Pdu2InfoBase.SOLAR_ARRAY_DEPL),
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.SOLAR_ARRAY_DEPL_OFF[0],
|
||||
info_off_pdu2(Pdu2InfoBase.SOLAR_ARRAY_DEPL),
|
||||
)
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.PL_CAM_ON[0], info_on_pdu2(Pdu2InfoBase.PL_CAM))
|
||||
)
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.PL_CAM_OFF[0], info_off_pdu2(Pdu2InfoBase.PL_CAM))
|
||||
)
|
||||
|
||||
|
||||
def create_pdu2_node() -> CmdTreeNode:
|
||||
node = CmdTreeNode(
|
||||
"pdu2", "P60 PCDU PDU2 device", hide_children_which_are_leaves=True
|
||||
)
|
||||
add_gomspace_nodes(node)
|
||||
add_pdu2_subnodes(node)
|
||||
node.add_child(
|
||||
CmdTreeNode(
|
||||
PowerOpCodes.PRINT_SWITCH_V_I[0], "PDU2: Print Switches, Voltages, Currents"
|
||||
)
|
||||
)
|
||||
return node
|
||||
|
||||
|
||||
def pdu2_switch_cmds(q: DefaultPusQueueHelper, op_code: str): # noqa C901
|
||||
if op_code in PowerOpCodes.PL_PCDU_VBAT_NOM_ON:
|
||||
pl_pcdu_bat_nom_on_cmd(q)
|
||||
|
@ -16,18 +16,20 @@ from eive_tmtc.config.object_ids import (
|
||||
get_object_ids,
|
||||
)
|
||||
from eive_tmtc.tmtc.power.pdu1 import (
|
||||
add_pdu1_subnodes,
|
||||
pdu1_req_hk_cmds,
|
||||
pdu1_switch_cmds,
|
||||
add_pdu1_common_defs,
|
||||
add_pdu1_cmds,
|
||||
)
|
||||
from eive_tmtc.tmtc.power.pdu2 import (
|
||||
add_pdu2_subnodes,
|
||||
pdu2_req_hk_cmds,
|
||||
add_pdu2_common_defs,
|
||||
pdu2_switch_cmds,
|
||||
add_pdu2_cmds,
|
||||
)
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config import CmdTreeNode, TmtcDefinitionWrapper, OpCodeEntry
|
||||
from eive_tmtc.config.object_ids import PCDU_HANDLER_ID
|
||||
|
||||
from eive_tmtc.tmtc.power.p60dock import CmdString, CmdInfo, p60_dock_req_hk_cmds
|
||||
@ -132,6 +134,20 @@ def add_p60_cmds(defs: TmtcDefinitionWrapper):
|
||||
)
|
||||
|
||||
|
||||
def create_power_node() -> CmdTreeNode:
|
||||
node = CmdTreeNode("power", "Power commands", hide_children_which_are_leaves=True)
|
||||
add_pdu1_subnodes(node)
|
||||
add_pdu2_subnodes(node)
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.SWITCHER_HK[0], PowerInfo.SWITCHER_HK))
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.INFO_ALL[0], PowerInfo.INFO_ALL))
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.INFO_CORE[0], PowerInfo.INFO_CORE))
|
||||
node.add_child(CmdTreeNode(PowerOpCodes.INFO_AUX[0], PowerInfo.INFO_AUX))
|
||||
node.add_child(
|
||||
CmdTreeNode(PowerOpCodes.RESET_ALL_GND_WDTS[0], PowerInfo.RESET_ALL_GND_WDTS)
|
||||
)
|
||||
return node
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
|
Loading…
x
Reference in New Issue
Block a user