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

renamed tmtc_core to tmtccmd

parent 483cec7f
......@@ -57,13 +57,13 @@ a git repository. If not, it can be transformed to one using `git init`.
cd obsw
mkdir tmtc
cd tmtc
git submodule add https://git.ksat-stuttgart.de/source/tmtc_core.git
git submodule add https://git.ksat-stuttgart.de/source/tmtccmd.git
```
Copy the contents of the `user` folder inside the `tmtc_core` folder to the `tmtc` folder
Copy the contents of the `user` folder inside the `tmtccmd` folder to the `tmtc` folder
```sh
cd tmtc_core
cp tmtc_core/user/* . -r
cd tmtccmd
cp tmtccmd/user/* . -r
cd ..
```
......@@ -85,7 +85,7 @@ in the `.idea` folder.
```sh
cd tmtc
cp tmtc_core/runConfigurations/* .idea/runConfigurations/
cp tmtccmd/runConfigurations/* .idea/runConfigurations/
```
## How to use the TMTC commander
......
......@@ -9,9 +9,9 @@ Description: Generic Communication Interface. Defines the syntax of the communic
"""
from abc import abstractmethod
from typing import Tuple
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTmListT
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcInfoT
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTmListT
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTcInfoT
# pylint: disable=useless-return
......
......@@ -7,11 +7,11 @@
"""
from typing import Tuple
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand, PusTcInfoT, TcDictionaryKeys
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory
from tmtc_core.pus_tm.tmtcc_tm_service1 import Service1TmPacked
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTelecommand, PusTcInfoT, TcDictionaryKeys
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory
from tmtccmd.pus_tm.tmtcc_tm_service1 import Service1TmPacked
from tmtccmd.utility.tmtcc_logger import get_logger
LOGGER = get_logger()
......
......@@ -11,12 +11,12 @@ import struct
import sys
from typing import Tuple
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface, PusTmListT
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcInfoT
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.core.definitions import ethernet_address_t
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface, PusTmListT
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTcInfoT
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.core.definitions import ethernet_address_t
LOGGER = get_logger()
......
......@@ -4,8 +4,8 @@ import socket
import struct
from typing import Tuple
from tmtc_core.core.definitions import ethernet_address_t
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.core.definitions import ethernet_address_t
from tmtccmd.utility.tmtcc_logger import get_logger
LOGGER = get_logger()
......
......@@ -26,12 +26,12 @@ import sys
import time
from collections import deque
from threading import Thread
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface, PusTcInfoT, PusTmListT
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.com_if.tmtcc_serial_com_if import SerialComIF, SerialCommunicationType
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.utility.dle_encoder import encode_dle, decode_dle, STX_CHAR, ETX_CHAR, DleErrorCodes
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface, PusTcInfoT, PusTmListT
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.com_if.tmtcc_serial_com_if import SerialComIF, SerialCommunicationType
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.utility.dle_encoder import encode_dle, decode_dle, STX_CHAR, ETX_CHAR, DleErrorCodes
LOGGER = get_logger()
SERIAL_FRAME_LENGTH = 256
......
......@@ -13,12 +13,12 @@ from collections import deque
import serial
import serial.tools.list_ports
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory, PusTmListT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcInfoT
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.utility.dle_encoder import encode_dle, decode_dle, STX_CHAR, ETX_CHAR, DleErrorCodes
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.pus_tm.tmtcc_pus_tm_factory import PusTelemetryFactory, PusTmListT
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTcInfoT
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.utility.dle_encoder import encode_dle, decode_dle, STX_CHAR, ETX_CHAR, DleErrorCodes
LOGGER = get_logger()
......
......@@ -4,16 +4,16 @@ import sys
from collections import deque
from typing import Tuple, Union
from tmtc_core.core.definitions import ComInterfaces, CoreGlobalIds
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcInfo, PusTelecommand
from tmtc_core.sendreceive.tmtcc_single_command_sender_receiver import SingleCommandSenderReceiver
from tmtc_core.sendreceive.tmtcc_sequential_sender_receiver import SequentialCommandSenderReceiver
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_exit_handler import keyboard_interrupt_handler
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import ServiceQueuePacker
from tmtccmd.core.definitions import ComInterfaces, CoreGlobalIds
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTcInfo, PusTelecommand
from tmtccmd.sendreceive.tmtcc_single_command_sender_receiver import SingleCommandSenderReceiver
from tmtccmd.sendreceive.tmtcc_sequential_sender_receiver import SequentialCommandSenderReceiver
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_exit_handler import keyboard_interrupt_handler
from tmtccmd.pus_tc.tmtcc_pus_tc_packer import ServiceQueuePacker
from config.tmtcc_definitions import ModeList, ServiceList
from config.tmtcc_com_config import create_communication_interface_user
......@@ -85,7 +85,7 @@ class TmTcHandler:
executed_handler.start()
def initialize(self):
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
"""
Perform initialization steps which might be necessary after class construction.
This has to be called at some point before using the class!
......@@ -157,7 +157,7 @@ class TmTcHandler:
self.mode = ModeList.PromptMode
elif self.mode == ModeList.ServiceTestMode:
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
service_queue = deque()
service_queue_packer = ServiceQueuePacker()
service_queue_packer.pack_service_queue_core(
......
......@@ -6,23 +6,23 @@
import sys
from typing import Union
from tmtc_core.core.definitions import ComInterfaces
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.com_if.tmtcc_dummy_com_if import DummyComIF
from tmtc_core.com_if.tmtcc_ethernet_com_if import EthernetComIF
from tmtc_core.com_if.tmtcc_qemu_com_if import QEMUComIF
from tmtc_core.com_if.tmtcc_serial_com_if import SerialCommunicationType, SerialComIF
from tmtc_core.com_if.tmtcc_serial_utilities import determine_com_port
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.core.definitions import ComInterfaces
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.com_if.tmtcc_dummy_com_if import DummyComIF
from tmtccmd.com_if.tmtcc_ethernet_com_if import EthernetComIF
from tmtccmd.com_if.tmtcc_qemu_com_if import QEMUComIF
from tmtccmd.com_if.tmtcc_serial_com_if import SerialCommunicationType, SerialComIF
from tmtccmd.com_if.tmtcc_serial_utilities import determine_com_port
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
LOGGER = get_logger()
def create_communication_interface_default(com_if: ComInterfaces, tmtc_printer: TmTcPrinter) -> \
Union[CommunicationInterface, None]:
from tmtc_core.core.definitions import CoreGlobalIds
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.definitions import CoreGlobalIds
from tmtccmd.core.globals_manager import get_global
"""
Return the desired communication interface object
:param tmtc_printer: TmTcPrinter object.
......
......@@ -13,11 +13,11 @@ from multiprocessing import Process
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QPixmap, QIcon
from tmtc_core.core.tmtcc_backend import TmTcHandler
from tmtc_core.core.tmtccore_definitions import ComInterfaces
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.core.tmtcc_globals_manager import get_global, update_global
from tmtccmd.core.tmtcc_backend import TmTcHandler
from tmtccmd.core.tmtccore_definitions import ComInterfaces
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.core.tmtcc_globals_manager import get_global, update_global
from config.tmtcc_definitions import ModeList, ServiceList
from config.tmtcc_globals import GlobalIds
......
......@@ -27,7 +27,7 @@ class GlobalsManager:
global_param = self.globals_dict.get(global_param_key)
if global_param is None:
try:
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_logger import get_logger
logger = get_logger()
logger.error(f"The key {global_param_key} for this global does not exist in the dictionary!")
......
......@@ -4,12 +4,12 @@ from typing import Union, Dict, Tuple
class TmTcHookBase:
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.core.backend import TmTcHandler
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtc_core.pus_tc.tmtcc_pus_tc_base import TcQueueT
from tmtc_core.core.definitions import ComInterfaces
from tmtccmd.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtccmd.core.backend import TmTcHandler
from tmtccmd.utility.tmtcc_tmtc_printer import TmTcPrinter
from tmtccmd.pus_tm.tmtcc_pus_tm_base import PusTelemetry
from tmtccmd.pus_tc.tmtcc_pus_tc_base import TcQueueT
from tmtccmd.core.definitions import ComInterfaces
from tmtcc_definitions import ModeList, ServiceList
def __init__(self):
......@@ -17,7 +17,7 @@ class TmTcHookBase:
@abstractmethod
def get_version(self) -> Tuple[str, int, int]:
from tmtc_core.core.version import SW_NAME, SW_VERSION, SW_SUBVERSION
from tmtccmd.core.version import SW_NAME, SW_VERSION, SW_SUBVERSION
return SW_NAME, SW_VERSION, SW_SUBVERSION
@abstractmethod
......@@ -30,12 +30,12 @@ class TmTcHookBase:
@abstractmethod
def add_globals_pre_args_parsing(self, gui: bool = False):
from tmtc_core.defaults.hook_functions import default_add_globals_pre_args_parsing
from tmtccmd.defaults.hook_functions import default_add_globals_pre_args_parsing
default_add_globals_pre_args_parsing(gui=gui)
@abstractmethod
def add_globals_post_args_parsing(self, args: argparse.Namespace):
from tmtc_core.defaults.hook_functions import default_add_globals_post_args_parsing
from tmtccmd.defaults.hook_functions import default_add_globals_post_args_parsing
default_add_globals_post_args_parsing(args=args)
@abstractmethod
......
import struct
import sys
from config.tmtcc_object_ids import ObjectIds
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_logger import get_logger
logger = get_logger()
......@@ -52,12 +52,12 @@ class ObjectIdManager:
from config.tmtcc_object_ids import set_object_ids
set_object_ids(self.object_id_dict)
except ImportError:
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_logger import get_logger
logger = get_logger()
logger.error("Could not import set_object_ids")
sys.exit(1)
except AttributeError:
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.utility.tmtcc_logger import get_logger
logger = get_logger()
logger.error("Please ensure that the object ID keys are defined as well!")
sys.exit(1)
......
import argparse
from tmtc_core.com_if.tmtcc_serial_com_if import SerialCommunicationType
from tmtc_core.com_if.tmtcc_serial_utilities import determine_com_port
from tmtc_core.core.definitions import CoreGlobalIds, ComInterfaces
from tmtccmd.com_if.tmtcc_serial_com_if import SerialCommunicationType
from tmtccmd.com_if.tmtcc_serial_utilities import determine_com_port
from tmtccmd.core.definitions import CoreGlobalIds, ComInterfaces
from tmtcc_definitions import ModeList, ServiceList
def default_add_globals_pre_args_parsing(gui: bool = False):
from tmtc_core.core.globals_manager import update_global
from tmtccmd.core.globals_manager import update_global
import pprint
update_global(CoreGlobalIds.APID, 0xef)
......@@ -48,8 +48,8 @@ def default_add_globals_pre_args_parsing(gui: bool = False):
def default_add_globals_post_args_parsing(args: argparse.Namespace):
from tmtc_core.core.globals_manager import update_global
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.core.globals_manager import update_global
from tmtccmd.utility.tmtcc_logger import get_logger
from config.tmtcc_definitions import ModeList
logger = get_logger()
......@@ -138,11 +138,11 @@ def default_add_globals_post_args_parsing(args: argparse.Namespace):
def default_set_up_ethernet_cfg():
from tmtc_core.core.globals_manager import update_global
from tmtccmd.core.globals_manager import update_global
update_global(CoreGlobalIds.USE_ETHERNET, True)
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
from config.tmtcc_definitions import EthernetConfig
from tmtc_core.com_if.tmtcc_ethernet_utilities import determine_ip_addresses
from tmtccmd.com_if.tmtcc_ethernet_utilities import determine_ip_addresses
ethernet_cfg_dict = get_global(CoreGlobalIds.ETHERNET_CONFIG)
# This will either load the addresses from a JSON file or prompt them from the user.
send_addr, rcv_addr = determine_ip_addresses()
......@@ -152,9 +152,9 @@ def default_set_up_ethernet_cfg():
def default_set_up_serial_cfg(com_if: ComInterfaces):
from tmtc_core.core.globals_manager import update_global
from tmtccmd.core.globals_manager import update_global
update_global(CoreGlobalIds.USE_SERIAL, True)
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
from config.tmtcc_definitions import SerialConfig
serial_cfg_dict = get_global(CoreGlobalIds.SERIAL_CONFIG)
if com_if == ComInterfaces.Serial:
......
......@@ -8,8 +8,8 @@ import sys
from enum import Enum
from typing import Dict, Union, Tuple, Deque
from tmtc_core.core.definitions import QueueCommands, CoreGlobalIds
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.core.definitions import QueueCommands, CoreGlobalIds
from tmtccmd.utility.tmtcc_logger import get_logger
LOGGER = get_logger()
......@@ -57,7 +57,7 @@ class PusTelecommand:
source_id: int = 0, version: int = 0, apid: int = -1):
# To get the correct globally configured APID
if apid == -1:
from tmtc_core.core.globals_manager import get_global
from tmtccmd.core.globals_manager import get_global
apid = get_global(CoreGlobalIds.APID)
"""
Initiates a telecommand with the given parameters.
......
......@@ -9,8 +9,8 @@ This file transfers TC packing to the user application.
import sys
from config.tmtcc_definitions import ServiceList
from tmtc_core.pus_tc.tmtcc_pus_tc_base import TcQueueT
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tc.tmtcc_pus_tc_base import TcQueueT
from tmtccmd.utility.tmtcc_logger import get_logger
LOGGER = get_logger()
......
import enum
from tmtc_core.core.definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand, TcQueueT
from tmtccmd.core.definitions import QueueCommands
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTelecommand, TcQueueT
class Srv17Subservices(enum.IntEnum):
......
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.utility.tmtcc_logger import get_logger
logger = get_logger()
......
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 Srv3Subservice(enum.IntEnum):
......
import enum
from tmtc_core.core.definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand, TcQueueT
from tmtccmd.core.definitions import QueueCommands
from tmtccmd.pus_tc.tmtcc_pus_tc_base import PusTelecommand, TcQueueT
class Srv5Subservices(enum.IntEnum):
......
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