some more useful printout

This commit is contained in:
Robin Müller 2023-09-08 17:49:59 +02:00
parent 649deac81b
commit 1faecb09de
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 13 additions and 5 deletions

View File

@ -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}")

View File

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

View File

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