OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C API referencev12.0

optris_sdk_pif_fail_safe_status

The fail-safe line's health, with the numbers behind it.

Read this rather than optris_sdk_io_snapshot_get_fail_safe_level(): that reports the instantaneous level of a line whose whole job is to alternate, so it flickers between High and Low on a perfectly healthy system and is not a health indicator.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_pif_fail_safe_status).

health

optris_sdk_pif_fail_safe_health health

One of the optris_sdk_pif_fail_safe_health values.

since_last_edge_ms

uint32_t since_last_edge_ms

Milliseconds since the last edge was driven. Zero when nothing has been driven yet.

longest_gap_ms

uint32_t longest_gap_ms

The longest interval between edges observed since the fail-safe was armed, including the gap still open now. A line that was late an hour ago looks healthy the moment you ask; this is what a support report needs.

edge_budget_ms

uint32_t edge_budget_ms

The interval the two above are judged against: half the interface's relay hold, because the relay is retriggered once per cycle.

was_ever_late

uint8_t was_ever_late

Non-zero if the line has ever been late since it was armed, whatever it is doing now.

reserved0

uint8_t reserved0[3]

Reserved; always zero. Named so the struct has no implicit padding.

edges

uint64_t edges

Edges driven since the fail-safe was armed.

detail

char detail[OPTRIS_SDK_MAX_MESSAGE]

The same answer in words, naming the numbers behind it, for a log line or a support report. Never empty.