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)