Commit 0fe730a3 authored by Robin Mueller's avatar Robin Mueller
Browse files

simplified hook base

parent df9852a1
import argparse
from abc import abstractmethod
from typing import Union, Dict
class TmTcHookBase:
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
from tmtc_core.core.tmtcc_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.tmtc_core_definitions import ComInterfaces
from tmtcc_definitions import ModeList, ServiceList
def __init__(self):
pass
@abstractmethod
def set_object_ids(self, object_id_dict: Dict[int, bytearray]):
pass
@abstractmethod
def add_globals(self) -> Dict[int, any]:
return dict()
@abstractmethod
def add_globals_pre_args_parsing(self, gui: bool = False):
pass
@abstractmethod
def add_globals_post_args_parsing(self, args: argparse.Namespace):
pass
@abstractmethod
def assign_communication_interface(self, com_if: ComInterfaces, tmtc_printer: TmTcPrinter) -> \
Union[CommunicationInterface, None]:
pass
@abstractmethod
def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: ModeList):
pass
@abstractmethod
def pack_service_queue(self, service: ServiceList, op_code: str, service_queue: TcQueueT):
pass
@abstractmethod
def tm_user_factory_hook(self, raw_tm_packet: bytearray) -> PusTelemetry:
pass
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