From 1faecb09def5d9d3c3956fcbfc2efdedbed770d3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 8 Sep 2023 17:49:59 +0200 Subject: [PATCH] some more useful printout --- eive_tmtc/cfdp/fault_handler.py | 12 ++++++++---- eive_tmtc/cfdp/tm.py | 2 +- eive_tmtc/cfdp/user.py | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/eive_tmtc/cfdp/fault_handler.py b/eive_tmtc/cfdp/fault_handler.py index a20ba80..6387792 100644 --- a/eive_tmtc/cfdp/fault_handler.py +++ b/eive_tmtc/cfdp/fault_handler.py @@ -1,16 +1,20 @@ +import logging + from spacepackets.cfdp import ConditionCode from tmtccmd.cfdp.mib import DefaultFaultHandlerBase +_LOGGER = logging.getLogger(__name__) + class EiveCfdpFaultHandler(DefaultFaultHandlerBase): def notice_of_suspension_cb(self, cond: ConditionCode): - pass + _LOGGER.info(f"Received notice of suspension: {cond!r}") def notice_of_cancellation_cb(self, cond: ConditionCode): - pass + _LOGGER.info(f"Received notice of cancellation: {cond!r}") def abandoned_cb(self, cond: ConditionCode): - pass + _LOGGER.info(f"Abandoned transaction: {cond!r}") def ignore_cb(self, cond: ConditionCode): - pass + _LOGGER.info(f"Ignored transaction: {cond!r}") diff --git a/eive_tmtc/cfdp/tm.py b/eive_tmtc/cfdp/tm.py index ffc0fd7..7484606 100644 --- a/eive_tmtc/cfdp/tm.py +++ b/eive_tmtc/cfdp/tm.py @@ -24,4 +24,4 @@ class CfdpInCcsdsWrapper(SpecificApidHandlerBase): else: 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) + self.handler.insert_pdu_packet(pdu_base) diff --git a/eive_tmtc/cfdp/user.py b/eive_tmtc/cfdp/user.py index 7e1afc2..c905f3e 100644 --- a/eive_tmtc/cfdp/user.py +++ b/eive_tmtc/cfdp/user.py @@ -1,6 +1,7 @@ import logging from spacepackets.cfdp import ConditionCode +from spacepackets.cfdp.pdu import DeliveryCode from tmtccmd.cfdp import CfdpUserBase, TransactionId from tmtccmd.cfdp.user import ( TransactionFinishedParams, @@ -20,6 +21,9 @@ class EiveCfdpUser(CfdpUserBase): def transaction_finished_indication(self, params: TransactionFinishedParams): _LOGGER.info(f"CFDP User: {params.transaction_id} finished") + _LOGGER.info(f"Delivery Code: {params.delivery_code!r}") + _LOGGER.info(f"Condition code: {params.condition_code!r}") + _LOGGER.info(f"File delivery status: {params.delivery_code!r}") def metadata_recv_indication(self, params: MetadataRecvParams): pass