diff --git a/config/hook_implementations.py b/config/hook_implementations.py index b1d2b6e..c5869d9 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -2,9 +2,9 @@ import argparse from typing import Union, Dict, Tuple from tmtccmd.config.definitions import ServiceOpCodeDictT -from tmtccmd.pus_tm.service_3_base import Service3Base +from tmtccmd.tm.service_3_base import Service3Base from tmtccmd.ecss.tm import PusTelemetry -from tmtccmd.pus_tc.definitions import TcQueueT +from tmtccmd.tc.definitions import TcQueueT 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/version.py b/config/version.py index ef8fd1f..e1d7641 100644 --- a/config/version.py +++ b/config/version.py @@ -1,4 +1,6 @@ SW_NAME = "eive" VERSION_MAJOR = 1 -VERSION_MINOR = 6 -VERSION_SUBMINOR = 1 +VERSION_MINOR = 7 +VERSION_SUBMINOR = 0 + +__version__ = "1.7.0" diff --git a/pus_tc/acu.py b/pus_tc/acu.py index 969e0fb..9e06242 100644 --- a/pus_tc/acu.py +++ b/pus_tc/acu.py @@ -6,7 +6,7 @@ @date 21.12.2020 """ -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from tmtccmd.config.definitions import QueueCommands from gomspace.gomspace_common import * diff --git a/pus_tc/heater.py b/pus_tc/heater.py index 51a247f..18adf80 100644 --- a/pus_tc/heater.py +++ b/pus_tc/heater.py @@ -6,7 +6,7 @@ @date 30.01.2021 """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand diff --git a/pus_tc/imtq.py b/pus_tc/imtq.py index 902b13e..943157c 100644 --- a/pus_tc/imtq.py +++ b/pus_tc/imtq.py @@ -7,9 +7,9 @@ """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand -from tmtccmd.pus_tc.service_3_housekeeping import make_sid, generate_one_hk_command +from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command class ImtqSetIds: diff --git a/pus_tc/p60dock.py b/pus_tc/p60dock.py index e269047..9b1bef8 100644 --- a/pus_tc/p60dock.py +++ b/pus_tc/p60dock.py @@ -6,7 +6,7 @@ @date 13.12.2020 """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from gomspace.gomspace_common import * diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py index 0130040..fc52e65 100644 --- a/pus_tc/pdu1.py +++ b/pus_tc/pdu1.py @@ -7,7 +7,7 @@ """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from gomspace.gomspace_common import * from pus_tc.p60dock import P60DockConfigTable diff --git a/pus_tc/pdu2.py b/pus_tc/pdu2.py index e6e8080..2beede5 100644 --- a/pus_tc/pdu2.py +++ b/pus_tc/pdu2.py @@ -6,7 +6,7 @@ @date 17.12.2020 """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from gomspace.gomspace_common import * from gomspace.gomspace_pdu_definitions import * diff --git a/pus_tc/ploc_mpsoc.py b/pus_tc/ploc_mpsoc.py index b8613ea..d7a2977 100644 --- a/pus_tc/ploc_mpsoc.py +++ b/pus_tc/ploc_mpsoc.py @@ -10,7 +10,7 @@ import struct from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand diff --git a/pus_tc/ploc_supervisor.py b/pus_tc/ploc_supervisor.py index 9feb841..f2ce4e0 100644 --- a/pus_tc/ploc_supervisor.py +++ b/pus_tc/ploc_supervisor.py @@ -10,7 +10,7 @@ import struct from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand diff --git a/pus_tc/rad_sensor.py b/pus_tc/rad_sensor.py index aa071c1..a462c13 100644 --- a/pus_tc/rad_sensor.py +++ b/pus_tc/rad_sensor.py @@ -8,7 +8,7 @@ import struct from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from pus_tc.service_200_mode import pack_mode_data diff --git a/pus_tc/reaction_wheels.py b/pus_tc/reaction_wheels.py index 02d6464..0c48491 100644 --- a/pus_tc/reaction_wheels.py +++ b/pus_tc/reaction_wheels.py @@ -8,7 +8,7 @@ import struct from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from pus_tc.service_200_mode import pack_mode_data diff --git a/pus_tc/service_200_mode.py b/pus_tc/service_200_mode.py index c49f5e0..4bc8cdb 100644 --- a/pus_tc/service_200_mode.py +++ b/pus_tc/service_200_mode.py @@ -7,8 +7,8 @@ """ from tmtccmd.config.definitions import QueueCommands from tmtccmd.ecss.tc import PusTelecommand -from tmtccmd.pus_tc.packer import TcQueueT -from tmtccmd.pus_tc.service_200_mode import pack_mode_data +from tmtccmd.tc.packer import TcQueueT +from tmtccmd.tc.service_200_mode import pack_mode_data from config.object_ids import TEST_DEVICE_ID TEST_DEVICE_OBJ_ID = TEST_DEVICE_ID diff --git a/pus_tc/solar_array_deployment.py b/pus_tc/solar_array_deployment.py index 6b63cae..f6a9b69 100644 --- a/pus_tc/solar_array_deployment.py +++ b/pus_tc/solar_array_deployment.py @@ -6,8 +6,8 @@ @date 15.02.2021 """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.definitions import TcQueueT -from tmtccmd.pus_tc.packer import PusTelecommand +from tmtccmd.tc.definitions import TcQueueT +from tmtccmd.tc.packer import PusTelecommand class ActionIds: diff --git a/pus_tc/syrlinks_hk_handler.py b/pus_tc/syrlinks_hk_handler.py index b3b8be7..bbdb0c2 100644 --- a/pus_tc/syrlinks_hk_handler.py +++ b/pus_tc/syrlinks_hk_handler.py @@ -7,8 +7,8 @@ """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.definitions import TcQueueT -from tmtccmd.pus_tc.service_3_housekeeping import make_sid, generate_one_hk_command +from tmtccmd.tc.definitions import TcQueueT +from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command class SetIds: diff --git a/pus_tc/tc_packer_hook.py b/pus_tc/tc_packer_hook.py index 236740c..fd2e7bc 100644 --- a/pus_tc/tc_packer_hook.py +++ b/pus_tc/tc_packer_hook.py @@ -10,9 +10,9 @@ from typing import Union from tmtccmd.config.definitions import CoreServiceList from tmtccmd.utility.logger import get_console_logger -from tmtccmd.pus_tc.definitions import TcQueueT -from tmtccmd.pus_tc.service_5_event import pack_generic_service5_test_into -from tmtccmd.pus_tc.service_17_test import pack_service17_ping_command +from tmtccmd.tc.definitions import TcQueueT +from tmtccmd.tc.service_5_event import pack_generic_service5_test_into +from tmtccmd.tc.service_17_test import pack_service17_ping_command from pus_tc.p60dock import pack_p60dock_test_into from pus_tc.pdu2 import pack_pdu2_test_into diff --git a/pus_tc/tmp1075.py b/pus_tc/tmp1075.py index b7ae123..48b2d65 100644 --- a/pus_tc/tmp1075.py +++ b/pus_tc/tmp1075.py @@ -7,7 +7,7 @@ """ from tmtccmd.config.definitions import QueueCommands -from tmtccmd.pus_tc.packer import TcQueueT +from tmtccmd.tc.packer import TcQueueT from tmtccmd.ecss.tc import PusTelecommand from pus_tc.service_200_mode import pack_mode_data diff --git a/pus_tm/factory_hook.py b/pus_tm/factory_hook.py index d1a2bac..559b212 100644 --- a/pus_tm/factory_hook.py +++ b/pus_tm/factory_hook.py @@ -3,14 +3,14 @@ @details Template configuration file. Copy this folder to the TMTC commander root and adapt it to your needs. """ -from tmtccmd.pus_tm.service_8_functional_cmd import Service8TM +from tmtccmd.tm.service_8_functional_cmd import Service8TM from tmtccmd.ecss.tm import PusTelemetry from tmtccmd.utility.logger import get_console_logger -from tmtccmd.pus_tm.service_1_verification import Service1TM -from tmtccmd.pus_tm.service_3_housekeeping import Service3TM -from tmtccmd.pus_tm.service_5_event import Service5TM -from tmtccmd.pus_tm.service_17_test import Service17TM +from tmtccmd.tm.service_1_verification import Service1TM +from tmtccmd.tm.service_3_housekeeping import Service3TM +from tmtccmd.tm.service_5_event import Service5TM +from tmtccmd.tm.service_17_test import Service17TM from tmtccmd.utility.tmtc_printer import TmTcPrinter from config.definitions import PUS_APID diff --git a/pus_tm/hk_handling.py b/pus_tm/hk_handling.py index 681c8aa..f81a042 100644 --- a/pus_tm/hk_handling.py +++ b/pus_tm/hk_handling.py @@ -7,7 +7,7 @@ import struct from typing import Tuple -from tmtccmd.pus_tm.service_3_housekeeping import Service3Base +from tmtccmd.tm.service_3_housekeeping import Service3Base from tmtccmd.utility.logger import get_console_logger from pus_tc.syrlinks_hk_handler import SetIds from pus_tc.imtq import ImtqSetIds diff --git a/tmtc_client_cli.py b/tmtc_client_cli.py index 283376e..d3f5b15 100644 --- a/tmtc_client_cli.py +++ b/tmtc_client_cli.py @@ -29,6 +29,7 @@ limitations under the License. import sys from config.hook_implementations import EiveHookObject +from config.version import __version__ from config.definitions import PUS_APID from pus_tm.factory_hook import ccsds_tm_handler try: @@ -45,6 +46,7 @@ except ImportError as error: def main(): hook_obj = EiveHookObject() + print(f"-- eive tmtc version {__version__}") initialize_tmtc_commander(hook_object=hook_obj) ccsds_handler = CcsdsTmHandler() ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50) diff --git a/tmtc_client_gui.py b/tmtc_client_gui.py index 1d44dd2..ddcfa07 100644 --- a/tmtc_client_gui.py +++ b/tmtc_client_gui.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 """ -@brief TMTC Commander entry point for GUI mode. +@brief TMTC Commander entry point for command line mode. @details This client was developed by KSat for the SOURCE project to test the on-board software but has evolved into a more generic tool for satellite developers to perform TMTC (Telemetry and Telecommand) @@ -26,14 +26,32 @@ limitations under the License. @author R. Mueller """ +import sys + from config.hook_implementations import EiveHookObject -from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander +from config.version import __version__ +from config.definitions import PUS_APID +from pus_tm.factory_hook import ccsds_tm_handler +try: + from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler + from tmtccmd.ccsds.handler import CcsdsTmHandler +except ImportError as error: + run_tmtc_commander = None + initialize_tmtc_commander = None + print(error) + print("Python tmtccmd submodule could not be imported") + print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation") + sys.exit(0) def main(): hook_obj = EiveHookObject() + print(f"-- eive tmtc version {__version__}") initialize_tmtc_commander(hook_object=hook_obj) - run_tmtc_commander(True) + ccsds_handler = CcsdsTmHandler() + ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50) + add_ccsds_handler(ccsds_handler) + run_tmtc_commander(use_gui=True) if __name__ == "__main__":