DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
df1.h File Reference

Allen-Bradley DF1 full-duplex frame codec (DETWS_ENABLE_DF1) - zero-heap framing + DLE byte-stuffing + BCC/CRC for the Rockwell serial PLC link layer. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

Allen-Bradley DF1 full-duplex frame codec (DETWS_ENABLE_DF1) - zero-heap framing + DLE byte-stuffing + BCC/CRC for the Rockwell serial PLC link layer.

A DF1 full-duplex message frame (AB pub. 1770-6.5.16):

DLE STX <application data, DLE bytes doubled> DLE ETX BCC | CRC
  • A data byte equal to DLE (0x10) is transmitted twice (DLE DLE); the doubled DLE is counted only once in the BCC/CRC.
  • BCC: the 2's complement of the modulo-256 sum of the application data bytes (the ETX is NOT included). One octet.
  • CRC: CRC-16 (poly X16+X15+X2+X0 = 0x8005, init 0x0000, reflected) over the application data bytes AND the ETX byte; two octets, transmitted low byte first.

This is the data-link framing layer; the DST/SRC/CMD/STS/TNS application header lives inside the application data. Field definitions verified against the 1770-6.5.16 manual.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file df1.h.