send wrapped CFDP packets and clean up printout

This commit is contained in:
Robin Müller 2022-09-13 13:54:47 +02:00
parent a3d1808457
commit 6ee3fa67dc
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -22,11 +22,10 @@ from tmtccmd.cfdp import (
IndicationCfg,
TransactionId,
)
from spacepackets.util import UnsignedByteField
from tmtccmd.cfdp.defs import CfdpRequestType, CfdpStates
from tmtccmd.cfdp.handler import SourceHandler, DestHandler
from tmtccmd.cfdp.mib import DefaultFaultHandlerBase
from tmtccmd.cfdp.request import PutRequest, PutRequestCfg
from tmtccmd.cfdp.request import PutRequest
from tmtccmd.cfdp.user import (
FileSegmentRecvdParams,
MetadataRecvParams,
@ -432,25 +431,26 @@ class TcHandler(TcHandlerBase):
pdu_holder,
packet,
) = self.cfdp_in_ccsds_wrapper.pull_next_source_packet()
print(pdu_holder)
# print(pdu_holder)
self.cfdp_in_ccsds_wrapper.confirm_source_packet_sent()
self.queue_helper.add_ccsds_tc(packet)
self.queue_helper.add_log_cmd("CFDP Source: Sending Metadata PDU")
(
pdu_holder,
packet,
) = self.cfdp_in_ccsds_wrapper.pull_next_source_packet()
print(pdu_holder)
# print(pdu_holder)
self.cfdp_in_ccsds_wrapper.confirm_source_packet_sent()
self.queue_helper.add_ccsds_tc(packet)
# for sp in self.cfdp_in_ccsds_wrapper:
# print(sp)
# self.queue_helper.add_ccsds_tc(sp)
pass
self.queue_helper.add_log_cmd("CFDP Source: Sending File Data PDU")
def send_cb(self, params: SendCbParams):
if params.entry.is_tc:
if params.entry.entry_type == TcQueueEntryType.PUS_TC:
self.handle_tc_send_cb(params)
elif params.entry.entry_type == TcQueueEntryType.CCSDS_TC:
cfdp_packet_in_ccsds = params.entry.to_space_packet_entry()
params.com_if.send(cfdp_packet_in_ccsds.space_packet.pack())
elif params.entry.entry_type == TcQueueEntryType.LOG:
log_entry = params.entry.to_log_entry()
LOGGER.info(log_entry.log_str)