optris::sdk::ActionCompleted
An action that has done its work, whatever that turned out to be.
Delivered on the SDK's alarm action thread, the same one ActionError arrives on, and under the same rule: an action's fate never propagates into frame processing and never changes the alarm state. The alarm is a fact about the world, not about the disk.
Reaches every source that runs actions -- a camera, a Player and a StillSource -- because a snapshot an alarm saves out of a recording is as much a file on disk as one saved from a live camera.
Public attributes
rule_id
uint64_t rule_id = 0
the rule whose action this was
action_index
size_t action_index = 0
which of its actions, in order
outcome
ActionOutcome outcome = ActionOutcome::kUnknown
What happened. Never ActionOutcome::kUnknown on an event the SDK delivered: that value means the struct was never filled in.
path
std::string path
The file that was written, for ActionOutcome::kWritten, and empty for every other outcome -- see each enumerator for why.
timestamp_us
uint64_t timestamp_us = 0
The causing AlarmEvent's timestamp_us, carried through unchanged.
Monotonic and comparable only against other events of the same rule, exactly as AlarmEvent::timestamp_us is -- read that field's documentation before doing arithmetic on this one. It is here so that an outcome arriving some time after its activation can still be placed against it.
sequence
uint64_t sequence = 0
The causing AlarmEvent's sequence, carried through unchanged.
This is the field to correlate on, and it is why a timestamp alone was not enough. An application showing a line per activation in an alarm history has the event's sequence already; matching this against it is exact, where matching on a rule id and a nearby time is a guess that a chattering alarm gets wrong.