Skip to content

Commit 51b7d7f

Browse files
Add communication component diagnostic message
Signed-off-by: Tiyash Basu <[email protected]>
1 parent 2e89add commit 51b7d7f

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Added new message definitions for communication components.
1616
- Added new message `ElectricalComponentDiagnostic` to represent warnings and errors in microgrid electrical components.
1717
- The enum `ComponentErrorCode` has now been renamed to `ElectricalComponentDiagnosticCode` to better reflect its shared usage with warnings and errors.
18+
- Added new message `CommunicationComponentDiagnostic` to represent warnings and errors in microgrid communication components.
1819

1920
## Bug Fixes
2021

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

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

1111
package frequenz.api.common.v1.microgrid.communication_components;
1212

13+
// Enumerated diagnostic codes for communication components.
14+
//
15+
// These codes indicate common network- or device-level faults that may affect connectivity.
16+
enum CommunicationComponentDiagnosticCode {
17+
// Default value; no specific diagnostic is specified.
18+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_UNSPECIFIED = 0;
19+
20+
// Component is unreachable (e.g., no heartbeat from device, network down).
21+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_UNREACHABLE = 1;
22+
23+
// Configuration error detected (e.g., invalid VLAN, IP conflict).
24+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_CONFIGURATION_ERR = 2;
25+
26+
// High packet loss detected over a sustained period.
27+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_PACKET_LOSS = 3;
28+
29+
// Excessive latency observed (e.g., ping time above threshold).
30+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_HIGH_LATENCY = 4;
31+
32+
// Hardware fault reported by device (e.g., port error, cable disconnected).
33+
COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_HARDWARE_FAULT = 5;
34+
}
35+
36+
// Represents an error or warning condition reported by a microgrid communication component.
37+
//
38+
// This message extends a standardized diagnostic code with optional vendor-specific
39+
// codes and contextual information for troubleshooting.
40+
//
41+
// !!! example "Typical Communication Component Warning"
42+
// ```json
43+
// {
44+
// "diagnosticCode": "COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_CONFIGURATION_ERR",
45+
// "vendorErrorCode": 1002,
46+
// "message": "VLAN mismatch detected on port 3"
47+
// }
48+
// ```
49+
//
50+
// !!! note "Vendor-Specific Codes"
51+
// When available, `vendor_error_code` reflects manufacturer-defined error identifiers.
52+
// These codes are vendor- and firmware-specific and must be interpreted using
53+
// the vendor's official documentation.
54+
message CommunicationComponentDiagnostic {
55+
// A standardized diagnostic code representing the category of the issue.
56+
CommunicationComponentDiagnosticCode diagnostic_code = 1;
57+
58+
// Optional vendor-provided error code for more granular diagnostics.
59+
optional uint32 vendor_error_code = 2;
60+
61+
// Human-readable message providing additional context.
62+
string message = 3;
63+
}
1364

1465
// `CommunicationComponent` represents a communication component within a
1566
// microgrid.

0 commit comments

Comments
 (0)