pub enum OperationalMode {
Unspecified,
Inactive,
TelemetryOnly,
ControlOnly,
ControlAndTelemetry,
}Expand description
The operational mode of a component.
Mirrors the ElectricalComponentOperationalMode enum in the microgrid API.
It indicates whether a component is active and operational, and whether it
provides telemetry data, accepts control commands, or both.
A component that does not provide telemetry (see Self::provides_telemetry)
cannot be a measurement source in a formula, but it can still be used to
classify the meter that measures it (e.g. as a PV meter or a CHP meter).
Variants§
Unspecified
The operational mode is not explicitly set.
Treated as if the component provides telemetry. A component with an unknown mode stays usable as a measurement source in formulas.
Inactive
The component is inactive and not operational. It does not provide telemetry data, and it does not accept control commands.
TelemetryOnly
The component is active and operational. It only provides telemetry data, and it does not accept control commands.
ControlOnly
The component is active and operational. It only accepts control commands, and it does not provide telemetry data.
ControlAndTelemetry
The component is active and operational. It provides telemetry data and accepts control commands.
Implementations§
Source§impl OperationalMode
impl OperationalMode
Sourcepub fn provides_telemetry(self) -> bool
pub fn provides_telemetry(self) -> bool
Returns true if a component in this mode provides telemetry data.
Self::Unspecified is treated as providing telemetry: when the mode is
unknown the component keeps the default behavior of being usable as a
measurement source.
Trait Implementations§
Source§impl Clone for OperationalMode
impl Clone for OperationalMode
Source§fn clone(&self) -> OperationalMode
fn clone(&self) -> OperationalMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OperationalMode
Source§impl Debug for OperationalMode
impl Debug for OperationalMode
Source§impl Default for OperationalMode
impl Default for OperationalMode
Source§fn default() -> OperationalMode
fn default() -> OperationalMode
Source§impl Display for OperationalMode
impl Display for OperationalMode
impl Eq for OperationalMode
Source§impl PartialEq for OperationalMode
impl PartialEq for OperationalMode
impl StructuralPartialEq for OperationalMode
Auto Trait Implementations§
impl Freeze for OperationalMode
impl RefUnwindSafe for OperationalMode
impl Send for OperationalMode
impl Sync for OperationalMode
impl Unpin for OperationalMode
impl UnsafeUnpin for OperationalMode
impl UnwindSafe for OperationalMode
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.