Update TMTC #42

Merged
meierj merged 15 commits from mueller/master into develop 2022-03-17 09:47:35 +01:00
5 changed files with 31 additions and 2 deletions
Showing only changes of commit 2251c8cbf4 - Show all commits

View File

@ -20,12 +20,14 @@ class GomspaceDeviceActionIds(enum.IntEnum):
WDT_RESET = 9 WDT_RESET = 9
REQUEST_HK_TABLE = 16 REQUEST_HK_TABLE = 16
PRINT_SWITCH_V_I = 32 PRINT_SWITCH_V_I = 32
PRINT_LATCHUPS = 33
class GomspaceOpCodes(enum.Enum): class GomspaceOpCodes(enum.Enum):
# Request HK # Request HK
REQUEST_HK_ONCE = "128" REQUEST_HK_ONCE = "128"
PRINT_SWITCH_V_I = "129" PRINT_SWITCH_V_I = "129"
PRINT_LATCHUPS = "130"
class SetIds: class SetIds:

View File

@ -197,6 +197,11 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
keys=GomspaceOpCodes.PRINT_SWITCH_V_I.value, keys=GomspaceOpCodes.PRINT_SWITCH_V_I.value,
info="P60 Dock: Print Switches, Voltages, Currents", info="P60 Dock: Print Switches, Voltages, Currents",
) )
add_op_code_entry(
op_code_dict=op_code_dict,
keys=GomspaceOpCodes.PRINT_LATCHUPS.value,
info="P60 Dock: Print Latchups",
)
add_service_op_code_entry( add_service_op_code_entry(
srv_op_code_dict=cmd_dict, srv_op_code_dict=cmd_dict,
name=CustomServiceList.P60DOCK.value, name=CustomServiceList.P60DOCK.value,

View File

@ -125,7 +125,14 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
) )
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
return if op_code == GomspaceOpCodes.PRINT_LATCHUPS.value:
tc_queue.appendleft(
(QueueCommands.PRINT, "P60 Dock: Print Latchups")
)
command = generate_action_command(
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
)
tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.reboot: if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
command = pack_reboot_command(object_id) command = pack_reboot_command(object_id)

View File

@ -203,6 +203,14 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
) )
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if op_code == GomspaceOpCodes.PRINT_LATCHUPS:
tc_queue.appendleft(
(QueueCommands.PRINT, "PDU1: Print Latchups")
)
command = generate_action_command(
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
)
tc_queue.appendleft(command.pack_command_tuple())
if PDU1TestProcedure.all or PDU1TestProcedure.ping: if PDU1TestProcedure.all or PDU1TestProcedure.ping:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test")) tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

View File

@ -133,7 +133,14 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
) )
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if op_code == GomspaceOpCodes.PRINT_LATCHUPS:
tc_queue.appendleft(
(QueueCommands.PRINT, "PDU2: Print Latchups")
)
command = generate_action_command(
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
)
tc_queue.appendleft(command.pack_command_tuple())
if PDU2TestProcedure.all or PDU2TestProcedure.reboot: if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reboot")) tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reboot"))
command = pack_reboot_command(object_id) command = pack_reboot_command(object_id)