|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
FANUC FOCAS Ethernet protocol codec (DETWS_ENABLE_FOCAS) - zero-heap request builders + response parsers for FANUC CNCs over TCP 8193 (the machine-tool data protocol). More...
#include "ServerConfig.h"Go to the source code of this file.
FANUC FOCAS Ethernet protocol codec (DETWS_ENABLE_FOCAS) - zero-heap request builders + response parsers for FANUC CNCs over TCP 8193 (the machine-tool data protocol).
FOCAS ("FANUC Open CNC API Specification") is normally a proprietary PC library (fwlib32); this is a pure codec for its Ethernet wire protocol. Every multi-octet field is BIG-endian. A frame is a 10-octet envelope + a payload:
The session is: open (payload = FRAME_DST 0x0002) -> one or more commands -> close. A command request payload is a 6-octet selector + five signed 32-bit arguments + optional extra data:
A command response payload echoes the 6-octet selector, then a 6-octet status (a signed-short FOCAS return code in its first two octets, 0 = EW_OK), then a u16 data length, then the data.
Frame layout, selector encoding, the open/close handshake, the SysInfo (ODBSYS) and alarm (>L) response layouts, and the 8-octet value encoding (data / base^exp) were reverse- engineered by and cross-checked against diohpix/pyfanuc. Function selectors are the verbatim set documented there. Pure codec, host-tested - the caller owns the TCP connection (det_client_*) and drives the open -> command -> close sequence.
Definition in file focas.h.