diff --git a/.gitignore b/.gitignore index 630695e..ffe7373 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,7 @@ log /.installed.cfg /*.egg /MANIFEST + +# Telemetry database. +/tm.db + diff --git a/eive_tmtc/cfdp/handler.py b/eive_tmtc/cfdp/handler.py new file mode 100644 index 0000000..e950532 --- /dev/null +++ b/eive_tmtc/cfdp/handler.py @@ -0,0 +1,259 @@ +from dataclasses import dataclass +from typing import Optional, Tuple + +import deprecation +from spacepackets import PacketType, SpacePacket, SpacePacketHeader +from spacepackets.cfdp import GenericPduPacket, PduFactory +from spacepackets.cfdp.pdu import PduHolder +from tmtccmd.cfdp import ( + CfdpUserBase, + LocalEntityCfg, + RemoteEntityCfgTable, +) +from tmtccmd.cfdp.defs import CfdpState +from tmtccmd.cfdp.handler import ( + DestHandler, + DestStateWrapper, + SourceHandler, + SourceStateWrapper, +) +from tmtccmd.cfdp.handler.common import PacketDestination, get_packet_destination +from tmtccmd.cfdp.mib import CheckTimerProvider +from tmtccmd.cfdp.request import PutRequest +from tmtccmd.util import ProvidesSeqCount +from tmtccmd.version import get_version + + +@dataclass +class StateWrapper: + source_handler_state = SourceStateWrapper() + dest_handler_state = DestStateWrapper() + + +class CfdpHandler: + """Wrapper class which wraps both the :py:class:`tmtccmd.cfdp.handler.source.SourceHandler` and + :py:class:`tmtccmd.cfdp.handler.dest.DestHandler` in a sensible way. + + If you have special requirements, for example you want to spawn a new destination handler + for each file copy transfer to allow multiple consecutive file transfers, it might be a good + idea to write a custom wrapper.""" + + def __init__( + self, + cfg: LocalEntityCfg, + user: CfdpUserBase, + seq_cnt_provider: ProvidesSeqCount, + remote_cfg_table: RemoteEntityCfgTable, + check_timer_provider: CheckTimerProvider, + ): + self.remote_cfg_table = remote_cfg_table + self.dest_handler = DestHandler( + cfg=cfg, + user=user, + remote_cfg_table=remote_cfg_table, + check_timer_provider=check_timer_provider, + ) + self.source_handler = SourceHandler( + cfg=cfg, + seq_num_provider=seq_cnt_provider, + user=user, + remote_cfg_table=remote_cfg_table, + check_timer_provider=check_timer_provider, + ) + + def put_request(self, request: PutRequest): + if not self.remote_cfg_table.get_cfg(request.destination_id): + raise ValueError( + f"No remote CFDP config found for entity ID {request.destination_id}" + ) + self.source_handler.put_request( + request, self.remote_cfg_table.get_cfg(request.destination_id) # type: ignore + ) + + def pull_next_source_packet(self) -> Optional[PduHolder]: + res = self.source_handler.state_machine() + if res.states.num_packets_ready: + return self.source_handler.get_next_packet() + return None + + def pull_next_dest_packet(self) -> Optional[PduHolder]: + res = self.dest_handler.state_machine() + if res.states.packets_ready: + return self.dest_handler.get_next_packet() + return None + + def __iter__(self): + return self + + def __next__(self) -> Tuple[Optional[PduHolder], Optional[PduHolder]]: + """The iterator for this class will returns a tuple of optional PDUs wrapped b a + :py:class:`PduHolder`. + + :return: Can be a tuple where the first entry can hold a source packet and the second entry + can be a destination packet. If both packets are None, a StopIteration will be raised. + """ + next_source_packet = self.pull_next_source_packet() + next_dest_packet = self.pull_next_dest_packet() + if not next_dest_packet and not next_source_packet: + raise StopIteration + return next_source_packet, next_dest_packet + + def put_request_pending(self) -> bool: + return self.source_handler.states.state != CfdpState.IDLE + + @deprecation.deprecated( + deprecated_in="6.0.0rc0", + current_version=get_version(), + details="Use insert_packet instead", + ) + def pass_packet(self, packet: GenericPduPacket): + self.insert_packet(packet) + + def insert_packet(self, packet: GenericPduPacket): + """This function routes the packets based on PDU type and directive type if applicable. + + The routing is based on section 4.5 of the CFDP standard which specifies the PDU forwarding + procedure.""" + if get_packet_destination(packet) == PacketDestination.DEST_HANDLER: + self.dest_handler.insert_packet(packet) + elif get_packet_destination(packet) == PacketDestination.SOURCE_HANDLER: + self.source_handler.insert_packet(packet) # type: ignore + + +class CfdpInCcsdsHandler: + """Wrapper helper type used to wrap PDU packets into CCSDS packets and to extract PDU + packets from CCSDS packets. + + :param cfg: Local CFDP entity configuration. + :param user: User wrapper. This contains the indication callback implementations and the + virtual filestore implementation. + :param cfdp_seq_cnt_provider: Every CFDP file transfer has a transaction sequence number. + This provider is used to retrieve that sequence number. + :param ccsds_seq_cnt_provider: Each CFDP PDU is wrapped into a CCSDS space packet, and each + space packet has a dedicated sequence count. This provider is used to retrieve the + sequence count. + :param ccsds_apid: APID to use for the CCSDS space packet header wrapped around each PDU. + This is important so that the OBSW can distinguish between regular PUS packets and + CFDP packets.""" + + def __init__( + self, + cfg: LocalEntityCfg, + user: CfdpUserBase, + remote_cfg_table: RemoteEntityCfgTable, + ccsds_apid: int, + cfdp_seq_cnt_provider: ProvidesSeqCount, + ccsds_seq_cnt_provider: ProvidesSeqCount, + check_timer_provider: CheckTimerProvider, + ): + self.cfdp_handler = CfdpHandler( + cfg=cfg, + user=user, + seq_cnt_provider=cfdp_seq_cnt_provider, + remote_cfg_table=remote_cfg_table, + check_timer_provider=check_timer_provider, + ) + self.ccsds_seq_cnt_provider = ccsds_seq_cnt_provider + self.ccsds_apid = ccsds_apid + + def put_request_pending(self): + return self.cfdp_handler.put_request_pending() + + def state_machine(self): + self.source_handler.state_machine() + self.dest_handler.state_machine() + + @deprecation.deprecated( + deprecated_in="6.0.0rc1", + current_version=get_version(), + details="Use state_machine instead", + ) + def fsm(self): + self.state_machine() + + @property + def source_handler(self): + return self.cfdp_handler.source_handler + + @property + def dest_handler(self): + return self.cfdp_handler.dest_handler + + def pull_next_source_packet(self) -> Optional[Tuple[PduHolder, SpacePacket]]: + """Retrieves the next PDU to send and wraps it into a space packet""" + next_packet = self.cfdp_handler.pull_next_source_packet() + if next_packet is None: + return next_packet + sp_header = SpacePacketHeader( + packet_type=PacketType.TC, + apid=self.ccsds_apid, + seq_count=self.ccsds_seq_cnt_provider.get_and_increment(), + data_len=next_packet.packet_len - 1, + ) + return next_packet, SpacePacket(sp_header, None, next_packet.pack()) + + def pull_next_dest_packet(self) -> Optional[Tuple[PduHolder, SpacePacket]]: + """Retrieves the next PDU to send and wraps it into a space packet""" + next_packet = self.cfdp_handler.pull_next_dest_packet() + if next_packet is None: + return next_packet + sp_header = SpacePacketHeader( + packet_type=PacketType.TC, + apid=self.ccsds_apid, + seq_count=self.ccsds_seq_cnt_provider.get_and_increment(), + data_len=next_packet.packet_len - 1, + ) + return next_packet, SpacePacket(sp_header, None, next_packet.pack()) + + @deprecation.deprecated( + deprecated_in="6.0.0rc1", + current_version=get_version(), + details="Use insert_space_packet instead", + ) + def pass_space_packet(self, space_packet: SpacePacket): + self.insert_space_packet(space_packet) + + def insert_space_packet(self, space_packet: SpacePacket) -> bool: + if space_packet.user_data is None: + raise ValueError( + "space packet is empty, expected packet containing a CFDP PDU" + ) + # Unwrap the user data and pass it to the handler + pdu_raw = space_packet.user_data + pdu_base = PduFactory.from_raw(pdu_raw) + if pdu_base: + self.insert_pdu_packet(pdu_base) + return True + return False + + def insert_pdu_packet(self, pdu: GenericPduPacket): + self.cfdp_handler.insert_packet(pdu) + + @deprecation.deprecated( + deprecated_in="6.0.0rc1", + current_version=get_version(), + details="Use insert_pdu_packet instead", + ) + def pass_pdu_packet(self, pdu_base: GenericPduPacket): + self.insert_pdu_packet(pdu_base) + + def __iter__(self): + return self + + def __next__( + self, + ) -> Tuple[ + Optional[Tuple[PduHolder, SpacePacket]], + Optional[Tuple[PduHolder, SpacePacket]], + ]: + """The iterator for this class will returns a tuple of optional PDUs wrapped b a + :py:class:`PduHolder`. + + :return: Can be a tuple where the first entry can hold a source packet and the second entry + can be a destination packet. If both packets are None, a StopIteration will be raised. + """ + next_source_tuple = self.pull_next_source_packet() + next_dest_tuple = self.pull_next_dest_packet() + if not next_source_tuple and not next_dest_tuple: + raise StopIteration + return next_source_tuple, next_dest_tuple diff --git a/eive_tmtc/cfdp/tm.py b/eive_tmtc/cfdp/tm.py index 7484606..5072553 100644 --- a/eive_tmtc/cfdp/tm.py +++ b/eive_tmtc/cfdp/tm.py @@ -1,27 +1,29 @@ import logging +from typing import Any from eive_tmtc.config.definitions import CFDP_APID from spacepackets.ccsds import SPACE_PACKET_HEADER_SIZE -from spacepackets.cfdp import PduFactory, PduType, DirectiveType +from spacepackets.cfdp import PduFactory, PduType from tmtccmd.cfdp.handler import CfdpInCcsdsHandler -from tmtccmd.tm import SpecificApidHandlerBase +from tmtccmd.tmtc import SpecificApidHandlerBase _LOGGER = logging.getLogger(__name__) class CfdpInCcsdsWrapper(SpecificApidHandlerBase): def __init__(self, cfdp_in_ccsds_handler: CfdpInCcsdsHandler): - super().__init__(CFDP_APID, None) self.handler = cfdp_in_ccsds_handler + super().__init__(CFDP_APID, None) - def handle_tm(self, packet: bytes, _user_args: any): + def handle_tm(self, packet: bytes, _user_args: Any): # Ignore the space packet header. Its only purpose is to use the same protocol and # have a seaprate APID for space packets. If this function is called, the APID is correct. pdu = packet[SPACE_PACKET_HEADER_SIZE:] - pdu_base = PduFactory.from_raw(pdu) - if pdu_base.pdu_type == PduType.FILE_DATA: + generic_pdu = PduFactory.from_raw(pdu) + assert generic_pdu is not None + if generic_pdu.pdu_type == PduType.FILE_DATA: _LOGGER.info("Received File Data PDU") else: - directive_type = DirectiveType(pdu_base.directive_type) + directive_type = PduFactory.pdu_directive_type(pdu) _LOGGER.info(f"Received File Directive PDU with type {directive_type!r}") - self.handler.insert_pdu_packet(pdu_base) + self.handler.insert_pdu_packet(generic_pdu) diff --git a/eive_tmtc/cfdp/user.py b/eive_tmtc/cfdp/user.py index 4a7ced0..9c9cd81 100644 --- a/eive_tmtc/cfdp/user.py +++ b/eive_tmtc/cfdp/user.py @@ -1,7 +1,10 @@ +from datetime import timedelta import logging from spacepackets.cfdp import ConditionCode +from spacepackets.util import UnsignedByteField from tmtccmd.cfdp import CfdpUserBase, TransactionId +from tmtccmd.cfdp.mib import CheckTimerProvider, Countdown, EntityType from tmtccmd.cfdp.user import ( TransactionFinishedParams, MetadataRecvParams, @@ -11,6 +14,16 @@ from tmtccmd.cfdp.user import ( _LOGGER = logging.getLogger(__name__) +class EiveCheckTimerProvider(CheckTimerProvider): + def provide_check_timer( + self, + local_entity_id: UnsignedByteField, + remote_entity_id: UnsignedByteField, + entity_type: EntityType, + ) -> Countdown: + return Countdown(timedelta(seconds=5.0)) + + class EiveCfdpUser(CfdpUserBase): def transaction_indication(self, transaction_id: TransactionId): _LOGGER.info(f"CFDP User: Start of File {transaction_id}") diff --git a/eive_tmtc/gomspace/gomspace_common.py b/eive_tmtc/gomspace/gomspace_common.py index 0e102ca..daa808c 100644 --- a/eive_tmtc/gomspace/gomspace_common.py +++ b/eive_tmtc/gomspace/gomspace_common.py @@ -11,8 +11,8 @@ import struct from typing import Union from spacepackets.ecss import PusTelecommand -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from tmtccmd.util import ObjectIdU32, ObjectIdBase diff --git a/eive_tmtc/pus_tc/procedure_packer.py b/eive_tmtc/pus_tc/procedure_packer.py index 4ccf291..60937c7 100644 --- a/eive_tmtc/pus_tc/procedure_packer.py +++ b/eive_tmtc/pus_tc/procedure_packer.py @@ -12,8 +12,8 @@ from eive_tmtc.tmtc.payload.scex import pack_scex_cmds from eive_tmtc.tmtc.tcs.subsystem import pack_tcs_sys_commands from tmtccmd import DefaultProcedureInfo, TcHandlerBase from tmtccmd.config import CoreServiceList -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.decorator import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.tmtc.decorator import ( route_to_registered_service_handlers, ServiceProviderParams, ) diff --git a/eive_tmtc/pus_tc/system/controllers.py b/eive_tmtc/pus_tc/system/controllers.py index 6ffcceb..161cade 100644 --- a/eive_tmtc/pus_tc/system/controllers.py +++ b/eive_tmtc/pus_tc/system/controllers.py @@ -1,7 +1,7 @@ from typing import Union -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import Mode +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import Mode from tmtccmd.util import ObjectIdU32, ObjectIdBase from eive_tmtc.tmtc.common import pack_mode_cmd_with_info diff --git a/eive_tmtc/pus_tc/system/proc.py b/eive_tmtc/pus_tc/system/proc.py index 8a80b1c..5656b3c 100644 --- a/eive_tmtc/pus_tc/system/proc.py +++ b/eive_tmtc/pus_tc/system/proc.py @@ -10,7 +10,7 @@ from spacepackets.ecss import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.pus.s11_tc_sched import ( create_time_tagged_cmd, create_enable_tc_sched_cmd, @@ -50,7 +50,7 @@ from eive_tmtc.tmtc.acs.gyros import ( L3gGyroSetId as L3gGyroSetIds_1_3, ) from eive_tmtc.tmtc.acs.gps import SetId as GpsSetIds -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, disable_periodic_hk_command, create_enable_periodic_hk_command_with_interval, diff --git a/eive_tmtc/pus_tc/tc_handler.py b/eive_tmtc/pus_tc/tc_handler.py index 8ebc652..3ff9778 100644 --- a/eive_tmtc/pus_tc/tc_handler.py +++ b/eive_tmtc/pus_tc/tc_handler.py @@ -12,7 +12,7 @@ from tmtccmd.cfdp.defs import CfdpRequestType from tmtccmd.cfdp.handler import CfdpInCcsdsHandler from tmtccmd.logging import get_current_time_string from tmtccmd.logging.pus import RawTmtcTimedLogWrapper -from tmtccmd.tc import ( +from tmtccmd.tmtc import ( DefaultPusQueueHelper, QueueWrapper, FeedWrapper, diff --git a/eive_tmtc/pus_tm/action_reply_handler.py b/eive_tmtc/pus_tm/action_reply_handler.py index 49981bf..32730e3 100644 --- a/eive_tmtc/pus_tm/action_reply_handler.py +++ b/eive_tmtc/pus_tm/action_reply_handler.py @@ -18,7 +18,7 @@ from eive_tmtc.tmtc.payload.ploc_mpsoc import handle_mpsoc_data_reply from eive_tmtc.tmtc.payload.ploc_supervisor import SupvActionId from eive_tmtc.tmtc.acs.star_tracker import handle_star_tracker_action_replies from eive_tmtc.tmtc.power.tm import handle_get_param_data_reply -from tmtccmd.tm import Service8FsfwTm +from tmtccmd.pus.s8_fsfw_action import Service8FsfwTm from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from spacepackets.ccsds.time import CdsShortTimestamp from tmtccmd.util import ObjectIdDictT diff --git a/eive_tmtc/pus_tm/event_handler.py b/eive_tmtc/pus_tm/event_handler.py index 9597bf4..496c28b 100644 --- a/eive_tmtc/pus_tm/event_handler.py +++ b/eive_tmtc/pus_tm/event_handler.py @@ -8,10 +8,10 @@ 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 eive_tmtc.tmtc.core import SdState, SdCardSelect -from tmtccmd.tc.pus_200_fsfw_mode import Mode -from tmtccmd.tc.pus_201_fsfw_health import FsfwHealth +from tmtccmd.pus.s200_fsfw_mode import Mode +from tmtccmd.pus.s201_fsfw_health import FsfwHealth -from tmtccmd.tm import Service5Tm +from tmtccmd.pus.s5_fsfw_event import Service5Tm from tmtccmd.fsfw import EventInfo from spacepackets.ccsds.time import CdsShortTimestamp diff --git a/eive_tmtc/pus_tm/hk_handler.py b/eive_tmtc/pus_tm/hk_handler.py index 943cafe..e474ccd 100644 --- a/eive_tmtc/pus_tm/hk_handler.py +++ b/eive_tmtc/pus_tm/hk_handler.py @@ -18,7 +18,7 @@ from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_hk_data from eive_tmtc.tmtc.tcs import handle_thermal_controller_hk_data from eive_tmtc.tmtc.tcs.tmp1075 import handle_tmp_1075_hk_data from spacepackets.ecss import PusTelemetry -from tmtccmd.tm.pus_3_fsfw_hk import ( +from tmtccmd.pus.tm.s3_fsfw_hk import ( HkContentType, Service3FsfwTm, ) diff --git a/eive_tmtc/pus_tm/pus_demux.py b/eive_tmtc/pus_tm/pus_demux.py index f178990..bc5b274 100644 --- a/eive_tmtc/pus_tm/pus_demux.py +++ b/eive_tmtc/pus_tm/pus_demux.py @@ -1,25 +1,28 @@ """Core EIVE TM handler module """ import logging +import sqlite3 +from typing import Optional -from eive_tmtc.config.object_ids import get_object_ids +from spacepackets.ccsds.time import CdsShortTimestamp from spacepackets.ecss import PusTelemetry from spacepackets.ecss.pus_17_test import Service17Tm from spacepackets.util import PrintFormats -from spacepackets.ccsds.time import CdsShortTimestamp +from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from tmtccmd.logging.pus import RawTmtcTimedLogWrapper from tmtccmd.pus import VerificationWrapper -from tmtccmd.tm import Service20FsfwTm, Service200FsfwTm -from tmtccmd.tm.pus_20_fsfw_param import Service20ParamDumpWrapper +from tmtccmd.pus.s20_fsfw_param import Service20FsfwTm, 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.fsfw.tmtc_printer import FsfwTmTcPrinter -from .defs import PrintWrapper +from tmtccmd.pus.s200_fsfw_mode import Service200FsfwTm +from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservice + +from eive_tmtc.config.object_ids import get_object_ids -from .event_handler import handle_event_packet -from .verification_handler import handle_service_1_fsfw_packet, generic_retval_printout -from .hk_handler import handle_hk_packet, HkFilter from .action_reply_handler import handle_action_reply +from .defs import PrintWrapper +from .event_handler import handle_event_packet +from .hk_handler import HkFilter, handle_hk_packet +from .verification_handler import generic_retval_printout, handle_service_1_fsfw_packet _LOGGER = logging.getLogger(__name__) @@ -31,6 +34,7 @@ def pus_factory_hook( # noqa C901 : Complexity okay here raw_logger: RawTmtcTimedLogWrapper, hk_level: int, hk_filter: HkFilter, + db: Optional[sqlite3.Connection], ): if len(packet) < 8: _LOGGER.warning("Detected packet shorter than 8 bytes!") @@ -51,6 +55,7 @@ def pus_factory_hook( # noqa C901 : Complexity okay here handle_service_1_fsfw_packet(wrapper=verif_wrapper, raw_tm=packet) elif service == 3: handle_hk_packet( + db=db, printer=printer, raw_tm=packet, obj_id_dict=obj_id_dict, diff --git a/eive_tmtc/pus_tm/verification_handler.py b/eive_tmtc/pus_tm/verification_handler.py index 7d75fa8..6de1582 100644 --- a/eive_tmtc/pus_tm/verification_handler.py +++ b/eive_tmtc/pus_tm/verification_handler.py @@ -4,7 +4,7 @@ from typing import List, Optional from spacepackets.ccsds import CdsShortTimestamp from spacepackets.ecss.pus_1_verification import UnpackParams, Service1Tm from tmtccmd.pus import VerificationWrapper -from tmtccmd.tm.pus_1_verification import Service1FsfwWrapper +from tmtccmd.pus.s1_verification import Service1FsfwWrapper from eive_tmtc.config.retvals import get_retval_dict _LOGGER = logging.getLogger(__name__) diff --git a/eive_tmtc/tmtc/acs/acs_board.py b/eive_tmtc/tmtc/acs/acs_board.py index 0027ee4..c3a4988 100644 --- a/eive_tmtc/tmtc/acs/acs_board.py +++ b/eive_tmtc/tmtc/acs/acs_board.py @@ -6,9 +6,9 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider, DefaultPusQueueHelper -from tmtccmd.tc.decorator import ServiceProviderParams -from tmtccmd.tc.pus_200_fsfw_mode import Mode +from tmtccmd.tmtc import service_provider, DefaultPusQueueHelper +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.s200_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 diff --git a/eive_tmtc/tmtc/acs/acs_ctrl.py b/eive_tmtc/tmtc/acs/acs_ctrl.py index 83d46c4..dcd74e9 100644 --- a/eive_tmtc/tmtc/acs/acs_ctrl.py +++ b/eive_tmtc/tmtc/acs/acs_ctrl.py @@ -1,49 +1,47 @@ import datetime import enum import logging +import math import socket import struct -import math from socket import AF_INET from typing import Tuple +from tmtccmd.config.tmtc import ( + OpCodeEntry, + TmtcDefinitionWrapper, + tmtc_definitions_provider, +) +from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.pus.s20_fsfw_param import create_load_param_cmd +from tmtccmd.pus.s20_fsfw_param_defs import ( + create_matrix_double_parameter, + create_matrix_float_parameter, + create_scalar_double_parameter, + create_scalar_float_parameter, + create_scalar_i32_parameter, + create_scalar_u8_parameter, + create_scalar_u16_parameter, + create_vector_double_parameter, + create_vector_float_parameter, +) +from tmtccmd.pus.s200_fsfw_mode import Mode, pack_mode_command +from tmtccmd.pus.tc.s3_fsfw_hk import ( + create_request_one_diag_command, + disable_periodic_hk_command, + enable_periodic_hk_command_with_interval, + generate_one_hk_command, + make_sid, +) +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.tmtc.queue import DefaultPusQueueHelper + from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.config.object_ids import ACS_CONTROLLER from eive_tmtc.pus_tm.defs import PrintWrapper from eive_tmtc.tmtc.acs.defs import AcsMode, SafeSubmode -from tmtccmd.config.tmtc import ( - tmtc_definitions_provider, - TmtcDefinitionWrapper, - OpCodeEntry, -) -from tmtccmd.tc import service_provider -from tmtccmd.tc.queue import DefaultPusQueueHelper -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, - make_sid, - enable_periodic_hk_command_with_interval, - disable_periodic_hk_command, - create_request_one_diag_command, -) -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd -from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter - -from tmtccmd.tc.pus_20_fsfw_param import create_load_param_cmd - -from tmtccmd.pus.s20_fsfw_param_defs import ( - create_scalar_u8_parameter, - create_scalar_u16_parameter, - create_scalar_i32_parameter, - create_scalar_float_parameter, - create_scalar_double_parameter, - create_vector_float_parameter, - create_vector_double_parameter, - create_matrix_float_parameter, - create_matrix_double_parameter, -) - _LOGGER = logging.getLogger(__name__) diff --git a/eive_tmtc/tmtc/acs/gps.py b/eive_tmtc/tmtc/acs/gps.py index 8420d29..de5f823 100644 --- a/eive_tmtc/tmtc/acs/gps.py +++ b/eive_tmtc/tmtc/acs/gps.py @@ -7,9 +7,9 @@ from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.pus_tm.defs import PrintWrapper from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.pus.s200_fsfw_mode import create_mode_command, Mode +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, create_request_one_hk_command, create_enable_periodic_hk_command_with_interval_with_diag, diff --git a/eive_tmtc/tmtc/acs/gyros.py b/eive_tmtc/tmtc/acs/gyros.py index e9c6c6f..4fe1442 100644 --- a/eive_tmtc/tmtc/acs/gyros.py +++ b/eive_tmtc/tmtc/acs/gyros.py @@ -3,13 +3,13 @@ import logging import struct from spacepackets.ecss import PusTelecommand -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_201_fsfw_health import pack_set_health_cmd_data, FsfwHealth +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s201_fsfw_health import pack_set_health_cmd_data, FsfwHealth from tmtccmd.pus.s201_fsfw_health import Subservice import eive_tmtc.config.object_ids as obj_ids -from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode -from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid +from tmtccmd.pus.s200_fsfw_mode import create_mode_command, Mode +from tmtccmd.pus.tc.s3_fsfw_hk import create_request_one_hk_command, make_sid from tmtccmd.config.tmtc import ( tmtc_definitions_provider, OpCodeEntry, diff --git a/eive_tmtc/tmtc/acs/imtq.py b/eive_tmtc/tmtc/acs/imtq.py index e9d873a..a0cb0eb 100644 --- a/eive_tmtc/tmtc/acs/imtq.py +++ b/eive_tmtc/tmtc/acs/imtq.py @@ -18,8 +18,8 @@ from tmtccmd.config.tmtc import ( OpCodeEntry, TmtcDefinitionWrapper, ) -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, generate_one_diag_command, generate_one_hk_command, @@ -27,7 +27,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import ( create_enable_periodic_hk_command_with_interval_with_diag, create_disable_periodic_hk_command_with_diag, ) -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode from tmtccmd.util import ObjectIdU32 from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter diff --git a/eive_tmtc/tmtc/acs/mgms.py b/eive_tmtc/tmtc/acs/mgms.py index 3450ef9..1166d94 100644 --- a/eive_tmtc/tmtc/acs/mgms.py +++ b/eive_tmtc/tmtc/acs/mgms.py @@ -14,8 +14,8 @@ from eive_tmtc.config.object_ids import ( from eive_tmtc.pus_tm.defs import PrintWrapper from tmtccmd.config.tmtc import tmtc_definitions_provider, TmtcDefinitionWrapper -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import create_mode_command, Mode from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/acs/reaction_wheels.py b/eive_tmtc/tmtc/acs/reaction_wheels.py index 55b7ddb..7fe3b9b 100644 --- a/eive_tmtc/tmtc/acs/reaction_wheels.py +++ b/eive_tmtc/tmtc/acs/reaction_wheels.py @@ -12,17 +12,17 @@ from eive_tmtc.pus_tm.defs import PrintWrapper from eive_tmtc.config.object_ids import RW1_ID, RW2_ID, RW3_ID, RW4_ID from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( generate_one_hk_command, generate_one_diag_command, make_sid, enable_periodic_hk_command_with_interval, disable_periodic_hk_command, ) -from tmtccmd.tc.pus_8_fsfw_funccmd import create_action_cmd +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode, Subservice +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode, Subservice from eive_tmtc.config.definitions import CustomServiceList from tmtccmd.util import ObjectIdU32 from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter diff --git a/eive_tmtc/tmtc/acs/star_tracker.py b/eive_tmtc/tmtc/acs/star_tracker.py index f068d59..17fec8b 100644 --- a/eive_tmtc/tmtc/acs/star_tracker.py +++ b/eive_tmtc/tmtc/acs/star_tracker.py @@ -16,16 +16,16 @@ from eive_tmtc.utility.input_helper import InputHelper from spacepackets.ecss.tc import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.pus.tc.s3_fsfw_hk import ( create_request_one_diag_command, create_request_one_hk_command, enable_periodic_hk_command_with_interval, disable_periodic_hk_command, make_sid, ) -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode from tmtccmd.util import ObjectIdU32 from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from eive_tmtc.config.object_ids import STR_ASSEMBLY, STAR_TRACKER_ID diff --git a/eive_tmtc/tmtc/acs/str_img_helper.py b/eive_tmtc/tmtc/acs/str_img_helper.py index e33864a..dae085c 100644 --- a/eive_tmtc/tmtc/acs/str_img_helper.py +++ b/eive_tmtc/tmtc/acs/str_img_helper.py @@ -12,7 +12,7 @@ import struct from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/acs/subsystem.py b/eive_tmtc/tmtc/acs/subsystem.py index 223c558..657c8e7 100644 --- a/eive_tmtc/tmtc/acs/subsystem.py +++ b/eive_tmtc/tmtc/acs/subsystem.py @@ -11,9 +11,9 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservices +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams class OpCode(str, enum.Enum): diff --git a/eive_tmtc/tmtc/acs/sus_board.py b/eive_tmtc/tmtc/acs/sus_board.py index d3d406d..cc419a4 100644 --- a/eive_tmtc/tmtc/acs/sus_board.py +++ b/eive_tmtc/tmtc/acs/sus_board.py @@ -7,9 +7,9 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider, DefaultPusQueueHelper -from tmtccmd.tc.decorator import ServiceProviderParams -from tmtccmd.tc.pus_200_fsfw_mode import Mode +from tmtccmd.tmtc import service_provider, DefaultPusQueueHelper +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.s200_fsfw_mode import Mode class SusOpCode: diff --git a/eive_tmtc/tmtc/com/ccsds_handler.py b/eive_tmtc/tmtc/com/ccsds_handler.py index 5fa4985..4aba6ed 100644 --- a/eive_tmtc/tmtc/com/ccsds_handler.py +++ b/eive_tmtc/tmtc/com/ccsds_handler.py @@ -15,8 +15,8 @@ from tmtccmd.config.tmtc import ( OpCodeEntry, TmtcDefinitionWrapper, ) -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import create_mode_command, Mode from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/com/pdec_handler.py b/eive_tmtc/tmtc/com/pdec_handler.py index 758ca5c..24e7a1f 100644 --- a/eive_tmtc/tmtc/com/pdec_handler.py +++ b/eive_tmtc/tmtc/com/pdec_handler.py @@ -8,10 +8,10 @@ import enum from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper -from tmtccmd.tc.pus_20_fsfw_param import create_load_param_cmd -from tmtccmd.tc.pus_8_fsfw_funccmd import create_action_cmd +from tmtccmd.pus.s20_fsfw_param import create_load_param_cmd +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from tmtccmd.pus.s20_fsfw_param_defs import create_scalar_u8_parameter from tmtccmd.config.tmtc import ( diff --git a/eive_tmtc/tmtc/com/subsystem.py b/eive_tmtc/tmtc/com/subsystem.py index 35cc3ff..900981f 100644 --- a/eive_tmtc/tmtc/com/subsystem.py +++ b/eive_tmtc/tmtc/com/subsystem.py @@ -12,15 +12,15 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams -from tmtccmd.tc.pus_200_fsfw_mode import ( +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.s200_fsfw_mode import ( create_mode_command, create_read_mode_command, create_announce_mode_command, create_announce_mode_recursive_command, ) -from tmtccmd.tc.pus_20_fsfw_param import ( +from tmtccmd.pus.s20_fsfw_param import ( create_load_param_cmd, ) diff --git a/eive_tmtc/tmtc/com/syrlinks_handler.py b/eive_tmtc/tmtc/com/syrlinks_handler.py index c757a61..608d101 100644 --- a/eive_tmtc/tmtc/com/syrlinks_handler.py +++ b/eive_tmtc/tmtc/com/syrlinks_handler.py @@ -17,8 +17,8 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, create_request_one_diag_command, create_request_one_hk_command, @@ -26,7 +26,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import ( create_disable_periodic_hk_command_with_diag, ) from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_mode_command +from tmtccmd.pus.s200_fsfw_mode import Mode, create_mode_command from eive_tmtc.config.object_ids import SYRLINKS_HANDLER_ID import struct diff --git a/eive_tmtc/tmtc/common.py b/eive_tmtc/tmtc/common.py index 8425195..4da20f6 100644 --- a/eive_tmtc/tmtc/common.py +++ b/eive_tmtc/tmtc/common.py @@ -1,8 +1,8 @@ from typing import Union from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode, Subservice +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode, Subservice from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/core.py b/eive_tmtc/tmtc/core.py index 6a85ce2..5866183 100644 --- a/eive_tmtc/tmtc/core.py +++ b/eive_tmtc/tmtc/core.py @@ -10,10 +10,10 @@ from eive_tmtc.config.definitions import CustomServiceList from spacepackets.ecss import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd -from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command -from tmtccmd.tc.pus_20_fsfw_param import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.pus.tc.s3_fsfw_hk import make_sid, generate_one_hk_command +from tmtccmd.pus.s20_fsfw_param import ( create_scalar_u8_parameter, create_load_param_cmd, ) diff --git a/eive_tmtc/tmtc/health.py b/eive_tmtc/tmtc/health.py index b9e99d9..70efb4c 100644 --- a/eive_tmtc/tmtc/health.py +++ b/eive_tmtc/tmtc/health.py @@ -6,9 +6,9 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider +from tmtccmd.tmtc import service_provider from tmtccmd.pus.s201_fsfw_health import Subservice, FsfwHealth -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc.decorator import ServiceProviderParams class OpCode: diff --git a/eive_tmtc/tmtc/misc/s200_test.py b/eive_tmtc/tmtc/misc/s200_test.py index 07da250..555f18c 100644 --- a/eive_tmtc/tmtc/misc/s200_test.py +++ b/eive_tmtc/tmtc/misc/s200_test.py @@ -6,8 +6,8 @@ @date 02.05.2020 """ from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode from eive_tmtc.config.object_ids import TEST_DEVICE_ID TEST_DEVICE_OBJ_ID = TEST_DEVICE_ID diff --git a/eive_tmtc/tmtc/payload/ploc_memory_dumper.py b/eive_tmtc/tmtc/payload/ploc_memory_dumper.py index ef79bd0..da7fbcc 100644 --- a/eive_tmtc/tmtc/payload/ploc_memory_dumper.py +++ b/eive_tmtc/tmtc/payload/ploc_memory_dumper.py @@ -12,7 +12,7 @@ from eive_tmtc.config.definitions import CustomServiceList from spacepackets.ecss.tc import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper from tmtccmd.config.tmtc import tmtc_definitions_provider, OpCodeEntry -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/payload/ploc_mpsoc.py b/eive_tmtc/tmtc/payload/ploc_mpsoc.py index 1a7f8cf..9a8e0a5 100644 --- a/eive_tmtc/tmtc/payload/ploc_mpsoc.py +++ b/eive_tmtc/tmtc/payload/ploc_mpsoc.py @@ -20,11 +20,11 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, ) from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams from eive_tmtc.utility.input_helper import InputHelper -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode -from tmtccmd.tc.pus_8_fsfw_funccmd import create_action_cmd +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode +from tmtccmd.pus.s8_fsfw_action import create_action_cmd _LOGGER = logging.getLogger(__name__) diff --git a/eive_tmtc/tmtc/payload/ploc_supervisor.py b/eive_tmtc/tmtc/payload/ploc_supervisor.py index 31e8071..a48bc43 100644 --- a/eive_tmtc/tmtc/payload/ploc_supervisor.py +++ b/eive_tmtc/tmtc/payload/ploc_supervisor.py @@ -14,13 +14,13 @@ from eive_tmtc.config.object_ids import PLOC_SUPV_ID, get_object_ids from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.pus_tm.defs import PrintWrapper from spacepackets.ecss.tc import PusTelecommand -from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid +from tmtccmd.pus.tc.s3_fsfw_hk import generate_one_hk_command, make_sid from tmtccmd.config import TmtcDefinitionWrapper from tmtccmd.config.tmtc import tmtc_definitions_provider, OpCodeEntry -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from eive_tmtc.utility.input_helper import InputHelper diff --git a/eive_tmtc/tmtc/payload/plpcdu.py b/eive_tmtc/tmtc/payload/plpcdu.py index a5cbef0..53eb207 100644 --- a/eive_tmtc/tmtc/payload/plpcdu.py +++ b/eive_tmtc/tmtc/payload/plpcdu.py @@ -9,20 +9,19 @@ from eive_tmtc.pus_tm.defs import PrintWrapper from tmtccmd.config import TmtcDefinitionWrapper from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, generate_one_diag_command, enable_periodic_hk_command_with_interval, disable_periodic_hk_command, ) -from tmtccmd.tc.pus_11_tc_sched import ( +from tmtccmd.pus.s11_tc_sched import ( create_enable_tc_sched_cmd, create_time_tagged_cmd, ) -from tmtccmd.pus.s200_fsfw_mode import Subservice -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode -from tmtccmd.tc.pus_20_fsfw_param import ( +from tmtccmd.pus.s200_fsfw_mode import Subservice, pack_mode_data, Mode +from tmtccmd.pus.s20_fsfw_param import ( create_scalar_double_parameter, create_load_param_cmd, create_scalar_boolean_parameter, diff --git a/eive_tmtc/tmtc/payload/rad_sensor.py b/eive_tmtc/tmtc/payload/rad_sensor.py index f4ba809..a8a3e22 100644 --- a/eive_tmtc/tmtc/payload/rad_sensor.py +++ b/eive_tmtc/tmtc/payload/rad_sensor.py @@ -14,9 +14,9 @@ from eive_tmtc.pus_tm.defs import PrintWrapper from spacepackets.ecss.tc import PusTelecommand 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_mode import Mode, pack_mode_data -from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import Mode, pack_mode_data +from tmtccmd.pus.tc.s3_fsfw_hk import generate_one_hk_command, make_sid from tmtccmd.util import ObjectIdU32 from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter diff --git a/eive_tmtc/tmtc/payload/scex.py b/eive_tmtc/tmtc/payload/scex.py index e98e5a1..b06e09a 100644 --- a/eive_tmtc/tmtc/payload/scex.py +++ b/eive_tmtc/tmtc/payload/scex.py @@ -5,10 +5,10 @@ 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_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 +from tmtccmd.pus.s200_fsfw_mode import Mode, pack_mode_data, Subservice +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper from eive_tmtc.config.object_ids import SCEX_HANDLER_ID diff --git a/eive_tmtc/tmtc/payload/subsystem.py b/eive_tmtc/tmtc/payload/subsystem.py index 560891d..69010d6 100644 --- a/eive_tmtc/tmtc/payload/subsystem.py +++ b/eive_tmtc/tmtc/payload/subsystem.py @@ -7,9 +7,9 @@ from spacepackets.ecss import PusTelecommand from eive_tmtc.tmtc.common import pack_mode_cmd_with_info 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_mode import Subservice as ModeSubservice +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservice class ModeId(enum.IntEnum): diff --git a/eive_tmtc/tmtc/power/acu.py b/eive_tmtc/tmtc/power/acu.py index 623b4bd..d285b4f 100644 --- a/eive_tmtc/tmtc/power/acu.py +++ b/eive_tmtc/tmtc/power/acu.py @@ -19,7 +19,7 @@ from eive_tmtc.tmtc.power.common_power import ( from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper import eive_tmtc.gomspace.gomspace_common as gs from eive_tmtc.config.object_ids import ACU_HANDLER_ID from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/power/bpx_batt.py b/eive_tmtc/tmtc/power/bpx_batt.py index 7713465..8fd387c 100644 --- a/eive_tmtc/tmtc/power/bpx_batt.py +++ b/eive_tmtc/tmtc/power/bpx_batt.py @@ -11,12 +11,12 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -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_mode import pack_mode_data, Mode -from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.pus.tc.s3_fsfw_hk import generate_one_hk_command, make_sid +from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode +from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservices from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter diff --git a/eive_tmtc/tmtc/power/common_power.py b/eive_tmtc/tmtc/power/common_power.py index bcf416c..f9d746d 100644 --- a/eive_tmtc/tmtc/power/common_power.py +++ b/eive_tmtc/tmtc/power/common_power.py @@ -16,15 +16,15 @@ from eive_tmtc.gomspace.gomspace_common import ( from eive_tmtc.gomspace.gomspace_pdu_definitions import OUT_ENABLE_LIST from spacepackets.ecss import PusTelecommand from tmtccmd.config import OpCodeEntry -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, generate_one_diag_command, generate_one_hk_command, enable_periodic_hk_command_with_interval, disable_periodic_hk_command, ) -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from tmtccmd.util import ObjectIdU32, ObjectIdBase diff --git a/eive_tmtc/tmtc/power/p60dock.py b/eive_tmtc/tmtc/power/p60dock.py index b8908a6..714221f 100644 --- a/eive_tmtc/tmtc/power/p60dock.py +++ b/eive_tmtc/tmtc/power/p60dock.py @@ -11,7 +11,7 @@ from eive_tmtc.tmtc.power.common_power import ( pack_common_power_cmds, SetId, ) -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from eive_tmtc.gomspace.gomspace_common import ( TableEntry, Channel, diff --git a/eive_tmtc/tmtc/power/pdu1.py b/eive_tmtc/tmtc/power/pdu1.py index b42c66a..16bc2b3 100644 --- a/eive_tmtc/tmtc/power/pdu1.py +++ b/eive_tmtc/tmtc/power/pdu1.py @@ -32,7 +32,7 @@ from spacepackets.ecss import PusTelecommand from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/power/pdu2.py b/eive_tmtc/tmtc/power/pdu2.py index f36c18c..69c54e2 100644 --- a/eive_tmtc/tmtc/power/pdu2.py +++ b/eive_tmtc/tmtc/power/pdu2.py @@ -34,7 +34,7 @@ from eive_tmtc.tmtc.power.common_power import ( from spacepackets.ecss import PusTelecommand from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/power/power.py b/eive_tmtc/tmtc/power/power.py index e6d47c5..9a0643a 100644 --- a/eive_tmtc/tmtc/power/power.py +++ b/eive_tmtc/tmtc/power/power.py @@ -32,12 +32,12 @@ from eive_tmtc.config.object_ids import PCDU_HANDLER_ID from eive_tmtc.tmtc.power.p60dock import P60OpCode, P60Info, p60_dock_req_hk_cmds from eive_tmtc.tmtc.power.acu import add_acu_cmds, acu_req_hk_cmds -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.pus.tc.s3_fsfw_hk import ( create_request_one_diag_command, make_sid, ) from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper class SetId(enum.IntEnum): diff --git a/eive_tmtc/tmtc/power/pwr_ctrl.py b/eive_tmtc/tmtc/power/pwr_ctrl.py index 5a13012..ecab1dd 100644 --- a/eive_tmtc/tmtc/power/pwr_ctrl.py +++ b/eive_tmtc/tmtc/power/pwr_ctrl.py @@ -11,11 +11,11 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider -from tmtccmd.tc.queue import DefaultPusQueueHelper -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 ( +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.queue import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import Mode, pack_mode_command +from tmtccmd.tmtc.decorator import ServiceProviderParams +from tmtccmd.pus.tc.s3_fsfw_hk import ( generate_one_hk_command, make_sid, enable_periodic_hk_command_with_interval, @@ -23,7 +23,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import ( ) from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter -from tmtccmd.tc.pus_20_fsfw_param import create_load_param_cmd +from tmtccmd.pus.s20_fsfw_param import create_load_param_cmd from tmtccmd.pus.s20_fsfw_param_defs import ( create_scalar_float_parameter, diff --git a/eive_tmtc/tmtc/power/subsystem.py b/eive_tmtc/tmtc/power/subsystem.py index 830a353..71c1443 100644 --- a/eive_tmtc/tmtc/power/subsystem.py +++ b/eive_tmtc/tmtc/power/subsystem.py @@ -10,9 +10,9 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices, Mode -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservices, Mode +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams class OpCode(str, enum.Enum): diff --git a/eive_tmtc/tmtc/power/tm.py b/eive_tmtc/tmtc/power/tm.py index 9bdb8c5..2fd6fce 100644 --- a/eive_tmtc/tmtc/power/tm.py +++ b/eive_tmtc/tmtc/power/tm.py @@ -9,7 +9,7 @@ from eive_tmtc.tmtc.power.common_power import ( OBC_ENDIANNESS, ) from eive_tmtc.tmtc.power.power import PcduSetIds -from tmtccmd.tm.pus_3_fsfw_hk import Service3FsfwTm +from tmtccmd.pus.tm.s3_fsfw_hk import Service3FsfwTm from tmtccmd.util import ObjectIdBase from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from eive_tmtc.pus_tm.defs import PrintWrapper diff --git a/eive_tmtc/tmtc/solar_array_deployment.py b/eive_tmtc/tmtc/solar_array_deployment.py index 5b44460..201a48c 100644 --- a/eive_tmtc/tmtc/solar_array_deployment.py +++ b/eive_tmtc/tmtc/solar_array_deployment.py @@ -17,9 +17,9 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider, DefaultPusQueueHelper -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc import service_provider, DefaultPusQueueHelper +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.tmtc.decorator import ServiceProviderParams class OpCode: diff --git a/eive_tmtc/tmtc/system.py b/eive_tmtc/tmtc/system.py index 981729b..b040131 100644 --- a/eive_tmtc/tmtc/system.py +++ b/eive_tmtc/tmtc/system.py @@ -7,14 +7,14 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import service_provider +from tmtccmd.tmtc import service_provider from eive_tmtc.config.object_ids import EIVE_SYSTEM_ID -from tmtccmd.tc.pus_200_fsfw_mode import ( +from tmtccmd.pus.s200_fsfw_mode import ( create_mode_command, create_announce_mode_recursive_command, ) -from tmtccmd.tc.pus_8_fsfw_funccmd import create_action_cmd -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.tmtc.decorator import ServiceProviderParams class SystemMode: diff --git a/eive_tmtc/tmtc/tcs/brd_assy.py b/eive_tmtc/tmtc/tcs/brd_assy.py index 2aeb01f..841fdfe 100644 --- a/eive_tmtc/tmtc/tcs/brd_assy.py +++ b/eive_tmtc/tmtc/tcs/brd_assy.py @@ -6,8 +6,8 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import Mode +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import Mode class InfoAssy: diff --git a/eive_tmtc/tmtc/tcs/ctrl.py b/eive_tmtc/tmtc/tcs/ctrl.py index 7b99437..3c3b906 100644 --- a/eive_tmtc/tmtc/tcs/ctrl.py +++ b/eive_tmtc/tmtc/tcs/ctrl.py @@ -7,8 +7,8 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_3_fsfw_hk import ( +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.tc.s3_fsfw_hk import ( make_sid, generate_one_hk_command, create_request_one_diag_command, diff --git a/eive_tmtc/tmtc/tcs/heater.py b/eive_tmtc/tmtc/tcs/heater.py index c6558c0..dd6352a 100644 --- a/eive_tmtc/tmtc/tcs/heater.py +++ b/eive_tmtc/tmtc/tcs/heater.py @@ -10,14 +10,14 @@ from eive_tmtc.config.object_ids import get_object_ids from eive_tmtc.tmtc.tcs.defs import Heater from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.util.obj_id import ObjectIdU32 from tmtccmd.pus.s201_fsfw_health import ( pack_set_health_cmd_data, FsfwHealth, Subservice, ) -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd +from tmtccmd.pus.s8_fsfw_action import create_action_cmd from spacepackets.ecss.tc import PusTelecommand diff --git a/eive_tmtc/tmtc/tcs/rtd.py b/eive_tmtc/tmtc/tcs/rtd.py index 56d5f24..fd3b727 100644 --- a/eive_tmtc/tmtc/tcs/rtd.py +++ b/eive_tmtc/tmtc/tcs/rtd.py @@ -8,9 +8,9 @@ from spacepackets.ecss import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tmtc import DefaultPusQueueHelper from tmtccmd.util import ObjectIdU32 -from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data, Subservice +from tmtccmd.pus.s200_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 from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter diff --git a/eive_tmtc/tmtc/tcs/subsystem.py b/eive_tmtc/tmtc/tcs/subsystem.py index 7b32a9d..4ae5697 100644 --- a/eive_tmtc/tmtc/tcs/subsystem.py +++ b/eive_tmtc/tmtc/tcs/subsystem.py @@ -7,8 +7,8 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_announce_mode_recursive_command +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import Mode, create_announce_mode_recursive_command class OpCode: diff --git a/eive_tmtc/tmtc/tcs/tmp1075.py b/eive_tmtc/tmtc/tcs/tmp1075.py index a03554d..e7905bc 100644 --- a/eive_tmtc/tmtc/tcs/tmp1075.py +++ b/eive_tmtc/tmtc/tcs/tmp1075.py @@ -17,9 +17,9 @@ from tmtccmd.config.tmtc import ( OpCodeEntry, ) from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter -from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data -from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid +from tmtccmd.tmtc import DefaultPusQueueHelper +from tmtccmd.pus.s200_fsfw_mode import Mode, pack_mode_data +from tmtccmd.pus.tc.s3_fsfw_hk import create_request_one_hk_command, make_sid from tmtccmd.util import ObjectIdU32 diff --git a/eive_tmtc/tmtc/test.py b/eive_tmtc/tmtc/test.py index ad292fd..c484a38 100644 --- a/eive_tmtc/tmtc/test.py +++ b/eive_tmtc/tmtc/test.py @@ -6,8 +6,8 @@ from tmtccmd.config.tmtc import ( OpCodeEntry, ) from tmtccmd.pus.s17_test import create_service_17_ping_command -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams class OpCodes: diff --git a/eive_tmtc/tmtc/time.py b/eive_tmtc/tmtc/time.py index 8b9a312..fcb301e 100644 --- a/eive_tmtc/tmtc/time.py +++ b/eive_tmtc/tmtc/time.py @@ -10,8 +10,8 @@ from tmtccmd.config.tmtc import ( OpCodeEntry, ) -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams class Subservice(enum.IntEnum): diff --git a/eive_tmtc/tmtc/tm_store.py b/eive_tmtc/tmtc/tm_store.py index 262cac7..3f4fc5f 100644 --- a/eive_tmtc/tmtc/tm_store.py +++ b/eive_tmtc/tmtc/tm_store.py @@ -15,8 +15,8 @@ from eive_tmtc.config.object_ids import ( from eive_tmtc.config.definitions import CustomServiceList from tmtccmd.config import TmtcDefinitionWrapper from tmtccmd.config.tmtc import tmtc_definitions_provider, OpCodeEntry -from tmtccmd.tc import service_provider -from tmtccmd.tc.decorator import ServiceProviderParams +from tmtccmd.tmtc import service_provider +from tmtccmd.tmtc.decorator import ServiceProviderParams from dateutil.parser import parse from spacepackets.ecss import PusService # noqa diff --git a/eive_tmtc/tmtc/wdt.py b/eive_tmtc/tmtc/wdt.py index 5b9d406..abb4ee1 100644 --- a/eive_tmtc/tmtc/wdt.py +++ b/eive_tmtc/tmtc/wdt.py @@ -4,8 +4,8 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, tmtc_definitions_provider, ) -from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd -from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.pus.s8_fsfw_action import create_action_cmd +from tmtccmd.tmtc import DefaultPusQueueHelper from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.config.object_ids import XIPHOS_WDT_ID diff --git a/pyproject.toml b/pyproject.toml index 2345398..b9017d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ "Topic :: Scientific/Engineering" ] dependencies = [ - "tmtccmd ~= 6.0", + "tmtccmd ~= 7.0", "python-dateutil ~= 2.8", # "tmtccmd @ git+https://github.com/robamu-org/tmtccmd@main" ] diff --git a/tmtcc.py b/tmtcc.py index 785d455..e6e4188 100755 --- a/tmtcc.py +++ b/tmtcc.py @@ -15,7 +15,8 @@ from spacepackets.cfdp import ( from spacepackets.ecss import PusVerificator from spacepackets.version import get_version as get_sp_version from tmtccmd import BackendBase -from tmtccmd.cfdp.handler import CfdpInCcsdsHandler +from tmtccmd.cfdp.handler import RemoteEntityCfgTable +from eive_tmtc.cfdp.handler import CfdpInCcsdsHandler from tmtccmd.cfdp.mib import ( IndicationCfg, LocalEntityCfg, @@ -40,13 +41,13 @@ from tmtccmd.logging.pus import ( TimedLogWhen, ) from tmtccmd.pus import VerificationWrapper -from tmtccmd.tm import CcsdsTmHandler, GenericApidHandlerBase, SpecificApidHandlerBase +from tmtccmd.tmtc import CcsdsTmHandler, GenericApidHandlerBase, SpecificApidHandlerBase from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider from eive_tmtc import APP_LOGGER from eive_tmtc.cfdp.fault_handler import EiveCfdpFaultHandler from eive_tmtc.cfdp.tm import CfdpInCcsdsWrapper -from eive_tmtc.cfdp.user import EiveCfdpUser +from eive_tmtc.cfdp.user import EiveCfdpUser, EiveCheckTimerProvider from eive_tmtc.config.definitions import ( CFDP_APID, CFDP_LOCAL_ENTITY_ID, @@ -155,7 +156,8 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper: closure_requested=False, entity_id=CFDP_LOCAL_ENTITY_ID, max_file_segment_len=990, - check_limit=None, + max_packet_len=1024, + check_limit=5, crc_on_transmission=False, crc_type=ChecksumType.CRC_32, default_transmission_mode=TransmissionMode.UNACKNOWLEDGED, @@ -164,11 +166,13 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper: closure_requested=False, entity_id=CFDP_REMOTE_ENTITY_ID, max_file_segment_len=990, - check_limit=None, + max_packet_len=1024, + check_limit=5, crc_on_transmission=False, crc_type=ChecksumType.CRC_32, default_transmission_mode=TransmissionMode.UNACKNOWLEDGED, ) + check_timer_provider = EiveCheckTimerProvider() cfdp_seq_count_provider = FileSeqCountProvider( max_bit_width=16, file_name=Path("seqcnt_cfdp_transaction.txt") ) @@ -178,7 +182,8 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper: cfdp_user = EiveCfdpUser() cfdp_in_ccsds_handler = CfdpInCcsdsHandler( cfg=cfdp_cfg, - remote_cfgs=[remote_cfg, self_as_remote], + check_timer_provider=check_timer_provider, + remote_cfg_table=RemoteEntityCfgTable([remote_cfg, self_as_remote]), ccsds_apid=CFDP_APID, ccsds_seq_cnt_provider=cfdp_ccsds_seq_count_provider, cfdp_seq_cnt_provider=cfdp_seq_count_provider,