Skip to content
Snippets Groups Projects
Commit 8bc1c2f5 authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-340: Ignore packets without timestamp, log reason why we stopped processing.

parent 16c8cfee
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,12 @@ class hdf5_writer: ...@@ -65,6 +65,12 @@ class hdf5_writer:
# grab the timestamp # grab the timestamp
statistics_timestamp = statistics_packet.timestamp() statistics_timestamp = statistics_packet.timestamp()
# ignore packets with no timestamp, as they indicate FPGA processing was disabled
# and are useless anyway.
if statistics_packet.block_serial_number == 0:
logger.warning(f"Received statistics with no timestamp. Packet dropped.")
return
# check if te statistics timestamp is unexpectedly older than the current one # check if te statistics timestamp is unexpectedly older than the current one
if statistics_timestamp < self.current_timestamp: if statistics_timestamp < self.current_timestamp:
logger.warning(f"Received statistics with earlier timestamp than is currently being processed ({statistics_timestamp}). Packet dropped.") logger.warning(f"Received statistics with earlier timestamp than is currently being processed ({statistics_timestamp}). Packet dropped.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment