diff --git a/config/hook_implementations.py b/config/hook_implementations.py index c7bc489..bbc88ea 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -5,7 +5,7 @@ from tmtccmd.config.definitions import ( ) from tmtccmd.tc.definitions import TcQueueT from tmtccmd.utility.retval import RetvalDictT -from tmtccmd.pus.obj_id import ObjectIdDictT +from tmtccmd.utility.obj_id import ObjectIdDictT from tmtccmd.com_if.com_interface_base import CommunicationInterface from tmtccmd.core.backend import TmTcHandler from tmtccmd.config.hook import TmTcHookBase diff --git a/config/object_ids.py b/config/object_ids.py index 9b0709e..095836a 100644 --- a/config/object_ids.py +++ b/config/object_ids.py @@ -4,7 +4,7 @@ it to your needs. """ import os.path -from tmtccmd.pus.obj_id import ObjectIdDictT +from tmtccmd.utility.obj_id import ObjectIdDictT from tmtccmd.fsfw import parse_fsfw_objects_csv from tmtccmd.logging import get_console_logger diff --git a/gomspace/gomspace_common.py b/gomspace/gomspace_common.py index c8741c1..aff5d20 100644 --- a/gomspace/gomspace_common.py +++ b/gomspace/gomspace_common.py @@ -8,7 +8,7 @@ """ import enum -from tmtccmd.tc.service_8_functional_cmd import generate_action_command +from tmtccmd.tc.pus_8_funccmd import generate_action_command from tmtccmd.tc.definitions import PusTelecommand diff --git a/pus_tc/devs/bpx_batt.py b/pus_tc/devs/bpx_batt.py index a9f6311..3073327 100644 --- a/pus_tc/devs/bpx_batt.py +++ b/pus_tc/devs/bpx_batt.py @@ -1,7 +1,7 @@ from tmtccmd.tc.definitions import TcQueueT, QueueCommands from config.object_ids import BPX_HANDLER_ID -from tmtccmd.tc.service_8_functional_cmd import generate_action_command -from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid +from tmtccmd.tc.pus_8_funccmd import generate_action_command +from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid class BpxSetIds: diff --git a/pus_tc/devs/gps.py b/pus_tc/devs/gps.py index 5297530..d0f3f21 100644 --- a/pus_tc/devs/gps.py +++ b/pus_tc/devs/gps.py @@ -2,7 +2,7 @@ import enum from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.definitions import TcQueueT -from tmtccmd.tc.service_8_functional_cmd import generate_action_command +from tmtccmd.tc.pus_8_funccmd import generate_action_command from config.object_ids import GPS_HANDLER_1_ID, GPS_HANDLER_0_ID diff --git a/pus_tc/devs/heater.py b/pus_tc/devs/heater.py index ef28b35..77db6e1 100644 --- a/pus_tc/devs/heater.py +++ b/pus_tc/devs/heater.py @@ -7,10 +7,14 @@ import enum from config.definitions import CustomServiceList from config.object_ids import get_object_ids -from tmtccmd.pus.obj_id import ObjectIdDictT, ObjectId +from tmtccmd.utility.obj_id import ObjectId from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT -from tmtccmd.tc.pus_201_fsfw_health import pack_set_health_cmd_data, FsfwHealth, Subservices -from tmtccmd.tc.service_8_functional_cmd import generate_action_command +from tmtccmd.tc.pus_201_fsfw_health import ( + pack_set_health_cmd_data, + FsfwHealth, + Subservices, +) +from tmtccmd.tc.pus_8_funccmd import generate_action_command from tmtccmd.config.globals import add_service_op_code_entry, add_op_code_entry from tmtccmd.tc.packer import TcQueueT from spacepackets.ecss.tc import PusTelecommand diff --git a/pus_tc/devs/imtq.py b/pus_tc/devs/imtq.py index 2ef75a8..7c1f136 100644 --- a/pus_tc/devs/imtq.py +++ b/pus_tc/devs/imtq.py @@ -9,7 +9,7 @@ from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.packer import TcQueueT from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command +from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command class ImtqSetIds: diff --git a/pus_tc/devs/p60dock.py b/pus_tc/devs/p60dock.py index dbdc59a..03bbd5b 100644 --- a/pus_tc/devs/p60dock.py +++ b/pus_tc/devs/p60dock.py @@ -7,7 +7,7 @@ """ from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.packer import TcQueueT -from tmtccmd.tc.service_3_housekeeping import ( +from tmtccmd.tc.pus_3_fsfw_hk import ( generate_one_hk_command, make_sid, generate_one_diag_command, diff --git a/pus_tc/devs/pdu1.py b/pus_tc/devs/pdu1.py index 2028639..08ddbd9 100644 --- a/pus_tc/devs/pdu1.py +++ b/pus_tc/devs/pdu1.py @@ -5,7 +5,7 @@ """ from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.packer import TcQueueT -from tmtccmd.tc.service_3_housekeeping import ( +from tmtccmd.tc.pus_3_fsfw_hk import ( generate_one_hk_command, make_sid, generate_one_diag_command, diff --git a/pus_tc/devs/pdu2.py b/pus_tc/devs/pdu2.py index c4e3623..12c1636 100644 --- a/pus_tc/devs/pdu2.py +++ b/pus_tc/devs/pdu2.py @@ -8,7 +8,7 @@ """ from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.packer import TcQueueT -from tmtccmd.tc.service_3_housekeeping import ( +from tmtccmd.tc.pus_3_fsfw_hk import ( generate_one_hk_command, generate_one_diag_command, make_sid, diff --git a/pus_tc/devs/ploc_mpsoc.py b/pus_tc/devs/ploc_mpsoc.py index da81496..eadcda4 100644 --- a/pus_tc/devs/ploc_mpsoc.py +++ b/pus_tc/devs/ploc_mpsoc.py @@ -14,7 +14,7 @@ from tmtccmd.logging import get_console_logger from tmtccmd.tc.packer import TcQueueT from spacepackets.ecss.tc import PusTelecommand from utility.input_helper import InputHelper -from tmtccmd.tc.service_200_mode import pack_mode_data, Modes +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes LOGGER = get_console_logger() diff --git a/pus_tc/devs/ploc_supervisor.py b/pus_tc/devs/ploc_supervisor.py index 34cfa7b..e8c9e47 100644 --- a/pus_tc/devs/ploc_supervisor.py +++ b/pus_tc/devs/ploc_supervisor.py @@ -12,7 +12,7 @@ from spacepackets.ecss.tc import PusTelecommand from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.packer import TcQueueT from tmtccmd.logging import get_console_logger -from tmtccmd.tc.service_200_mode import pack_mode_data, Modes +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes from utility.input_helper import InputHelper LOGGER = get_console_logger() diff --git a/pus_tc/devs/plpcdu.py b/pus_tc/devs/plpcdu.py index dd6f027..28775d0 100644 --- a/pus_tc/devs/plpcdu.py +++ b/pus_tc/devs/plpcdu.py @@ -3,8 +3,8 @@ from typing import Optional from tmtccmd.config import QueueCommands from tmtccmd.tc.definitions import TcQueueT -from tmtccmd.tc.service_200_mode import pack_mode_data, Modes, Subservices -from tmtccmd.tc.service_20_parameter import ( +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices +from tmtccmd.tc.pus_20_params import ( pack_scalar_double_param_app_data, pack_fsfw_load_param_cmd, pack_boolean_parameter_app_data, @@ -234,6 +234,6 @@ def pack_pl_pcdu_mode_cmd(tc_queue: TcQueueT, info: str, mode: Modes, submode: i ) mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=mode, submode=submode) mode_cmd = PusTelecommand( - service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data + service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=mode_data ) tc_queue.appendleft(mode_cmd.pack_command_tuple()) diff --git a/pus_tc/devs/star_tracker.py b/pus_tc/devs/star_tracker.py index f8df76d..73bbc37 100644 --- a/pus_tc/devs/star_tracker.py +++ b/pus_tc/devs/star_tracker.py @@ -11,7 +11,7 @@ from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.packer import TcQueueT from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.service_200_mode import pack_mode_data, Modes +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes from tmtccmd.logging import get_console_logger from utility.input_helper import InputHelper diff --git a/pus_tc/devs/syrlinks_hk_handler.py b/pus_tc/devs/syrlinks_hk_handler.py index 0e4848c..48adbcd 100644 --- a/pus_tc/devs/syrlinks_hk_handler.py +++ b/pus_tc/devs/syrlinks_hk_handler.py @@ -8,9 +8,9 @@ from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.definitions import TcQueueT -from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command +from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.service_200_mode import pack_mode_data, Modes +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes import struct diff --git a/pus_tc/service_200_mode.py b/pus_tc/service_200_mode.py index 08faad4..345012f 100644 --- a/pus_tc/service_200_mode.py +++ b/pus_tc/service_200_mode.py @@ -8,7 +8,7 @@ from tmtccmd.config.definitions import QueueCommands from spacepackets.ecss.tc import PusTelecommand from tmtccmd.tc.packer import TcQueueT -from tmtccmd.tc.service_200_mode import pack_mode_data +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes from config.object_ids import TEST_DEVICE_ID TEST_DEVICE_OBJ_ID = TEST_DEVICE_ID @@ -20,22 +20,22 @@ def pack_service200_test_into(tc_queue: TcQueueT) -> TcQueueT: obj_id = TEST_DEVICE_OBJ_ID # Set On Mode tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode On")) - mode_data = pack_mode_data(obj_id, 1, 0) + mode_data = pack_mode_data(obj_id, Modes.ON, 0) command = PusTelecommand(service=200, subservice=1, ssc=2000, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) # Set Normal mode tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode Normal")) - mode_data = pack_mode_data(obj_id, 2, 0) + mode_data = pack_mode_data(obj_id, Modes.NORMAL, 0) command = PusTelecommand(service=200, subservice=1, ssc=2010, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) # Set Raw Mode tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode Raw")) - mode_data = pack_mode_data(obj_id, 3, 0) + mode_data = pack_mode_data(obj_id, Modes.RAW, 0) command = PusTelecommand(service=200, subservice=1, ssc=2020, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) # Set Off Mode tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode Off")) - mode_data = pack_mode_data(obj_id, 0, 0) + mode_data = pack_mode_data(obj_id, Modes.OFF, 0) command = PusTelecommand(service=200, subservice=1, ssc=2030, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft((QueueCommands.EXPORT_LOG, "log/tmtc_log_service200.txt")) diff --git a/pus_tc/system/acs.py b/pus_tc/system/acs.py index 109a8e7..ea97734 100644 --- a/pus_tc/system/acs.py +++ b/pus_tc/system/acs.py @@ -1,6 +1,6 @@ import enum from tmtccmd.tc.definitions import TcQueueT -from tmtccmd.tc.service_200_mode import Modes +from tmtccmd.tc.pus_200_fsfw_modes import Modes from config.object_ids import ACS_BOARD_ASS_ID, SUS_BOARD_ASS_ID from .common import command_assembly diff --git a/pus_tc/system/common.py b/pus_tc/system/common.py index a37412a..55ae7b3 100644 --- a/pus_tc/system/common.py +++ b/pus_tc/system/common.py @@ -1,6 +1,6 @@ from tmtccmd.tc.definitions import TcQueueT, QueueCommands from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.service_200_mode import pack_mode_data, Modes, Subservices +from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices def command_assembly( @@ -13,6 +13,6 @@ def command_assembly( submode=submode, ) cmd = PusTelecommand( - service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data + service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=mode_data ) tc_queue.appendleft(cmd.pack_command_tuple()) diff --git a/pus_tc/system/core.py b/pus_tc/system/core.py index 132ab8a..a4e5c6e 100644 --- a/pus_tc/system/core.py +++ b/pus_tc/system/core.py @@ -2,9 +2,9 @@ import enum from tmtccmd.config.definitions import QueueCommands from tmtccmd.tc.definitions import TcQueueT -from tmtccmd.tc.service_8_functional_cmd import generate_action_command +from tmtccmd.tc.pus_8_funccmd import generate_action_command from tmtccmd.logging import get_console_logger -from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command +from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command from config.object_ids import CORE_CONTROLLER_ID LOGGER = get_console_logger() diff --git a/pus_tc/system/tcs.py b/pus_tc/system/tcs.py index fda1a76..5b98ddc 100644 --- a/pus_tc/system/tcs.py +++ b/pus_tc/system/tcs.py @@ -1,5 +1,5 @@ from tmtccmd.tc.definitions import TcQueueT, QueueCommands -from tmtccmd.tc.service_200_mode import Modes +from tmtccmd.tc.pus_200_fsfw_modes import Modes from .common import command_assembly from config.object_ids import TCS_BOARD_ASS_ID diff --git a/pus_tc/tc_packer_hook.py b/pus_tc/tc_packer_hook.py index 25bcd28..8427696 100644 --- a/pus_tc/tc_packer_hook.py +++ b/pus_tc/tc_packer_hook.py @@ -11,8 +11,8 @@ from tmtccmd.config.definitions import CoreServiceList from tmtccmd.logging import get_console_logger from tmtccmd.logging.pus import log_raw_pus_tc from tmtccmd.tc.definitions import TcQueueT -from tmtccmd.tc.service_5_event import pack_generic_service5_test_into -from tmtccmd.pus.service_17_test import pack_service_17_ping_command +from tmtccmd.tc.pus_5_event import pack_generic_service5_test_into +from tmtccmd.pus.pus_17_test import pack_service_17_ping_command from tmtccmd.logging import get_current_time_string from pus_tc.service_200_mode import pack_service200_test_into diff --git a/pus_tm/factory_hook.py b/pus_tm/factory_hook.py index b5a318a..d1829ca 100644 --- a/pus_tm/factory_hook.py +++ b/pus_tm/factory_hook.py @@ -9,9 +9,9 @@ from tmtccmd.logging.pus import ( create_tmtc_logger, ) -from tmtccmd.pus.service_17_test import Service17TMExtended -from tmtccmd.tm.service_20_fsfw_parameters import Service20FsfwTm -from tmtccmd.tm.service_200_fsfw_mode import Service200FsfwTm +from tmtccmd.tm.pus_17_test import Service17TMExtended +from tmtccmd.tm.pus_20_fsfw_parameters import Service20FsfwTm +from tmtccmd.tm.pus_200_fsfw_modes import Service200FsfwTm from tmtccmd.utility.tmtc_printer import PrintFormats, FsfwTmTcPrinter from config.definitions import PUS_APID diff --git a/pus_tm/hk_handling.py b/pus_tm/hk_handling.py index 0902f36..f3047d4 100644 --- a/pus_tm/hk_handling.py +++ b/pus_tm/hk_handling.py @@ -5,7 +5,7 @@ import datetime from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter from tmtccmd.config.definitions import HkReplyUnpacked -from tmtccmd.tm.service_3_fsfw_housekeeping import ( +from tmtccmd.tm.pus_3_fsfw_hk import ( Service3Base, HkContentType, Service3FsfwTm, @@ -15,7 +15,7 @@ from pus_tc.devs.bpx_batt import BpxSetIds from pus_tc.devs.syrlinks_hk_handler import SetIds from pus_tc.devs.p60dock import SetIds from pus_tc.devs.imtq import ImtqSetIds -from tmtccmd.pus.obj_id import ObjectId, ObjectIdDictT +from tmtccmd.utility.obj_id import ObjectId, ObjectIdDictT import config.object_ids as obj_ids diff --git a/pus_tm/verification_handler.py b/pus_tm/verification_handler.py index 2047f1d..2b81825 100644 --- a/pus_tm/verification_handler.py +++ b/pus_tm/verification_handler.py @@ -2,7 +2,7 @@ import logging from datetime import datetime from typing import cast -from tmtccmd.pus.service_1_verification import Service1TMExtended +from tmtccmd.tm.pus_1_verification import Service1TMExtended from tmtccmd.logging import get_console_logger from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter from config.retvals import get_retval_dict diff --git a/requirements.txt b/requirements.txt index 7b75c9d..1907adc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -tmtccmd>=2.0.1 +tmtccmd>=2.1.0 diff --git a/spacepackets b/spacepackets index 522b021..d0c3f4a 160000 --- a/spacepackets +++ b/spacepackets @@ -1 +1 @@ -Subproject commit 522b021ba5690f97a4b74ae8b110762a32eb9b19 +Subproject commit d0c3f4a802c3cddc5be2919af763b08fe6a6b05c diff --git a/tmtccmd b/tmtccmd index 18912c1..11960d5 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit 18912c1e906bf9a997a5e927a36df6ef38874d17 +Subproject commit 11960d5b35db30c25c1306cab663224fbb1deb86