cimstructs/Source.rs
1/// Source gives information related to the origin of a value.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum Source {
4 /// The value is provided by input from the process I/O or being calculated from some function.
5 PROCESS,
6 /// The value contains a default value.
7 DEFAULTED,
8 /// The value is provided by input of an operator or by an automatic source.
9 SUBSTITUTED,
10}
11
12impl Source {
13 pub fn uri(&self) -> &'static str {
14 match self {
15 Source::PROCESS => "http://iec.ch/TC57/CIM100#Source.PROCESS",
16 Source::DEFAULTED => "http://iec.ch/TC57/CIM100#Source.DEFAULTED",
17 Source::SUBSTITUTED => "http://iec.ch/TC57/CIM100#Source.SUBSTITUTED",
18 }
19 }
20}