pub struct Position { /* private fields */ }Expand description
One LIN position under construction.
Implementations§
Source§impl Position
impl Position
Sourcepub fn number(self, number: impl Into<String>) -> Self
pub fn number(self, number: impl Into<String>) -> Self
Set LIN DE 1082 explicitly. Positions are numbered from 1 otherwise.
Sourcepub fn item_type(self, code: impl Into<String>) -> Self
pub fn item_type(self, code: impl Into<String>) -> Self
Set LIN C212 DE 7143 — the Zeitreihentyp in ALOCAT.
Sourcepub fn description(self, code: impl Into<String>) -> Self
pub fn description(self, code: impl Into<String>) -> Self
Set the IMD DE 7009 code — NOMRES labels which side a position reports.
Sourcepub fn location(self, qualifier: impl Into<String>, code: Option<&str>) -> Self
pub fn location(self, qualifier: impl Into<String>, code: Option<&str>) -> Self
Open a LOC group. Pass None as the code for LOC+Z99, which ALOCAT
sends when the message needs no specific place.
Sourcepub fn quantity(
self,
qualifier: impl Into<String>,
value: impl Into<String>,
period: DvgwPeriod,
) -> Self
pub fn quantity( self, qualifier: impl Into<String>, value: impl Into<String>, period: DvgwPeriod, ) -> Self
Add a quantity to the open LOC group, with the period it applies to,
in the family’s default unit (KW1 kWh/h; KWH for SSQNOT).
Repeat to transmit a profile: the DVGW column admits one DTM+2 and
one QTY per LOC group, so every quantity after the first is
written under a repeated LOC.
§Panics
Panics when no location has been opened yet — a
quantity outside a LOC group has nowhere to go on the wire.
Sourcepub fn quantity_in(
self,
qualifier: impl Into<String>,
value: impl Into<String>,
unit: impl Into<String>,
period: DvgwPeriod,
) -> Self
pub fn quantity_in( self, qualifier: impl Into<String>, value: impl Into<String>, unit: impl Into<String>, period: DvgwPeriod, ) -> Self
Sourcepub fn status(self, code: impl Into<String>) -> Self
pub fn status(self, code: impl Into<String>) -> Self
Attach an STS DE 9015 code to the last quantity — the Zeitreihentyp
of an ALOCAT (09G, 14G, …), the Verfahren of a SSQNOT (A1G/A2G).
§Panics
Panics when no quantity has been added yet.