Heater Commands #63
@ -9,10 +9,9 @@ from tmtccmd.pus.obj_id import ObjectIdDictT
|
|||||||
from tmtccmd.com_if.com_interface_base import CommunicationInterface
|
from tmtccmd.com_if.com_interface_base import CommunicationInterface
|
||||||
from tmtccmd.core.backend import TmTcHandler
|
from tmtccmd.core.backend import TmTcHandler
|
||||||
from tmtccmd.config.hook import TmTcHookBase
|
from tmtccmd.config.hook import TmTcHookBase
|
||||||
from tmtccmd.config.globals import OpCodeDictKeys
|
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
|
||||||
from config.retvals import get_retval_dict
|
from config.retvals import get_retval_dict
|
||||||
|
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
|
||||||
|
|
||||||
|
|
||||||
class EiveHookObject(TmTcHookBase):
|
class EiveHookObject(TmTcHookBase):
|
||||||
@ -56,292 +55,3 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
|
|
||||||
def get_retval_dict(self) -> RetvalDictT:
|
def get_retval_dict(self) -> RetvalDictT:
|
||||||
return get_retval_dict()
|
return get_retval_dict()
|
||||||
|
|
||||||
|
|
||||||
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
|
||||||
from pus_tc.cmd_definitions import (
|
|
||||||
add_bpx_cmd_definitions,
|
|
||||||
add_core_controller_definitions,
|
|
||||||
add_pcdu_cmds,
|
|
||||||
add_pl_pcdu_cmds,
|
|
||||||
add_imtq_cmds,
|
|
||||||
add_rw_cmds,
|
|
||||||
add_rad_sens_cmds,
|
|
||||||
add_ploc_mpsoc_cmds,
|
|
||||||
add_ploc_supv_cmds,
|
|
||||||
add_system_cmds,
|
|
||||||
add_time_cmds,
|
|
||||||
)
|
|
||||||
from pus_tc.devs.gps import GpsOpCodes
|
|
||||||
|
|
||||||
add_bpx_cmd_definitions(cmd_dict=service_op_code_dict)
|
|
||||||
add_core_controller_definitions(cmd_dict=service_op_code_dict)
|
|
||||||
add_pl_pcdu_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_pcdu_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_imtq_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_rad_sens_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_rw_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_ploc_mpsoc_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_ploc_supv_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_system_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_time_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
|
|
||||||
op_code_dict = {
|
|
||||||
GpsOpCodes.RESET_GNSS.value: ("Reset GPS", {OpCodeDictKeys.TIMEOUT: 2.0})
|
|
||||||
}
|
|
||||||
service_tuple = ("GPS 0", op_code_dict)
|
|
||||||
service_op_code_dict[CustomServiceList.GPS_0.value] = service_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.GPS_1.value] = service_tuple
|
|
||||||
|
|
||||||
op_code_dict = {
|
|
||||||
"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
|
|
||||||
|
|
||||||
op_code_dict = {
|
|
||||||
"0": ("TMP1075 Tests", {OpCodeDictKeys.TIMEOUT: 2.2}),
|
|
||||||
}
|
|
||||||
service_tuple = ("TMP1075 1", op_code_dict)
|
|
||||||
service_op_code_dict[CustomServiceList.TMP1075_1.value] = service_tuple
|
|
||||||
service_tuple = ("TMP1075 2", op_code_dict)
|
|
||||||
service_op_code_dict[CustomServiceList.TMP1075_2.value] = service_tuple
|
|
||||||
|
|
||||||
op_code_dict_srv_heater = {
|
|
||||||
"0": ("Heater Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_heater_tuple = ("Heater Device", op_code_dict_srv_heater)
|
|
||||||
|
|
||||||
op_code_dict_srv_star_tracker = {
|
|
||||||
"0": (
|
|
||||||
"Star Tracker: Mode On, Submode Bootloader",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"1": ("Star Tracker: Mode On, Submode Firmware", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Star Tracker: Mode Normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Star Tracker: Mode Off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Star Tracker: Mode Raw", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Star Tracker: Ping", {OpCodeDictKeys.TIMEOUT: 5.0}),
|
|
||||||
"6": (
|
|
||||||
"Star Tracker: Switch to bootloader program",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"7": ("Star Tracker: Request temperature", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": ("Star Tracker: Request version", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"9": ("Star Tracker: Request interface", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"10": ("Star Tracker: Request power", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"11": (
|
|
||||||
"Star Tracker: Set subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"12": (
|
|
||||||
"Star Tracker: Boot image (requires bootloader mode)",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"13": ("Star Tracker: Request time", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"14": ("Star Tracker: Request solution", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"15": ("Star Tracker: Upload image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"16": ("Star Tracker: Download image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"17": ("Star Tracker: Set limit parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"18": ("Star Tracker: Set tracking parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"19": ("Star Tracker: Set mounting parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"20": ("Star Tracker: Set camera parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"22": (
|
|
||||||
"Star Tracker: Set centroiding parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"23": ("Star Tracker: Set LISA parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"24": ("Star Tracker: Set matching parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"25": (
|
|
||||||
"Star Tracker: Set validation parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"26": ("Star Tracker: Set algo parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"27": ("Star Tracker: Take image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"28": ("Star Tracker: Stop str helper", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"30": (
|
|
||||||
"Star Tracker: Set name of download image",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"31": ("Star Tracker: Request histogram", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"32": ("Star Tracker: Request contrast", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"33": ("Star Tracker: Set json filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"35": ("Star Tracker: Flash read", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"36": ("Star Tracker: Set flash read filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"37": ("Star Tracker: Get checksum", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"49": ("Star Tracker: Request camera parameter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"50": ("Star Tracker: Request limits", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"51": (
|
|
||||||
"Star Tracker: Set image processor parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"52": (
|
|
||||||
"Star Tracker: (EGSE only) Load camera ground config ",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"53": (
|
|
||||||
"Star Tracker: (EGSE only) Load camera flight config",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"54": (
|
|
||||||
"Star Tracker: Request log level parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"55": (
|
|
||||||
"Star Tracker: Request mounting parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"56": (
|
|
||||||
"Star Tracker: Request image processor parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"57": (
|
|
||||||
"Star Tracker: Request centroiding parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"58": ("Star Tracker: Request lisa parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"59": (
|
|
||||||
"Star Tracker: Request matching parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"60": (
|
|
||||||
"Star Tracker: Request tracking parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"61": (
|
|
||||||
"Star Tracker: Request validation parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"62": ("Star Tracker: Request algo parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"63": (
|
|
||||||
"Star Tracker: Request subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"64": (
|
|
||||||
"Star Tracker: Request log subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"65": (
|
|
||||||
"Star Tracker: Request debug camera parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"66": ("Star Tracker: Set log level parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"67": (
|
|
||||||
"Star Tracker: Set log subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"68": (
|
|
||||||
"Star Tracker: Set debug camera parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"69": ("Star Tracker: Firmware update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"70": (
|
|
||||||
"Star Tracker: Disable timestamp generation",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"71": (
|
|
||||||
"Star Tracker: Enable timestamp generation",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
}
|
|
||||||
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
|
||||||
|
|
||||||
op_code_dict_srv_ccsds_handler = {
|
|
||||||
"0": ("CCSDS Handler: Set low rate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("CCSDS Handler: Set high rate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("CCSDS Handler: Enable transmitter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("CCSDS Handler: Disable transmitter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("CCSDS Handler: Set arbitrary bitrate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": (
|
|
||||||
"CCSDS Handler: Enable tx clock manipulator",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"6": (
|
|
||||||
"CCSDS Handler: Disable tx clock manipulator",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"7": (
|
|
||||||
"CCSDS Handler: Update tx data on rising edge",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"8": (
|
|
||||||
"CCSDS Handler: Update tx data on falling edge",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
}
|
|
||||||
service_ccsds_handler_tuple = ("CCSDS Handler", op_code_dict_srv_ccsds_handler)
|
|
||||||
|
|
||||||
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 mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("Syrlinks Handler: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Syrlinks Handler: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Syrlinks Handler: Set TX standby", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Syrlinks Handler: Set TX modulation", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Syrlinks Handler: Set TX carrier wave", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("Syrlinks Handler: Read TX status", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("Syrlinks Handler: Read TX waveform", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": (
|
|
||||||
"Syrlinks Handler: Read TX AGC value high byte ",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"9": (
|
|
||||||
"Syrlinks Handler: Read TX AGC value low byte ",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"12": (
|
|
||||||
"Syrlinks Handler: Write LCL config",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"13": (
|
|
||||||
"Syrlinks Handler: Read RX status registers",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"14": (
|
|
||||||
"Syrlinks Handler: Read LCL config register",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"15": (
|
|
||||||
"Syrlinks Handler: Set waveform OQPSK",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"16": (
|
|
||||||
"Syrlinks Handler: Set waveform BPSK",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"17": (
|
|
||||||
"Syrlinks Handler: Set second config",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"18": (
|
|
||||||
"Syrlinks Handler: Enable debug output",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"19": (
|
|
||||||
"Syrlinks Handler: Disable debug output",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
}
|
|
||||||
service_syrlinks_handler_tuple = (
|
|
||||||
"Syrlinks Handler",
|
|
||||||
op_code_dict_srv_syrlinks_handler,
|
|
||||||
)
|
|
||||||
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
|
||||||
service_op_code_dict[
|
|
||||||
CustomServiceList.STAR_TRACKER.value
|
|
||||||
] = service_star_tracker_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
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from pus_tc.devs.gps import GpsOpCodes
|
||||||
from tmtccmd.config import (
|
from tmtccmd.config import (
|
||||||
add_op_code_entry,
|
add_op_code_entry,
|
||||||
add_service_op_code_entry,
|
add_service_op_code_entry,
|
||||||
@ -9,6 +10,284 @@ from config.definitions import CustomServiceList
|
|||||||
from pus_tc.devs.bpx_batt import BpxOpCodes
|
from pus_tc.devs.bpx_batt import BpxOpCodes
|
||||||
|
|
||||||
|
|
||||||
|
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||||
|
add_bpx_cmd_definitions(cmd_dict=service_op_code_dict)
|
||||||
|
add_core_controller_definitions(cmd_dict=service_op_code_dict)
|
||||||
|
add_pl_pcdu_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_pcdu_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_imtq_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_rad_sens_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_rw_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_ploc_mpsoc_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_ploc_supv_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_system_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_time_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_syrlinks_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_gps_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_str_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_ccsds_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
add_tmp_sens_cmds(cmd_dict=service_op_code_dict)
|
||||||
|
|
||||||
|
|
||||||
|
def add_tmp_sens_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
|
op_code_dict = {
|
||||||
|
"0": ("TMP1075 Tests", {OpCodeDictKeys.TIMEOUT: 2.2}),
|
||||||
|
}
|
||||||
|
service_tuple = ("TMP1075 1", op_code_dict)
|
||||||
|
cmd_dict[CustomServiceList.TMP1075_1.value] = service_tuple
|
||||||
|
service_tuple = ("TMP1075 2", op_code_dict)
|
||||||
|
cmd_dict[CustomServiceList.TMP1075_2.value] = service_tuple
|
||||||
|
|
||||||
|
|
||||||
|
def add_heater_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
|
op_code_dict_srv_heater = {
|
||||||
|
"0": ("Heater Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_heater_tuple = ("Heater Device", op_code_dict_srv_heater)
|
||||||
|
cmd_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
||||||
|
|
||||||
|
|
||||||
|
def add_pdec_cmds(cmd_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)
|
||||||
|
cmd_dict[CustomServiceList.PDEC_HANDLER.value] = service_pdec_handler_tuple
|
||||||
|
|
||||||
|
|
||||||
|
def add_ccsds_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
|
op_code_dict_srv_ccsds_handler = {
|
||||||
|
"0": ("CCSDS Handler: Set low rate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("CCSDS Handler: Set high rate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("CCSDS Handler: Enable transmitter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("CCSDS Handler: Disable transmitter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("CCSDS Handler: Set arbitrary bitrate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": (
|
||||||
|
"CCSDS Handler: Enable tx clock manipulator",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"6": (
|
||||||
|
"CCSDS Handler: Disable tx clock manipulator",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"7": (
|
||||||
|
"CCSDS Handler: Update tx data on rising edge",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"8": (
|
||||||
|
"CCSDS Handler: Update tx data on falling edge",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
service_ccsds_handler_tuple = ("CCSDS Handler", op_code_dict_srv_ccsds_handler)
|
||||||
|
cmd_dict[CustomServiceList.CCSDS_HANDLER.value] = service_ccsds_handler_tuple
|
||||||
|
|
||||||
|
|
||||||
|
def add_gps_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
|
op_code_dict = {
|
||||||
|
GpsOpCodes.RESET_GNSS.value: ("Reset GPS", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||||
|
}
|
||||||
|
service_tuple = ("GPS 0", op_code_dict)
|
||||||
|
cmd_dict[CustomServiceList.GPS_0.value] = service_tuple
|
||||||
|
cmd_dict[CustomServiceList.GPS_1.value] = service_tuple
|
||||||
|
|
||||||
|
|
||||||
|
def add_str_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
|
op_code_dict_srv_star_tracker = {
|
||||||
|
"0": (
|
||||||
|
"Star Tracker: Mode On, Submode Bootloader",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"1": ("Star Tracker: Mode On, Submode Firmware", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("Star Tracker: Mode Normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("Star Tracker: Mode Off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("Star Tracker: Mode Raw", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("Star Tracker: Ping", {OpCodeDictKeys.TIMEOUT: 5.0}),
|
||||||
|
"6": (
|
||||||
|
"Star Tracker: Switch to bootloader program",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"7": ("Star Tracker: Request temperature", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"8": ("Star Tracker: Request version", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"9": ("Star Tracker: Request interface", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"10": ("Star Tracker: Request power", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"11": (
|
||||||
|
"Star Tracker: Set subscription parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"12": (
|
||||||
|
"Star Tracker: Boot image (requires bootloader mode)",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"13": ("Star Tracker: Request time", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"14": ("Star Tracker: Request solution", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"15": ("Star Tracker: Upload image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"16": ("Star Tracker: Download image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"17": ("Star Tracker: Set limit parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"18": ("Star Tracker: Set tracking parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"19": ("Star Tracker: Set mounting parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"20": ("Star Tracker: Set camera parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"22": (
|
||||||
|
"Star Tracker: Set centroiding parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"23": ("Star Tracker: Set LISA parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"24": ("Star Tracker: Set matching parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"25": (
|
||||||
|
"Star Tracker: Set validation parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"26": ("Star Tracker: Set algo parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"27": ("Star Tracker: Take image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"28": ("Star Tracker: Stop str helper", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"30": (
|
||||||
|
"Star Tracker: Set name of download image",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"31": ("Star Tracker: Request histogram", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"32": ("Star Tracker: Request contrast", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"33": ("Star Tracker: Set json filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"35": ("Star Tracker: Flash read", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"36": ("Star Tracker: Set flash read filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"37": ("Star Tracker: Get checksum", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"49": ("Star Tracker: Request camera parameter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"50": ("Star Tracker: Request limits", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"51": (
|
||||||
|
"Star Tracker: Set image processor parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"52": (
|
||||||
|
"Star Tracker: (EGSE only) Load camera ground config ",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"53": (
|
||||||
|
"Star Tracker: (EGSE only) Load camera flight config",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"54": (
|
||||||
|
"Star Tracker: Request log level parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"55": (
|
||||||
|
"Star Tracker: Request mounting parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"56": (
|
||||||
|
"Star Tracker: Request image processor parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"57": (
|
||||||
|
"Star Tracker: Request centroiding parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"58": ("Star Tracker: Request lisa parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"59": (
|
||||||
|
"Star Tracker: Request matching parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"60": (
|
||||||
|
"Star Tracker: Request tracking parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"61": (
|
||||||
|
"Star Tracker: Request validation parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"62": ("Star Tracker: Request algo parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"63": (
|
||||||
|
"Star Tracker: Request subscription parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"64": (
|
||||||
|
"Star Tracker: Request log subscription parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"65": (
|
||||||
|
"Star Tracker: Request debug camera parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"66": ("Star Tracker: Set log level parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"67": (
|
||||||
|
"Star Tracker: Set log subscription parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"68": (
|
||||||
|
"Star Tracker: Set debug camera parameters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"69": ("Star Tracker: Firmware update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"70": (
|
||||||
|
"Star Tracker: Disable timestamp generation",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"71": (
|
||||||
|
"Star Tracker: Enable timestamp generation",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
||||||
|
cmd_dict[CustomServiceList.STAR_TRACKER.value] = service_star_tracker_tuple
|
||||||
|
|
||||||
|
|
||||||
|
def add_syrlinks_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
|
op_code_dict_srv_syrlinks_handler = {
|
||||||
|
"0": ("Syrlinks Handler: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("Syrlinks Handler: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("Syrlinks Handler: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("Syrlinks Handler: Set TX standby", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("Syrlinks Handler: Set TX modulation", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("Syrlinks Handler: Set TX carrier wave", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"6": ("Syrlinks Handler: Read TX status", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"7": ("Syrlinks Handler: Read TX waveform", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"8": (
|
||||||
|
"Syrlinks Handler: Read TX AGC value high byte ",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"9": (
|
||||||
|
"Syrlinks Handler: Read TX AGC value low byte ",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"12": (
|
||||||
|
"Syrlinks Handler: Write LCL config",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"13": (
|
||||||
|
"Syrlinks Handler: Read RX status registers",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"14": (
|
||||||
|
"Syrlinks Handler: Read LCL config register",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"15": (
|
||||||
|
"Syrlinks Handler: Set waveform OQPSK",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"16": (
|
||||||
|
"Syrlinks Handler: Set waveform BPSK",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"17": (
|
||||||
|
"Syrlinks Handler: Set second config",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"18": (
|
||||||
|
"Syrlinks Handler: Enable debug output",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"19": (
|
||||||
|
"Syrlinks Handler: Disable debug output",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
service_syrlinks_handler_tuple = (
|
||||||
|
"Syrlinks Handler",
|
||||||
|
op_code_dict_srv_syrlinks_handler,
|
||||||
|
)
|
||||||
|
cmd_dict[CustomServiceList.SYRLINKS.value] = service_syrlinks_handler_tuple
|
||||||
|
|
||||||
|
|
||||||
def add_bpx_cmd_definitions(cmd_dict: ServiceOpCodeDictT):
|
def add_bpx_cmd_definitions(cmd_dict: ServiceOpCodeDictT):
|
||||||
op_code_dict = dict()
|
op_code_dict = dict()
|
||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
@ -471,6 +750,12 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
info="PDU2 Device",
|
info="PDU2 Device",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=op_code_dict,
|
||||||
)
|
)
|
||||||
|
op_code_dict = {
|
||||||
|
"0": ("ACU: Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"51": ("ACU: Print channel statistics", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_tuple = ("ACU Devices", op_code_dict)
|
||||||
|
cmd_dict[CustomServiceList.ACU.value] = service_tuple
|
||||||
|
|
||||||
|
|
||||||
def add_imtq_cmds(cmd_dict: ServiceOpCodeDictT):
|
def add_imtq_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||||
@ -622,18 +907,36 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
),
|
),
|
||||||
"42": ("PLOC Supervisor: Perform update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"42": ("PLOC Supervisor: Perform update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"43": ("PLOC Supervisor: Terminate supervisor process", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"43": (
|
||||||
|
"PLOC Supervisor: Terminate supervisor process",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
"44": ("PLOC Supervisor: Start MPSoC quiet", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"44": ("PLOC Supervisor: Start MPSoC quiet", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"45": ("PLOC Supervisor: Set shutdown timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"45": ("PLOC Supervisor: Set shutdown timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"46": ("PLOC Supervisor: Factory flash", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"46": ("PLOC Supervisor: Factory flash", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"47": ("PLOC Supervisor: Enable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"47": ("PLOC Supervisor: Enable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"49": ("PLOC Supervisor: Enable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"49": (
|
||||||
"50": ("PLOC Supervisor: Disable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"PLOC Supervisor: Enable ADC monitor task",
|
||||||
"51": ("PLOC Supervisor: Logging request event buffers", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
"52": ("PLOC Supervisor: Logging clear counters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
),
|
||||||
|
"50": (
|
||||||
|
"PLOC Supervisor: Disable ADC monitor task",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"51": (
|
||||||
|
"PLOC Supervisor: Logging request event buffers",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
|
"52": (
|
||||||
|
"PLOC Supervisor: Logging clear counters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
"53": ("PLOC Supervisor: Logging set topic", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"53": ("PLOC Supervisor: Logging set topic", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"54": ("PLOC Supervisor: Logging request counters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"54": (
|
||||||
|
"PLOC Supervisor: Logging request counters",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||||
|
),
|
||||||
"55": ("PLOC Supervisor: Request ADC Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"55": ("PLOC Supervisor: Request ADC Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"56": ("PLOC Supervisor: Reset PL", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"56": ("PLOC Supervisor: Reset PL", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,11 @@ def pack_ploc_mpsoc_commands(
|
|||||||
elif op_code == "16":
|
elif op_code == "16":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc cam command send"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc cam command send"))
|
||||||
cam_cmd = input("Specify cam command string: ")
|
cam_cmd = input("Specify cam command string: ")
|
||||||
command = object_id + struct.pack("!I", CommandIds.TC_CAM_CMD_SEND) + bytearray(cam_cmd, 'utf-8')
|
command = (
|
||||||
|
object_id
|
||||||
|
+ struct.pack("!I", CommandIds.TC_CAM_CMD_SEND)
|
||||||
|
+ bytearray(cam_cmd, "utf-8")
|
||||||
|
)
|
||||||
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())
|
||||||
|
|
||||||
|
@ -32,8 +32,14 @@ MANUAL_INPUT = "1"
|
|||||||
update_file_dict = {
|
update_file_dict = {
|
||||||
MANUAL_INPUT: ["manual input", ""],
|
MANUAL_INPUT: ["manual input", ""],
|
||||||
"2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"],
|
"2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"],
|
||||||
"3": ["/mnt/sd0/ploc/supervisor/update-large.bin", "/mnt/sd0/ploc/supervisor/update-large.bin"],
|
"3": [
|
||||||
"4": ["/mnt/sd0/ploc/supervisor/update-small.bin", "/mnt/sd0/ploc/supervisor/update-small.bin"],
|
"/mnt/sd0/ploc/supervisor/update-large.bin",
|
||||||
|
"/mnt/sd0/ploc/supervisor/update-large.bin",
|
||||||
|
],
|
||||||
|
"4": [
|
||||||
|
"/mnt/sd0/ploc/supervisor/update-small.bin",
|
||||||
|
"/mnt/sd0/ploc/supervisor/update-small.bin",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
event_buffer_path_dict = {
|
event_buffer_path_dict = {
|
||||||
@ -373,69 +379,65 @@ def pack_ploc_supv_commands(
|
|||||||
command = PusTelecommand(service=8, subservice=128, ssc=57, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=57, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "43":
|
elif op_code == "43":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Terminate supervisor process"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack(
|
(QueueCommands.PRINT, "PLOC Supervisor: Terminate supervisor process")
|
||||||
"!I", SupvActionIds.TERMINATE_SUPV_HELPER
|
|
||||||
)
|
)
|
||||||
|
command = object_id + struct.pack("!I", SupvActionIds.TERMINATE_SUPV_HELPER)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=58, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=58, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "44":
|
elif op_code == "44":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Start MPSoC quiet"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Start MPSoC quiet"))
|
||||||
command = object_id + struct.pack(
|
command = object_id + struct.pack("!I", SupvActionIds.START_MPSOC_QUIET)
|
||||||
"!I", SupvActionIds.START_MPSOC_QUIET
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=59, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=59, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "45":
|
elif op_code == "45":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set shutdown timeout"))
|
tc_queue.appendleft(
|
||||||
|
(QueueCommands.PRINT, "PLOC Supervisor: Set shutdown timeout")
|
||||||
|
)
|
||||||
command = pack_set_shutdown_timeout_command(object_id)
|
command = pack_set_shutdown_timeout_command(object_id)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=60, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=60, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "46":
|
elif op_code == "46":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Factory flash"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Factory flash"))
|
||||||
command = object_id + struct.pack(
|
command = object_id + struct.pack("!I", SupvActionIds.FACTORY_FLASH)
|
||||||
"!I", SupvActionIds.FACTORY_FLASH
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=61, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=61, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "47":
|
elif op_code == "47":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable auto TM"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable auto TM"))
|
||||||
command = object_id + struct.pack(
|
command = object_id + struct.pack("!I", SupvActionIds.ENABLE_AUTO_TM)
|
||||||
"!I", SupvActionIds.ENABLE_AUTO_TM
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=62, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=62, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "48":
|
elif op_code == "48":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable auto TM"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable auto TM"))
|
||||||
command = object_id + struct.pack(
|
command = object_id + struct.pack("!I", SupvActionIds.DISABLE_AUTO_TM)
|
||||||
"!I", SupvActionIds.DISABLE_AUTO_TM
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "49":
|
elif op_code == "49":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable ADC monitor task"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack(
|
(QueueCommands.PRINT, "PLOC Supervisor: Enable ADC monitor task")
|
||||||
"!I", SupvActionIds.ENABLE_ADC_MONITOR_TASK
|
|
||||||
)
|
)
|
||||||
|
command = object_id + struct.pack("!I", SupvActionIds.ENABLE_ADC_MONITOR_TASK)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=64, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=64, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "50":
|
elif op_code == "50":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable ADC monitor task"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack(
|
(QueueCommands.PRINT, "PLOC Supervisor: Disable ADC monitor task")
|
||||||
"!I", SupvActionIds.DISABLE_ADC_MONITOR_TASK
|
|
||||||
)
|
)
|
||||||
|
command = object_id + struct.pack("!I", SupvActionIds.DISABLE_ADC_MONITOR_TASK)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "51":
|
elif op_code == "51":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging request event buffers"))
|
tc_queue.appendleft(
|
||||||
|
(QueueCommands.PRINT, "PLOC Supervisor: Logging request event buffers")
|
||||||
|
)
|
||||||
command = pack_logging_buffer_request(object_id)
|
command = pack_logging_buffer_request(object_id)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=66, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=66, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "52":
|
elif op_code == "52":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging clear counters"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack(
|
(QueueCommands.PRINT, "PLOC Supervisor: Logging clear counters")
|
||||||
"!I", SupvActionIds.LOGGING_CLEAR_COUNTERS
|
|
||||||
)
|
)
|
||||||
|
command = object_id + struct.pack("!I", SupvActionIds.LOGGING_CLEAR_COUNTERS)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "53":
|
elif op_code == "53":
|
||||||
@ -444,18 +446,22 @@ def pack_ploc_supv_commands(
|
|||||||
command = PusTelecommand(service=8, subservice=128, ssc=68, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=68, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "54":
|
elif op_code == "54":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging request counters"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack('!I', SupvActionIds.LOGGING_REQUEST_COUNTERS)
|
(QueueCommands.PRINT, "PLOC Supervisor: Logging request counters")
|
||||||
|
)
|
||||||
|
command = object_id + struct.pack("!I", SupvActionIds.LOGGING_REQUEST_COUNTERS)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=69, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=69, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "55":
|
elif op_code == "55":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Request ADC report"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack('!I', SupvActionIds.REQUEST_ADC_REPORT)
|
(QueueCommands.PRINT, "PLOC Supervisor: Request ADC report")
|
||||||
|
)
|
||||||
|
command = object_id + struct.pack("!I", SupvActionIds.REQUEST_ADC_REPORT)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "56":
|
elif op_code == "56":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Reset PL"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Reset PL"))
|
||||||
command = object_id + struct.pack('!I', SupvActionIds.RESET_PL)
|
command = object_id + struct.pack("!I", SupvActionIds.RESET_PL)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
@ -706,30 +712,30 @@ def pack_update_command(object_id: bytearray) -> bytearray:
|
|||||||
start_address = int(input("Specify start address: 0x"), 16)
|
start_address = int(input("Specify start address: 0x"), 16)
|
||||||
update_file = get_update_file()
|
update_file = get_update_file()
|
||||||
command += object_id
|
command += object_id
|
||||||
command += struct.pack('!I', SupvActionIds.PERFORM_UPDATE)
|
command += struct.pack("!I", SupvActionIds.PERFORM_UPDATE)
|
||||||
command += bytearray(update_file, 'utf-8')
|
command += bytearray(update_file, "utf-8")
|
||||||
# Adding null terminator
|
# Adding null terminator
|
||||||
command += struct.pack('!B', 0)
|
command += struct.pack("!B", 0)
|
||||||
command += struct.pack('!B', memory_id)
|
command += struct.pack("!B", memory_id)
|
||||||
command += struct.pack('!I', start_address)
|
command += struct.pack("!I", start_address)
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
|
||||||
def pack_set_shutdown_timeout_command(object_id: bytearray) -> bytearray:
|
def pack_set_shutdown_timeout_command(object_id: bytearray) -> bytearray:
|
||||||
command = bytearray()
|
command = bytearray()
|
||||||
command += object_id
|
command += object_id
|
||||||
command += struct.pack('!I', SupvActionIds.SET_SHUTDOWN_TIMEOUT)
|
command += struct.pack("!I", SupvActionIds.SET_SHUTDOWN_TIMEOUT)
|
||||||
timeout = int(input("Specify shutdown timeout (ms): "))
|
timeout = int(input("Specify shutdown timeout (ms): "))
|
||||||
command += struct.pack('!I', timeout)
|
command += struct.pack("!I", timeout)
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
|
||||||
def pack_logging_buffer_request(object_id: bytearray) -> bytearray:
|
def pack_logging_buffer_request(object_id: bytearray) -> bytearray:
|
||||||
command = bytearray()
|
command = bytearray()
|
||||||
command += object_id
|
command += object_id
|
||||||
command += struct.pack('!I', SupvActionIds.LOGGING_REQUEST_EVENT_BUFFERS)
|
command += struct.pack("!I", SupvActionIds.LOGGING_REQUEST_EVENT_BUFFERS)
|
||||||
path = get_event_buffer_path()
|
path = get_event_buffer_path()
|
||||||
command += bytearray(path, 'utf-8')
|
command += bytearray(path, "utf-8")
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
|
||||||
@ -779,9 +785,9 @@ def pack_read_gpio_cmd(object_id: bytearray) -> bytearray:
|
|||||||
|
|
||||||
|
|
||||||
def pack_logging_set_topic(objetc_id: bytearray) -> bytearray:
|
def pack_logging_set_topic(objetc_id: bytearray) -> bytearray:
|
||||||
command = objetc_id + struct.pack('!I', SupvActionIds.LOGGING_SET_TOPIC)
|
command = objetc_id + struct.pack("!I", SupvActionIds.LOGGING_SET_TOPIC)
|
||||||
tpc = int(input("Specify logging topic: "))
|
tpc = int(input("Specify logging topic: "))
|
||||||
command += struct.pack('!B', tpc)
|
command += struct.pack("!B", tpc)
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,17 +64,17 @@ def pack_syrlinks_command(
|
|||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "3":
|
if op_code == "3":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode standby"))
|
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode standby"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.SET_TX_MODE_STANDBY)
|
command = object_id + struct.pack("!I", CommandIds.SET_TX_MODE_STANDBY)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=10, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=10, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "4":
|
if op_code == "4":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode modulation"))
|
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode modulation"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.SET_TX_MODE_MODULATION)
|
command = object_id + struct.pack("!I", CommandIds.SET_TX_MODE_MODULATION)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=11, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=11, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "5":
|
if op_code == "5":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode CW"))
|
tc_queue.appendleft((QueueCommands.PRINT, "syrlinks: Set TX mode CW"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.SET_TX_MODE_CW)
|
command = object_id + struct.pack("!I", CommandIds.SET_TX_MODE_CW)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=12, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=12, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "6":
|
if op_code == "6":
|
||||||
@ -89,26 +89,26 @@ def pack_syrlinks_command(
|
|||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "8":
|
if op_code == "8":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX status"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX status"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_TX_STATUS)
|
command = object_id + struct.pack("!I", CommandIds.READ_TX_STATUS)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=13, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=13, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "9":
|
if op_code == "9":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX waveform"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read TX waveform"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_TX_WAVEFORM)
|
command = object_id + struct.pack("!I", CommandIds.READ_TX_WAVEFORM)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=14, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=14, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "10":
|
if op_code == "10":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft(
|
||||||
(QueueCommands.PRINT, "Syrlinks: Read TX AGC value high byte")
|
(QueueCommands.PRINT, "Syrlinks: Read TX AGC value high byte")
|
||||||
)
|
)
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_TX_AGC_VALUE_HIGH_BYTE)
|
command = object_id + struct.pack("!I", CommandIds.READ_TX_AGC_VALUE_HIGH_BYTE)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=15, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=15, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "11":
|
if op_code == "11":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft(
|
||||||
(QueueCommands.PRINT, "Syrlinks: Read TX AGC value low byte")
|
(QueueCommands.PRINT, "Syrlinks: Read TX AGC value low byte")
|
||||||
)
|
)
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_TX_AGC_VALUE_LOW_BYTE)
|
command = object_id + struct.pack("!I", CommandIds.READ_TX_AGC_VALUE_LOW_BYTE)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=16, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=16, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "12":
|
if op_code == "12":
|
||||||
|
Loading…
Reference in New Issue
Block a user