Skip to main content

cimstructs/
SynchronousMachineKind.rs

1/// Synchronous machine type.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum SynchronousMachineKind {
4    /// Indicates the synchronous machine can operate as a generator.
5    generator,
6    /// Indicates the synchronous machine can operate as a condenser.
7    condenser,
8    /// Indicates the synchronous machine can operate as a generator or as a condenser.
9    generatorOrCondenser,
10    /// Indicates the synchronous machine can operate as a motor.
11    motor,
12    /// Indicates the synchronous machine can operate as a generator or as a motor.
13    generatorOrMotor,
14    /// Indicates the synchronous machine can operate as a motor or as a condenser.
15    motorOrCondenser,
16    /// Indicates the synchronous machine can operate as a generator or as a condenser or as a motor.
17    generatorOrCondenserOrMotor,
18}
19
20impl SynchronousMachineKind {
21    pub fn uri(&self) -> &'static str {
22        match self {
23            SynchronousMachineKind::generator => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.generator",
24            SynchronousMachineKind::condenser => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.condenser",
25            SynchronousMachineKind::generatorOrCondenser => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.generatorOrCondenser",
26            SynchronousMachineKind::motor => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.motor",
27            SynchronousMachineKind::generatorOrMotor => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.generatorOrMotor",
28            SynchronousMachineKind::motorOrCondenser => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.motorOrCondenser",
29            SynchronousMachineKind::generatorOrCondenserOrMotor => "http://iec.ch/TC57/CIM100#SynchronousMachineKind.generatorOrCondenserOrMotor",
30        }
31    }
32}