Skip to content

Commit e821150

Browse files
Add warnings to sensor SensorState
This commit adds a new field `warnings` to the `SensorState` message in the `sensors.proto` file. This field is a repeated field of type `SensorDiagnostic`, which is used to represent warnings for the microgrid sensor. The `warnings` field is expected to have warnings if and only if the sensor is reporting warnings. The list will contain unique members, meaning no warning will exist twice in this list. This makes the `SensorState` message consistent with respect to `ElectricalComponentState`. Signed-off-by: Tiyash Basu <[email protected]>
1 parent d0e83a9 commit e821150

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- The enum `ComponentErrorCode` has now been renamed to `ElectricalComponentDiagnosticCode` to better reflect its shared usage with warnings and errors.
1818
- Added new message `SensorDiagnostic` to represent warnings and errors in microgrid sensors.
1919
- The enum `SensorErrorCode` has now been renamed to `SensorDiagnosticCode` to better reflect its shared usage with warnings and errors.
20+
- Added warnings to sensor `SensorState`.
2021

2122
## Bug Fixes
2223

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ message SensorState {
193193
// this list.
194194
repeated SensorStateCode states = 2;
195195

196+
// List of warnings for the microgrid sensor.
197+
//
198+
// !!! note
199+
// This list is expected to have warnings if and only if the sensor is
200+
// reporting warnings.
201+
//
202+
// !!! note
203+
// The list will contain unique members. No warning will exist twice in
204+
// this list.
205+
repeated SensorDiagnostic warnings = 3;
206+
196207
// List of errors for the microgrid sensor.
197208
//
198209
// !!! note

0 commit comments

Comments
 (0)