Update tmtccmd #21
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,17 +1,10 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
log
|
log
|
||||||
|
/gps_log.txt
|
||||||
|
|
||||||
.idea/*
|
.idea/*
|
||||||
!.idea/runConfigurations
|
!.idea/runConfigurations
|
||||||
|
|
||||||
*.json
|
*.json
|
||||||
|
|
||||||
/Lib
|
|
||||||
/Scripts
|
|
||||||
/pyvenv.cfg
|
|
||||||
/bin
|
|
||||||
/lib
|
|
||||||
/lib64
|
|
||||||
/share
|
|
||||||
|
|
||||||
/venv
|
/venv
|
||||||
|
@ -20,173 +20,7 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
|
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
|
||||||
from tmtccmd.config.globals import get_default_service_op_code_dict
|
from tmtccmd.config.globals import get_default_service_op_code_dict
|
||||||
service_op_code_dict = get_default_service_op_code_dict()
|
service_op_code_dict = get_default_service_op_code_dict()
|
||||||
op_code_dict = {
|
get_eive_service_op_code_dict(service_op_code_dict=service_op_code_dict)
|
||||||
'reboot': ('Reboot with Prompt', {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
'reboot_self': ('Reboot Self', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
|
||||||
'reboot_0_0': ('Reboot 0 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
|
||||||
'reboot_0_1': ('Reboot 0 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
|
||||||
'reboot_1_0': ('Reboot 1 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
|
||||||
'reboot_1_1': ('Reboot 1 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
|
||||||
}
|
|
||||||
service_tuple = ('Core Controller', op_code_dict)
|
|
||||||
service_op_code_dict[CustomServiceList.CORE.value] = service_tuple
|
|
||||||
|
|
||||||
op_code_dict = {
|
|
||||||
"0": ("ACU Tests", {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_p60 = {
|
|
||||||
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("P60 Dock: Turn stack 3V3 on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("P60 Dock: Turn stack 3V3 off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_p60_tuple = ("P60 Device", op_code_dict_srv_p60)
|
|
||||||
|
|
||||||
op_code_dict_srv_pdu1 = {
|
|
||||||
"0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("PDU1: Get switch state of star tracker", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
|
||||||
|
|
||||||
op_code_dict_srv_pdu2 = {
|
|
||||||
"0": ("PDU2 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("PDU1: Turn ACS Side B on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("PDU1: Turn ACS Side B off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
|
||||||
|
|
||||||
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_imtq = {
|
|
||||||
"0": ("IMTQ Tests All", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("IMTQ perform pos X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("IMTQ perform neg X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("IMTQ perform pos Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("IMTQ perform neg Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("IMTQ perform pos Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("IMTQ perform neg Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("IMTQ command dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": ("IMTQ get commanded dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_imtq_tuple = ("IMTQ Device", op_code_dict_srv_imtq)
|
|
||||||
|
|
||||||
op_code_dict_srv_rw = {
|
|
||||||
"0": ("Reaction Wheel: Run all commands", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("Reaction Wheel: Set speed", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Reaction Wheel: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Reaction Wheel: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Reaction Wheel: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Reaction Wheel: Send get-telemetry-command", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_rw_tuple = ("Reaction Wheel", op_code_dict_srv_rw)
|
|
||||||
|
|
||||||
op_code_dict_srv_rad_sensor = {
|
|
||||||
"0": ("Radiation Sensor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("Radiation Sensor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Radiation Sensor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_rad_sensor_tuple = ("Radiation Sensor", op_code_dict_srv_rad_sensor)
|
|
||||||
|
|
||||||
op_code_dict_ploc_mem_dumper = {
|
|
||||||
"0": ("PLOC Memory Dumper: MRAM dump", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_ploc_memory_dumper_tuple = ("Radiation Sensor", op_code_dict_ploc_mem_dumper)
|
|
||||||
|
|
||||||
op_code_dict_srv_ploc_supv = {
|
|
||||||
"0": ("PLOC Supervisor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("PLOC Supervisor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("PLOC Supervisor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("PLOC Supervisor: Get HK Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("PLOC Supervisor: Restart MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("PLOC Supervisor: Start MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("PLOC Supervisor: Shutdown MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("PLOC Supervisor: Select MPSoC boot image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": ("PLOC Supervisor: Set max restart tries", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"9": ("PLOC Supervisor: Reset MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"10": ("PLOC Supervisor: Set time reference", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"11": ("PLOC Supervisor: Set boot timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"12": ("PLOC Supervisor: Disable Hk", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"13": ("PLOC Supervisor: Request boot status report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"14": ("PLOC Supervisor: Update available", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"15": ("PLOC Supervisor: Watchdogs enable", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"16": ("PLOC Supervisor: Watchdog Configure Timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"17": ("PLOC Supervisor: Enable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"18": ("PLOC Supervisor: Disable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"19": ("PLOC Supervisor: Auto calibrate alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"20": ("PLOC Supervisor: Set alert limit", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"21": ("PLOC Supervisor: Set alert irq filter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"22": ("PLOC Supervisor: Set ADC sweep period", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"23": ("PLOC Supervisor: Set ADC enabled channels", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"24": ("PLOC Supervisor: Set ADC window and stride", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"25": ("PLOC Supervisor: Set ADC threshold", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"26": ("PLOC Supervisor: Request latchup status report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"27": ("PLOC Supervisor: Copy ADC data to MRAM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"28": ("PLOC Supervisor: Enable/Disable NVM0/1/3", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"29": ("PLOC Supervisor: Select NVM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"30": ("PLOC Supervisor: Run auto EM tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"31": ("PLOC Supervisor: MRAM Wipe", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"33": ("PLOC Supervisor: Print CPU stats", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"34": ("PLOC Supervisor: Set debug verbosity", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"35": ("PLOC Supervisor: Set GPIO", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"36": ("PLOC Supervisor: Read GPIO", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"37": ("PLOC Supervisor: Restart supervisor", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"38": ("PLOC Supervisor: Factory reset clear all", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"39": ("PLOC Supervisor: Factory reset clear mirror entries", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"40": ("PLOC Supervisor: Factory reset clear circular entries", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"41": ("PLOC Supervisor: CAN loopback test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv)
|
|
||||||
|
|
||||||
op_code_dict_srv_ploc_updater = {
|
|
||||||
"0": ("Ploc Updater: Update uboot on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("Ploc Updater: Update bitstream on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Ploc Updater: Update linux on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Ploc Updater: Update application on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Ploc Updater: Update uboot on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Ploc Updater: Update bitstream on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("Ploc Updater: Update linux on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("Ploc Updater: Update application on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
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}),
|
|
||||||
}
|
|
||||||
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
|
||||||
|
|
||||||
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
|
|
||||||
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_1.value] = service_rw_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_2.value] = service_rw_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_3.value] = service_rw_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_4.value] = service_rw_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.RAD_SENSOR.value] = service_rad_sensor_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.PLOC_SUPV.value] = service_ploc_supv_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.PLOC_UPDATER.value] = service_ploc_updater_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.STAR_TRACKER.value] = service_star_tracker_tuple
|
|
||||||
service_op_code_dict[CustomServiceList.PLOC_MEMORY_DUMPER.value] = service_ploc_memory_dumper_tuple
|
|
||||||
return service_op_code_dict
|
return service_op_code_dict
|
||||||
|
|
||||||
def get_json_config_file_path(self) -> str:
|
def get_json_config_file_path(self) -> str:
|
||||||
@ -250,3 +84,181 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
if event_id == 1:
|
if event_id == 1:
|
||||||
return ""
|
return ""
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||||
|
from pus_tc.pdu1 import Pdu1OpCodes
|
||||||
|
op_code_dict = {
|
||||||
|
'reboot': ('Reboot with Prompt', {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
'reboot_self': ('Reboot Self', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||||
|
'reboot_0_0': ('Reboot 0 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||||
|
'reboot_0_1': ('Reboot 0 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||||
|
'reboot_1_0': ('Reboot 1 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||||
|
'reboot_1_1': ('Reboot 1 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||||
|
}
|
||||||
|
service_tuple = ('Core Controller', op_code_dict)
|
||||||
|
service_op_code_dict[CustomServiceList.CORE.value] = service_tuple
|
||||||
|
|
||||||
|
op_code_dict = {
|
||||||
|
"0": ("ACU Tests", {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_p60 = {
|
||||||
|
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("P60 Dock: Turn stack 3V3 on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("P60 Dock: Turn stack 3V3 off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_p60_tuple = ("P60 Device", op_code_dict_srv_p60)
|
||||||
|
|
||||||
|
op_code_dict_srv_pdu1 = {
|
||||||
|
"0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
Pdu1OpCodes.STAR_TRACKER_ON.value:
|
||||||
|
("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("PDU1: Get switch state of star tracker", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
||||||
|
("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
||||||
|
("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}),
|
||||||
|
}
|
||||||
|
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
||||||
|
|
||||||
|
op_code_dict_srv_pdu2 = {
|
||||||
|
"0": ("PDU2 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("PDU1: Turn ACS Side B on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("PDU1: Turn ACS Side B off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
||||||
|
|
||||||
|
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_imtq = {
|
||||||
|
"0": ("IMTQ Tests All", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("IMTQ perform pos X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("IMTQ perform neg X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("IMTQ perform pos Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("IMTQ perform neg Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("IMTQ perform pos Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"6": ("IMTQ perform neg Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"7": ("IMTQ command dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"8": ("IMTQ get commanded dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_imtq_tuple = ("IMTQ Device", op_code_dict_srv_imtq)
|
||||||
|
|
||||||
|
op_code_dict_srv_rw = {
|
||||||
|
"0": ("Reaction Wheel: Run all commands", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("Reaction Wheel: Set speed", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("Reaction Wheel: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("Reaction Wheel: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("Reaction Wheel: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("Reaction Wheel: Send get-telemetry-command", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_rw_tuple = ("Reaction Wheel", op_code_dict_srv_rw)
|
||||||
|
|
||||||
|
op_code_dict_srv_rad_sensor = {
|
||||||
|
"0": ("Radiation Sensor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("Radiation Sensor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("Radiation Sensor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_rad_sensor_tuple = ("Radiation Sensor", op_code_dict_srv_rad_sensor)
|
||||||
|
|
||||||
|
op_code_dict_ploc_mem_dumper = {
|
||||||
|
"0": ("PLOC Memory Dumper: MRAM dump", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_ploc_memory_dumper_tuple = ("Radiation Sensor", op_code_dict_ploc_mem_dumper)
|
||||||
|
|
||||||
|
op_code_dict_srv_ploc_supv = {
|
||||||
|
"0": ("PLOC Supervisor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("PLOC Supervisor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("PLOC Supervisor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("PLOC Supervisor: Get HK Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("PLOC Supervisor: Restart MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("PLOC Supervisor: Start MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"6": ("PLOC Supervisor: Shutdown MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"7": ("PLOC Supervisor: Select MPSoC boot image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"8": ("PLOC Supervisor: Set max restart tries", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"9": ("PLOC Supervisor: Reset MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"10": ("PLOC Supervisor: Set time reference", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"11": ("PLOC Supervisor: Set boot timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"12": ("PLOC Supervisor: Disable Hk", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"13": ("PLOC Supervisor: Request boot status report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"14": ("PLOC Supervisor: Update available", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"15": ("PLOC Supervisor: Watchdogs enable", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"16": ("PLOC Supervisor: Watchdog Configure Timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"17": ("PLOC Supervisor: Enable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"18": ("PLOC Supervisor: Disable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"19": ("PLOC Supervisor: Auto calibrate alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"20": ("PLOC Supervisor: Set alert limit", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"21": ("PLOC Supervisor: Set alert irq filter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"22": ("PLOC Supervisor: Set ADC sweep period", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"23": ("PLOC Supervisor: Set ADC enabled channels", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"24": ("PLOC Supervisor: Set ADC window and stride", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"25": ("PLOC Supervisor: Set ADC threshold", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"26": ("PLOC Supervisor: Request latchup status report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"27": ("PLOC Supervisor: Copy ADC data to MRAM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"28": ("PLOC Supervisor: Enable/Disable NVM0/1/3", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"29": ("PLOC Supervisor: Select NVM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"30": ("PLOC Supervisor: Run auto EM tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"31": ("PLOC Supervisor: MRAM Wipe", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"33": ("PLOC Supervisor: Print CPU stats", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"34": ("PLOC Supervisor: Set debug verbosity", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"35": ("PLOC Supervisor: Set GPIO", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"36": ("PLOC Supervisor: Read GPIO", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"37": ("PLOC Supervisor: Restart supervisor", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"38": ("PLOC Supervisor: Factory reset clear all", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"39": ("PLOC Supervisor: Factory reset clear mirror entries",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"40": ("PLOC Supervisor: Factory reset clear circular entries",
|
||||||
|
{OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"41": ("PLOC Supervisor: CAN loopback test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv)
|
||||||
|
|
||||||
|
op_code_dict_srv_ploc_updater = {
|
||||||
|
"0": ("Ploc Updater: Update uboot on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("Ploc Updater: Update bitstream on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"2": ("Ploc Updater: Update linux on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"3": ("Ploc Updater: Update application on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"4": ("Ploc Updater: Update uboot on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"5": ("Ploc Updater: Update bitstream on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"6": ("Ploc Updater: Update linux on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"7": ("Ploc Updater: Update application on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
}
|
||||||
|
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}),
|
||||||
|
}
|
||||||
|
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
||||||
|
|
||||||
|
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
|
||||||
|
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.REACTION_WHEEL_1.value] = service_rw_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.REACTION_WHEEL_2.value] = service_rw_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.REACTION_WHEEL_3.value] = service_rw_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.REACTION_WHEEL_4.value] = service_rw_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.RAD_SENSOR.value] = service_rad_sensor_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.PLOC_SUPV.value] = service_ploc_supv_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.PLOC_UPDATER.value] = service_ploc_updater_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.STAR_TRACKER.value] = service_star_tracker_tuple
|
||||||
|
service_op_code_dict[CustomServiceList.PLOC_MEMORY_DUMPER.value] = \
|
||||||
|
service_ploc_memory_dumper_tuple
|
@ -6,6 +6,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
|
import enum
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
from tmtccmd.tc.packer import TcQueueT
|
||||||
@ -15,6 +16,13 @@ from pus_tc.p60dock import P60DockConfigTable
|
|||||||
from gomspace.gomspace_pdu_definitions import *
|
from gomspace.gomspace_pdu_definitions import *
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu1OpCodes(enum.Enum):
|
||||||
|
STAR_TRACKER_ON = "1"
|
||||||
|
STAR_TRACKER_OFF = "4"
|
||||||
|
ACS_A_SIDE_ON = "6"
|
||||||
|
ACS_A_SIDE_OFF = "7"
|
||||||
|
|
||||||
|
|
||||||
class PDU1TestProcedure:
|
class PDU1TestProcedure:
|
||||||
"""
|
"""
|
||||||
@brief Use this class to define the tests to perform for the PDU2.
|
@brief Use this class to define the tests to perform for the PDU2.
|
||||||
@ -31,10 +39,10 @@ class PDU1TestProcedure:
|
|||||||
turn_channel_3_off = False
|
turn_channel_3_off = False
|
||||||
|
|
||||||
|
|
||||||
def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1"))
|
||||||
|
|
||||||
if op_code == "1":
|
if op_code == Pdu1OpCodes.STAR_TRACKER_ON.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker on"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker on"))
|
||||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size, Channel.on)
|
PDUConfigTable.out_en_2.parameter_size, Channel.on)
|
||||||
@ -46,7 +54,7 @@ def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str)
|
|||||||
PDUConfigTable.out_en_4.parameter_size, Channel.on)
|
PDUConfigTable.out_en_4.parameter_size, Channel.on)
|
||||||
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())
|
||||||
if op_code == "4":
|
if op_code == Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker off"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker off"))
|
||||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||||
@ -58,16 +66,20 @@ def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str)
|
|||||||
PDUConfigTable.out_en_4.parameter_size, Channel.off)
|
PDUConfigTable.out_en_4.parameter_size, Channel.off)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "6":
|
if op_code == Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn ACS Side A on"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn ACS Side A on"))
|
||||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_7.parameter_address,
|
command = pack_set_param_command(
|
||||||
PDUConfigTable.out_en_7.parameter_size, Channel.on)
|
object_id, PDUConfigTable.out_en_7.parameter_address,
|
||||||
|
PDUConfigTable.out_en_7.parameter_size, Channel.on
|
||||||
|
)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "7":
|
if op_code == Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn ACS Side A off"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn ACS Side A off"))
|
||||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_7.parameter_address,
|
command = pack_set_param_command(
|
||||||
PDUConfigTable.out_en_7.parameter_size, Channel.off)
|
object_id, PDUConfigTable.out_en_7.parameter_address,
|
||||||
|
PDUConfigTable.out_en_7.parameter_size, Channel.off
|
||||||
|
)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user