From 6a7a8bac470a0ca706dd82176513adeef9fcbcfa Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 9 Sep 2022 15:06:58 +0200 Subject: [PATCH] some documentation --- common.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/common.py b/common.py index 076b4e1..5c8c891 100644 --- a/common.py +++ b/common.py @@ -72,7 +72,6 @@ LOGGER = get_console_logger() class CfdpCcsdsWrapper(SpecificApidHandlerBase): - def __init__( self, cfg: LocalEntityCfg, @@ -82,6 +81,22 @@ class CfdpCcsdsWrapper(SpecificApidHandlerBase): ccsds_seq_cnt_provider: ProvidesSeqCount, ccsds_apid: int, ): + """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 remote_cfg: + :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. + """ super().__init__(EXAMPLE_CFDP_APID, None) self.handler = CfdpHandler(cfg, user, cfdp_seq_cnt_provider, remote_cfg) self.ccsds_seq_cnt_provider = ccsds_seq_cnt_provider @@ -335,7 +350,7 @@ def setup_tmtc_handlers( ) -> (CcsdsTmHandler, TcHandler): pus_handler = PusHandler( - printer=printer, raw_logger=raw_logger, wrapper=verif_wrapper, cfdp_handler=cfdp_handler + printer=printer, raw_logger=raw_logger, wrapper=verif_wrapper ) ccsds_handler = CcsdsTmHandler(None) ccsds_handler.add_apid_handler(pus_handler) @@ -344,7 +359,7 @@ def setup_tmtc_handlers( raw_logger=raw_logger, pus_verificator=verif_wrapper.pus_verificator, seq_count_provider=PusFileSeqCountProvider(), - cfdp_handler=cfdp_handler + cfdp_handler=cfdp_handler, ) return ccsds_handler, tc_handler