Skip to content

Commit

Permalink
Merge pull request #4 from us-irs/example-updates
Browse files Browse the repository at this point in the history
example updates
  • Loading branch information
robamu committed Jan 24, 2024
2 parents ad5e6ba + 53af2d2 commit 9d32bfa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions examples/cfdp-libre-cube-crosstest/tmtccmd-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand Down
10 changes: 8 additions & 2 deletions examples/cfdp-simple/file-copy-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
FileSegmentRecvdParams,
MetadataRecvParams,
TransactionFinishedParams,
TransactionParams,
)
from spacepackets.countdown import Countdown
from spacepackets.seqcount import SeqCountProvider
Expand Down Expand Up @@ -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}")
Expand Down

0 comments on commit 9d32bfa

Please sign in to comment.