163 const uint16_t *control, uint16_t *state,
The safety heartbeat: the panel's signal that it is running, and the IOmcu's judgement of whether to ...
The IOmcu's half of the link: answer polls, and fail safe when they stop.
safety_gate_t safety_gate_step(heartbeat_mon_t *beat, bool line_edge, link_dev_t *dev, uint16_t *control, uint32_t now_ms)
One pass of the main loop, after the link has been served.
Definition safety_gate.c:24
bool safety_gate_line_trusted(uint16_t faults)
The panel's reading of a STATUS fault bitmap: whether the far end trusts the heartbeat.
Definition safety_gate.c:126
uint8_t safety_gate_control_write(uint16_t *control, uint8_t off, uint8_t n, const uint16_t *in, const heartbeat_mon_t *beat, link_dev_t *dev)
A write to the CONTROL page: link_control_write() with this end's answer to whether the bench may arm...
Definition safety_gate.c:68
void safety_gate_status(const heartbeat_mon_t *beat, const link_dev_t *dev, const uint16_t *control, uint16_t *state, uint16_t *faults)
The STATUS page's state register and the two fault bits this decision owns (LINK_FAULT_LINK_SILENT,...
Definition safety_gate.c:99
bool safety_gate_may_arm(const heartbeat_mon_t *beat, const link_dev_t *dev)
Whether a write of ARM is taken: heartbeat trusted, link out of failsafe, latch clear.
Definition safety_gate.c:14
bool safety_gate_supply_ok(const heartbeat_mon_t *beat, const link_dev_t *dev)
Whether the supply's output may be on: heartbeat trusted and link out of failsafe.
Definition safety_gate.c:19
bool safety_gate_arm_now(bool gate_arm, uint16_t quiet_mask, bool update_holds)
Whether the bank is armed for this pass: the pass's decision (safety_gate_t.arm, gate_arm) and two ho...
Definition safety_gate.c:62
Definition heartbeat.h:118
The IOmcu's end of the link: pages, the silence watchdog and the arm latch.
Definition link_dev.h:56
What a pass decided.
Definition safety_gate.h:38
bool off
The heartbeat stopped being trusted or the link went silent in this pass: the outputs come down now.
Definition safety_gate.h:45
uint16_t roles
The roles armed for this pass, LINK_ARM_ROLES bits: link_arm_roles() of ARM while arm is true,...
Definition safety_gate.h:54
bool arm
Whether the bank is armed for this pass.
Definition safety_gate.h:47