Skip to main content

cimstructs/
DCPolarityKind.rs

1/// Polarity for DC circuits.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum DCPolarityKind {
4    /// Positive pole. The converter terminal is intended to operate at a positive voltage relative the midpoint or negative terminal.
5    positive,
6    /// Middle pole. The converter terminal is the midpoint in a bipolar or symmetric monopole configuration. The midpoint can be grounded and/or have a metallic return.
7    middle,
8    /// Negative pole. The converter terminal is intended to operate at a negative voltage relative the midpoint or positive terminal.
9    negative,
10}
11
12impl DCPolarityKind {
13    pub fn uri(&self) -> &'static str {
14        match self {
15            DCPolarityKind::positive => "http://iec.ch/TC57/CIM100#DCPolarityKind.positive",
16            DCPolarityKind::middle => "http://iec.ch/TC57/CIM100#DCPolarityKind.middle",
17            DCPolarityKind::negative => "http://iec.ch/TC57/CIM100#DCPolarityKind.negative",
18        }
19    }
20}