Commit e8e3dc36 authored by Robin Mueller's avatar Robin Mueller
Browse files

renamed tmtc_core to tmtccmd

parent 483cec7f
import enum
import struct
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTelecommand
class Srv8Subservices(enum.IntEnum):
......
"""
@brief Base class for implementation of PUS Service 2 handling.
"""
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
class Service2TM(PusTelemetry):
......
......@@ -3,7 +3,7 @@
"""
import struct
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
class Service200TM(PusTelemetry):
......
import os
import struct
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry, TmDictionaryKeys, PusTmInfoT
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry, TmDictionaryKeys, PusTmInfoT
from tmtccmd.utility.tmtcc_logger import get_logger
logger = get_logger()
......
......@@ -6,9 +6,9 @@ Description: Deserialize Housekeeping TM
Author: R. Mueller
"""
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtc_core.pus_tm.tmtcc_tm_service3_base import Service3Base
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.pus_tm.tmtcc_tm_service3_base import Service3Base
from tmtccmd.utility.tmtcc_logger import get_logger
from typing import Type
import struct
......@@ -31,7 +31,7 @@ class Service3TM(Service3Base):
STRUCTURE_REPORT_FIXED_HEADER_SIZE = MINIMAL_PACKET_SIZE + 7
def __init__(self, byte_array: bytearray):
from tmtc_core.core.object_id_manager import get_key_from_raw_object_id
from tmtccmd.core.object_id_manager import get_key_from_raw_object_id
super().__init__(byte_array)
if len(self._tm_data) < 8:
warning = "Service3TM: handle_filling_definition_arrays: Invalid Service 3 packet," \
......
......@@ -3,9 +3,9 @@
"""
import struct
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtc_core.core.object_id_manager import get_key_from_raw_object_id
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.core.object_id_manager import get_key_from_raw_object_id
from tmtccmd.utility.tmtcc_logger import get_logger
from config.tmtcc_object_ids import ObjectIds
logger = get_logger()
......
import math
import time
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_logger import get_logger
import datetime
from enum import Enum, auto
......
......@@ -3,8 +3,8 @@ This module creates the class required to generate PUS telemetry packets.
"""
import crcmod
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry, PusTelemetryTimestamp
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry, PusTelemetryTimestamp
from tmtccmd.utility.tmtcc_logger import get_logger
LOGGER = get_logger()
......
# -*- coding: utf-8 -*-
from typing import Deque, List, Tuple, Union
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry, PusTmInfoT
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry, PusTmInfoT
from tmtccmd.utility.tmtcc_logger import get_logger
# This function is implemented by the user
from pus_tm.tmtcc_pus_tm_factory_hook import tm_user_factory_hook
......
......@@ -8,9 +8,9 @@ Author: R. Mueller
import struct
from typing import Dict
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry, TmDictionaryKeys
from tmtc_core.pus_tm.tmtcc_pus_tm_creator import PusTelemetryCreator
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry, TmDictionaryKeys
from tmtccmd.pus_tm.tmtcc_pus_tm_creator import PusTelemetryCreator
from tmtccmd.utility.tmtcc_logger import get_logger
LOGGER = get_logger()
PusPacketInfoService1T = Dict[TmDictionaryKeys, any]
......
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
class Service17TM(PusTelemetry):
......
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
class Service3Base(PusTelemetry):
......
......@@ -6,8 +6,8 @@ Description: Deserialize PUS Event Report
Author: R. Mueller
"""
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry, TmDictionaryKeys
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTmInfoT
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry, TmDictionaryKeys
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTmInfoT
import struct
......
......@@ -12,7 +12,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_core/tmtcc_runner.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccmd/tmtcc_runner.py" />
<option name="PARAMETERS" value="-m 2 -c 2 --boardIP=127.0.0.1" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......
......@@ -13,15 +13,15 @@ if the first reply has not been received.
"""
import time
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.core.definitions import QueueCommands, CoreGlobalIds
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.core.definitions import QueueCommands, CoreGlobalIds
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtc_core.sendreceive.tmtcc_tm_listener import TmListener
from tmtc_core.pus_tc.tmtcc_pus_tc_base import TcQueueEntryT
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTmQueueT
from tmtc_core.core.globals_manager import get_global
from tmtccmd.sendreceive.tmtcc_tm_listener import TmListener
from tmtccmd.pus_tc.tmtcc_pus_tc_base import TcQueueEntryT
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTmQueueT
from tmtccmd.core.globals_manager import get_global
LOGGER = get_logger()
......@@ -199,7 +199,7 @@ class CommandSenderReceiver:
if self._start_time != 0:
self._elapsed_time = time.time() - self._start_time
if self._elapsed_time >= self._tm_timeout * self._tc_send_timeout_factor:
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
if get_global(CoreGlobalIds.RESEND_TC):
LOGGER.info("CommandSenderReceiver: Timeout, sending TC again !")
self._com_interface.send_telecommand(self._last_tc, self._last_tc_info)
......
......@@ -7,13 +7,13 @@ import time
from typing import Union, Deque
from collections import deque
from tmtc_core.core.definitions import CoreGlobalIds
from tmtc_core.sendreceive.tmtcc_sequential_sender_receiver import SequentialCommandSenderReceiver
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.core.globals_manager import get_global
from tmtc_core.sendreceive.tmtcc_tm_listener import TmListener
from tmtc_core.utility.tmtcc_tmtc_printer import get_logger
from tmtccmd.core.definitions import CoreGlobalIds
from tmtccmd.sendreceive.tmtcc_sequential_sender_receiver import SequentialCommandSenderReceiver
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.core.globals_manager import get_global
from tmtccmd.sendreceive.tmtcc_tm_listener import TmListener
from tmtccmd.utility.tmtcc_tmtc_printer import get_logger
LOGGER = get_logger()
......
......@@ -7,12 +7,12 @@
import sys
import time
from tmtc_core.sendreceive.tmtcc_command_sender_receiver import CommandSenderReceiver
from tmtc_core.sendreceive.tmtcc_tm_listener import TmListener
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.pus_tc.tmtcc_pus_tc_base import TcQueueT
from tmtccmd.sendreceive.tmtcc_command_sender_receiver import CommandSenderReceiver
from tmtccmd.sendreceive.tmtcc_tm_listener import TmListener
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tc.tmtcc_pus_tc_base import TcQueueT
LOGGER = get_logger()
......
......@@ -8,15 +8,15 @@
Used to send single tcs and listen for replies after that
"""
from tmtc_core.sendreceive.tmtcc_command_sender_receiver import CommandSenderReceiver
from tmtc_core.sendreceive.tmtcc_tm_listener import TmListener
from tmtccmd.sendreceive.tmtcc_command_sender_receiver import CommandSenderReceiver
from tmtccmd.sendreceive.tmtcc_tm_listener import TmListener
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcTupleT
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTcTupleT
logger = get_logger()
......
......@@ -10,9 +10,9 @@ import threading
from collections import deque
from enum import Enum
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTmQueueT, PusTmInfoQueueT
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTmQueueT, PusTmInfoQueueT
LOGGER = get_logger()
......@@ -226,8 +226,8 @@ class TmListener:
time.sleep(0.05)
# the timeout value can be set by special TC queue entries if wiretapping_packet handling
# takes longer, but it is reset here to the global value
from tmtc_core.core.globals_manager import get_global
from tmtc_core.core.definitions import CoreGlobalIds
from tmtccmd.core.globals_manager import get_global
from tmtccmd.core.definitions import CoreGlobalIds
if self.__tm_timeout is not get_global(CoreGlobalIds.TM_TIMEOUT):
self.__tm_timeout = get_global(CoreGlobalIds.TM_TIMEOUT)
return True
......
......@@ -10,10 +10,10 @@
import sys
from typing import Tuple
from tmtc_core.core.hook_base import TmTcHookBase
from tmtc_core.core.definitions import CoreGlobalIds
from tmtc_core.utility.tmtcc_core_args_parser import parse_input_arguments
from tmtc_core.utility.tmtcc_logger import set_tmtc_logger, get_logger
from tmtccmd.core.hook_base import TmTcHookBase
from tmtccmd.core.definitions import CoreGlobalIds
from tmtccmd.utility.tmtcc_core_args_parser import parse_input_arguments
from tmtccmd.utility.tmtcc_logger import set_tmtc_logger, get_logger
logger = get_logger()
......@@ -29,7 +29,7 @@ def initialize_tmtc_commander(hook_object: TmTcHookBase):
Example for a simple main function content to use the command line mode:
hook_obj = MyCustomHookClass()
initialize_tmtc_core(hook_obj)
initialize_tmtccmd(hook_obj)
run_tmtc_client(False)
:param: hook_base: Instantiation of a custom hook object. The TMTC core will call the various
......@@ -47,7 +47,7 @@ def run_tmtc_commander(use_gui: bool, reduced_printout: bool = False):
Example for a simple main function content to use the command line mode:
hook_obj = MyCustomHookClass()
initialize_tmtc_core(hook_obj)
initialize_tmtccmd(hook_obj)
run_tmtc_client(False)
:param use_gui: Specify whether the GUI is used or not
......@@ -62,8 +62,8 @@ def run_tmtc_commander(use_gui: bool, reduced_printout: bool = False):
def assign_tmtc_commander_hooks(hook_object: TmTcHookBase):
from tmtc_core.core.globals_manager import update_global
from tmtc_core.core.definitions import CoreGlobalIds
from tmtccmd.core.globals_manager import update_global
from tmtccmd.core.definitions import CoreGlobalIds
if hook_object is None:
logger.error("Passed hook base object handle is invalid. Terminating..")
......@@ -81,9 +81,9 @@ def assign_tmtc_commander_hooks(hook_object: TmTcHookBase):
def set_up_tmtc_commander(use_gui: bool, reduced_printout: bool):
from tmtc_core.core.globals_manager import get_global
from tmtc_core.core.definitions import CoreGlobalIds
from tmtc_core.core.hook_base import TmTcHookBase
from tmtccmd.core.globals_manager import get_global
from tmtccmd.core.definitions import CoreGlobalIds
from tmtccmd.core.hook_base import TmTcHookBase
from typing import cast
set_tmtc_logger()
......@@ -120,7 +120,7 @@ def handle_init_printout(use_gui: bool, version_tuple: Tuple[str, int, int]):
def handle_cli_args_and_globals():
from typing import cast
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
hook_obj = cast(TmTcHookBase, get_global(CoreGlobalIds.TMTC_HOOK))
logger.info("Setting up pre-globals..")
......@@ -134,8 +134,8 @@ def handle_cli_args_and_globals():
def start_tmtc_commander_cli():
from tmtc_core.core.backend import TmTcHandler
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.backend import TmTcHandler
from tmtccmd.core.globals_manager import get_global
service = get_global(CoreGlobalIds.SERVICE)
op_code = get_global(CoreGlobalIds.OP_CODE)
# The global variables are set by the argument parser.
......@@ -147,8 +147,8 @@ def start_tmtc_commander_cli():
def start_tmtc_commander_qt_gui():
from tmtc_core.core.frontend import TmTcFrontend
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.frontend import TmTcFrontend
from tmtccmd.core.globals_manager import get_global
try:
from PyQt5.QtWidgets import QApplication
except ImportError:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment