some changes for CFDP done logic

This commit is contained in:
Robin Müller 2022-10-17 12:26:00 +02:00
parent 73ba9f5d90
commit 34203461fa
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -158,6 +158,7 @@ class CfdpInCcsdsWrapper(SpecificApidHandlerBase):
sp_header = SpacePacketHeader.unpack(ccsds_header_raw)
pdu = packet[6:]
sp = SpacePacket(sp_header, sec_header=None, user_data=pdu)
print(f"Received TM: {packet.hex(sep=',')}")
self.handler.pass_packet(sp)
@ -204,9 +205,11 @@ class TcHandler(TcHandlerBase):
seq_cnt_provider=seq_count_provider,
pus_verificator=pus_verificator,
)
self.cfdp_done = False
self.cfdp_in_ccsds_wrapper = cfdp_in_ccsds_wrapper
def cfdp_done(self) -> bool:
return not self.cfdp_in_ccsds_wrapper.handler.put_request_pending()
def feed_cb(self, info: ProcedureWrapper, wrapper: FeedWrapper):
self.queue_helper.queue_wrapper = wrapper.queue_wrapper
if info.proc_type == TcProcedureType.DEFAULT:
@ -313,7 +316,7 @@ class TcHandler(TcHandlerBase):
)
elif info.proc_type == TcProcedureType.CFDP:
LOGGER.info(f"Finished CFDP queue")
self.cfdp_done = True
self.cfdp_sending_done = True
def setup_params(hook_obj: TmTcCfgHookBase) -> SetupWrapper: