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

DNP3 (IEEE 1815) data-link frame codec (DETWS_ENABLE_DNP3) - zero-heap builder + CRC-validating parser for the SCADA / utility outstation link layer. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

DNP3 (IEEE 1815) data-link frame codec (DETWS_ENABLE_DNP3) - zero-heap builder + CRC-validating parser for the SCADA / utility outstation link layer.

A DNP3 data-link frame:

0x05 0x64 LEN CTRL DEST(2,LE) SRC(2,LE) CRC(2) // 10-octet header block
[<=16 user-data octets][CRC(2)] ... // data blocks, each CRC'd
  • LEN counts CTRL + DEST + SRC + user data (the start word, LEN itself, and the CRCs are excluded), so LEN = 5 + user_data_len; min 5, max 255 (<= 250 user-data octets).
  • Addresses are little-endian (LSB first). User data is carried in blocks of up to 16 octets, each followed by its own CRC; the header is its own CRC'd block.
  • CRC is CRC-16/DNP (poly 0x3D65, init 0x0000, reflected in/out, final XOR 0xFFFF), transmitted low octet first.

This is the data-link layer (framing + CRC). The transport-function reassembly and the application layer (objects / function codes) are layered on the de-blocked user data.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file dnp3.h.