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

Server-side NTRIP caster listener (DETWS_ENABLE_NTRIP_CASTER): the ConnProto::PROTO_NTRIP_CASTER handler that answers rover requests and streams RTCM to subscribers. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

Server-side NTRIP caster listener (DETWS_ENABLE_NTRIP_CASTER): the ConnProto::PROTO_NTRIP_CASTER handler that answers rover requests and streams RTCM to subscribers.

The pure codec (ntrip_caster.h) parses requests and builds responses / the source table; this file owns the connection state: it reads each rover's request off its socket, replies (stream-accept, source table, error, or 401), and then fans RTCM correction bytes out to every rover subscribed to a mountpoint. Layered exactly like services/relay - the app opens the listener, adds one or more mountpoints, then pushes RTCM as its survey/receiver produces it:

int32_t li = server.listen(2101, ConnProto::PROTO_NTRIP_CASTER); // 2101 = the IANA NTRIP port
NtripMount m = {};
m.mountpoint = "BASE1";
m.identifier = "Lab roof";
m.format_details = "1005(1)";
m.lat_deg = 37.77; m.lon_deg = -122.42;
det_ntrip_caster_add_mount((uint8_t)li, &m, nullptr); // null = open (no auth)
...
uint8_t frame[64];
size_t n = rtcm3_build_1005(frame, sizeof(frame), 2003, x01mm, y01mm, z01mm);
det_ntrip_caster_broadcast("BASE1", frame, n); // -> every subscribed rover
@ PROTO_NTRIP_CASTER
NTRIP caster (DETWS_ENABLE_NTRIP_CASTER): serves RTCM3 corrections to rovers.

The NtripMount's string fields must remain valid for the caster's lifetime (they are referenced, not copied - configure them from static storage). Only the mountpoint name and optional credentials are copied internally.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file ntrip_caster_listener.h.