CNC RS-232 DNC (Distributed Numerical Control) drip-feed codec (PROTOCORE_ENABLE_DNC). More...
#include "protocore_config.h"Go to the source code of this file.
CNC RS-232 DNC (Distributed Numerical Control) drip-feed codec (PROTOCORE_ENABLE_DNC).
DNC is the classic way a program is streamed to a machine-tool controller: a G-code program (RS-274 / ISO 6983) is punched as blocks (one line each), framed with a % rewind-stop at the start and end, and drip-fed over an RS-232 link with XON/XOFF software flow control so the sender pauses when the controller's small input buffer fills. This codec is the transport-agnostic framing + tape-code layer only - the same bytes ride RS-232, a raw TCP socket, or a WebSocket. The app owns the wire.
Two tape codes are supported (the historical split every DNC package still carries):
Three pieces, all pure and zero-heap:
Definition in file dnc.h.