Skip to main content

Direction

Enum Direction 

pub enum Direction {
    Consumption,
    Production,
}
Expand description

Which of the two limitation use cases an actor is playing.

Both state machines use nonnegative magnitudes. The direction determines the active limit’s wire sign (§2.8.1: ≥ 0 for LPC, ≤ 0 for LPP), its description, and the failsafe configuration key. See Sign conventions.

Variants§

§

Consumption

Limitation of Power Consumption: how much the device may draw.

The basis of §14a EnWG in Germany.

§

Production

Limitation of Power Production: how much the device may feed in.

The basis of EEG §9 (2023) in Germany.

Implementations§

§

impl Direction

pub const fn energy_direction(self) -> EnergyDirection

The limitDirection of the limit description (LPC/LPP Table 22).

pub const fn failsafe_limit_key(self) -> DeviceConfigurationKeyName

The keyName of the failsafe power limit ([LPC-021], [LPP-021]).

The schema names both, so this is a variant rather than a string: a typo cannot reach the wire as an Other extension nobody recognises.

pub const fn nominal_max_characteristic( self, ) -> ElectricalConnectionCharacteristicType

The characteristicType of the device’s own nominal maximum ([LPC/LPP-041]).

LPC UC TS §2.6.4.1 and LPP §2.6.4.1: this value says what the appliance is physically able to draw or feed in, and it is for appliances only. An energy manager publishes contractual_max_characteristic instead — it has no single nameplate of its own, and the number an Energy Guard needs from it is what the customer’s contract allows.

pub const fn contractual_max_characteristic( self, ) -> ElectricalConnectionCharacteristicType

The characteristicType of an energy manager’s contractual maximum ([LPC/LPP-042]).

The counterpart of nominal_max_characteristic, and mutually exclusive with it: the specification says each SHALL only be used by the kind of actor it belongs to.

pub const fn use_case_name(self) -> &'static str

The use-case name a device announces in nodeManagementUseCaseData.

pub const fn scenario_one_name(self) -> &'static str

The name of scenario 1, as the specification writes it.

§

impl Direction

pub const fn signal_prefix(self) -> &'static str

The prefix runtime signals are named with: lpc or lpp.

The abbreviation the test specification uses, lowercased, which is what the laboratory’s own tooling expects to see in a debug interface.

Trait Implementations§

§

impl Clone for Direction

§

fn clone(&self) -> Direction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Copy for Direction

§

impl Debug for Direction

§

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

Formats the value using the given formatter. Read more
§

impl Eq for Direction

§

impl Hash for Direction

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq for Direction

§

fn eq(&self, other: &Direction) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl StructuralPartialEq for Direction

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.