diff --git a/pus_tc/cmd_definitions.py b/pus_tc/cmd_definitions.py index 63e4df0..42daa1c 100644 --- a/pus_tc/cmd_definitions.py +++ b/pus_tc/cmd_definitions.py @@ -1,3 +1,4 @@ +from pus_tc.system.proc import add_proc_cmds from tmtccmd.config import ( add_op_code_entry, add_service_op_code_entry, @@ -482,37 +483,6 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT): ] = service_ploc_memory_dumper_tuple -def add_proc_cmds(cmd_dict: ServiceOpCodeDictT): - from pus_tc.system.proc import OpCodes, KAI - - op_code_dict = dict() - add_op_code_entry( - op_code_dict=op_code_dict, keys=OpCodes.HEATER, info=KAI.HEATER[1] - ) - add_service_op_code_entry( - srv_op_code_dict=cmd_dict, - name=CustomServiceList.PROCEDURE.value, - info="Procedures", - op_code_entry=op_code_dict, - ) - op_code_dict = dict() - add_op_code_entry( - op_code_dict=op_code_dict, keys=OpCodes.BAT_FT, info=KAI.BAT_FT[1] - ) - add_op_code_entry( - op_code_dict=op_code_dict, keys=OpCodes.PCDU_FT, info=KAI.PCDU_FT[1] - ) - add_op_code_entry( - op_code_dict=op_code_dict, keys=OpCodes.CORE_FT, info=KAI.CORE_FT[1], options={} - ) - add_service_op_code_entry( - srv_op_code_dict=cmd_dict, - name=CustomServiceList.PROCEDURE.value, - info="TV Test Procedures", - op_code_entry=op_code_dict, - ) - - def add_system_cmds(cmd_dict: ServiceOpCodeDictT): from pus_tc.system.acs import AcsOpCodes, SusOpCodes import pus_tc.system.tcs as tcs diff --git a/pus_tc/system/proc.py b/pus_tc/system/proc.py index 8a5a846..1c89ffb 100644 --- a/pus_tc/system/proc.py +++ b/pus_tc/system/proc.py @@ -1,4 +1,5 @@ -from tmtccmd.config import QueueCommands +from config.definitions import CustomServiceList +from tmtccmd.config import QueueCommands, ServiceOpCodeDictT, add_op_code_entry, add_service_op_code_entry from tmtccmd.tc.definitions import TcQueueT from tmtccmd.tc.pus_3_fsfw_hk import * @@ -87,7 +88,7 @@ PROC_INFO_DICT = { # collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120seconds is not needed after RWs are tested KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0], # collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120seconds is not needed after RWs are tested - KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0], + KAI.RW_FT_TWO_RWS[0]: [OpCodes.RW_FT_TWO_RWS, KAI.RW_FT_TWO_RWS[1], 10.0, 1.0], } @@ -97,6 +98,21 @@ def generic_print(tc_queue: TcQueueT, info: dict): ) +def add_proc_cmds(cmd_dict: ServiceOpCodeDictT): + + op_code_dict = dict() + for proc_entry in PROC_INFO_DICT.values(): + add_op_code_entry( + op_code_dict=op_code_dict, keys=proc_entry[0], info=proc_entry[1] + ) + add_service_op_code_entry( + srv_op_code_dict=cmd_dict, + name=CustomServiceList.PROCEDURE.value, + info="TV Test Procedures", + op_code_entry=op_code_dict, + ) + + def pack_generic_hk_listening_cmds( tc_queue: TcQueueT, proc_key: str,