Merge pull request 'meier/startracker' (#29) from meier/startracker into develop

Reviewed-on: #29
This commit is contained in:
Robin Müller 2021-12-22 11:27:41 +01:00
commit d388a222b6
20 changed files with 569 additions and 57 deletions

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ACU" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s acu -l -t 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -6,9 +6,9 @@
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Star Tracker" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s star_tracker -l -t 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Syrlinks" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="C:\Users\EIVE_Reinraumrechner\AppData\Local\Programs\Python\Python39\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-s syrlinks -l -t 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ccsds handler" type="PythonConfigurationType" factoryName="Python" folderName="CCSDS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-s ccsds_handler -l -t 8 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="pdec handler" type="PythonConfigurationType" factoryName="Python" folderName="CCSDS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-s pdec_handler -l -t 8 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ACU Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<configuration default="false" name="tmtcc Service 17" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -12,8 +12,8 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s acu -l" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-s 17 -o 0 -t 3 -l" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -38,3 +38,5 @@ class CustomServiceList(enum.Enum):
STAR_TRACKER = 'star_tracker'
CCSDS_HANDLER = 'ccsds_handler'
PDEC_HANDLER = 'pdec_handler'
STR_IMG_HELPER = 'str_img_helper'
SYRLINKS = 'syrlinks'

View File

@ -112,7 +112,8 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
service_op_code_dict[CustomServiceList.GPS_1.value] = service_tuple
op_code_dict = {
"0": ("ACU Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
"0": ("ACU: Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
"51": ("ACU: Print channel statistics", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_tuple = ("ACU Devices", op_code_dict)
service_op_code_dict[CustomServiceList.ACU.value] = service_tuple
@ -154,8 +155,12 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
Pdu1OpCodes.SYRLINKS_ON.value:
("PDU1: Turn Syrlinks on", {OpCodeDictKeys.TIMEOUT: 2.0}),
Pdu1OpCodes.SYRLINKS_OFF.value:
("PDU1: Turn Syrlinks off", {OpCodeDictKeys.TIMEOUT: 2.0}),
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0})
("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
@ -278,7 +283,40 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
service_ploc_updater_tuple = ("Ploc Updater", op_code_dict_srv_ploc_updater)
op_code_dict_srv_star_tracker = {
"0": ("Star Tracker: Ping", {OpCodeDictKeys.TIMEOUT: 2.0}),
"0": ("Star Tracker: Mode On", {OpCodeDictKeys.TIMEOUT: 2.0}),
"1": ("Star Tracker: Mode Normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
"2": ("Star Tracker: Mode Off", {OpCodeDictKeys.TIMEOUT: 2.0}),
"3": ("Star Tracker: Mode Raw", {OpCodeDictKeys.TIMEOUT: 2.0}),
"4": ("Star Tracker: Ping", {OpCodeDictKeys.TIMEOUT: 2.0}),
"5": ("Star Tracker: Switch to bootloader program", {OpCodeDictKeys.TIMEOUT: 2.0}),
"6": ("Star Tracker: Request temperature", {OpCodeDictKeys.TIMEOUT: 2.0}),
"7": ("Star Tracker: Request version", {OpCodeDictKeys.TIMEOUT: 2.0}),
"8": ("Star Tracker: Request interface", {OpCodeDictKeys.TIMEOUT: 2.0}),
"9": ("Star Tracker: Request power", {OpCodeDictKeys.TIMEOUT: 2.0}),
"10": ("Star Tracker: Subscribe to telemetry", {OpCodeDictKeys.TIMEOUT: 2.0}),
"11": ("Star Tracker: Boot image (requires bootloader mode)", {OpCodeDictKeys.TIMEOUT: 2.0}),
"12": ("Star Tracker: Request time", {OpCodeDictKeys.TIMEOUT: 2.0}),
"13": ("Star Tracker: Request solution", {OpCodeDictKeys.TIMEOUT: 2.0}),
"14": ("Star Tracker: Upload image", {OpCodeDictKeys.TIMEOUT: 2.0}),
"15": ("Star Tracker: Download image", {OpCodeDictKeys.TIMEOUT: 2.0}),
"16": ("Star Tracker: Limits", {OpCodeDictKeys.TIMEOUT: 2.0}),
"17": ("Star Tracker: Tracking", {OpCodeDictKeys.TIMEOUT: 2.0}),
"18": ("Star Tracker: Mounting", {OpCodeDictKeys.TIMEOUT: 2.0}),
"19": ("Star Tracker: Camera", {OpCodeDictKeys.TIMEOUT: 2.0}),
"20": ("Star Tracker: Blob", {OpCodeDictKeys.TIMEOUT: 2.0}),
"21": ("Star Tracker: Centroiding", {OpCodeDictKeys.TIMEOUT: 2.0}),
"22": ("Star Tracker: LISA", {OpCodeDictKeys.TIMEOUT: 2.0}),
"23": ("Star Tracker: Matching", {OpCodeDictKeys.TIMEOUT: 2.0}),
"24": ("Star Tracker: Validation", {OpCodeDictKeys.TIMEOUT: 2.0}),
"25": ("Star Tracker: Algo", {OpCodeDictKeys.TIMEOUT: 2.0}),
"26": ("Star Tracker: Take image", {OpCodeDictKeys.TIMEOUT: 2.0}),
"27": ("Star Tracker: Stop image loader", {OpCodeDictKeys.TIMEOUT: 2.0}),
"28": ("Star Tracker: Reset error signal", {OpCodeDictKeys.TIMEOUT: 2.0}),
"29": ("Star Tracker: Set name of download image", {OpCodeDictKeys.TIMEOUT: 2.0}),
"30": ("Star Tracker: Request histogram", {OpCodeDictKeys.TIMEOUT: 2.0}),
"31": ("Star Tracker: Request contrast", {OpCodeDictKeys.TIMEOUT: 2.0}),
"32": ("Star Tracker: Set json filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
"33": ("Star Tracker: Write", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
@ -292,9 +330,21 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
op_code_dict_srv_pdec_handler = {
"0": ("PDEC Handler: Print CLCW", {OpCodeDictKeys.TIMEOUT: 2.0}),
"1": ("PDEC Handler: Print PDEC monitor", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_pdec_handler_tuple = ("PDEC Handler", op_code_dict_srv_pdec_handler)
op_code_dict_srv_syrlinks_handler = {
"0": ("Syrlinks Handler: Set TX standby", {OpCodeDictKeys.TIMEOUT: 2.0}),
"1": ("Syrlinks Handler: Set TX modulation", {OpCodeDictKeys.TIMEOUT: 2.0}),
"2": ("Syrlinks Handler: Set TX carrier wave", {OpCodeDictKeys.TIMEOUT: 2.0}),
"5": ("Syrlinks Handler: Read TX status", {OpCodeDictKeys.TIMEOUT: 2.0}),
"6": ("Syrlinks Handler: Read TX waveform", {OpCodeDictKeys.TIMEOUT: 2.0}),
"7": ("Syrlinks Handler: Read TX AGC value high byte ", {OpCodeDictKeys.TIMEOUT: 2.0}),
"8": ("Syrlinks Handler: Read TX AGC value low byte ", {OpCodeDictKeys.TIMEOUT: 2.0})
}
service_syrlinks_handler_tuple = ("Syrlinks Handler", op_code_dict_srv_syrlinks_handler)
service_op_code_dict[CustomServiceList.P60DOCK.value] = service_p60_tuple
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
service_op_code_dict[CustomServiceList.PDU2.value] = service_pdu2_tuple
@ -311,3 +361,4 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
service_op_code_dict[CustomServiceList.PLOC_MEMORY_DUMPER.value] = service_ploc_memory_dumper_tuple
service_op_code_dict[CustomServiceList.CCSDS_HANDLER.value] = service_ccsds_handler_tuple
service_op_code_dict[CustomServiceList.PDEC_HANDLER.value] = service_pdec_handler_tuple
service_op_code_dict[CustomServiceList.SYRLINKS.value] = service_syrlinks_handler_tuple

View File

@ -22,7 +22,7 @@ TMP_1075_1_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x04])
TMP_1075_2_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x05])
# Communication Object IDs
SYRLINKS_HANDLER = bytes([0x44, 0x53, 0x00, 0xA3])
SYRLINKS_HANDLER_ID = bytes([0x44, 0x53, 0x00, 0xA3])
# ACS Object IDs
MGM_0_HANDLER_ID = bytes([0x44, 0x12, 0x00, 0x06])
@ -53,6 +53,7 @@ RAD_SENSOR_ID = bytes([0x44, 0x32, 0x00, 0xA5])
PLOC_SUPV_ID = bytes([0x44, 0x33, 0x00, 0x16])
PLOC_UPDATER_ID = bytes([0x44, 0x33, 0x00, 0x00])
PLOC_MEMORY_DUMPER_ID = bytes([0x44, 0x33, 0x00, 0x01])
STR_IMG_HELPER_ID = bytes([0x44, 0x33, 0x00, 0x02])
PLOC_MPSOC_ID = bytes([0x44, 0x33, 0x00, 0x15])

View File

@ -5,6 +5,7 @@
@author J. Meier
@date 21.12.2020
"""
import struct
from tmtccmd.tc.packer import TcQueueT
from tmtccmd.config.definitions import QueueCommands
from gomspace.gomspace_common import *
@ -51,19 +52,19 @@ class ACUHkTable:
wdt_gnd_left = TableEntry(bytearray([0x00, 0x74]), TableEntry.uint32_size)
def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT):
class CommandId:
PRINT_CHANNEL_STATS = 51
def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
tc_queue.appendleft((QueueCommands.PRINT, "Testing ACU"))
tc_queue.appendleft(
(QueueCommands.PRINT, "P60 Dock: Enabling ACU connected to X1 slot (channel 0)")
)
p60dock_object_id = P60_DOCK_HANDLER
command = pack_set_param_command(
p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
P60DockConfigTable.out_en_0.parameter_size, Channel.on
)
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "51":
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Print channel stats"))
command = object_id + struct.pack('!I', CommandId.PRINT_CHANNEL_STATS)
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
return
if ACUTestProcedure.all or ACUTestProcedure.reboot:
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reboot"))

View File

@ -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())

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
"""PDU2 is mounted on the X4 slot of the P60 dock
"""PDU2 is mounted on the X2 slot of the P60 dock
@author J. Meier
@date 17.12.2020
"""
@ -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:
@ -65,16 +67,16 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
PDUConfigTable.out_en_2.parameter_size, Channel.on
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
PDUConfigTable.out_en_4.parameter_size, Channel.on)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.STAR_TRACKER_OFF.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker off"))
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 == Pdu1OpCodes.SUS_NOMINAL_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
PDUConfigTable.out_en_4.parameter_size, Channel.on)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
command = pack_set_param_command(
@ -96,13 +98,6 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
PDUConfigTable.out_en_7.parameter_size, Channel.off
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
command = pack_set_param_command(
object_id, PDUConfigTable.out_en_4.parameter_address,
PDUConfigTable.out_en_4.parameter_size, Channel.on
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
command = pack_set_param_command(
@ -116,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"))

View File

@ -2,7 +2,7 @@
"""
@file tmtcc_tc_pdu2.py
@brief PDU2 tests
@details PDU2 is mounted on the X2 slot of the P60 dock
@details PDU2 is mounted on the X4 slot of the P60 dock
@author J. Meier
@date 17.12.2020
"""

View File

@ -11,29 +11,250 @@ from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.packer import TcQueueT
from spacepackets.ecss.tc import PusTelecommand
from pus_tc.service_200_mode import pack_mode_data
class StarTrackerActionIds:
PING = 0
BOOT = 1
REQ_VERSION = 2
REQ_INTERFACE = 3
REQ_TIME = 4
REQ_POWER = 11
SWITCH_TO_BOOTLOADER_PROGRAM = 7
DOWNLOAD_IMAGE = 9
UPLOAD_IMAGE = 10
SUBSCRIBE_TO_TM = 18
REQ_SOLUTION = 24
REQ_TEMPERATURE = 25
REQ_HISTOGRAM = 28
REQ_CONTRAST = 29
LIMITS = 40
MOUNTING = 41
CAMERA = 42
BLOB = 43
CENTROIDING = 44
LISA = 45
MATCHING = 46
TRACKING = 47
VALIDATION = 48
ALGO = 49
CHECKSUM = 50
RAED = 51
WRITE = 52
TAKE_IMAGE = 15
STOP_IMAGE_LOADER = 55
RESET_ERROR = 56
CHANGE_DOWNLOAD_IMAGE = 57
SET_JSON_FILE_NAME = 58
def pack_star_tracker_commands_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
class ImagePathDefs:
uploadFile = "/mnt/sd0/startracker/gemma.bin"
downloadFile = "test_image.bin"
downloadPath = "/mnt/sd0/startracker"
jsonFile = "/mnt/sd0/startracker/test.json"
flashFile = "/mnt/sd0/startracker/flash.bin"
def pack_star_tracker_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
tc_queue.appendleft(
(QueueCommands.PRINT,
"Generate command for star tracker with object id: 0x" + object_id.hex())
)
if op_code == "0":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode On"))
command = pack_mode_data(object_id, 1, 0)
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "1":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Normal"))
command = pack_mode_data(object_id, 2, 0)
command = PusTelecommand(service=200, subservice=1, ssc=11, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "2":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Off"))
command = pack_mode_data(object_id, 0, 0)
command = PusTelecommand(service=200, subservice=1, ssc=12, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "3":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Raw"))
command = pack_mode_data(object_id, 3, 0)
command = PusTelecommand(service=200, subservice=1, ssc=13, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Ping"))
command = pack_ping_command(object_id)
command = object_id + struct.pack('!I', StarTrackerActionIds.PING)
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "5":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Switch to bootloader program"))
command = object_id + struct.pack('!I', StarTrackerActionIds.SWITCH_TO_BOOTLOADER_PROGRAM)
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "6":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Temperature request"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_TEMPERATURE)
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "7":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request version"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_VERSION)
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "8":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request interface"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_INTERFACE)
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "9":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request power"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_POWER)
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "10":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Subscribe to telemetry"))
tm_id = int(input("Specify Id of tm: "))
command = object_id + struct.pack('!I', StarTrackerActionIds.SUBSCRIBE_TO_TM) + struct.pack('B', tm_id)
command = PusTelecommand(service=8, subservice=128, ssc=36, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "11":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Boot"))
command = object_id + struct.pack('!I', StarTrackerActionIds.BOOT)
command = PusTelecommand(service=8, subservice=128, ssc=37, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "12":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request time"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_TIME)
command = PusTelecommand(service=8, subservice=128, ssc=38, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "13":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request solution"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_SOLUTION)
command = PusTelecommand(service=8, subservice=128, ssc=39, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "14":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Upload image"))
command = object_id + struct.pack('!I', StarTrackerActionIds.UPLOAD_IMAGE) + \
bytearray(ImagePathDefs.uploadFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=40, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "15":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download image"))
command = object_id + struct.pack('!I', StarTrackerActionIds.DOWNLOAD_IMAGE) + \
bytearray(ImagePathDefs.downloadPath, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=53, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "16":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set limits"))
command = object_id + struct.pack('!I', StarTrackerActionIds.LIMITS) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=42, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "17":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set tracking parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.TRACKING) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=43, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "18":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mounting"))
command = object_id + struct.pack('!I', StarTrackerActionIds.MOUNTING) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "19":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Camera"))
command = object_id + struct.pack('!I', StarTrackerActionIds.CAMERA) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "20":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Blob"))
command = object_id + struct.pack('!I', StarTrackerActionIds.BLOB) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=46, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "21":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Centroiding"))
command = object_id + struct.pack('!I', StarTrackerActionIds.CENTROIDING) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=47, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "22":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: LISA"))
command = object_id + struct.pack('!I', StarTrackerActionIds.LISA) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=48, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "23":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Matching"))
command = object_id + struct.pack('!I', StarTrackerActionIds.MATCHING) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=49, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "24":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Validation"))
command = object_id + struct.pack('!I', StarTrackerActionIds.VALIDATION) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=50, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "25":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Algo"))
command = object_id + struct.pack('!I', StarTrackerActionIds.ALGO) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=51, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "26":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Take image"))
actionid = int(input("Specify parameter ID (nominal - 4): "))
command = object_id + struct.pack('!I', StarTrackerActionIds.TAKE_IMAGE) + struct.pack('!B', actionid)
command = PusTelecommand(service=8, subservice=128, ssc=52, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "27":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Stop image loader"))
command = object_id + struct.pack('!I', StarTrackerActionIds.STOP_IMAGE_LOADER)
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "28":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Reset error signal"))
command = object_id + struct.pack('!I', StarTrackerActionIds.RESET_ERROR)
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "29":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set name of download image"))
filename = input("Specify download image name: ")
command = object_id + struct.pack('!I', StarTrackerActionIds.CHANGE_DOWNLOAD_IMAGE) + \
bytearray(filename, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "30":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request histogram"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_HISTOGRAM)
command = PusTelecommand(service=8, subservice=128, ssc=55, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "31":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request contrast"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_CONTRAST)
command = PusTelecommand(service=8, subservice=128, ssc=56, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "32":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set json filename"))
command = object_id + struct.pack('!I', StarTrackerActionIds.SET_JSON_FILE_NAME) + \
bytearray(ImagePathDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=57, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "33":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Write"))
command = pack_write_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=58, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
def pack_ping_command(object_id: bytearray) -> bytearray:
data = int(input("Specify ping data: "))
command = bytearray()
command = object_id + struct.pack('!I', StarTrackerActionIds.PING)
command = command + struct.pack('!I', data)
def pack_write_command(object_id: bytearray) -> bytearray:
region = 1
address = 0
command = object_id + struct.pack('!I', StarTrackerActionIds.WRITE) + struct.pack('!B', region) + \
struct.pack('!I', address) + bytearray(ImagePathDefs.flashFile, 'utf-8')
return command

38
pus_tc/str_img_helper.py Normal file
View File

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
"""
@file str_img_helper.py
@brief Commanding of the star tracker image helper object which is responsible for uploading
and downloading images to/from the star tracker.
@details Images to uplaod must be previously transferred to the OBC with the CFDP protocol.
Also downloaded images will be stored on the filesystem of the OBC and can be transferred via CFDP.
@author J. Meier
@date 29.11.2021
"""
import struct
from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.packer import TcQueueT
from spacepackets.ecss.tc import PusTelecommand
class Commands:
UPLOAD_IMAGE = 0
DOWNLOAD_IMAGE = 1
class ImagePathDefs:
uploadFile = "/mnt/sd0/startracker/gemma.bin"
def pack_str_img_helper_command(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
tc_queue.appendleft(
(QueueCommands.PRINT,
"Testing star tracker image helper object id: 0x" + object_id.hex())
)
if op_code == "0":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker image helper: Upload image"))
command = object_id + struct.pack('!I', Commands.UPLOAD_IMAGE) + bytearray(ImagePathDefs.uploadFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())

View File

@ -9,6 +9,7 @@
from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.definitions import TcQueueT
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
from spacepackets.ecss.tc import PusTelecommand
class SetIds:
@ -16,13 +17,64 @@ class SetIds:
TX_REGISTERS_DATASET = 2
def pack_syrlinks_hk_handler_test_into(object_id: bytearray, tc_queue: TcQueueT):
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get RX Registers"))
sid = make_sid(object_id, SetIds.RX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 200)
tc_queue.appendleft(command.pack_command_tuple())
class CommandIds:
SET_TX_MODE_STANDBY = bytearray([0x0, 0x0, 0x0, 0x3])
SET_TX_MODE_MODULATION = bytearray([0x0, 0x0, 0x0, 0x4])
SET_TX_MODE_CW = bytearray([0x0, 0x0, 0x0, 0x5])
READ_TX_STATUS = bytearray([0x0, 0x0, 0x0, 0x7])
READ_TX_WAVEFORM = bytearray([0x0, 0x0, 0x0, 0x8])
READ_TX_AGC_VALUE_HIGH_BYTE = bytearray([0x0, 0x0, 0x0, 0x9])
READ_TX_AGC_VALUE_LOW_BYTE = bytearray([0x0, 0x0, 0x0, 0x9])
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get TX Registers"))
sid = make_sid(object_id, SetIds.TX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 201)
tc_queue.appendleft(command.pack_command_tuple())
def pack_syrlinks_command(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
tc_queue.appendleft(
(QueueCommands.PRINT,
"Testing PLOC memory dumper with object id: 0x" + object_id.hex())
)
if op_code == "0":
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode standby"))
command = object_id + CommandIds.SET_TX_MODE_STANDBY
command = PusTelecommand(service=8, subservice=128, ssc=10, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "1":
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode modulation"))
command = object_id + CommandIds.SET_TX_MODE_MODULATION
command = PusTelecommand(service=8, subservice=128, ssc=11, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "2":
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode CW"))
command = object_id + CommandIds.SET_TX_MODE_CW
command = PusTelecommand(service=8, subservice=128, ssc=12, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "3":
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get RX Registers"))
sid = make_sid(object_id, SetIds.RX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 200)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get TX Registers"))
sid = make_sid(object_id, SetIds.TX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 201)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "5":
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX status"))
command = object_id + CommandIds.READ_TX_STATUS
command = PusTelecommand(service=8, subservice=128, ssc=13, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "6":
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX waveform"))
command = object_id + CommandIds.READ_TX_WAVEFORM
command = PusTelecommand(service=8, subservice=128, ssc=14, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "7":
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX AGC value high byte"))
command = object_id + CommandIds.READ_TX_AGC_VALUE_HIGH_BYTE
command = PusTelecommand(service=8, subservice=128, ssc=15, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "8":
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX AGC value low byte"))
command = object_id + CommandIds.READ_TX_AGC_VALUE_LOW_BYTE
command = PusTelecommand(service=8, subservice=128, ssc=16, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())

View File

@ -26,15 +26,17 @@ 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.ccsds_handler import pack_ccsds_handler_test
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
from pus_tc.syrlinks_hk_handler import pack_syrlinks_command
from pus_tc.gps import pack_gps_command
from pus_tc.acs import pack_acs_command
from pus_tc.str_img_helper import pack_str_img_helper_command
from config.definitions import CustomServiceList
from config.object_ids import P60_DOCK_HANDLER, PDU_1_HANDLER_ID, PDU_2_HANDLER_ID, \
ACU_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, RAD_SENSOR_ID, PLOC_SUPV_ID, PLOC_UPDATER_ID, \
STAR_TRACKER_ID, PLOC_MEMORY_DUMPER_ID, GPS_HANDLER_0_ID, GPS_HANDLER_1_ID, CCSDS_HANDLER_ID, \
PDEC_HANDLER_ID
PDEC_HANDLER_ID, STR_IMG_HELPER_ID, SYRLINKS_HANDLER_ID
LOGGER = get_console_logger()
@ -58,7 +60,7 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
return pack_pdu2_commands(object_id=object_id, tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.ACU.value:
object_id = ACU_HANDLER_ID
return pack_acu_test_into(object_id=object_id, tc_queue=service_queue)
return pack_acu_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.TMP1075_1.value:
object_id = TMP_1075_1_HANDLER_ID
return pack_tmp1075_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
@ -103,7 +105,12 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
)
if service == CustomServiceList.STAR_TRACKER.value:
object_id = STAR_TRACKER_ID
return pack_star_tracker_commands_into(
return pack_star_tracker_commands(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.STR_IMG_HELPER.value:
object_id = STR_IMG_HELPER_ID
return pack_str_img_helper_command(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.CORE.value:
@ -123,6 +130,8 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
return pack_ccsds_handler_test(object_id=CCSDS_HANDLER_ID, tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.PDEC_HANDLER.value:
return pack_ccsds_handler_test(object_id=PDEC_HANDLER_ID, tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.SYRLINKS.value:
return pack_syrlinks_command(object_id=SYRLINKS_HANDLER_ID, tc_queue=service_queue, op_code=op_code)
LOGGER.warning("Invalid Service !")

@ -1 +1 @@
Subproject commit 464274a91ce31a28e3493a05089fcdbe0bdf285b
Subproject commit 0365df03ed2ff8f3def8496c76f578ed3a5984cc

@ -1 +1 @@
Subproject commit bfa459ccc3c7189a77374a68f0217d448525b34b
Subproject commit 71213f68e2947afda9551539a97c540e14d1e7b6