Skip to main content

PubMonitorCell

Struct PubMonitorCell 

Source
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: AtomicU32

W3b.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: AtomicU32

Age 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.

Implementations§

Source§

impl PubMonitorCell

Source

pub const fn new() -> Self

Trait Implementations§

Source§

impl Debug for PubMonitorCell

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PubMonitorCell

Source§

fn default() -> PubMonitorCell

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.