Commit 56f5263
committed
Use new component states and state snapshots
The new state snapshots in the v0.18 client provide errors and warnings
using a different structure, so we need to account for that.
State code were also unified and there is no more specific enums for
cable state and other component-specific states, all states are part of
the `ComponentStateCode` enum and the component data can have many
state codes in it, while before it contained only one.
In previous versions EV chargers only used one `PLUGGED` or `LOCKED`
status but now the cable status was split in 2 connector ends: station
and EV, so now all combinations of those need to be accounted for. This
might change again on the API side as it ended up a bit messy.
Also the old component data wrappers now can't be frozen because the
`ComponentData` class is not frozen (this is to allow parsing from the
new telemetry messages easier for phases).
Signed-off-by: Leandro Lucarella <[email protected]>1 parent ceba590 commit 56f5263
File tree
11 files changed
+219
-234
lines changed- src/frequenz/sdk/microgrid/_power_distributing/_component_status
- tests
- microgrid
- power_distributing/_component_status
- timeseries
- _ev_charger_pool
- _pv_pool
- utils
11 files changed
+219
-234
lines changedLines changed: 37 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 27 | + | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
| |||
70 | 64 | | |
71 | 65 | | |
72 | 66 | | |
73 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 374 | + | |
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
380 | | - | |
| 378 | + | |
381 | 379 | | |
382 | | - | |
| 380 | + | |
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
| |||
394 | 392 | | |
395 | 393 | | |
396 | 394 | | |
397 | | - | |
| 395 | + | |
398 | 396 | | |
399 | | - | |
| 397 | + | |
| 398 | + | |
400 | 399 | | |
401 | 400 | | |
402 | | - | |
| 401 | + | |
403 | 402 | | |
404 | | - | |
| 403 | + | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
| |||
416 | 415 | | |
417 | 416 | | |
418 | 417 | | |
419 | | - | |
| 418 | + | |
420 | 419 | | |
421 | | - | |
| 420 | + | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
| 427 | + | |
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | | - | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
Lines changed: 12 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
| |||
87 | 84 | | |
88 | 85 | | |
89 | 86 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
97 | 95 | | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
126 | | - | |
127 | | - | |
| 125 | + | |
128 | 126 | | |
129 | | - | |
130 | | - | |
| 127 | + | |
131 | 128 | | |
132 | 129 | | |
133 | 130 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
137 | | - | |
| 140 | + | |
138 | 141 | | |
139 | | - | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
0 commit comments