ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
udp_telemetry.h File Reference

One point in line protocol, cast to a collector as one UDP datagram (PROTOCORE_ENABLE_UDP_TELEMETRY). More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

One point in line protocol, cast to a collector as one UDP datagram (PROTOCORE_ENABLE_UDP_TELEMETRY).

The payload is line protocol, the text format InfluxData specifies for a point. That is a vendor specification, published as "Line protocol" in the InfluxData documentation (InfluxDB v2, reference/syntax/line-protocol; InfluxDB v1, write_protocols/line_protocol_reference). No IETF document governs it and it carries no RFC number.

The syntax that reference gives is

<measurement>[,<tag_key>=<tag_value>...] <field_key>=<field_value>[,...] [<timestamp>]

and it names four elements: measurement (required), tag set (optional), field set (required, at least one entry) and timestamp (optional, Unix nanoseconds by default). A field value carries its type in its suffix: i signed integer, u unsigned integer, no suffix float. Tag keys and tag values escape comma, equals and space with a backslash ("Special characters").

The transport is UDP, RFC 768. Its "User Interface" section names the send: "an operation that allows a datagram to be sent, specifying the data, source and destination ports and addresses to be sent". RFC 768 also states "delivery and duplicate protection are not guaranteed", so a write reports only that the stack took the octets: nothing is acknowledged and nothing is retried.

A line is built into a buffer the caller owns, one element per call, and this module holds the position in it. That buffer has to outlive the calls between a measurement and its write. Nothing here allocates. A build with no network stack builds lines and refuses every send.

The module exports one symbol, UdpTelemetry. Everything in udp_telemetry.c has internal linkage.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file udp_telemetry.h.