Skip to main content

PowerReadback

Struct PowerReadback 

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

One commissioned MMXU total active power mapping. Configure distinct mappings for independently monitored sources. A new mapping starts without a sample.

Implementations§

Source§

impl PowerReadback

Source

pub fn new( domain: &str, logical_node: &str, source: MeasurementSource, peer: Ski, unit: UnitId, max_age: Duration, ) -> Result<Self, InvalidMeasurementMapping>

Bind MMXU TotW at a logical device and node to an authenticated SHIP identity and the exact SPINE device/entity discovered on that association. Call Self::commission after the actor resolves its measurement descriptions.

Source

pub fn commission( &mut self, peer: &Ski, engine: &Engine, actor: &MonitoringApplianceActor, ) -> Result<(), InvalidMeasurementMapping>

Verify the authenticated session’s advertised use case, exact entity, actor-resolved total-power ID, and original SPINE measurement description in watts. Run this after the initial description exchange and whenever the peer changes its discovery or descriptions. Recommissioning this peer discards the current sample.

Source

pub fn observe( &mut self, source: MeasurementSource, peer: &Ski, event: &MonitoringEvent, utc: Duration, now: Duration, )

Feed an event with the use case and authenticated SHIP identity supplied by its connection. Supply synchronized UTC since the Unix epoch at reception and a monotonic reading from the clock used for MMS reads. Only absolute timestamps with a known offset can establish freshness across merged notifications.

Source

pub fn disconnect(&mut self)

Mark a lost or detached connection unavailable immediately. Reattach the actor and call Self::commission before admitting newer values.

Source

pub fn answer_read( &self, request: &ConfirmedRequest<'_>, now: Duration, ) -> Answer

Serve direct named reads of TotW$mag$f (signed watts), TotW$q and TotW$t. Missing or expired watts return MMS temporarily-unavailable. Encode the returned answer with the association’s original invoke ID.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.