pub struct DiagSink {
pub published: u32,
pub failed: u32,
/* private fields */
}Expand description
One executor’s /diagnostics reporter: the publisher and two counters.
No rate-limit state: the rules are windowed and fire on transitions, so the
reporter is built per call with no interval (and this struct’s size, which
nros-build-helpers adds to CPP_EXECUTOR_OPAQUE_U64S, stays the
publisher plus two words).
Fields§
§published: u32Reports published.
failed: u32Reports that could not be (serialise or publish failed).
Implementations§
Source§impl DiagSink
impl DiagSink
Sourcepub fn create(
executor: &mut Executor<'_>,
domain_id: u32,
) -> Result<Self, NodeError>
pub fn create( executor: &mut Executor<'_>, domain_id: u32, ) -> Result<Self, NodeError>
Create the /diagnostics publisher on executor’s PRIMARY node, in
domain_id (the executor’s own for a Rust entry; the C++ context
keeps its domain beside the executor).
An executor-level entity, so it is announced under the primary node
(Executor::create_executor_publisher), as a stock ROS 2 node publishes its own diagnostics. It used to be a
session publisher with no node, filed under the session’s own name.