Merge branch 'mueller/major-dependency-update' into irini

This commit is contained in:
2022-07-08 16:21:01 +02:00
114 changed files with 2901 additions and 4017 deletions

View File

@ -1,14 +0,0 @@
"""
@brief This file exposes hook functions to the user.
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
it to your needs.
"""
from spacepackets.ecss.tc import PusTelecommand
def command_preparation_hook() -> PusTelecommand:
"""
Can be used to pack user-defined commands by generating and returning a PusTelecommand
class instance
"""
return PusTelecommand(service=17, subservice=1, ssc=20)

View File

@ -5,7 +5,7 @@
"""
import enum
from tmtccmd.core.backend import TmTcHandler
from tmtccmd import CcsdsTmtcBackend
from tmtccmd.logging import get_console_logger
LOGGER = get_console_logger()
@ -15,5 +15,5 @@ class CustomModeList(enum.IntEnum):
pass
def custom_mode_operation(tmtc_backend: TmTcHandler, mode: int):
def custom_mode_operation(_tmtc_backend: CcsdsTmtcBackend, _mode: int):
pass

View File

@ -1,30 +1,24 @@
from typing import Union
from typing import Optional
from config.definitions import SPACE_PACKET_IDS
from tmtccmd.config.definitions import (
ServiceOpCodeDictT,
)
from tmtccmd.tc.definitions import TcQueueT
from tmtccmd import TmTcCfgHookBase, CcsdsTmtcBackend
from tmtccmd.com_if import ComInterface
from tmtccmd.config import TmTcDefWrapper
from tmtccmd.utility.retval import RetvalDictT
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
from config.retvals import get_retval_dict
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
class EiveHookObject(TmTcHookBase):
class EiveHookObject(TmTcCfgHookBase):
def __init__(self, json_cfg_path: str):
super().__init__(json_cfg_path=json_cfg_path)
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
def get_tmtc_definitions(self) -> TmTcDefWrapper:
return get_eive_service_op_code_dict()
def assign_communication_interface(
self, com_if_key: str
) -> Union[CommunicationInterface, None]:
def assign_communication_interface(self, com_if_key: str) -> Optional[ComInterface]:
from tmtccmd.config.com_if import create_communication_interface_default
return create_communication_interface_default(
@ -33,17 +27,10 @@ class EiveHookObject(TmTcHookBase):
space_packet_ids=SPACE_PACKET_IDS,
)
def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int):
def perform_mode_operation(self, tmtc_backend: CcsdsTmtcBackend, mode: int):
from config.custom_mode_op import custom_mode_operation
custom_mode_operation(mode=mode, tmtc_backend=tmtc_backend)
def pack_service_queue(self, service: int, op_code: str, service_queue: TcQueueT):
from pus_tc.tc_packer_hook import pack_service_queue_user
pack_service_queue_user(
service=service, op_code=op_code, service_queue=service_queue
)
custom_mode_operation(tmtc_backend, mode)
def get_object_ids(self) -> ObjectIdDictT:
from config.object_ids import get_object_ids