From 2a2f5c4d58c5146479e52359943c0c9b5bd15548 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 20 Jul 2020 19:39:19 +0800 Subject: [PATCH] comm_analyzer: make header error flag more general --- artiq/coredevice/comm_analyzer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/coredevice/comm_analyzer.py b/artiq/coredevice/comm_analyzer.py index 45766f340..dd58acb68 100644 --- a/artiq/coredevice/comm_analyzer.py +++ b/artiq/coredevice/comm_analyzer.py @@ -92,16 +92,16 @@ DecodedDump = namedtuple( def decode_dump(data): parts = struct.unpack(">IQbbb", data[:15]) (sent_bytes, total_byte_count, - overflow_occured, log_channel, dds_onehot_sel) = parts + error_occured, log_channel, dds_onehot_sel) = parts expected_len = sent_bytes + 15 if expected_len != len(data): raise ValueError("analyzer dump has incorrect length " "(got {}, expected {})".format( len(data), expected_len)) - if overflow_occured: - logger.warning("analyzer FIFO overflow occured, " - "some messages have been lost") + if error_occured: + logger.warning("error occured within the analyzer, " + "data may be corrupted") if total_byte_count > sent_bytes: logger.info("analyzer ring buffer has wrapped %d times", total_byte_count//sent_bytes)