Skip to content

Commit d0833cb

Browse files
Update communication component diagnostics code enum
This commit updates the `CommunicationComponentDiagnosticCode` enum in the `communication_components.proto` file to include additional diagnostic codes for better error handling and reporting. The new codes include `COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_UNKNOWN`, `COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_AUTHENTICATION_ERR`, `COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_OVER_TEMPERATURE`. Signed-off-by: Tiyash Basu <[email protected]>
1 parent 819304a commit d0833cb

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,28 @@ enum CommunicationComponentDiagnosticCode {
2323
// Component is unreachable (e.g., no heartbeat from device, network down).
2424
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_UNREACHABLE = 1;
2525

26+
// Communication component is unknown. This could happen in cases where the
27+
// status could be read from the component, but it could not be identified
28+
// as a known state.
29+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_UNKNOWN = 2;
30+
31+
// Authentication error (e.g., invalid credentials, certificate issues).
32+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_AUTHENTICATION_ERR = 3;
33+
2634
// Configuration error detected (e.g., invalid VLAN, IP conflict).
27-
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_CONFIGURATION_ERR = 2;
35+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_CONFIGURATION_ERR = 3;
2836

2937
// High packet loss detected over a sustained period.
30-
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_PACKET_LOSS = 3;
38+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_PACKET_LOSS = 4;
3139

3240
// Excessive latency observed (e.g., ping time above threshold).
33-
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_HIGH_LATENCY = 4;
41+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_HIGH_LATENCY = 5;
3442

3543
// Hardware fault reported by device (e.g., port error, cable disconnected).
36-
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_HARDWARE_FAULT = 5;
44+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_HARDWARE_GENERIC_FAULT = 6;
45+
46+
// Hardware fault due to overheating.
47+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_OVER_TEMPERATURE = 7;
3748
}
3849

3950
// Represents an error or warning condition reported by a microgrid

0 commit comments

Comments
 (0)