ploc updater commands

This commit is contained in:
Jakob.Meier 2021-08-08 15:02:29 +02:00
parent 98a1d0f856
commit e7d8199e67

View File

@ -36,6 +36,9 @@ class UpdaterActionIds:
class ImagePathDefs:
imageNvm0A = "/mnt/sd0/ploc/updateNvm0A.bin"
imageNvm0B = "/mnt/sd0/ploc/updateNvm0B.bin"
imageNvm1A = "/mnt/sd0/ploc/updateNvm1A.bin"
imageNvm1B = "/mnt/sd0/ploc/updateNvm1B.bin"
def pack_ploc_updater_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
@ -50,3 +53,21 @@ def pack_ploc_updater_test_into(object_id: bytearray, tc_queue: TcQueueT, op_cod
bytearray(ImagePathDefs.imageNvm0A, 'utf-8')
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, "PLOC Supervisor: Update partition B on NVM0"))
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_NVM0_B) + \
bytearray(ImagePathDefs.imageNvm0B, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "2":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update partition A on NVM1"))
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_NVM1_A) + \
bytearray(ImagePathDefs.imageNvm1A, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "3":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update partition B on NVM1"))
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_NVM1_B) + \
bytearray(ImagePathDefs.imageNvm1B, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())