Skip to content

Commit c20fa34

Browse files
Upgrade frequenz-api-common to v0.3.0 (#65)
The submodule `frequenz-api-common` has been upgraded to v0.3.0. This version renames the enum representing EV charger types to `EvChargerType` and defined the `MetricAggregation` message, which was previously defined in `frequenz-api-microgrid`. Since the message `MetricAggregation` is now being imported from the common specs, it has been removed from the file `common.proto`. The message `EVCharger` is being renamed to `EvCharger`, to use same naming convention as `frequenz-api-common`. Note that a similar renaming was done in [`frequenz-api-common` v0.3.0](frequenz-floss/frequenz-api-common#21) to improve the code quality of the derived rust code using prost.
2 parents b6ac10c + bc07384 commit c20fa34

File tree

6 files changed

+29
-100
lines changed

6 files changed

+29
-100
lines changed

RELEASE_NOTES.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,32 @@
22

33
## Summary
44

5-
<!-- Here goes a general summary of what this release is about -->
5+
This release upgrades the submodule `frequenz-api-common` to v0.3.0, and
6+
renames the message `EVCharger` to `EvCharger`.
67

78
## Upgrading
89

9-
<!-- Here goes notes on how to upgrade from previous versions, including if there are any deprecations and what they should be replaced with -->
10+
* [Upgraded `frequenz-api-common` to v0.3.0](https://github.com/frequenz-floss/frequenz-api-microgrid/pull/65)
11+
12+
The submodule `frequenz-api-common` has been upgraded to v0.3.0.
13+
This version renames the enum representing EV charger types to `EvChargerType`
14+
and defined the `MetricAggregation` message, which was previously defined in
15+
`frequenz-api-microgrid`.
16+
17+
Since the message `MetricAggregation` is now being imported from the common
18+
specs, it has been removed from the file `common.proto`.
19+
20+
* [Renamed message `EVCharger` to `EvCharger`](https://github.com/frequenz-floss/frequenz-api-microgrid/pull/65)
21+
22+
This is done to use same naming convention as `frequenz-api-common`.
23+
Note that a similar renaming was done in `frequenz-api-common` v0.3.0 to
24+
improve the code quality of the derived rust code using prost.
25+
1026

1127
## New Features
1228

13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
29+
None
1430

1531
## Bug Fixes
1632

17-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
33+
None

proto/frequenz/api/microgrid/battery.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ package frequenz.api.microgrid.battery;
1313
import "frequenz/api/microgrid/common.proto";
1414

1515
import "frequenz/api/common/components.proto";
16+
import "frequenz/api/common/metrics.proto";
1617
import "frequenz/api/common/metrics/electrical.proto";
1718

1819
// The battery metadata.
@@ -178,15 +179,15 @@ message Data {
178179

179180
// Battery's overall SoC.
180181
// In percent (%).
181-
common.MetricAggregation soc = 2;
182+
frequenz.api.common.metrics.MetricAggregation soc = 2;
182183

183184
// The aggregated values of all the temperature measurements of a battery.
184185
// In degree Celsius (°C).
185-
common.MetricAggregation temperature = 3;
186+
frequenz.api.common.metrics.MetricAggregation temperature = 3;
186187

187188
// The aggregated values of all the humidity measurements of a battery.
188189
// In percent (%).
189-
common.MetricAggregation humidity = 4;
190+
frequenz.api.common.metrics.MetricAggregation humidity = 4;
190191
}
191192

192193
// Battery properties.

proto/frequenz/api/microgrid/common.proto

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -10,94 +10,6 @@ syntax = "proto3";
1010

1111
package frequenz.api.microgrid.common;
1212

13-
import "frequenz/api/common/metrics.proto";
14-
15-
// Metrics depicted as a collection of statistical summaries.
16-
//
17-
// Useful when a component has to report multiple values for the same metric.
18-
// E.g., a battery is a collection of several blocks, and each block has a
19-
// temperature sensor. The battery can report a summary of the values provided
20-
// by all these sensors, like, min, max, avg, etc., and if possible, the entire
21-
// array of temperature values.
22-
message MetricAggregation {
23-
// The average value of the metric.
24-
float avg = 1;
25-
26-
// The minimum value of the metric.
27-
optional float min = 2;
28-
29-
// The maximum value of the metric.
30-
optional float max = 3;
31-
32-
// The array of all the metric values.
33-
repeated float raw_values = 12;
34-
35-
// The manufacturer's rated bounds of the metric. This may differ from
36-
// `system_bounds` as it does not take into account the current state of the
37-
// overall system.
38-
frequenz.api.common.metrics.Bounds rated_bounds = 13;
39-
40-
// The current bounds of the metric, as imposed by the component this metric
41-
// originates from.
42-
frequenz.api.common.metrics.Bounds component_bounds = 14;
43-
44-
// These bounds indicate the range of values that are disallowed for the
45-
// metric.
46-
// If these bounds for a metric are [`lower`, `upper`], then this metric's
47-
// `value` needs to comply with the constraints
48-
// `value <= lower` OR `upper <= value`.
49-
//
50-
// It is important to note that these bounds work together with
51-
// `system_inclusion_bounds`.
52-
//
53-
// E.g., for the system to accept a charge command,
54-
// clients need to request power values within the bounds
55-
// `[system_inclusion_bounds.lower, system_exclusion_bounds.lower]`.
56-
// This means that clients can only request charge commands with power values
57-
// that are within the `system_inclusion_bounds`, but not within
58-
// `system_exclusion_bounds`.
59-
// Similarly, for the system to accept a discharge command,
60-
// clients need to request power values within the bounds
61-
// `[system_exclusion_bounds.upper, system_inclusion_bounds.upper]`.
62-
//
63-
// The following diagram illustrates the relationship between the bounds.
64-
// ```
65-
// inclusion.lower inclusion.upper
66-
// <-------|============|------------------|============|--------->
67-
// exclusion.lower exclusion.upper
68-
// ```
69-
// ---- values here are disallowed and wil be rejected
70-
// ==== vales here are allowed and will be accepted
71-
frequenz.api.common.metrics.Bounds system_exclusion_bounds = 4;
72-
73-
// These bounds indicate the range of values that are allowed for the metric.
74-
// If these bounds for a metric are [`lower`, `upper`], then this metric's
75-
// `value` needs to comply with the constraint `lower <= value <= upper`
76-
//
77-
// It is important to note that these bounds work together with
78-
// `system_exclusion_bounds`.
79-
//
80-
// E.g., for the system to accept a charge command,
81-
// clients need to request power values within the bounds
82-
// `[system_inclusion_bounds.lower, system_exclusion_bounds.lower]`.
83-
// This means that clients can only request charge commands with power values
84-
// that are within the `system_inclusion_bounds`, but not within
85-
// `system_exclusion_bounds`.
86-
// Similarly, for the system to accept a discharge command,
87-
// clients need to request power values within the bounds
88-
// `[system_exclusion_bounds.upper, system_inclusion_bounds.upper]`.
89-
//
90-
// The following diagram illustrates the relationship between the bounds.
91-
// ```
92-
// inclusion.lower inclusion.upper
93-
// <-------|============|------------------|============|--------->
94-
// exclusion.lower exclusion.upper
95-
// ```
96-
// ---- values here are disallowed and wil be rejected
97-
// ==== vales here are allowed and will be accepted
98-
frequenz.api.common.metrics.Bounds system_inclusion_bounds = 5;
99-
}
100-
10113
// Error levels definitions.
10214
enum ErrorLevel {
10315
// Unspecified component error.

proto/frequenz/api/microgrid/ev_charger.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import "frequenz/api/common/metrics/electrical.proto";
1919
// The EV charger metadata.
2020
message Metadata {
2121
// The EV charger type.
22-
frequenz.api.common.components.EVChargerType type = 1;
22+
frequenz.api.common.components.EvChargerType type = 1;
2323
}
2424

2525
// The possible states of an EV charging station.
@@ -186,8 +186,8 @@ message Properties {
186186
string firmware_ver = 1;
187187
}
188188

189-
// EVCharger details
190-
message EVCharger {
189+
// EvCharger details
190+
message EvCharger {
191191
// The component properties
192192
Properties properties = 1;
193193

proto/frequenz/api/microgrid/microgrid.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ message ComponentData {
464464
meter.Meter meter = 3;
465465
inverter.Inverter inverter = 4;
466466
battery.Battery battery = 5;
467-
ev_charger.EVCharger ev_charger = 6;
467+
ev_charger.EvCharger ev_charger = 6;
468468
sensor.Sensor sensor = 7;
469469
}
470470
}

0 commit comments

Comments
 (0)