|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
IO-Link (SDCI, IEC 61131-9) data-link message codec (DETWS_ENABLE_IOLINK). More...
#include "ServerConfig.h"Go to the source code of this file.
IO-Link (SDCI, IEC 61131-9) data-link message codec (DETWS_ENABLE_IOLINK).
IO-Link is the point-to-point 3-wire serial link to smart sensors / actuators. This codec implements the data-link message layer: the M-sequence Control octet (MC), the checksum / M-sequence-type octet (CKT) of a master message, the checksum / status octet (CKS) of a device reply, and the SDCI message checksum that protects both directions.
The checksum is the part everyone gets wrong, so it is implemented straight from the spec (IO-Link Interface and System Specification v1.1.4, Annex A.1.6): a 0x52 seed XORed octet by octet across the message (the check octet included with its checksum bits 0), then the 8-to-6-bit compression of equation (A.1). iol_finalize writes it into the check octet and iol_verify checks it.
Scope: the message / DL layer. The per-type M-sequence octet layout (process + on-request data widths) is the device's profile, and the ISDU on-request service framing layers on top; lay those octets out per your device, then finalize / verify with this codec. The wire is a UART at 4.8 / 38.4 / 230.4 kbit/s through an IO-Link transceiver (e.g. MAX14819 / L6360); pure and host-tested.
Definition in file iolink.h.