more useful printout
This commit is contained in:
parent
e4e9b3d5d3
commit
8237591c4c
19
common.py
19
common.py
@ -1,7 +1,7 @@
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Optional, Sequence, Tuple
|
||||
from typing import Optional, Sequence, Tuple, cast
|
||||
|
||||
from spacepackets import SpacePacket, SpacePacketHeader, PacketTypes
|
||||
from spacepackets.cfdp import (
|
||||
@ -14,6 +14,7 @@ from spacepackets.cfdp import (
|
||||
ChecksumTypes,
|
||||
ConditionCode,
|
||||
)
|
||||
from spacepackets.cfdp.pdu import MetadataPdu, FileDataPdu
|
||||
from tmtccmd.cfdp import (
|
||||
RemoteEntityCfgTable,
|
||||
RemoteEntityCfg,
|
||||
@ -435,20 +436,30 @@ class TcHandler(TcHandlerBase):
|
||||
) = self.cfdp_in_ccsds_wrapper.pull_next_source_packet()
|
||||
self.queue_helper.add_ccsds_tc(packet)
|
||||
self.cfdp_in_ccsds_wrapper.confirm_source_packet_sent()
|
||||
self.queue_helper.add_log_cmd("CFDP Source: Sending Metadata PDU")
|
||||
metadata = cast(MetadataPdu, pdu_holder.to_metadata_pdu())
|
||||
self.queue_helper.add_log_cmd(
|
||||
f"CFDP Source: Sending Metadata PDU for file with size {metadata.file_size}"
|
||||
)
|
||||
(
|
||||
pdu_holder,
|
||||
packet,
|
||||
) = self.cfdp_in_ccsds_wrapper.pull_next_source_packet()
|
||||
fd_pdu = cast(FileDataPdu, pdu_holder.to_file_data_pdu())
|
||||
self.queue_helper.add_ccsds_tc(packet)
|
||||
self.cfdp_in_ccsds_wrapper.confirm_source_packet_sent()
|
||||
self.queue_helper.add_log_cmd("CFDP Source: Sending File Data PDU")
|
||||
self.queue_helper.add_log_cmd(
|
||||
f"CFDP Source: Sending File Data PDU for segment at offset {fd_pdu.offset} "
|
||||
f"with length {len(fd_pdu.file_data)}"
|
||||
)
|
||||
(
|
||||
pdu_holder,
|
||||
packet,
|
||||
) = self.cfdp_in_ccsds_wrapper.pull_next_source_packet()
|
||||
self.queue_helper.add_log_cmd("CFDP Source: Sending EOF PDU")
|
||||
self.queue_helper.add_log_cmd(
|
||||
f"CFDP Source: Sending EOF PDU"
|
||||
)
|
||||
self.queue_helper.add_ccsds_tc(packet)
|
||||
|
||||
self.cfdp_in_ccsds_wrapper.confirm_source_packet_sent()
|
||||
self.cfdp_in_ccsds_wrapper.handler.source_handler.state_machine()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user