pub struct LogicalMeterHandle { /* private fields */ }Expand description
This provides an interface stream high-level metrics from a microgrid.
Implementations§
Source§impl LogicalMeterHandle
impl LogicalMeterHandle
Sourcepub async fn try_new(
client: MicrogridClientHandle,
config: LogicalMeterConfig,
) -> Result<Self, Error>
pub async fn try_new( client: MicrogridClientHandle, config: LogicalMeterConfig, ) -> Result<Self, Error>
Creates a new LogicalMeter instance.
Sourcepub fn grid<M: Metric>(
&mut self,
metric: M,
) -> Result<Formula<M::QuantityType>, Error>
pub fn grid<M: Metric>( &mut self, metric: M, ) -> Result<Formula<M::QuantityType>, Error>
Returns a receiver that streams samples for the given metric at the grid
connection point.
Sourcepub fn battery<M: Metric>(
&mut self,
component_ids: Option<BTreeSet<u64>>,
metric: M,
) -> Result<Formula<M::QuantityType>, Error>
pub fn battery<M: Metric>( &mut self, component_ids: Option<BTreeSet<u64>>, metric: M, ) -> Result<Formula<M::QuantityType>, Error>
Returns a receiver that streams samples for the given metric for the
given battery IDs.
When component_ids is None, all batteries in the microgrid are used.
Sourcepub fn chp<M: Metric>(
&mut self,
component_ids: Option<BTreeSet<u64>>,
metric: M,
) -> Result<Formula<M::QuantityType>, Error>
pub fn chp<M: Metric>( &mut self, component_ids: Option<BTreeSet<u64>>, metric: M, ) -> Result<Formula<M::QuantityType>, Error>
Returns a receiver that streams samples for the given metric for the
given CHP IDs.
When component_ids is None, all CHPs in the microgrid are used.
Sourcepub fn pv<M: Metric>(
&mut self,
component_ids: Option<BTreeSet<u64>>,
metric: M,
) -> Result<Formula<M::QuantityType>, Error>
pub fn pv<M: Metric>( &mut self, component_ids: Option<BTreeSet<u64>>, metric: M, ) -> Result<Formula<M::QuantityType>, Error>
Returns a receiver that streams samples for the given metric for the
given PV IDs.
When component_ids is None, all PVs in the microgrid are used.
Sourcepub fn ev_charger<M: Metric>(
&mut self,
component_ids: Option<BTreeSet<u64>>,
metric: M,
) -> Result<Formula<M::QuantityType>, Error>
pub fn ev_charger<M: Metric>( &mut self, component_ids: Option<BTreeSet<u64>>, metric: M, ) -> Result<Formula<M::QuantityType>, Error>
Returns a receiver that streams samples for the given metric for the
given EV charger IDs.
When component_ids is None, all EV chargers in the microgrid are
used.
Sourcepub fn consumer<M: Metric>(
&mut self,
metric: M,
) -> Result<Formula<M::QuantityType>, Error>
pub fn consumer<M: Metric>( &mut self, metric: M, ) -> Result<Formula<M::QuantityType>, Error>
Returns a receiver that streams samples for the given metric for the
logical consumer in the microgrid.
Trait Implementations§
Source§impl Clone for LogicalMeterHandle
impl Clone for LogicalMeterHandle
Source§fn clone(&self) -> LogicalMeterHandle
fn clone(&self) -> LogicalMeterHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for LogicalMeterHandle
impl RefUnwindSafe for LogicalMeterHandle
impl Send for LogicalMeterHandle
impl Sync for LogicalMeterHandle
impl Unpin for LogicalMeterHandle
impl UnwindSafe for LogicalMeterHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request