p60 print command
This commit is contained in:
@ -7,10 +7,15 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from gomspace.gomspace_common import *
|
||||
|
||||
|
||||
class P60OpCodes(enum.Enum):
|
||||
TEST = "0"
|
||||
STACK_3V3_ON = "1"
|
||||
STACK_3V3_OFF = "2"
|
||||
|
||||
|
||||
class P60DockTestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the P60Dock.
|
||||
@ -57,27 +62,30 @@ class P60DockHkTable:
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
||||
|
||||
|
||||
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
|
||||
if op_code == "1":
|
||||
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code == P60OpCodes.STACK_3V3_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
||||
P60DockConfigTable.out_en_9.parameter_size, Channel.on
|
||||
)
|
||||
# command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
if op_code == "2":
|
||||
return
|
||||
if op_code == P60OpCodes.STACK_3V3_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
||||
P60DockConfigTable.out_en_9.parameter_size, Channel.off
|
||||
)
|
||||
# command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
|
||||
return
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
|
||||
command = pack_reboot_command(object_id)
|
||||
|
@ -91,10 +91,10 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == PduOpCodes.PRINT_HK_TABLE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_HK_TABLE
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
@ -84,10 +84,10 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == PduOpCodes.PRINT_HK_TABLE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Switches, Currents, Voltahes"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_HK_TABLE
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
Reference in New Issue
Block a user