Skip to main content

cimstructs/
RegulatingControlModeKind.rs

1/// The kind of regulation model. For example regulating voltage, reactive power, active power, etc.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum RegulatingControlModeKind {
4    /// Voltage is specified.
5    voltage,
6    /// Active power is specified.
7    activePower,
8    /// Reactive power is specified.
9    reactivePower,
10    /// Current flow is specified.
11    currentFlow,
12    /// Admittance is specified.
13    admittance,
14    /// Control switches on/off by time of day. The times may change on the weekend, or in different seasons.
15    timeScheduled,
16    /// Control switches on/off based on the local temperature (i.e., a thermostat).
17    temperature,
18    /// Power factor is specified.
19    powerFactor,
20}
21
22impl RegulatingControlModeKind {
23    pub fn uri(&self) -> &'static str {
24        match self {
25            RegulatingControlModeKind::voltage => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.voltage",
26            RegulatingControlModeKind::activePower => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.activePower",
27            RegulatingControlModeKind::reactivePower => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.reactivePower",
28            RegulatingControlModeKind::currentFlow => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.currentFlow",
29            RegulatingControlModeKind::admittance => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.admittance",
30            RegulatingControlModeKind::timeScheduled => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.timeScheduled",
31            RegulatingControlModeKind::temperature => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.temperature",
32            RegulatingControlModeKind::powerFactor => "http://iec.ch/TC57/CIM100#RegulatingControlModeKind.powerFactor",
33        }
34    }
35}