Skip to main content

TelemetryComponent

Struct TelemetryComponent 

Source
pub struct TelemetryComponent { /* private fields */ }
Expand description

TelemetryComponent — production-ready CCM-Component.

Implementations§

Source§

impl TelemetryComponent

Source

pub fn new(name: &str) -> Self

Konstruktor mit Component-Name (wird als Label-Prefix verwendet).

Source

pub fn record_custom(&mut self, label: String)

Records einen Custom-Event. Caller-Layer (z.B. Component-Logic) ruft das auf, um App-spezifische Telemetrie zu emittieren.

Source

pub fn events(&self) -> &[TelemetryEvent]

Liste aller bisher emittierten Events (in Reihenfolge).

Source

pub fn count_of(&self, kind: TelemetryKind) -> usize

Anzahl Events einer bestimmten Kind.

Source

pub fn last_event(&self) -> Option<&TelemetryEvent>

Letzte Event (None wenn leer).

Source

pub fn drain(&mut self) -> Vec<TelemetryEvent>

Drain — leere die Event-Queue und gib sie zurueck. Nuetzlich wenn die DDS-Runtime den Buffer ausliest.

Source

pub fn is_active(&self) -> bool

Liefert true wenn aktiviert.

Source

pub fn name(&self) -> &str

Component-Name.

Trait Implementations§

Source§

impl ComponentExecutor for TelemetryComponent

Source§

fn set_context(&mut self, context: Box<dyn ComponentContext>)

set_session_context / set_service_context etc. — der Container injiziert den Context vor dem ersten Method-Call (Spec §8.1.5).
Source§

fn ccm_activate(&mut self) -> Result<(), CifError>

ccm_activate — Spec §8.1.5.4.
Source§

fn ccm_passivate(&mut self) -> Result<(), CifError>

ccm_passivate — Spec §8.1.5.5.
Source§

fn ccm_remove(&mut self) -> Result<(), CifError>

ccm_remove — Spec §8.1.5.6.
Source§

impl Debug for TelemetryComponent

Source§

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

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

impl Default for TelemetryComponent

Source§

fn default() -> Self

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.