45#ifndef PROTOCORE_SAFETY_SCL_H
46#define PROTOCORE_SAFETY_SCL_H
50#if PROTOCORE_ENABLE_SAFETY_SCL
57 SCL_STATE_RUNNING = 1,
58 SCL_STATE_FAILSAFE = 2,
63 SCL_FAULT_PROTOCORE_NONE = 0,
64 SCL_FAULT_SIGNATURE = 1,
65 SCL_FAULT_COUNTER = 2,
66 SCL_FAULT_TIMEOUT = 3,
95void protocore_scl_init(SclConn *c, uint32_t first_counter, uint32_t counter_mod, uint32_t watchdog_ms, uint32_t now);
115embed_bool protocore_scl_on_frame(SclConn *c, embed_bool signature_ok, uint32_t counter, uint32_t now);
126embed_bool protocore_scl_poll(SclConn *c, uint32_t now);
134void protocore_scl_reset(SclConn *c, uint32_t first_counter, uint32_t now);
137embed_bool protocore_scl_ok(
const SclConn *c);
140SclState protocore_scl_state(
const SclConn *c);
143SclFault protocore_scl_fault(
const SclConn *c);
153uint32_t protocore_scl_next_counter(uint32_t counter, uint32_t counter_mod);
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.