pub struct PubMonitorCell {
pub count: AtomicU32,
pub max_latency_us: AtomicU32,
pub last_publish_stamp_age_us: AtomicU32,
}Expand description
One contracted publisher’s counters. Baked as a static by codegen
(or declared by the fixture); the publisher handle bumps count on
every publish, the executor reads deltas on spin ticks.
Fields§
§count: AtomicU32§max_latency_us: AtomicU32W3b.5 — max observed take→publish latency (µs) in the current check window. Written by the dispatch loop (fetch_max), drained (swap 0) by the latency check.
last_publish_stamp_age_us: AtomicU32Age of the stamp this publisher last put ON THE WIRE, in
microseconds: epoch_now - outgoing header.stamp.
Distinct from max_latency_us, which times this node’s own
take→publish work. This says how old the DATA is that the node just
published, which is the quantity a chain is made of.
It exists to answer a question max-age-runtime cannot. That rule
measures epoch_now - stamp on the TAKE path, so if every node in a
chain propagates the original stamp – the usual ROS convention, each
node copying its input’s stamp to its output – the age at the final
consumer already IS the end-to-end latency. If any node re-stamps
with now, the clock silently resets and the same number becomes
single-hop age instead. Same units, same magnitude, no warning.
A publish age near zero on a node that consumes input is the signature of re-stamping. Recording it here is what lets a chain’s provenance be checked at all, rather than assumed.
0 = never observed, matching the other cells: the type has no
STAMP_OFFSET, or no epoch source is installed.