update tmtccmd
This commit is contained in:
parent
63d7f577b1
commit
98af6a7907
@ -17,8 +17,8 @@ CFDP_APID = 0x66
|
||||
PUS_PACKET_ID = PacketId(PacketType.TM, True, PUS_APID)
|
||||
CFDP_PACKET_ID = PacketId(PacketType.TM, False, CFDP_APID)
|
||||
SPACE_PACKET_IDS = (
|
||||
PUS_PACKET_ID.raw(),
|
||||
CFDP_PACKET_ID.raw(),
|
||||
PUS_PACKET_ID,
|
||||
CFDP_PACKET_ID,
|
||||
)
|
||||
|
||||
CFDP_LOCAL_ENTITY_ID = UnsignedByteField(byte_len=2, val=1)
|
||||
|
@ -1,8 +1,8 @@
|
||||
from typing import Optional
|
||||
|
||||
from eive_tmtc.config.definitions import SPACE_PACKET_IDS
|
||||
from tmtccmd import TmTcCfgHookBase, CcsdsTmtcBackend
|
||||
from tmtccmd.com_if import ComInterface
|
||||
from tmtccmd import HookBase, CcsdsTmtcBackend
|
||||
from tmtccmd.com import ComInterface
|
||||
from tmtccmd.config import TmtcDefinitionWrapper
|
||||
|
||||
from eive_tmtc.config.retvals import get_retval_dict
|
||||
@ -10,7 +10,7 @@ from eive_tmtc.pus_tc.cmd_definitions import get_eive_service_op_code_dict
|
||||
from tmtccmd.util import ObjectIdDictT, RetvalDictT
|
||||
|
||||
|
||||
class EiveHookObject(TmTcCfgHookBase):
|
||||
class EiveHookObject(HookBase):
|
||||
def __init__(self, json_cfg_path: str):
|
||||
super().__init__(json_cfg_path=json_cfg_path)
|
||||
|
||||
@ -18,7 +18,7 @@ class EiveHookObject(TmTcCfgHookBase):
|
||||
return get_eive_service_op_code_dict()
|
||||
|
||||
def assign_communication_interface(self, com_if_key: str) -> Optional[ComInterface]:
|
||||
from tmtccmd.config.com_if import (
|
||||
from tmtccmd.config.com import (
|
||||
create_com_interface_default,
|
||||
create_com_interface_cfg_default,
|
||||
)
|
||||
|
@ -11,8 +11,8 @@ from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Subservice as ModeSubservices
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices
|
||||
|
||||
|
||||
class BpxSetId:
|
||||
|
@ -18,8 +18,8 @@ from tmtccmd.tc.pus_11_tc_sched import (
|
||||
create_enable_tc_sched_cmd,
|
||||
create_time_tagged_cmd,
|
||||
)
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode, Subservice
|
||||
from tmtccmd.tc.pus_20_fsfw_params import (
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode, Subservice
|
||||
from tmtccmd.tc.pus_20_fsfw_param import (
|
||||
pack_scalar_double_param_app_data,
|
||||
create_load_param_cmd,
|
||||
pack_boolean_parameter_app_data,
|
||||
|
@ -9,7 +9,7 @@ from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode, pack_mode_data, Subservice
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data, Subservice
|
||||
import eive_tmtc.config.object_ids as oids
|
||||
from eive_tmtc.config.object_ids import get_object_ids
|
||||
|
||||
|
@ -5,7 +5,7 @@ from spacepackets.ecss import PusTelecommand
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode, pack_mode_data, Subservice
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data, Subservice
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
|
||||
|
@ -10,7 +10,7 @@ import enum
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from eive_tmtc.pus_tc.service_200_mode import pack_mode_data
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
from tmtccmd.pus.s8_fsfw_funccmd import make_action_id
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
"""
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||
from eive_tmtc.config.object_ids import TEST_DEVICE_ID
|
||||
|
||||
TEST_DEVICE_OBJ_ID = TEST_DEVICE_ID
|
||||
|
@ -1,7 +1,7 @@
|
||||
from typing import Union
|
||||
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
from tmtccmd.util import ObjectIdU32, ObjectIdBase
|
||||
|
||||
from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
|
||||
|
@ -5,7 +5,7 @@ from eive_tmtc.config.object_ids import get_object_ids
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tm.verification_handler import generic_retval_printout
|
||||
from eive_tmtc.tmtc.acs.subsystem import AcsMode
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
|
||||
from tmtccmd.tm import Service5Tm
|
||||
from tmtccmd.logging import get_console_logger
|
||||
|
@ -9,9 +9,9 @@ from tmtccmd import get_console_logger
|
||||
from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
|
||||
from tmtccmd.pus import VerificationWrapper
|
||||
from tmtccmd.tm import Service20FsfwTm, Service200FsfwTm
|
||||
from tmtccmd.tm.pus_20_fsfw_params import Service20ParamDumpWrapper
|
||||
from tmtccmd.pus.s20_fsfw_params_defs import CustomSubservice as ParamSubservice
|
||||
from tmtccmd.tm.pus_200_fsfw_modes import Subservice as ModeSubservice
|
||||
from tmtccmd.tm.pus_20_fsfw_param import Service20ParamDumpWrapper
|
||||
from tmtccmd.pus.s20_fsfw_param_defs import CustomSubservice as ParamSubservice
|
||||
from tmtccmd.tm.pus_200_fsfw_mode import Subservice as ModeSubservice
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from .defs import PrintWrapper
|
||||
|
||||
|
@ -8,7 +8,7 @@ from tmtccmd.config.tmtc import (
|
||||
)
|
||||
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
from eive_tmtc.config.object_ids import ACS_BOARD_ASS_ID
|
||||
|
||||
from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
|
||||
|
@ -14,7 +14,7 @@ from tmtccmd.config.tmtc import (
|
||||
OpCodeEntry,
|
||||
)
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode, pack_mode_command
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_command
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
generate_one_hk_command,
|
||||
|
@ -22,7 +22,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
generate_one_diag_command,
|
||||
generate_one_hk_command,
|
||||
)
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
@ -20,7 +20,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
disable_periodic_hk_command,
|
||||
)
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode, Subservice
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode, Subservice
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
@ -9,7 +9,7 @@ import enum
|
||||
import struct
|
||||
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||
from tmtccmd.logging import get_console_logger
|
||||
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
@ -10,7 +10,7 @@ from tmtccmd.config.tmtc import (
|
||||
TmtcDefinitionWrapper,
|
||||
OpCodeEntry,
|
||||
)
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Subservice as ModeSubservices
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
|
||||
|
@ -9,7 +9,7 @@ from tmtccmd.config.tmtc import (
|
||||
)
|
||||
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
|
||||
|
||||
class SusOpCode:
|
||||
|
@ -16,7 +16,7 @@ from tmtccmd.config.tmtc import (
|
||||
TmtcDefinitionWrapper,
|
||||
)
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import create_mode_command, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from eive_tmtc.config.object_ids import CCSDS_HANDLER_ID
|
||||
|
||||
|
@ -10,8 +10,8 @@ from tmtccmd.config.tmtc import (
|
||||
)
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import create_mode_command
|
||||
from tmtccmd.tc.pus_20_fsfw_params import (
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command
|
||||
from tmtccmd.tc.pus_20_fsfw_param import (
|
||||
create_load_param_cmd,
|
||||
pack_scalar_u8_parameter_app_data,
|
||||
)
|
||||
|
@ -23,7 +23,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
create_disable_periodic_hk_command,
|
||||
)
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode, create_mode_command
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_mode_command
|
||||
from eive_tmtc.config.object_ids import SYRLINKS_HANDLER_ID
|
||||
import struct
|
||||
|
||||
|
@ -2,7 +2,7 @@ from typing import Union
|
||||
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode, Subservice
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode, Subservice
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from eive_tmtc.utility.input_helper import InputHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
@ -9,7 +9,7 @@ from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Subservice as ModeSubservice
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservice
|
||||
|
||||
|
||||
class OpCode(str, enum.Enum):
|
||||
|
@ -8,7 +8,7 @@ from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
make_sid,
|
||||
generate_one_hk_command,
|
||||
|
15
tmtcc.py
15
tmtcc.py
@ -72,7 +72,7 @@ from tmtccmd.tc import (
|
||||
FeedWrapper,
|
||||
TcProcedureType,
|
||||
TcQueueEntryType,
|
||||
DefaultPusQueueHelper,
|
||||
DefaultPusQueueHelper, QueueWrapper,
|
||||
)
|
||||
from tmtccmd.config import (
|
||||
default_json_path,
|
||||
@ -221,10 +221,11 @@ class TcHandler(TcHandlerBase):
|
||||
self.pus_raw_logger = raw_pus_logger
|
||||
self.gui = gui
|
||||
self.queue_helper = DefaultPusQueueHelper(
|
||||
queue_wrapper=None,
|
||||
pus_apid=PUS_APID,
|
||||
queue_wrapper=QueueWrapper.empty(),
|
||||
default_pus_apid=PUS_APID,
|
||||
seq_cnt_provider=seq_count_provider,
|
||||
pus_verificator=pus_verificator,
|
||||
tc_sched_timestamp_len=4
|
||||
)
|
||||
self.cfdp_in_ccsds_wrapper = cfdp_in_ccsds_wrapper
|
||||
|
||||
@ -338,15 +339,17 @@ def setup_params() -> SetupWrapper:
|
||||
parser_wrapper.create_default_parent_parser()
|
||||
parser_wrapper.create_default_parser()
|
||||
parser_wrapper.add_def_proc_and_cfdp_as_subparsers()
|
||||
post_arg_parsing_wrapper = parser_wrapper.parse(hook_obj)
|
||||
post_arg_parsing_wrapper = parser_wrapper.parse(setup_params=params, hook_obj=hook_obj)
|
||||
tmtccmd.init_printout(post_arg_parsing_wrapper.use_gui)
|
||||
use_prompts = not post_arg_parsing_wrapper.use_gui
|
||||
proc_param_wrapper = ProcedureParamsWrapper()
|
||||
if use_prompts:
|
||||
post_arg_parsing_wrapper.set_params_with_prompts(params, proc_param_wrapper)
|
||||
post_arg_parsing_wrapper.set_params_with_prompts(proc_param_wrapper)
|
||||
else:
|
||||
post_arg_parsing_wrapper.set_params_without_prompts(params, proc_param_wrapper)
|
||||
post_arg_parsing_wrapper.set_params_without_prompts(proc_param_wrapper)
|
||||
params.apid = PUS_APID
|
||||
if params.com_if is None:
|
||||
raise ValueError("could not determine a COM interface.")
|
||||
setup_wrapper = SetupWrapper(
|
||||
hook_obj=hook_obj, setup_params=params, proc_param_wrapper=proc_param_wrapper
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user