Skip to content

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

No description provided.

This commit introduces the `SensorDiagnostic` message to represent
errors and warnings reported by microgrid sensors. This message
extends a standardized error code with contextual information useful for
diagnostics, such as subsystem names, measured values, or
vendor-specific insights.

Signed-off-by: Tiyash Basu <[email protected]>
This commit renames the enum `SensorErrorCode` to `SensorDiagnosticCode`
in the `sensors.proto` file. This change is made to better reflect the
shared usage of this enum for both warnings and errors in microgrid
sensors.

Signed-off-by: Tiyash Basu <[email protected]>
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]>
@tiyash-basu-frequenz tiyash-basu-frequenz added this to the v0.7.0 milestone Apr 16, 2025
@tiyash-basu-frequenz tiyash-basu-frequenz self-assigned this Apr 16, 2025
Copilot AI review requested due to automatic review settings April 16, 2025 14:02
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner April 16, 2025 14:02
@github-actions github-actions bot added part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files labels Apr 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the sensor error representation for microgrid sensors by introducing a new SensorDiagnostic message and aligning diagnostic reporting for both errors and warnings.

  • Added a SensorDiagnostic message to encapsulate standardized diagnostic codes, vendor error codes, and descriptive messages.
  • Updated SensorState to include a new warnings list and replaced the errors field to use SensorDiagnostic.
  • Renamed SensorErrorCode to SensorDiagnosticCode to better represent its broader usage.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto Introduces SensorDiagnostic, updates SensorState to include warnings, and renames SensorErrorCode to SensorDiagnosticCode.
RELEASE_NOTES.md Adds documentation updates reflecting the new SensorDiagnostic message and the updated enum name.

Copy link
Contributor

@thomas-nicolai-frequenz thomas-nicolai-frequenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue Apr 29, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 59dcdc0 Apr 29, 2025
6 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the sensor_err branch April 29, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants