import sys import struct sys.path.insert(0, "/home/prathiyuman/Prathiyuman/ContecMonitor/fiveparaminte-main") from contec_parser import parse_contec_binary_packet with open("/home/prathiyuman/Prathiyuman/ContecMonitor/fiveparaminte-main/scratch/raw_contec_stream.bin", "rb") as f: stream = f.read() i = 0 pkts = [] while i < len(stream) - 8: if (stream[i + 2] == 0x04 or stream[i + 2] == 0x01) and stream[i + 3] == 0x46: pkt_len = struct.unpack_from(' Cache: {current}") last_printed = current