some documentation

This commit is contained in:
Robin Müller 2022-09-09 15:06:58 +02:00
parent 4f9e246ecd
commit 6a7a8bac47
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -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