From 10cca44fbe2aef1f2feb3cd190a37b266a6a7c9d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Oct 2022 15:21:56 +0200 Subject: [PATCH] add TODO --- tmtcc.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tmtcc.py b/tmtcc.py index 5531c4c..3167a0e 100755 --- a/tmtcc.py +++ b/tmtcc.py @@ -97,7 +97,6 @@ from pus_tc.procedure_packer import handle_default_procedure LOGGER = get_console_logger() - # Put rotating file logger parameters here for quick changes ROTATING_TIMED_LOGGER_INTERVAL_WHEN = TimedLogWhen.PER_MINUTE ROTATING_TIMED_LOGGER_INTERVAL = 30 @@ -226,6 +225,7 @@ class TcHandler(TcHandlerBase): pus_verificator=pus_verificator, ) self.cfdp_in_ccsds_wrapper = cfdp_in_ccsds_wrapper + # self.cfdp_counter = 0 def cfdp_done(self) -> bool: return not self.cfdp_in_ccsds_wrapper.handler.put_request_pending() @@ -259,6 +259,13 @@ class TcHandler(TcHandlerBase): elif entry_helper.entry_type == TcQueueEntryType.CCSDS_TC: cfdp_packet_in_ccsds = entry_helper.to_space_packet_entry() send_params.com_if.send(cfdp_packet_in_ccsds.space_packet.pack()) + # TODO: Log raw CFDP packets similarly to how PUS packets are logged. + # - Log full raw format including space packet wrapper + # - Log context information: Transaction ID, and PDU type and directive + # print(f"sending packet: [{cfdp_packet_in_ccsds.space_packet.pack()}]") + # with open(f"cfdp_packet_{self.cfdp_counter}", "wb") as of: + # of.write(cfdp_packet_in_ccsds.space_packet.pack()) + # self.cfdp_counter += 1 elif entry_helper.entry_type == TcQueueEntryType.LOG: log_entry = entry_helper.to_log_entry() LOGGER.info(log_entry.log_str)