diff --git a/config/definitions.py b/config/definitions.py index f48c235..a0b54b5 100644 --- a/config/definitions.py +++ b/config/definitions.py @@ -8,10 +8,13 @@ import enum class CustomServiceList(enum.Enum): + TEST_DEVICE = "test", P60DOCK = "p60dock" PDU1 = "pdu1" PDU2 = "pdu2" ACU = "acu" TMP1075_1 = "tmp1075_1" TMP1075_2 = "tmp1075_2" - HEATER = "heater" + HEATER = "heater", + PCDU = "pcdu", + SA_DEPLYOMENT = "sa_depl" diff --git a/config/hook_implementations.py b/config/hook_implementations.py index 0df8e71..74f106c 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -1,7 +1,7 @@ import argparse from typing import Union, Dict, Tuple -from tmtccmd.config.definitions import ServiceOpCodeDictT +from tmtccmd.config.definitions import ServiceOpCodeDictT, CoreServiceList from tmtccmd.pus_tm.service_3_base import Service3Base from tmtccmd.ecss.tm import PusTelemetry from tmtccmd.pus_tc.definitions import TcQueueT @@ -9,13 +9,56 @@ from tmtccmd.com_if.com_interface_base import CommunicationInterface from tmtccmd.core.backend import TmTcHandler from tmtccmd.config.hook import TmTcHookBase from tmtccmd.utility.tmtc_printer import TmTcPrinter +from tmtccmd.config.globals import OpCodeDictKeys + +from config.definitions import CustomServiceList class EiveHookObject(TmTcHookBase): def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT: from tmtccmd.config.globals import get_default_service_op_code_dict - return get_default_service_op_code_dict() + service_op_code_dict = get_default_service_op_code_dict() + op_code_dict_srv_acu = { + "0": ("ACU Tests", {OpCodeDictKeys.TIMEOUT: 2.0}), + } + service_acu_tuple = ("ACU Devices", op_code_dict_srv_acu) + + op_code_dict_srv_tmp1075 = { + "0": ("TMP1075 Tests", {OpCodeDictKeys.TIMEOUT: 2.2}), + } + service_tmp1075_1_tuple = ("TMP1075 1", op_code_dict_srv_tmp1075) + service_tmp1075_2_tuple = ("TMP1075 2", op_code_dict_srv_tmp1075) + + op_code_dict_srv_p60 = { + "0": ("P60 Tests", {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}), + } + service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1) + + op_code_dict_srv_pdu2 = { + "0": ("PDU2 Tests", {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) + + service_op_code_dict[CustomServiceList.ACU.value] = service_acu_tuple + service_op_code_dict[CustomServiceList.TMP1075_1.value] = service_tmp1075_1_tuple + service_op_code_dict[CustomServiceList.TMP1075_2.value] = service_tmp1075_2_tuple + 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.PDU1.value] = service_pdu2_tuple + service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu2_tuple + service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple + return service_op_code_dict def get_json_config_file_path(self) -> str: """