Struct TriggerEvent#
Defined in File trigger_types.hpp
Struct Documentation#
-
struct TriggerEvent
A single timestamped event from any trigger source.
TriggerEvent is the common currency passed between trigger sources (KeyboardTrigger, SerialTrigger, ParallelPortTrigger), TriggerManager, and TriggerRecorder. It is also emitted by TriggerManager::event_received() so the UI or any downstream consumer can react in real time.
- CSV columns
TriggerRecorder writes one row per event.
elapsed_nsis the raw, unmodified value shared withtimestamps_camN.csv(both come from the same process-wide elapsed_ns() origin — see utils/timestamp.hpp);elapsed_msis recording-relative (zeroed at TriggerRecorder::start()) and is display-only, NOT safe to compare against timestamps_camN.csv:elapsed_ms,elapsed_ns,wall_clock,source,label,value 1523.004,1523004112000,14:32:06.645,keyboard,Event A,0 4910.331,4910331889000,14:32:09.032,parallel_port,D3_RISE,1
Public Members
-
int64_t timestampNs = 0
Monotonic nanosecond timestamp from elapsed_ns() at the moment the event was detected. Use this to align to
timestamps_camN.csv.
-
QString source
Where the event originated. One of:
"keyboard"— a KeyboardTrigger event filter."parallel_port"— a bit-edge on the LPT data register.
-
QString label
Human-readable event name.
Keyboard: the user-configured binding name, e.g.
"Event A".Parallel: bit and edge, e.g.
"D3_RISE"or"D3_FALL".
-
double value = 0.0
Optional numeric payload.
Keyboard / parallel rising edge:
1.0.Parallel falling edge:
0.0.
-
TriggerAction action = TriggerAction::Log
The action dispatched by this event. Set by TriggerManager when routing.