From 53af2d22b5e3428d011defc57d4fc6820362a52f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 24 Jan 2024 18:05:28 +0100 Subject: [PATCH] example updates --- examples/cfdp-libre-cube-crosstest/tmtccmd-client.py | 10 ++++++++-- examples/cfdp-simple/file-copy-example.py | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py b/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py index 677192d..491d861 100755 --- a/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py +++ b/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py @@ -32,6 +32,7 @@ FileSegmentRecvdParams, MetadataRecvParams, TransactionFinishedParams, + TransactionParams, ) from common import REMOTE_CFG_FOR_DEST_ENTITY, UDP_SERVER_PORT, UDP_TM_SERVER_PORT from common import REMOTE_ENTITY_ID as REMOTE_ENTITY_ID_RAW @@ -103,9 +104,14 @@ def __init__(self, base_str: str): self.base_str = base_str super().__init__() - def transaction_indication(self, transaction_id: TransactionId): + def transaction_indication( + self, + transaction_indication_params: TransactionParams, + ): """This indication is used to report the transaction ID to the CFDP user""" - _LOGGER.info(f"{self.base_str}: Transaction.indication for {transaction_id}") + _LOGGER.info( + f"{self.base_str}: Transaction.indication for {transaction_indication_params.transaction_id}" + ) def eof_sent_indication(self, transaction_id: TransactionId): _LOGGER.info(f"{self.base_str}: EOF-Sent.indication for {transaction_id}") diff --git a/examples/cfdp-simple/file-copy-example.py b/examples/cfdp-simple/file-copy-example.py index 7446359..99f7bf6 100755 --- a/examples/cfdp-simple/file-copy-example.py +++ b/examples/cfdp-simple/file-copy-example.py @@ -38,6 +38,7 @@ FileSegmentRecvdParams, MetadataRecvParams, TransactionFinishedParams, + TransactionParams, ) from spacepackets.countdown import Countdown from spacepackets.seqcount import SeqCountProvider @@ -118,9 +119,14 @@ def __init__(self, base_str: str): self.base_str = base_str super().__init__() - def transaction_indication(self, transaction_id: TransactionId): + def transaction_indication( + self, + transaction_indication_params: TransactionParams, + ): """This indication is used to report the transaction ID to the CFDP user""" - _LOGGER.info(f"{self.base_str}: Transaction.indication for {transaction_id}") + _LOGGER.info( + f"{self.base_str}: Transaction.indication for {transaction_indication_params.transaction_id}" + ) def eof_sent_indication(self, transaction_id: TransactionId): _LOGGER.info(f"{self.base_str}: EOF-Sent.indication for {transaction_id}")