eive-tmtc/eive_tmtc/cfdp/fault_handler.py

29 lines
920 B
Python
Raw Permalink Normal View History

2023-09-08 17:49:59 +02:00
import logging
2024-01-24 17:59:16 +01:00
from spacepackets.cfdp import ConditionCode, TransactionId
from cfdppy.mib import DefaultFaultHandlerBase
2023-08-17 11:33:42 +02:00
2023-09-08 17:49:59 +02:00
_LOGGER = logging.getLogger(__name__)
2023-08-17 11:33:42 +02:00
class EiveCfdpFaultHandler(DefaultFaultHandlerBase):
2024-01-24 17:59:16 +01:00
def notice_of_suspension_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
2023-09-08 17:49:59 +02:00
_LOGGER.info(f"Received notice of suspension: {cond!r}")
2023-08-17 11:33:42 +02:00
2024-01-24 17:59:16 +01:00
def notice_of_cancellation_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
2023-09-08 17:49:59 +02:00
_LOGGER.info(f"Received notice of cancellation: {cond!r}")
2023-08-17 11:33:42 +02:00
2024-01-24 17:59:16 +01:00
def abandoned_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
2023-09-08 17:49:59 +02:00
_LOGGER.info(f"Abandoned transaction: {cond!r}")
2023-08-17 11:33:42 +02:00
2024-01-24 17:59:16 +01:00
def ignore_cb(
self, transaction_id: TransactionId, cond: ConditionCode, progress: int
):
2023-09-08 17:49:59 +02:00
_LOGGER.info(f"Ignored transaction: {cond!r}")