From 0d596a5547392b9ab97b2ab8ab72e86bf5128fac Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 31 Oct 2022 19:32:42 +0100 Subject: [PATCH] basic code to dump TCs/TMs to bin --- tmtcc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmtcc.py b/tmtcc.py index 019b2e8..2b79db5 100755 --- a/tmtcc.py +++ b/tmtcc.py @@ -170,6 +170,8 @@ class PusHandler(SpecificApidHandlerBase): self.raw_logger = raw_logger def handle_tm(self, packet: bytes, _user_args: any): + # with open("tc.bin", "wb") as of: + # of.write(packet) pus_factory_hook(packet, self.verif_wrapper, self.printer, self.raw_logger) @@ -255,6 +257,8 @@ class TcHandler(TcHandlerBase): self.high_level_file_logger.info( f"{get_current_time_string(True)}: {tc_info_string}" ) + # with open("tc.bin", "wb") as of: + # of.write(raw_tc) send_params.com_if.send(raw_tc) elif entry_helper.entry_type == TcQueueEntryType.CCSDS_TC: cfdp_packet_in_ccsds = entry_helper.to_space_packet_entry()