v1.9.0 #53

Merged
muellerr merged 354 commits from develop into master 2022-04-07 17:39:42 +02:00
5 changed files with 83 additions and 41 deletions
Showing only changes of commit b1e89d4046 - Show all commits

View File

@ -30,6 +30,8 @@ class CustomServiceList(enum.Enum):
RAD_SENSOR = "rad_sensor" RAD_SENSOR = "rad_sensor"
PLOC_SUPV = "ploc_supv" PLOC_SUPV = "ploc_supv"
PLOC_UPDATER = "ploc_updater" PLOC_UPDATER = "ploc_updater"
GPS_0 = "gps0"
GPS_1 = "gps1"
PLOC_MEMORY_DUMPER = "ploc_memory_dumper" PLOC_MEMORY_DUMPER = "ploc_memory_dumper"
CORE = 'core' CORE = 'core'
STAR_TRACKER = 'star_tracker' STAR_TRACKER = 'star_tracker'

View File

@ -5,9 +5,7 @@
@author J. Meier @author J. Meier
@date 21.12.2020 @date 21.12.2020
""" """
from tmtccmd.tc.packer import TcQueueT from tmtccmd.tc.packer import TcQueueT
from tmtccmd.ecss.tc import PusTelecommand
from tmtccmd.config.definitions import QueueCommands from tmtccmd.config.definitions import QueueCommands
from gomspace.gomspace_common import * from gomspace.gomspace_common import *
from pus_tc.p60dock import P60DockConfigTable from pus_tc.p60dock import P60DockConfigTable
@ -64,13 +62,13 @@ def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT):
p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address, p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
P60DockConfigTable.out_en_0.parameter_size, Channel.on P60DockConfigTable.out_en_0.parameter_size, Channel.on
) )
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.reboot: if ACUTestProcedure.all or ACUTestProcedure.reboot:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reboot")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reboot"))
command = pack_reboot_command(object_id) command = pack_reboot_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.read_gnd_wdt: if ACUTestProcedure.all or ACUTestProcedure.read_gnd_wdt:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ground watchdog timer value")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ground watchdog timer value"))
@ -78,54 +76,54 @@ def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT):
object_id, TableIds.hk, ACUHkTable.wdt_gnd_left.parameter_address, object_id, TableIds.hk, ACUHkTable.wdt_gnd_left.parameter_address,
ACUHkTable.wdt_gnd_left.parameter_size ACUHkTable.wdt_gnd_left.parameter_size
) )
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.gnd_wdt_reset: if ACUTestProcedure.all or ACUTestProcedure.gnd_wdt_reset:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Testing ground watchdog reset")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Testing ground watchdog reset"))
command = pack_gnd_wdt_reset_command(object_id) command = pack_gnd_wdt_reset_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.ping: if ACUTestProcedure.all or ACUTestProcedure.ping:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Ping Test")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: 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])
command = pack_ping_command(object_id, ping_data) command = pack_ping_command(object_id, ping_data)
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.read_temperature3: if ACUTestProcedure.all or ACUTestProcedure.read_temperature3:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading temperature 3")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading temperature 3"))
command = pack_get_param_command(object_id, TableIds.hk, ACUHkTable.temperature3.parameter_address, command = pack_get_param_command(object_id, TableIds.hk, ACUHkTable.temperature3.parameter_address,
ACUHkTable.temperature3.parameter_size) ACUHkTable.temperature3.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.read_vboost: if ACUTestProcedure.all or ACUTestProcedure.read_vboost:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vboost value")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vboost value"))
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vboost.parameter_address, command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vboost.parameter_address,
ACUConfigTable.vboost.parameter_size) ACUConfigTable.vboost.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_hi: if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_hi:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_hi")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_hi"))
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vbat_max_hi.parameter_address, command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vbat_max_hi.parameter_address,
ACUConfigTable.vbat_max_hi.parameter_size) ACUConfigTable.vbat_max_hi.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_lo: if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_lo:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_lo")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_lo"))
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vbat_max_lo.parameter_address, command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vbat_max_lo.parameter_address,
ACUConfigTable.vbat_max_lo.parameter_size) ACUConfigTable.vbat_max_lo.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if ACUTestProcedure.all or ACUTestProcedure.read_ov_mode: if ACUTestProcedure.all or ACUTestProcedure.read_ov_mode:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ov_mode")) tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ov_mode"))
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.ov_mode.parameter_address, command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.ov_mode.parameter_address,
ACUConfigTable.ov_mode.parameter_size) ACUConfigTable.ov_mode.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning off ACU")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning off ACU"))
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address, command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
P60DockConfigTable.out_en_0.parameter_size, Channel.off) P60DockConfigTable.out_en_0.parameter_size, Channel.off)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
return tc_queue return tc_queue

22
pus_tc/gps.py Normal file
View File

@ -0,0 +1,22 @@
import enum
from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.definitions import TcQueueT
from tmtccmd.tc.service_8_functional_cmd import generate_action_command
from config.object_ids import GPS_HANDLER_1_ID, GPS_HANDLER_0_ID
class GpsOpCodes(enum.Enum):
RESET_GNSS = "5"
def pack_gps_command(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
if op_code == GpsOpCodes.RESET_GNSS.value:
if object_id == GPS_HANDLER_0_ID:
tc_queue.appendleft((QueueCommands.PRINT, "Resetting GPS device 0"))
elif object_id == GPS_HANDLER_1_ID:
tc_queue.appendleft((QueueCommands.PRINT, "Resetting GPS device 1"))
cmd = generate_action_command(object_id=object_id, action_id=int(op_code))
tc_queue.appendleft(cmd.pack_command_tuple())

View File

@ -62,24 +62,28 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
if op_code == "1": if op_code == "1":
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 on")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 on"))
parameter = 0 # set channel off parameter = 0 # set channel off
command = pack_set_param_command(object_id, P60DockConfigTable.out_en_9.parameter_address, command = pack_set_param_command(
P60DockConfigTable.out_en_9.parameter_size, Channel.on) object_id, P60DockConfigTable.out_en_9.parameter_address,
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command) 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()) tc_queue.appendleft(command.pack_command_tuple())
return tc_queue return tc_queue
if op_code == "2": if op_code == "2":
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 off")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 off"))
parameter = 0 # set channel off parameter = 0 # set channel off
command = pack_set_param_command(object_id, P60DockConfigTable.out_en_9.parameter_address, command = pack_set_param_command(
P60DockConfigTable.out_en_9.parameter_size, Channel.off) object_id, P60DockConfigTable.out_en_9.parameter_address,
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command) 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()) tc_queue.appendleft(command.pack_command_tuple())
return tc_queue return tc_queue
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)
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.read_gnd_wdt: if P60DockTestProcedure.all or P60DockTestProcedure.read_gnd_wdt:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reading ground watchdog timer value")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reading ground watchdog timer value"))
@ -87,25 +91,25 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
object_id, TableIds.hk, P60DockHkTable.wdt_gnd_left.parameter_address, object_id, TableIds.hk, P60DockHkTable.wdt_gnd_left.parameter_address,
P60DockHkTable.wdt_gnd_left.parameter_size P60DockHkTable.wdt_gnd_left.parameter_size
) )
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.gnd_wdt_reset: if P60DockTestProcedure.all or P60DockTestProcedure.gnd_wdt_reset:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing ground watchdog reset")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing ground watchdog reset"))
command = pack_gnd_wdt_reset_command(object_id) command = pack_gnd_wdt_reset_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.ping: if P60DockTestProcedure.all or P60DockTestProcedure.ping:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Ping")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Ping"))
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])
command = pack_ping_command(object_id, ping_data) command = pack_ping_command(object_id, ping_data)
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_off: if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_off:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 off")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 off"))
parameter = 0 # set channel off parameter = 0 # set channel off
command = pack_set_param_command(object_id, P60DockConfigTable.out_en_3.parameter_address, command = pack_set_param_command(object_id, P60DockConfigTable.out_en_3.parameter_address,
P60DockConfigTable.out_en_3.parameter_size, parameter) P60DockConfigTable.out_en_3.parameter_size, parameter)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.read_temperature1: if P60DockTestProcedure.all or P60DockTestProcedure.read_temperature1:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing temperature reading")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing temperature reading"))
@ -113,14 +117,14 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address, object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address,
P60DockHkTable.temperature1.parameter_size P60DockHkTable.temperature1.parameter_size
) )
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on: if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
tc_queue.appendleft((QueueCommands.PRINT, tc_queue.appendleft((QueueCommands.PRINT,
"P60 Dock: Testing Output Channel 3 state (PDU2)")) "P60 Dock: Testing Output Channel 3 state (PDU2)"))
command = pack_get_param_command(object_id, TableIds.config, P60DockConfigTable.out_en_3.parameter_address, command = pack_get_param_command(object_id, TableIds.config, P60DockConfigTable.out_en_3.parameter_address,
P60DockConfigTable.out_en_3.parameter_size) P60DockConfigTable.out_en_3.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.read_cur_lu_lim_0: if P60DockTestProcedure.all or P60DockTestProcedure.read_cur_lu_lim_0:
tc_queue.appendleft((QueueCommands.PRINT, tc_queue.appendleft((QueueCommands.PRINT,
@ -129,14 +133,14 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
object_id, TableIds.config, P60DockConfigTable.cur_lu_lim_0.parameter_address, object_id, TableIds.config, P60DockConfigTable.cur_lu_lim_0.parameter_address,
P60DockConfigTable.cur_lu_lim_0.parameter_size P60DockConfigTable.cur_lu_lim_0.parameter_size
) )
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on: if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 on")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 on"))
parameter = 1 # set channel on parameter = 1 # set channel on
command = pack_set_param_command(object_id, P60DockConfigTable.out_en_3.parameter_address, command = pack_set_param_command(object_id, P60DockConfigTable.out_en_3.parameter_address,
P60DockConfigTable.out_en_3.parameter_size, parameter) P60DockConfigTable.out_en_3.parameter_size, parameter)
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_table_id_test: if P60DockTestProcedure.all or P60DockTestProcedure.invalid_table_id_test:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing invalid table id handling")) tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing invalid table id handling"))
@ -145,7 +149,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
object_id, table_id_invalid, P60DockHkTable.temperature1.parameter_address, object_id, table_id_invalid, P60DockHkTable.temperature1.parameter_address,
P60DockHkTable.temperature1.parameter_size P60DockHkTable.temperature1.parameter_size
) )
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_address_test: if P60DockTestProcedure.all or P60DockTestProcedure.invalid_address_test:
tc_queue.appendleft((QueueCommands.PRINT, tc_queue.appendleft((QueueCommands.PRINT,
@ -153,7 +157,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
invalid_address = bytearray([0x01, 0xF4]) invalid_address = bytearray([0x01, 0xF4])
command = pack_get_param_command(object_id, TableIds.hk, invalid_address, command = pack_get_param_command(object_id, TableIds.hk, invalid_address,
P60DockHkTable.temperature1.parameter_size) P60DockHkTable.temperature1.parameter_size)
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.PRINT, tc_queue.appendleft((QueueCommands.PRINT,
"P60 Dock: Testing invalid address handling in set param command")) "P60 Dock: Testing invalid address handling in set param command"))
@ -161,7 +165,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
parameter_size = 2 parameter_size = 2
parameter = 1 parameter = 1
command = pack_set_param_command(object_id, invalid_address, parameter_size, parameter) command = pack_set_param_command(object_id, invalid_address, parameter_size, parameter)
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_parameter_size_test: if P60DockTestProcedure.all or P60DockTestProcedure.invalid_parameter_size_test:
tc_queue.appendleft( tc_queue.appendleft(
@ -172,7 +176,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
command = pack_get_param_command( command = pack_get_param_command(
object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address, invalid_size object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address, invalid_size
) )
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft( tc_queue.appendleft(
(QueueCommands.PRINT, (QueueCommands.PRINT,
@ -182,7 +186,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
command = pack_set_param_command( command = pack_set_param_command(
object_id, P60DockConfigTable.out_en_3.parameter_address, invalid_size, parameter object_id, P60DockConfigTable.out_en_3.parameter_address, invalid_size, parameter
) )
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command) # command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
return tc_queue return tc_queue

View File

@ -30,10 +30,12 @@ from pus_tc.ploc_upater import pack_ploc_updater_test_into
from pus_tc.ploc_memory_dumper import pack_ploc_memory_dumper_cmd from pus_tc.ploc_memory_dumper import pack_ploc_memory_dumper_cmd
from pus_tc.core import pack_core_commands from pus_tc.core import pack_core_commands
from pus_tc.star_tracker import pack_star_tracker_commands_into from pus_tc.star_tracker import pack_star_tracker_commands_into
from pus_tc.gps import pack_gps_command
from config.definitions import CustomServiceList from config.definitions import CustomServiceList
from config.object_ids import P60_DOCK_HANDLER, PDU_1_HANDLER_ID, PDU_2_HANDLER_ID, ACU_HANDLER_ID, \ from config.object_ids import P60_DOCK_HANDLER, PDU_1_HANDLER_ID, PDU_2_HANDLER_ID, \
TMP_1075_1_HANDLER_ID, TMP_1075_2_HANDLER_ID, HEATER_ID, IMTQ_HANDLER_ID, PLOC_MPSOC_ID, RW1_ID, RW2_ID, RW3_ID, RW4_ID, \ ACU_HANDLER_ID, TMP_1075_1_HANDLER_ID, TMP_1075_2_HANDLER_ID, HEATER_ID, IMTQ_HANDLER_ID, \
RAD_SENSOR_ID, PLOC_SUPV_ID, PLOC_UPDATER_ID, STAR_TRACKER_ID, PLOC_MEMORY_DUMPER_ID PLOC_MPSOC_ID, RW1_ID, RW2_ID, RW3_ID, RW4_ID, RAD_SENSOR_ID, PLOC_SUPV_ID, PLOC_UPDATER_ID, \
STAR_TRACKER_ID, PLOC_MEMORY_DUMPER_ID, GPS_HANDLER_0_ID, GPS_HANDLER_1_ID
LOGGER = get_console_logger() LOGGER = get_console_logger()
@ -87,21 +89,35 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
return pack_single_rw_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code) return pack_single_rw_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.RAD_SENSOR.value: if service == CustomServiceList.RAD_SENSOR.value:
object_id = RAD_SENSOR_ID object_id = RAD_SENSOR_ID
return pack_rad_sensor_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code) return pack_rad_sensor_test_into(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.PLOC_SUPV.value: if service == CustomServiceList.PLOC_SUPV.value:
object_id = PLOC_SUPV_ID object_id = PLOC_SUPV_ID
return pack_ploc_supv_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code) return pack_ploc_supv_test_into(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.PLOC_UPDATER.value: if service == CustomServiceList.PLOC_UPDATER.value:
object_id = PLOC_UPDATER_ID object_id = PLOC_UPDATER_ID
return pack_ploc_updater_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code) return pack_ploc_updater_test_into(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.STAR_TRACKER.value: if service == CustomServiceList.STAR_TRACKER.value:
object_id = STAR_TRACKER_ID object_id = STAR_TRACKER_ID
return pack_star_tracker_commands_into(object_id=object_id, tc_queue=service_queue, op_code=op_code) return pack_star_tracker_commands_into(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.CORE.value: if service == CustomServiceList.CORE.value:
return pack_core_commands(tc_queue=service_queue, op_code=op_code) return pack_core_commands(tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.PLOC_MEMORY_DUMPER.value: if service == CustomServiceList.PLOC_MEMORY_DUMPER.value:
object_id = PLOC_MEMORY_DUMPER_ID object_id = PLOC_MEMORY_DUMPER_ID
return pack_ploc_memory_dumper_cmd(object_id=object_id, tc_queue=service_queue, op_code=op_code) return pack_ploc_memory_dumper_cmd(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.GPS_0.value:
return pack_gps_command(object_id=GPS_HANDLER_0_ID, tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.GPS_1.value:
return pack_gps_command(object_id=GPS_HANDLER_1_ID, tc_queue=service_queue, op_code=op_code)
LOGGER.warning("Invalid Service !") LOGGER.warning("Invalid Service !")