diff --git a/config/hook_implementations.py b/config/hook_implementations.py index 41964f5..cae5deb 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -1,5 +1,5 @@ import argparse -from typing import Union, Dict, Tuple +from typing import Union, Dict from tmtccmd.config.definitions import ( ServiceOpCodeDictT, @@ -13,7 +13,6 @@ 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.object_ids import RW1_ID from config.definitions import CustomServiceList @@ -103,7 +102,7 @@ class EiveHookObject(TmTcHookBase): def handle_service_5_event( object_id: bytes, event_id: int, param_1: int, param_2: int ) -> str: - from config.event_handler import handle_event_packet + from pus_tm.event_handler import handle_event_packet return handle_event_packet( object_id=object_id, event_id=event_id, @@ -113,7 +112,7 @@ class EiveHookObject(TmTcHookBase): def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT): - from config.cmd_definitions import ( + from pus_tc.cmd_definitions import ( add_bpx_cmd_definitions, add_core_controller_definitions, add_pcdu_cmds, @@ -123,7 +122,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT): add_rad_sens_cmds, add_ploc_cmds, ) - from pus_tc.gps import GpsOpCodes + 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) diff --git a/pus_tc/acs.py b/pus_tc/acs.py index 016d42d..6f8309c 100644 --- a/pus_tc/acs.py +++ b/pus_tc/acs.py @@ -6,12 +6,7 @@ from tmtccmd.tc.service_200_mode import pack_mode_data, Modes from tmtccmd.tc.packer import PusTelecommand from config.object_ids import ( MGM_0_HANDLER_ID, - MGM_1_HANDLER_ID, - MGM_2_HANDLER_ID, - MGM_3_HANDLER_ID, ) -from pus_tc.pdu1 import pack_pdu1_commands, Pdu1OpCodes -from pus_tc.pdu2 import pack_pdu2_commands, Pdu2OpCodes class AcsOpCodes(enum.Enum): diff --git a/config/cmd_definitions.py b/pus_tc/cmd_definitions.py similarity index 99% rename from config/cmd_definitions.py rename to pus_tc/cmd_definitions.py index e164e50..1e9849f 100644 --- a/config/cmd_definitions.py +++ b/pus_tc/cmd_definitions.py @@ -6,7 +6,7 @@ from tmtccmd.config import ( OpCodeDictKeys, ) from config.definitions import CustomServiceList -from pus_tc.bpx_batt import BpxOpCodes +from pus_tc.devs.bpx_batt import BpxOpCodes def add_bpx_cmd_definitions(cmd_dict: ServiceOpCodeDictT): @@ -160,7 +160,7 @@ def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT): def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT): from pus_tc.p60dock import P60OpCodes, GomspaceOpCodes - from pus_tc.pdu1 import Pdu1OpCodes + from pus_tc.devs.pdu1 import Pdu1OpCodes from pus_tc.pdu2 import Pdu2OpCodes op_code_dict = dict() diff --git a/pus_tc/devs/__init__.py b/pus_tc/devs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pus_tc/acu.py b/pus_tc/devs/acu.py similarity index 100% rename from pus_tc/acu.py rename to pus_tc/devs/acu.py diff --git a/pus_tc/bpx_batt.py b/pus_tc/devs/bpx_batt.py similarity index 100% rename from pus_tc/bpx_batt.py rename to pus_tc/devs/bpx_batt.py diff --git a/pus_tc/ccsds_handler.py b/pus_tc/devs/ccsds_handler.py similarity index 100% rename from pus_tc/ccsds_handler.py rename to pus_tc/devs/ccsds_handler.py diff --git a/pus_tc/gps.py b/pus_tc/devs/gps.py similarity index 100% rename from pus_tc/gps.py rename to pus_tc/devs/gps.py diff --git a/pus_tc/heater.py b/pus_tc/devs/heater.py similarity index 100% rename from pus_tc/heater.py rename to pus_tc/devs/heater.py diff --git a/pus_tc/imtq.py b/pus_tc/devs/imtq.py similarity index 100% rename from pus_tc/imtq.py rename to pus_tc/devs/imtq.py diff --git a/pus_tc/p60dock.py b/pus_tc/devs/p60dock.py similarity index 100% rename from pus_tc/p60dock.py rename to pus_tc/devs/p60dock.py diff --git a/pus_tc/pdec_handler.py b/pus_tc/devs/pdec_handler.py similarity index 100% rename from pus_tc/pdec_handler.py rename to pus_tc/devs/pdec_handler.py diff --git a/pus_tc/pdu1.py b/pus_tc/devs/pdu1.py similarity index 100% rename from pus_tc/pdu1.py rename to pus_tc/devs/pdu1.py diff --git a/pus_tc/pdu2.py b/pus_tc/devs/pdu2.py similarity index 100% rename from pus_tc/pdu2.py rename to pus_tc/devs/pdu2.py diff --git a/pus_tc/ploc_memory_dumper.py b/pus_tc/devs/ploc_memory_dumper.py similarity index 100% rename from pus_tc/ploc_memory_dumper.py rename to pus_tc/devs/ploc_memory_dumper.py diff --git a/pus_tc/ploc_mpsoc.py b/pus_tc/devs/ploc_mpsoc.py similarity index 100% rename from pus_tc/ploc_mpsoc.py rename to pus_tc/devs/ploc_mpsoc.py diff --git a/pus_tc/ploc_supervisor.py b/pus_tc/devs/ploc_supervisor.py similarity index 100% rename from pus_tc/ploc_supervisor.py rename to pus_tc/devs/ploc_supervisor.py diff --git a/pus_tc/ploc_upater.py b/pus_tc/devs/ploc_upater.py similarity index 100% rename from pus_tc/ploc_upater.py rename to pus_tc/devs/ploc_upater.py diff --git a/pus_tc/plpcdu.py b/pus_tc/devs/plpcdu.py similarity index 100% rename from pus_tc/plpcdu.py rename to pus_tc/devs/plpcdu.py diff --git a/pus_tc/rad_sensor.py b/pus_tc/devs/rad_sensor.py similarity index 100% rename from pus_tc/rad_sensor.py rename to pus_tc/devs/rad_sensor.py diff --git a/pus_tc/reaction_wheels.py b/pus_tc/devs/reaction_wheels.py similarity index 100% rename from pus_tc/reaction_wheels.py rename to pus_tc/devs/reaction_wheels.py diff --git a/pus_tc/solar_array_deployment.py b/pus_tc/devs/solar_array_deployment.py similarity index 100% rename from pus_tc/solar_array_deployment.py rename to pus_tc/devs/solar_array_deployment.py diff --git a/pus_tc/star_tracker.py b/pus_tc/devs/star_tracker.py similarity index 100% rename from pus_tc/star_tracker.py rename to pus_tc/devs/star_tracker.py diff --git a/pus_tc/str_img_helper.py b/pus_tc/devs/str_img_helper.py similarity index 100% rename from pus_tc/str_img_helper.py rename to pus_tc/devs/str_img_helper.py diff --git a/pus_tc/syrlinks_hk_handler.py b/pus_tc/devs/syrlinks_hk_handler.py similarity index 100% rename from pus_tc/syrlinks_hk_handler.py rename to pus_tc/devs/syrlinks_hk_handler.py diff --git a/pus_tc/tmp1075.py b/pus_tc/devs/tmp1075.py similarity index 100% rename from pus_tc/tmp1075.py rename to pus_tc/devs/tmp1075.py diff --git a/pus_tc/tc_packer_hook.py b/pus_tc/tc_packer_hook.py index 40a2fb7..66c0239 100644 --- a/pus_tc/tc_packer_hook.py +++ b/pus_tc/tc_packer_hook.py @@ -13,8 +13,8 @@ from tmtccmd.pus.service_17_test import pack_service_17_ping_command from pus_tc.service_200_mode import pack_service200_test_into from pus_tc.p60dock import pack_p60dock_test_into from pus_tc.pdu2 import pack_pdu2_commands -from pus_tc.pdu1 import pack_pdu1_commands -from pus_tc.bpx_batt import pack_bpx_commands +from pus_tc.devs.pdu1 import pack_pdu1_commands +from pus_tc.devs.bpx_batt import pack_bpx_commands from pus_tc.acu import pack_acu_test_into from pus_tc.imtq import pack_imtq_test_into from pus_tc.tmp1075 import pack_tmp1075_test_into @@ -25,11 +25,11 @@ from pus_tc.reaction_wheels import pack_single_rw_test_into from pus_tc.rad_sensor import pack_rad_sensor_test_into 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.devs.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 from pus_tc.syrlinks_hk_handler import pack_syrlinks_command -from pus_tc.gps import pack_gps_command +from pus_tc.devs.gps import pack_gps_command from pus_tc.acs import pack_acs_command from pus_tc.plpcdu import pack_pl_pcdu_commands from pus_tc.str_img_helper import pack_str_img_helper_command diff --git a/config/event_handler.py b/pus_tm/event_handler.py similarity index 100% rename from config/event_handler.py rename to pus_tm/event_handler.py diff --git a/pus_tm/hk_handling.py b/pus_tm/hk_handling.py index 6cac660..cc2ce3d 100644 --- a/pus_tm/hk_handling.py +++ b/pus_tm/hk_handling.py @@ -6,7 +6,7 @@ import datetime from tmtccmd.config.definitions import HkReplyUnpacked from tmtccmd.tm.service_3_fsfw_housekeeping import Service3Base from tmtccmd.utility.logger import get_console_logger -from pus_tc.bpx_batt import BpxSetIds +from pus_tc.devs.bpx_batt import BpxSetIds from pus_tc.syrlinks_hk_handler import SetIds from pus_tc.imtq import ImtqSetIds from config.object_ids import (