Skip to main content

AssetMeta

Struct AssetMeta 

Source
pub struct AssetMeta {
    pub id: AssetId,
    pub label: String,
    pub circuit: CircuitId,
    pub phases: PhaseConnection,
    pub connection_power: Power,
    pub commissioned_at: Option<Date>,
    pub steuve_exemption: Option<SteuVeExemption>,
    pub legacy_status: LegacyStatus,
    pub switched_voluntarily: bool,
    pub capabilities: Capabilities,
}
Expand description

Facts every asset carries.

Fields§

§id: AssetId

The name used in configuration, topics and the UI.

§label: String

A human label for the UI. Falls back to the id when empty.

§circuit: CircuitId

The circuit this asset hangs off.

§phases: PhaseConnection

How it is connected to the outer conductors.

§connection_power: Power

Netzanschlussleistung — the nameplate power the network operator sees.

This is the number the 4,2 kW threshold and the 0,4 scaling factor of [BK6-22-300 A1 2.4.1 / 4.5.1] are applied to, so it is a declared value, not a measured one.

§commissioned_at: Option<Date>

The date of technical commissioning.

[A1 3.1.b] makes participation in the netzorientierte Steuerung mandatory for devices commissioned after 31.12.2023; [A1 10] puts everything older into one of the transitional regimes. An unknown date leaves the device in the § 14a group: dropping a device out of the group is how a site exceeds a network operator’s limit, and it also lowers the minimum power the customer is owed. See hems_grid::para14a::participation.

§steuve_exemption: Option<SteuVeExemption>

Why this asset does not participate, if it does not.

§legacy_status: LegacyStatus

What the device brings with it from before 2024, [A1 10].

§switched_voluntarily: bool

Whether the operator moved this device into the netzorientierte Steuerung voluntarily, [A1 10.4].

The network operator may not refuse and there is no way back, so this is a contractual fact that is stored rather than derived.

§capabilities: Capabilities

What the driver can do with it.

Implementations§

Source§

impl AssetMeta

Source

pub fn new( id: AssetId, circuit: CircuitId, phases: PhaseConnection, connection_power: Power, ) -> Self

A minimal description: identity, circuit, phases and rating.

Source

pub fn with_capabilities(self, capabilities: Capabilities) -> Self

Replace the capability set.

Source

pub fn commissioned(self, date: Date) -> Self

Set the commissioning date.

Source

pub fn exempt(self, reason: SteuVeExemption) -> Self

Declare an exemption from § 14a participation.

Source

pub fn with_legacy_status(self, legacy_status: LegacyStatus) -> Self

Record what the device brings with it from before 2024, [A1 10].

Source

pub fn switched_voluntarily(self) -> Self

Record the irreversible move into the netzorientierte Steuerung, [A1 10.4].

Trait Implementations§

Source§

impl Clone for AssetMeta

Source§

fn clone(&self) -> AssetMeta

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
Source§

impl Debug for AssetMeta

Source§

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

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

impl<'de> Deserialize<'de> for AssetMeta

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for AssetMeta

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for AssetMeta

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AssetMeta

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> 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, <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.