From 6657bf072c08e9b558f85c9d6e3e8bf1926b2595 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 4 Sep 2023 11:17:25 +0200 Subject: [PATCH] looking good --- eive_tmtc/cfdp/tm.py | 10 +++------- eive_tmtc/cfdp/user.py | 6 ++++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/eive_tmtc/cfdp/tm.py b/eive_tmtc/cfdp/tm.py index 93dcd44..ffc0fd7 100644 --- a/eive_tmtc/cfdp/tm.py +++ b/eive_tmtc/cfdp/tm.py @@ -20,12 +20,8 @@ class CfdpInCcsdsWrapper(SpecificApidHandlerBase): pdu = packet[SPACE_PACKET_HEADER_SIZE:] pdu_base = PduFactory.from_raw(pdu) if pdu_base.pdu_type == PduType.FILE_DATA: - _LOGGER.info("Received File Data PDU TM") + _LOGGER.info("Received File Data PDU") else: - if pdu_base.directive_type == DirectiveType.FINISHED_PDU: - _LOGGER.info("Received Finished PDU TM") - else: - _LOGGER.info( - f"Received File Directive PDU with type {pdu_base.directive_type!r} TM" - ) + directive_type = DirectiveType(pdu_base.directive_type) + _LOGGER.info(f"Received File Directive PDU with type {directive_type!r}") self.handler.pass_pdu_packet(pdu_base) diff --git a/eive_tmtc/cfdp/user.py b/eive_tmtc/cfdp/user.py index 7a25ad2..7e1afc2 100644 --- a/eive_tmtc/cfdp/user.py +++ b/eive_tmtc/cfdp/user.py @@ -25,7 +25,9 @@ class EiveCfdpUser(CfdpUserBase): pass def file_segment_recv_indication(self, params: FileSegmentRecvdParams): - pass + _LOGGER.info( + f"CFDP User: Received File Data PDU for {params.transaction_id} | Offset: {params.offset} | Segment Length: {params.length}" + ) def report_indication(self, transaction_id: TransactionId, status_report: any): pass @@ -49,4 +51,4 @@ class EiveCfdpUser(CfdpUserBase): pass def eof_recv_indication(self, transaction_id: TransactionId): - pass + _LOGGER.info(f"CFDP User: EOF received for {transaction_id}")