eive-tmtc/eive_tmtc/cfdp/fault_handler.py

29 lines
920 B
Python

import logging
from spacepackets.cfdp import ConditionCode, TransactionId
from cfdppy.mib import DefaultFaultHandlerBase
_LOGGER = logging.getLogger(__name__)
class EiveCfdpFaultHandler(DefaultFaultHandlerBase):
def notice_of_suspension_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
_LOGGER.info(f"Received notice of suspension: {cond!r}")
def notice_of_cancellation_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
_LOGGER.info(f"Received notice of cancellation: {cond!r}")
def abandoned_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
_LOGGER.info(f"Abandoned transaction: {cond!r}")
def ignore_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
_LOGGER.info(f"Ignored transaction: {cond!r}")