ActionError
class optris_sdk.alarms.ActionError
An alarm action that failed, and why.
The failure ending, where ActionCompleted carries the
three that are not failures. Both halves existed in the C ABI and
neither reached Python, so an action that failed was as silent as
one that succeeded.
- Attribute
rule_id— whose action this was. - Attribute
action_index— its position in that rule's action list, so a rule with several actions says which one failed. - Attribute
path— the file it was trying to write, or''. - Attribute
message— what went wrong, for a log line or an operator. - Attribute
sequence— the causing alarm event's sequence, carried through unchanged. Correlate on this, as onActionCompleted.sequence: a failed still has no file, so neither the path nor the rule and a nearby time can say which activation failed.
ActionError — methods
blank(cls)
The SDK's own defaulted record, for a test.
These arrive from a callback, so until now there was no way to
build one -- and an application cannot test its own
on_action_error handler without a record to hand it.
Built through optris_sdk_action_error_init() rather than
from Python zeros, for the reason _buffers.initialised
gives: the neutral value of each field is the SDK's to define,
and a field that starts defaulting to something other than
zero would make a hand-written default wrong in silence.
Assign over whatever your test needs to be different.