Skip to main content

cimstructs/
GovHydro2.rs

1/// IEEE hydro turbine governor with straightforward penstock configuration and hydraulic-dashpot governor.
2#[derive(Debug, Default, Clone, serde::Serialize, serde::Deserialize)]
3pub struct GovHydro2 {
4    #[serde(flatten)]
5    pub base: super::TurbineGovernorDynamics,
6    /// Turbine numerator multiplier (Aturb). Typical value = -1.
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub aturb: Option<f64>,
9    /// Turbine denominator multiplier (Bturb) (> 0). Typical value = 0,5.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub bturb: Option<f64>,
12    /// Intentional deadband width (db1). Unit = Hz. Typical value = 0.
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub db1: Option<f64>,
15    /// Unintentional deadband (db2). Unit = MW. Typical value = 0.
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub db2: Option<f64>,
18    /// Intentional db hysteresis (eps). Unit = Hz. Typical value = 0.
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub eps: Option<f64>,
21    /// Nonlinear gain point 1, PU gv (Gv1). Typical value = 0.
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub gv1: Option<f64>,
24    /// Nonlinear gain point 2, PU gv (Gv2). Typical value = 0.
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub gv2: Option<f64>,
27    /// Nonlinear gain point 3, PU gv (Gv3). Typical value = 0.
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub gv3: Option<f64>,
30    /// Nonlinear gain point 4, PU gv (Gv4). Typical value = 0.
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub gv4: Option<f64>,
33    /// Nonlinear gain point 5, PU gv (Gv5). Typical value = 0.
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub gv5: Option<f64>,
36    /// Nonlinear gain point 6, PU gv (Gv6). Typical value = 0.
37    #[serde(skip_serializing_if = "Option::is_none")]
38    pub gv6: Option<f64>,
39    /// Turbine gain (Kturb). Typical value = 1.
40    #[serde(skip_serializing_if = "Option::is_none")]
41    pub kturb: Option<f64>,
42    /// Base for power values (MWbase) (> 0). Unit = MW.
43    #[serde(skip_serializing_if = "Option::is_none")]
44    pub mwbase: Option<f64>,
45    /// Nonlinear gain point 1, PU power (Pgv1). Typical value = 0.
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub pgv1: Option<f64>,
48    /// Nonlinear gain point 2, PU power (Pgv2). Typical value = 0.
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub pgv2: Option<f64>,
51    /// Nonlinear gain point 3, PU power (Pgv3). Typical value = 0.
52    #[serde(skip_serializing_if = "Option::is_none")]
53    pub pgv3: Option<f64>,
54    /// Nonlinear gain point 4, PU power (Pgv4). Typical value = 0.
55    #[serde(skip_serializing_if = "Option::is_none")]
56    pub pgv4: Option<f64>,
57    /// Nonlinear gain point 5, PU power (Pgv5). Typical value = 0.
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub pgv5: Option<f64>,
60    /// Nonlinear gain point 6, PU power (Pgv6). Typical value = 0.
61    #[serde(skip_serializing_if = "Option::is_none")]
62    pub pgv6: Option<f64>,
63    /// Maximum gate opening (Pmax) (> GovHydro2.pmin). Typical value = 1.
64    #[serde(skip_serializing_if = "Option::is_none")]
65    pub pmax: Option<f64>,
66    /// Minimum gate opening (Pmin) (< GovHydro2.pmax). Typical value = 0.
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub pmin: Option<f64>,
69    /// Permanent droop (Rperm). Typical value = 0,05.
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub rperm: Option<f64>,
72    /// Temporary droop (Rtemp). Typical value = 0,5.
73    #[serde(skip_serializing_if = "Option::is_none")]
74    pub rtemp: Option<f64>,
75    /// Gate servo time constant (Tg) (> 0). Typical value = 0,5.
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub tg: Option<f64>,
78    /// Pilot servo valve time constant (Tp) (>= 0). Typical value = 0,03.
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub tp: Option<f64>,
81    /// Dashpot time constant (Tr) (>= 0). Typical value = 12.
82    #[serde(skip_serializing_if = "Option::is_none")]
83    pub tr: Option<f64>,
84    /// Water inertia time constant (Tw) (>= 0). Typical value = 2.
85    #[serde(skip_serializing_if = "Option::is_none")]
86    pub tw: Option<f64>,
87    /// Maximum gate closing velocity (Uc) (< 0). Unit = PU / s. Typical value = -0,1.
88    #[serde(skip_serializing_if = "Option::is_none")]
89    pub uc: Option<f64>,
90    /// Maximum gate opening velocity (Uo). Unit = PU / s. Typical value = 0,1.
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub uo: Option<f64>,
93}
94impl crate::base::CimElement for GovHydro2 {
95    fn mrid(&self) -> &str { &self.base.base.base.id }
96    fn type_name(&self) -> &'static str { "GovHydro2" }
97    fn as_any(&self) -> &dyn std::any::Any { self }
98    fn to_json_value(&self) -> serde_json::Value {
99        serde_json::to_value(self).unwrap_or(serde_json::Value::Null)
100    }
101    fn to_block(&self) -> crate::base::RdfBlock {
102        let mut block = self.base.to_block();
103        block.type_name = "GovHydro2".to_string();
104        if let Some(v) = self.aturb {
105            block.fields.insert("GovHydro2.aturb".into(), crate::base::FieldValue::Text(v.to_string()));
106        }
107        if let Some(v) = self.bturb {
108            block.fields.insert("GovHydro2.bturb".into(), crate::base::FieldValue::Text(v.to_string()));
109        }
110        if let Some(v) = self.db1 {
111            block.fields.insert("GovHydro2.db1".into(), crate::base::FieldValue::Text(v.to_string()));
112        }
113        if let Some(v) = self.db2 {
114            block.fields.insert("GovHydro2.db2".into(), crate::base::FieldValue::Text(v.to_string()));
115        }
116        if let Some(v) = self.eps {
117            block.fields.insert("GovHydro2.eps".into(), crate::base::FieldValue::Text(v.to_string()));
118        }
119        if let Some(v) = self.gv1 {
120            block.fields.insert("GovHydro2.gv1".into(), crate::base::FieldValue::Text(v.to_string()));
121        }
122        if let Some(v) = self.gv2 {
123            block.fields.insert("GovHydro2.gv2".into(), crate::base::FieldValue::Text(v.to_string()));
124        }
125        if let Some(v) = self.gv3 {
126            block.fields.insert("GovHydro2.gv3".into(), crate::base::FieldValue::Text(v.to_string()));
127        }
128        if let Some(v) = self.gv4 {
129            block.fields.insert("GovHydro2.gv4".into(), crate::base::FieldValue::Text(v.to_string()));
130        }
131        if let Some(v) = self.gv5 {
132            block.fields.insert("GovHydro2.gv5".into(), crate::base::FieldValue::Text(v.to_string()));
133        }
134        if let Some(v) = self.gv6 {
135            block.fields.insert("GovHydro2.gv6".into(), crate::base::FieldValue::Text(v.to_string()));
136        }
137        if let Some(v) = self.kturb {
138            block.fields.insert("GovHydro2.kturb".into(), crate::base::FieldValue::Text(v.to_string()));
139        }
140        if let Some(v) = self.mwbase {
141            block.fields.insert("GovHydro2.mwbase".into(), crate::base::FieldValue::Text(v.to_string()));
142        }
143        if let Some(v) = self.pgv1 {
144            block.fields.insert("GovHydro2.pgv1".into(), crate::base::FieldValue::Text(v.to_string()));
145        }
146        if let Some(v) = self.pgv2 {
147            block.fields.insert("GovHydro2.pgv2".into(), crate::base::FieldValue::Text(v.to_string()));
148        }
149        if let Some(v) = self.pgv3 {
150            block.fields.insert("GovHydro2.pgv3".into(), crate::base::FieldValue::Text(v.to_string()));
151        }
152        if let Some(v) = self.pgv4 {
153            block.fields.insert("GovHydro2.pgv4".into(), crate::base::FieldValue::Text(v.to_string()));
154        }
155        if let Some(v) = self.pgv5 {
156            block.fields.insert("GovHydro2.pgv5".into(), crate::base::FieldValue::Text(v.to_string()));
157        }
158        if let Some(v) = self.pgv6 {
159            block.fields.insert("GovHydro2.pgv6".into(), crate::base::FieldValue::Text(v.to_string()));
160        }
161        if let Some(v) = self.pmax {
162            block.fields.insert("GovHydro2.pmax".into(), crate::base::FieldValue::Text(v.to_string()));
163        }
164        if let Some(v) = self.pmin {
165            block.fields.insert("GovHydro2.pmin".into(), crate::base::FieldValue::Text(v.to_string()));
166        }
167        if let Some(v) = self.rperm {
168            block.fields.insert("GovHydro2.rperm".into(), crate::base::FieldValue::Text(v.to_string()));
169        }
170        if let Some(v) = self.rtemp {
171            block.fields.insert("GovHydro2.rtemp".into(), crate::base::FieldValue::Text(v.to_string()));
172        }
173        if let Some(v) = self.tg {
174            block.fields.insert("GovHydro2.tg".into(), crate::base::FieldValue::Text(v.to_string()));
175        }
176        if let Some(v) = self.tp {
177            block.fields.insert("GovHydro2.tp".into(), crate::base::FieldValue::Text(v.to_string()));
178        }
179        if let Some(v) = self.tr {
180            block.fields.insert("GovHydro2.tr".into(), crate::base::FieldValue::Text(v.to_string()));
181        }
182        if let Some(v) = self.tw {
183            block.fields.insert("GovHydro2.tw".into(), crate::base::FieldValue::Text(v.to_string()));
184        }
185        if let Some(v) = self.uc {
186            block.fields.insert("GovHydro2.uc".into(), crate::base::FieldValue::Text(v.to_string()));
187        }
188        if let Some(v) = self.uo {
189            block.fields.insert("GovHydro2.uo".into(), crate::base::FieldValue::Text(v.to_string()));
190        }
191        block
192    }
193}
194
195impl GovHydro2 {
196    pub fn from_block(b: &crate::base::RdfBlock) -> Self {
197        let mut obj = Self::default();
198        obj.base.base.base.id.clone_from(&b.mrid);
199        for (key, val) in &b.fields {
200            match key.as_str() {
201                "GovHydro2.aturb" => {
202                    match val {
203                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.aturb = Some(v); } }
204                        crate::base::FieldValue::TextList(svs) => {
205                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.aturb = Some(v); } }
206                        }
207                        _ => {}
208                    }
209                }
210                "GovHydro2.bturb" => {
211                    match val {
212                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.bturb = Some(v); } }
213                        crate::base::FieldValue::TextList(svs) => {
214                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.bturb = Some(v); } }
215                        }
216                        _ => {}
217                    }
218                }
219                "GovHydro2.db1" => {
220                    match val {
221                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.db1 = Some(v); } }
222                        crate::base::FieldValue::TextList(svs) => {
223                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.db1 = Some(v); } }
224                        }
225                        _ => {}
226                    }
227                }
228                "GovHydro2.db2" => {
229                    match val {
230                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.db2 = Some(v); } }
231                        crate::base::FieldValue::TextList(svs) => {
232                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.db2 = Some(v); } }
233                        }
234                        _ => {}
235                    }
236                }
237                "GovHydro2.eps" => {
238                    match val {
239                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.eps = Some(v); } }
240                        crate::base::FieldValue::TextList(svs) => {
241                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.eps = Some(v); } }
242                        }
243                        _ => {}
244                    }
245                }
246                "GovHydro2.gv1" => {
247                    match val {
248                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.gv1 = Some(v); } }
249                        crate::base::FieldValue::TextList(svs) => {
250                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.gv1 = Some(v); } }
251                        }
252                        _ => {}
253                    }
254                }
255                "GovHydro2.gv2" => {
256                    match val {
257                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.gv2 = Some(v); } }
258                        crate::base::FieldValue::TextList(svs) => {
259                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.gv2 = Some(v); } }
260                        }
261                        _ => {}
262                    }
263                }
264                "GovHydro2.gv3" => {
265                    match val {
266                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.gv3 = Some(v); } }
267                        crate::base::FieldValue::TextList(svs) => {
268                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.gv3 = Some(v); } }
269                        }
270                        _ => {}
271                    }
272                }
273                "GovHydro2.gv4" => {
274                    match val {
275                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.gv4 = Some(v); } }
276                        crate::base::FieldValue::TextList(svs) => {
277                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.gv4 = Some(v); } }
278                        }
279                        _ => {}
280                    }
281                }
282                "GovHydro2.gv5" => {
283                    match val {
284                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.gv5 = Some(v); } }
285                        crate::base::FieldValue::TextList(svs) => {
286                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.gv5 = Some(v); } }
287                        }
288                        _ => {}
289                    }
290                }
291                "GovHydro2.gv6" => {
292                    match val {
293                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.gv6 = Some(v); } }
294                        crate::base::FieldValue::TextList(svs) => {
295                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.gv6 = Some(v); } }
296                        }
297                        _ => {}
298                    }
299                }
300                "GovHydro2.kturb" => {
301                    match val {
302                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.kturb = Some(v); } }
303                        crate::base::FieldValue::TextList(svs) => {
304                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.kturb = Some(v); } }
305                        }
306                        _ => {}
307                    }
308                }
309                "GovHydro2.mwbase" => {
310                    match val {
311                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.mwbase = Some(v); } }
312                        crate::base::FieldValue::TextList(svs) => {
313                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.mwbase = Some(v); } }
314                        }
315                        _ => {}
316                    }
317                }
318                "GovHydro2.pgv1" => {
319                    match val {
320                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pgv1 = Some(v); } }
321                        crate::base::FieldValue::TextList(svs) => {
322                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pgv1 = Some(v); } }
323                        }
324                        _ => {}
325                    }
326                }
327                "GovHydro2.pgv2" => {
328                    match val {
329                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pgv2 = Some(v); } }
330                        crate::base::FieldValue::TextList(svs) => {
331                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pgv2 = Some(v); } }
332                        }
333                        _ => {}
334                    }
335                }
336                "GovHydro2.pgv3" => {
337                    match val {
338                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pgv3 = Some(v); } }
339                        crate::base::FieldValue::TextList(svs) => {
340                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pgv3 = Some(v); } }
341                        }
342                        _ => {}
343                    }
344                }
345                "GovHydro2.pgv4" => {
346                    match val {
347                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pgv4 = Some(v); } }
348                        crate::base::FieldValue::TextList(svs) => {
349                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pgv4 = Some(v); } }
350                        }
351                        _ => {}
352                    }
353                }
354                "GovHydro2.pgv5" => {
355                    match val {
356                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pgv5 = Some(v); } }
357                        crate::base::FieldValue::TextList(svs) => {
358                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pgv5 = Some(v); } }
359                        }
360                        _ => {}
361                    }
362                }
363                "GovHydro2.pgv6" => {
364                    match val {
365                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pgv6 = Some(v); } }
366                        crate::base::FieldValue::TextList(svs) => {
367                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pgv6 = Some(v); } }
368                        }
369                        _ => {}
370                    }
371                }
372                "GovHydro2.pmax" => {
373                    match val {
374                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pmax = Some(v); } }
375                        crate::base::FieldValue::TextList(svs) => {
376                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pmax = Some(v); } }
377                        }
378                        _ => {}
379                    }
380                }
381                "GovHydro2.pmin" => {
382                    match val {
383                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.pmin = Some(v); } }
384                        crate::base::FieldValue::TextList(svs) => {
385                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.pmin = Some(v); } }
386                        }
387                        _ => {}
388                    }
389                }
390                "GovHydro2.rperm" => {
391                    match val {
392                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.rperm = Some(v); } }
393                        crate::base::FieldValue::TextList(svs) => {
394                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.rperm = Some(v); } }
395                        }
396                        _ => {}
397                    }
398                }
399                "GovHydro2.rtemp" => {
400                    match val {
401                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.rtemp = Some(v); } }
402                        crate::base::FieldValue::TextList(svs) => {
403                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.rtemp = Some(v); } }
404                        }
405                        _ => {}
406                    }
407                }
408                "GovHydro2.tg" => {
409                    match val {
410                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tg = Some(v); } }
411                        crate::base::FieldValue::TextList(svs) => {
412                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tg = Some(v); } }
413                        }
414                        _ => {}
415                    }
416                }
417                "GovHydro2.tp" => {
418                    match val {
419                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tp = Some(v); } }
420                        crate::base::FieldValue::TextList(svs) => {
421                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tp = Some(v); } }
422                        }
423                        _ => {}
424                    }
425                }
426                "GovHydro2.tr" => {
427                    match val {
428                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tr = Some(v); } }
429                        crate::base::FieldValue::TextList(svs) => {
430                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tr = Some(v); } }
431                        }
432                        _ => {}
433                    }
434                }
435                "GovHydro2.tw" => {
436                    match val {
437                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tw = Some(v); } }
438                        crate::base::FieldValue::TextList(svs) => {
439                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tw = Some(v); } }
440                        }
441                        _ => {}
442                    }
443                }
444                "GovHydro2.uc" => {
445                    match val {
446                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.uc = Some(v); } }
447                        crate::base::FieldValue::TextList(svs) => {
448                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.uc = Some(v); } }
449                        }
450                        _ => {}
451                    }
452                }
453                "GovHydro2.uo" => {
454                    match val {
455                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.uo = Some(v); } }
456                        crate::base::FieldValue::TextList(svs) => {
457                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.uo = Some(v); } }
458                        }
459                        _ => {}
460                    }
461                }
462                "TurbineGovernorDynamics.AsynchronousMachineDynamics" => {
463                    if let crate::base::FieldValue::Resource(sv) = val {
464                        obj.base.asynchronous_machine_dynamics = Some(crate::base::MridRef { mrid: sv.clone() });
465                    }
466                }
467                "TurbineGovernorDynamics.SynchronousMachineDynamics" => {
468                    if let crate::base::FieldValue::Resource(sv) = val {
469                        obj.base.synchronous_machine_dynamics = Some(crate::base::MridRef { mrid: sv.clone() });
470                    }
471                }
472                "DynamicsFunctionBlock.enabled" => {
473                    match val {
474                        crate::base::FieldValue::Text(sv) => { obj.base.base.enabled = Some(sv.trim() == "true"); }
475                        crate::base::FieldValue::TextList(svs) => {
476                            if let Some(sv) = svs.last() { obj.base.base.enabled = Some(sv.trim() == "true"); }
477                        }
478                        _ => {}
479                    }
480                }
481                "IdentifiedObject.description" => {
482                    match val {
483                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.description = sv.clone(); }
484                        crate::base::FieldValue::TextList(svs) => {
485                            if let Some(sv) = svs.last() { obj.base.base.base.description = sv.clone(); }
486                        }
487                        _ => {}
488                    }
489                }
490                "IdentifiedObject.energyIdentCodeEic" => {
491                    match val {
492                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.energy_ident_code_eic = sv.clone(); }
493                        crate::base::FieldValue::TextList(svs) => {
494                            if let Some(sv) = svs.last() { obj.base.base.base.energy_ident_code_eic = sv.clone(); }
495                        }
496                        _ => {}
497                    }
498                }
499                "IdentifiedObject.mRID" => {
500                    match val {
501                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.m_rid = sv.clone(); }
502                        crate::base::FieldValue::TextList(svs) => {
503                            if let Some(sv) = svs.last() { obj.base.base.base.m_rid = sv.clone(); }
504                        }
505                        _ => {}
506                    }
507                }
508                "IdentifiedObject.name" => {
509                    match val {
510                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.name = sv.clone(); }
511                        crate::base::FieldValue::TextList(svs) => {
512                            if let Some(sv) = svs.last() { obj.base.base.base.name = sv.clone(); }
513                        }
514                        _ => {}
515                    }
516                }
517                "IdentifiedObject.shortName" => {
518                    match val {
519                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.short_name = sv.clone(); }
520                        crate::base::FieldValue::TextList(svs) => {
521                            if let Some(sv) = svs.last() { obj.base.base.base.short_name = sv.clone(); }
522                        }
523                        _ => {}
524                    }
525                }
526                _ => {}
527            }
528        }
529        obj
530    }
531}