|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Shared CAN 2.0 frame type for the CAN-based industrial codecs (one source of truth). More...
#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | CanFrame |
Macros | |
| #define | DET_CAN_MAX_DLC 8 |
| classic CAN carries at most 8 data octets. | |
| #define | DET_CAN_STD_ID_MASK 0x7FFu |
| 11-bit standard identifier. | |
| #define | DET_CAN_EXT_ID_MASK 0x1FFFFFFFu |
| 29-bit extended identifier. | |
Shared CAN 2.0 frame type for the CAN-based industrial codecs (one source of truth).
CANopen, J1939, DeviceNet, and NMEA 2000 all ride classic CAN frames (an 11-bit or 29-bit identifier plus up to 8 data octets). They share this one frame struct so the frame shape lives in a single place; each codec only builds and parses the id + data, never the wire bus itself.
The physical CAN controller is the application's: the ESP32's built-in TWAI peripheral with a transceiver (e.g. SN65HVD230), or an external MCP2515 over SPI. The app hands a received CanFrame to a codec's parser, or transmits a CanFrame a builder filled in. That keeps these codecs pure and host-testable, exactly like the serial / TCP codecs.
Header-only, not feature-gated: each CAN codec includes it behind its own DETWS_ENABLE_* guard.
Definition in file can.h.
| #define DET_CAN_MAX_DLC 8 |