clean up power module a bit
This commit is contained in:
parent
8655f0c9e6
commit
195d5343bc
@ -31,35 +31,6 @@ class GomspaceDeviceActionIds(enum.IntEnum):
|
||||
PRINT_LATCHUPS = 33
|
||||
|
||||
|
||||
class GomspaceOpCodes:
|
||||
# Request HK
|
||||
REQUEST_CORE_HK_ONCE = ["hk_core"]
|
||||
REQUEST_AUX_HK_ONCE = ["hk_aux"]
|
||||
PRINT_SWITCH_V_I = ["print_switch_vi"]
|
||||
PRINT_LATCHUPS = ["print_latchups"]
|
||||
GET_PARAM = ["get_param"]
|
||||
SET_INTEGER_PARAM = ["set_int_param"]
|
||||
SAVE_TABLE = ["save_table"]
|
||||
RESET_GND_WATCHDOG = ["reset_gnd_wdt"]
|
||||
SAVE_TABLE_DEFAULT = ["save_table_default"]
|
||||
LOAD_TABLE = ["load_table"]
|
||||
REQUEST_CONFIG_TABLE = ["cfg_table"]
|
||||
|
||||
|
||||
class GsInfo:
|
||||
REQUEST_CORE_HK_ONCE = "Requesting Core HK once"
|
||||
REQUEST_AUX_HK_ONCE = "Requesting Aux HK once"
|
||||
PRINT_SWITCH_V_I = "Print Switch V I Info"
|
||||
PRINT_LATCHUPS = "Print latchups"
|
||||
GET_PARAMETER = "Get parameter"
|
||||
SET_PARAMETER = "Set integer parameter"
|
||||
REQUEST_CONFIG_TABLE = "Request Config Table"
|
||||
RESET_GND_WATCHDOG = "Reset GND watchdog"
|
||||
SAVE_TABLE = "Save table non-volatile (file)"
|
||||
SAVE_TABLE_DEFAULT = "Save table non-volatile (default)"
|
||||
LOAD_TABLE = "Load Table"
|
||||
|
||||
|
||||
class SetIds:
|
||||
PDU_1_CORE = 1
|
||||
PDU_1_AUX = 2
|
||||
|
@ -6,25 +6,17 @@
|
||||
|
||||
from config.definitions import CustomServiceList
|
||||
from tmtc.power.common_power import (
|
||||
pack_gomspace_cmds,
|
||||
pack_common_gomspace_cmds,
|
||||
add_gomspace_cmd_defs,
|
||||
req_hk_cmds,
|
||||
pack_common_power_cmds,
|
||||
)
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
make_sid,
|
||||
generate_one_diag_command,
|
||||
generate_one_hk_command,
|
||||
)
|
||||
import gomspace.gomspace_common as gs
|
||||
from gomspace.gomspace_common import GomspaceOpCodes
|
||||
from gomspace.gomspace_common import GsInfo as GsInfo
|
||||
from config.object_ids import ACU_HANDLER_ID
|
||||
from tmtc.power.p60dock import P60DockConfigTable
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
@ -68,7 +60,8 @@ def add_acu_cmds(defs: TmtcDefinitionWrapper):
|
||||
|
||||
def pack_acu_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||
q.add_log_cmd("Handling ACU command")
|
||||
pack_gomspace_cmds("ACU", object_id, q, op_code)
|
||||
pack_common_power_cmds("ACU", object_id, q, op_code)
|
||||
pack_common_gomspace_cmds("ACU", object_id, q, op_code)
|
||||
acu_req_hk_cmds(q, op_code)
|
||||
pack_test_cmds(object_id=object_id, q=q)
|
||||
|
||||
@ -173,13 +166,3 @@ def pack_test_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper):
|
||||
ACUConfigTable.ov_mode.parameter_size,
|
||||
)
|
||||
)
|
||||
if ACUTestProcedure.all or ACUTestProcedure.off:
|
||||
q.add_log_cmd("P60 Dock: Turning off ACU")
|
||||
q.add_pus_tc(
|
||||
gs.pack_set_param_command(
|
||||
ACU_HANDLER_ID,
|
||||
P60DockConfigTable.out_en_0.parameter_address,
|
||||
P60DockConfigTable.out_en_0.parameter_size,
|
||||
gs.Channel.off,
|
||||
)
|
||||
)
|
||||
|
@ -1,8 +1,6 @@
|
||||
from gomspace.gomspace_common import (
|
||||
pack_set_u8_param_command,
|
||||
Channel,
|
||||
GomspaceOpCodes,
|
||||
GsInfo,
|
||||
GomspaceDeviceActionIds,
|
||||
prompt_and_pack_set_integer_param_command,
|
||||
prompt_and_pack_get_param_command,
|
||||
@ -23,11 +21,37 @@ from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.util import ObjectIdU32, ObjectIdBase
|
||||
|
||||
|
||||
class GomspaceOpCodes:
|
||||
GET_PARAM = ["get_param"]
|
||||
SET_INTEGER_PARAM = ["set_int_param"]
|
||||
SAVE_TABLE = ["save_table"]
|
||||
RESET_GND_WATCHDOG = ["reset_gnd_wdt"]
|
||||
SAVE_TABLE_DEFAULT = ["save_table_default"]
|
||||
LOAD_TABLE = ["load_table"]
|
||||
REQUEST_CONFIG_TABLE = ["cfg_table"]
|
||||
|
||||
|
||||
class GsInfo:
|
||||
GET_PARAMETER = "Get parameter"
|
||||
SET_PARAMETER = "Set integer parameter"
|
||||
REQUEST_CONFIG_TABLE = "Request Config Table"
|
||||
RESET_GND_WATCHDOG = "Reset GND watchdog"
|
||||
SAVE_TABLE = "Save table non-volatile (file)"
|
||||
SAVE_TABLE_DEFAULT = "Save table non-volatile (default)"
|
||||
LOAD_TABLE = "Load Table"
|
||||
|
||||
|
||||
class PowerInfo:
|
||||
INFO_CORE = "Core Information"
|
||||
INFO_AUX = "Auxiliary Information"
|
||||
INFO_ALL = "All Information"
|
||||
ENABLE_INFO_HK = "Enable Core Info HK"
|
||||
DISABLE_INFO_HK = "Disable Core Info HK"
|
||||
RESET_ALL_GND_WDTS = "Reset all Ground Watchdogs"
|
||||
REQUEST_CORE_HK_ONCE = "Requesting Core HK once"
|
||||
REQUEST_AUX_HK_ONCE = "Requesting Aux HK once"
|
||||
PRINT_SWITCH_V_I = "Print Switch V I Info"
|
||||
PRINT_LATCHUPS = "Print latchups"
|
||||
|
||||
|
||||
class PowerOpCodes:
|
||||
@ -68,24 +92,39 @@ class PowerOpCodes:
|
||||
PL_CAM_OFF = ["cam_off"]
|
||||
|
||||
INFO_CORE = ["info"]
|
||||
ENABLE_INFO_HK = ["info_hk_on"]
|
||||
DISABLE_INFO_HK = ["info_hk_off"]
|
||||
INFO_AUX = ["info_aux"]
|
||||
INFO_ALL = ["info_all"]
|
||||
RESET_ALL_GND_WDTS = ["reset_gnd_wdts"]
|
||||
# Request HK
|
||||
REQUEST_CORE_HK_ONCE = ["hk_core"]
|
||||
REQUEST_AUX_HK_ONCE = ["hk_aux"]
|
||||
PRINT_SWITCH_V_I = ["print_switch_vi"]
|
||||
PRINT_LATCHUPS = ["print_latchups"]
|
||||
|
||||
|
||||
def pack_gomspace_cmds(
|
||||
def pack_common_power_cmds(
|
||||
prefix: str, object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str
|
||||
):
|
||||
objb = object_id.as_bytes
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.PRINT_SWITCH_V_I}")
|
||||
if op_code in PowerOpCodes.ENABLE_INFO_HK:
|
||||
pass
|
||||
|
||||
|
||||
def pack_common_gomspace_cmds(
|
||||
prefix: str, object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str
|
||||
):
|
||||
objb = object_id.as_bytes
|
||||
if op_code in PowerOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.PRINT_SWITCH_V_I}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.PRINT_LATCHUPS}")
|
||||
if op_code in PowerOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.PRINT_LATCHUPS}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
@ -189,12 +228,12 @@ def req_hk_cmds(
|
||||
obj_id: bytes,
|
||||
set_id_pair: [int, int],
|
||||
):
|
||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
||||
if op_code in PowerOpCodes.REQUEST_CORE_HK_ONCE:
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.REQUEST_CORE_HK_ONCE}")
|
||||
hk_sid = make_sid(object_id=obj_id, set_id=set_id_pair[0])
|
||||
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
||||
if op_code in PowerOpCodes.REQUEST_AUX_HK_ONCE:
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.REQUEST_AUX_HK_ONCE}")
|
||||
hk_sid = make_sid(object_id=obj_id, set_id=set_id_pair[1])
|
||||
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||
|
||||
@ -231,15 +270,15 @@ def generic_off_cmd(
|
||||
|
||||
def add_gomspace_cmd_defs(oce: OpCodeEntry):
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
||||
keys=PowerOpCodes.REQUEST_CORE_HK_ONCE,
|
||||
info=PowerInfo.REQUEST_CORE_HK_ONCE,
|
||||
)
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||
keys=PowerOpCodes.REQUEST_AUX_HK_ONCE,
|
||||
info=PowerInfo.REQUEST_AUX_HK_ONCE,
|
||||
)
|
||||
oce.add(keys=PowerOpCodes.PRINT_LATCHUPS, info=PowerInfo.PRINT_LATCHUPS)
|
||||
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info=GsInfo.PRINT_LATCHUPS)
|
||||
oce.add(keys=GomspaceOpCodes.SET_INTEGER_PARAM, info=GsInfo.SET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCodes.REQUEST_CONFIG_TABLE, info=GsInfo.REQUEST_CONFIG_TABLE)
|
||||
oce.add(keys=GomspaceOpCodes.SAVE_TABLE, info=GsInfo.SAVE_TABLE)
|
||||
|
@ -5,7 +5,11 @@
|
||||
@author J. Meier
|
||||
@date 13.12.2020
|
||||
"""
|
||||
from tmtc.power.common_power import pack_gomspace_cmds, req_hk_cmds
|
||||
from tmtc.power.common_power import (
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
pack_common_power_cmds,
|
||||
)
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from gomspace.gomspace_common import (
|
||||
TableEntry,
|
||||
@ -96,7 +100,8 @@ class P60DockHkTable:
|
||||
|
||||
def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||
objb = object_id.as_bytes
|
||||
pack_gomspace_cmds("P60 Dock", object_id, q, op_code)
|
||||
pack_common_power_cmds("P60 Dock", object_id, q, op_code)
|
||||
pack_common_gomspace_cmds("P60 Dock", object_id, q, op_code)
|
||||
p60_dock_req_hk_cmds(q, op_code)
|
||||
if op_code in P60OpCodes.STACK_3V3_ON:
|
||||
q.add_log_cmd(P60Info.STACK_3V3_ON)
|
||||
|
@ -3,18 +3,25 @@
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
from config.definitions import CustomServiceList
|
||||
from config.object_ids import PDU_1_HANDLER_ID
|
||||
from tmtc.power.common_power import (
|
||||
pack_gomspace_cmds,
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
PowerOpCodes,
|
||||
generic_on_cmd,
|
||||
generic_off_cmd,
|
||||
add_gomspace_cmd_defs,
|
||||
pack_common_power_cmds,
|
||||
GomspaceOpCodes,
|
||||
GsInfo,
|
||||
PowerInfo,
|
||||
)
|
||||
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
from tmtccmd.config import OpCodeEntry
|
||||
from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
|
||||
|
||||
class Pdu1InfoBase:
|
||||
@ -61,7 +68,8 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
objb = object_id.as_bytes
|
||||
pdu1_cmds(q, op_code)
|
||||
pdu1_req_hk_cmds(q, op_code)
|
||||
pack_gomspace_cmds("PDU1", object_id, q, op_code)
|
||||
pack_common_power_cmds("PDU1", object_id, q, op_code)
|
||||
pack_common_gomspace_cmds("PDU1", object_id, q, op_code)
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||
q.add_log_cmd("PDU1: Ping Test")
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
@ -146,6 +154,26 @@ def add_pdu1_common_defs(oce: OpCodeEntry):
|
||||
oce.add(keys=PowerOpCodes.SCEX_OFF, info=info_off_pdu1(Pdu1InfoBase.SCEX))
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu1_common_defs(oce)
|
||||
add_gomspace_cmd_defs(oce)
|
||||
oce.add(keys=PowerOpCodes.REQUEST_CORE_HK_ONCE, info=PowerInfo.REQUEST_CORE_HK_ONCE)
|
||||
oce.add(keys=PowerOpCodes.REQUEST_AUX_HK_ONCE, info=PowerInfo.REQUEST_AUX_HK_ONCE)
|
||||
oce.add(
|
||||
keys=PowerOpCodes.PRINT_SWITCH_V_I,
|
||||
info="PDU1: Print Switches, Voltages, Currents",
|
||||
)
|
||||
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
|
||||
defs.add_service(
|
||||
name=CustomServiceList.PDU1.value,
|
||||
info="PDU1 Device",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
def tcs_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||
|
||||
|
@ -8,15 +8,18 @@
|
||||
"""
|
||||
from config.object_ids import PDU_2_HANDLER_ID
|
||||
from tmtc.power.common_power import (
|
||||
pack_gomspace_cmds,
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
PowerOpCodes,
|
||||
generic_on_cmd,
|
||||
generic_off_cmd,
|
||||
add_gomspace_cmd_defs,
|
||||
pack_common_power_cmds,
|
||||
)
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
from tmtccmd.config import OpCodeEntry
|
||||
from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
|
||||
|
||||
class Pdu2InfoBase:
|
||||
@ -74,7 +77,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
objb = object_id.as_bytes
|
||||
pdu2_cmds(q, op_code)
|
||||
pdu2_req_hk_cmds(q, op_code)
|
||||
pack_gomspace_cmds("PDU2", object_id, q, op_code)
|
||||
pack_common_power_cmds("PDU2", object_id, q, op_code)
|
||||
pack_common_gomspace_cmds("PDU2", object_id, q, op_code)
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
|
||||
q.add_log_cmd("PDU2: Reboot")
|
||||
q.add_pus_tc(pack_reboot_command(object_id))
|
||||
@ -130,6 +134,26 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
q.add_pus_tc(pack_request_full_hk_table_command(object_id))
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu2_common_defs(oce)
|
||||
add_gomspace_cmd_defs(oce)
|
||||
oce.add(
|
||||
keys=PowerOpCodes.PRINT_SWITCH_V_I,
|
||||
info="PDU2: Print Switches, Voltages, Currents",
|
||||
)
|
||||
oce.add(
|
||||
keys=PowerOpCodes.PRINT_LATCHUPS,
|
||||
info="PDU2: Print Latchups",
|
||||
)
|
||||
defs.add_service(
|
||||
name="pdu2",
|
||||
info="PDU2 Device",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
def pdu2_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in PowerOpCodes.PL_PCDU_VBAT_NOM_ON:
|
||||
pl_pcdu_bat_nom_on_cmd(q)
|
||||
|
@ -1,4 +1,3 @@
|
||||
from gomspace.gomspace_common import GsInfo, GomspaceOpCodes
|
||||
from tmtc.power.common_power import (
|
||||
PowerOpCodes,
|
||||
PowerInfo,
|
||||
@ -13,8 +12,18 @@ from config.object_ids import (
|
||||
PDU_2_HANDLER_ID,
|
||||
get_object_ids,
|
||||
)
|
||||
from tmtc.power.pdu1 import pdu1_req_hk_cmds, pdu1_cmds, add_pdu1_common_defs
|
||||
from tmtc.power.pdu2 import pdu2_req_hk_cmds, add_pdu2_common_defs, pdu2_cmds
|
||||
from tmtc.power.pdu1 import (
|
||||
pdu1_req_hk_cmds,
|
||||
pdu1_cmds,
|
||||
add_pdu1_common_defs,
|
||||
add_pdu1_cmds,
|
||||
)
|
||||
from tmtc.power.pdu2 import (
|
||||
pdu2_req_hk_cmds,
|
||||
add_pdu2_common_defs,
|
||||
pdu2_cmds,
|
||||
add_pdu2_cmds,
|
||||
)
|
||||
from tmtccmd import get_console_logger
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
|
||||
@ -31,26 +40,26 @@ def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pdu1_cmds(q, op_code)
|
||||
pdu2_cmds(q, op_code)
|
||||
if op_code in PowerOpCodes.INFO_CORE:
|
||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu1_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
q.add_wait_seconds(8.0)
|
||||
elif op_code in PowerOpCodes.INFO_AUX:
|
||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
pdu1_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
q.add_wait_seconds(8.0)
|
||||
elif op_code in PowerOpCodes.INFO_ALL:
|
||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
pdu1_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu1_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
p60_dock_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
acu_req_hk_cmds(q, PowerOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
q.add_wait_seconds(8.0)
|
||||
elif op_code in PowerOpCodes.RESET_ALL_GND_WDTS:
|
||||
oids = get_object_ids()
|
||||
@ -93,46 +102,6 @@ def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu1_common_defs(oce)
|
||||
add_gomspace_cmd_defs(oce)
|
||||
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
||||
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||
info="PDU1: Print Switches, Voltages, Currents",
|
||||
)
|
||||
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
|
||||
defs.add_service(
|
||||
name=CustomServiceList.PDU1.value,
|
||||
info="PDU1 Device",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu2_common_defs(oce)
|
||||
add_gomspace_cmd_defs(oce)
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||
info="PDU2: Print Switches, Voltages, Currents",
|
||||
)
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
||||
info="PDU2: Print Latchups",
|
||||
)
|
||||
defs.add_service(
|
||||
name="pdu2",
|
||||
info="PDU2 Device",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
def add_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||
add_p60_cmds(defs)
|
||||
add_pdu1_cmds(defs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user