45#ifndef PROTOCORE_SAFETY_SCL_H
46#define PROTOCORE_SAFETY_SCL_H
50#if PROTOCORE_ENABLE_SAFETY_SCL
58 SCL_STATE_RUNNING = 1,
59 SCL_STATE_FAILSAFE = 2,
65 SCL_FAULT_PROTOCORE_NONE = 0,
66 SCL_FAULT_SIGNATURE = 1,
67 SCL_FAULT_COUNTER = 2,
68 SCL_FAULT_TIMEOUT = 3,
97void protocore_scl_init(SclConn *c, uint32_t first_counter, uint32_t counter_mod, uint32_t watchdog_ms, uint32_t now);
117proto_bool protocore_scl_on_frame(SclConn *c,
proto_bool signature_ok, uint32_t counter, uint32_t now);
128proto_bool protocore_scl_poll(SclConn *c, uint32_t now);
136void protocore_scl_reset(SclConn *c, uint32_t first_counter, uint32_t now);
142SclState protocore_scl_state(
const SclConn *c);
145SclFault protocore_scl_fault(
const SclConn *c);
155uint32_t protocore_scl_next_counter(uint32_t counter, uint32_t counter_mod);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS