Skip to content

Commit 88a4907

Browse files
Update the docs for reporting errors for components
Signed-off-by: Tiyash Basu <[email protected]>
1 parent 4e4be8b commit 88a4907

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,13 @@ message ElectricalComponentState {
503503
// List of operational states currently active for the component.
504504
//
505505
// !!! note
506-
// The list must not contain duplicate state codes.
506+
// The list will contain unique members. No state will exist twice in
507+
// this list.
508+
//
509+
// !!! note
510+
// If the state is `ELECTRICAL_COMPONENT_STATE_CODE_ERROR`, then the
511+
// electrical component is in an error state. In such cases, the `errors`
512+
// field will be populated with the list of errors.
507513
repeated ElectricalComponentStateCode states = 2;
508514

509515
// List of non-critical warnings detected for the component.
@@ -516,6 +522,10 @@ message ElectricalComponentState {
516522
// List of critical errors currently affecting the component.
517523
//
518524
// !!! note
525+
// This list is expected to have errors if and only if the electrical
526+
// component is in an error state.
527+
//
528+
// !!! note
519529
// This list is expected to be populated only when the component is in an
520530
// error state.
521531
// No duplicate error codes allowed.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ message SensorState {
191191
// !!! note
192192
// The list will contain unique members. No state will exist twice in
193193
// this list.
194+
//
195+
// !!! note
196+
// If the state is `SENSOR_STATE_CODE_ERROR`, the sensor is in an error
197+
// state. In such cases, the `errors` field will be populated with the
198+
// list of errors.
194199
repeated SensorStateCode states = 2;
195200

196201
// List of warnings for the microgrid sensor.

0 commit comments

Comments
 (0)