|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Radio / wireless gateway bridge (DETWS_ENABLE_GATEWAY) - the v5 southbound-to- northbound bridge. More...
#include "ServerConfig.h"Go to the source code of this file.
Radio / wireless gateway bridge (DETWS_ENABLE_GATEWAY) - the v5 southbound-to- northbound bridge.
The generic gateway pattern that ties the hardware-ingest pipeline to the web stack. A southbound radio (LoRa / nRF24 / CC1101 / Zigbee / Z-Wave / ... reached over SPI / I2C / UART) is a port. When it receives a frame - the data-ready ISR reads it over DMA (services/dma), posts it onto the FORWARD lane (services/preempt_queue), and a per-radio codec extracts the source node address and payload - you call det_gw_uplink(). The gateway envelopes the frame (source address, port, RSSI, a sequence number) and publishes it northbound through the uplink callback, which you wire to MQTT / HTTP / WebSocket / UDP. A northbound command runs the other way through det_gw_downlink() to the port's transmit callback (the radio's SPI / UART write).
The radio transmit and the northbound publish are callbacks - the seam a real radio driver and a real protocol binding plug into - so the bridge is fully host- and device-testable with no radio hardware (the tests / example supply capturing callbacks and feed simulated frames). This is the northbound half; the DMA + FORWARD lane carry the bytes, and each radio's frame format is its own codec.
Per-port uplink rate cap (fail-closed), a routing-key helper (det_gw_topic() formats <prefix>/<port>/<addr>), and static tables (zero heap): DETWS_GW_MAX_PORTS ports.
Definition in file gateway.h.