mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-29 23:22:23 +02:00
Allow for resync to happen also if frames are missing
This commit is contained in:
@@ -50,11 +50,16 @@ void sf_replay (
|
||||
|
||||
auto start_time = chrono::steady_clock::now();
|
||||
|
||||
file_reader.get_frame(
|
||||
auto is_frame_present = file_reader.get_frame(
|
||||
curr_pulse_id,
|
||||
&(metadata_buffer.module_frame),
|
||||
(char*)(frame_buffer.get()));
|
||||
|
||||
if (!is_frame_present) {
|
||||
// TODO: Improve signaling to sf_writer about missing frame.
|
||||
metadata_buffer.module_frame.pulse_id = curr_pulse_id;
|
||||
}
|
||||
|
||||
auto end_time = chrono::steady_clock::now();
|
||||
auto read_us_duration = chrono::duration_cast<chrono::microseconds>(
|
||||
end_time-start_time).count();
|
||||
|
||||
Reference in New Issue
Block a user