Implementation-owned framing and optional electronics response for one crate.
More...
GEMC creates one instance per crate per run invocation. All callbacks execute serially on that crate's thread. State may span frame boundaries; overlap processing must not reset at every frame boundary. No mutable digitizer or worker state may be accessed here. The output sink outlives this instance.
The collector accepts out-of-order deliveries, but calls consume_payload in ascending order of (time, event_id, sequence), releasing only records strictly before a proven safe input boundary. advance_time follows consumption of all records before that boundary. Equal-time records remain pending until a later boundary, keeping their ordering deterministic.
At orderly shutdown, including interruption, the collector consumes all remaining submitted records in order before finish_run. Missing events can leave these records beyond the last safe input boundary. Only advance_time and finish_run authorize frame emission; consume_payload alone does not establish completeness. finish_run decides what to do with incomplete frames using the end context. GEMC imposes no frame duration or acquisition cutoff. Output readiness may lag input progress when electronics retain unresolved signals.
On orderly shutdown, GEMC calls finish_run once, then output.finish_output once. No callbacks follow. Callback exceptions propagate to the service, which stops dispatch and wakes blocked producers. Successful finalization is not guaranteed after an exception; destructors still release resources.
Definition at line 78 of file gSROPlugin.h.