read pdec mon reg and power switching of syrlinks
This commit is contained in:
@ -12,7 +12,9 @@ from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
class CommandIds:
|
||||
# prints the clcw to the console. Useful for debugging
|
||||
PRINT_CLCW = bytearray([0x0, 0x0, 0x0, 0x0])
|
||||
PRINT_CLCW = byteCrray([0x0, 0x0, 0x0, 0x0])
|
||||
# Print PDEC monitor register
|
||||
PRINT_PDEC_MON = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||
|
||||
|
||||
def pack_pdec_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
@ -25,4 +27,10 @@ def pack_pdec_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: st
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDEC Handler: Print CLCW"))
|
||||
command = object_id + CommandIds.PRINT_CLCW
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "1":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDEC Handler: Print PDEC monitor register"))
|
||||
command = object_id + CommandIds.PRINT_PDEC_MON
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
@ -23,6 +23,8 @@ class Pdu1OpCodes(enum.Enum):
|
||||
SUS_NOMINAL_OFF = "6"
|
||||
ACS_A_SIDE_ON = "7"
|
||||
ACS_A_SIDE_OFF = "8"
|
||||
SYRLINKS_ON = "9"
|
||||
SYRLINKS_OFF = "10"
|
||||
|
||||
|
||||
class PDU1TestProcedure:
|
||||
@ -109,6 +111,20 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SYRLINKS_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_1.parameter_address,
|
||||
PDUConfigTable.out_en_1.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SYRLINKS_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_1.parameter_address,
|
||||
PDUConfigTable.out_en_1.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
||||
|
Reference in New Issue
Block a user