@@ -336,129 +336,123 @@ enum ElectricalComponentStateCode {
336336 ELECTRICAL_COMPONENT_STATE_CODE_PRECHARGER_CLOSED = 42 ;
337337}
338338
339- // A representation of all possible errors that can occur across all component
340- // categories.
341- enum ElectricalComponentErrorCode {
339+ // A representation of all possible diagnostic codes that can occur for
340+ // electrical component, across all their categories. These diagnostic codes
341+ // can be used to refer to warnings or errors that are reported by the
342+ // component.
343+ enum ElectricalComponentDiagnosticCode {
342344 // Default value. No specific error is specified.
343- ELECTRICAL_COMPONENT_ERROR_CODE_UNSPECIFIED = 0 ;
345+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNSPECIFIED = 0 ;
344346
345347 // The component is reporting an unknown or an undefined error, and the sender
346348 // cannot parse the component error to any of the variants below.
347- ELECTRICAL_COMPONENT_ERROR_CODE_UNKNOWN = 1 ;
349+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNKNOWN = 1 ;
348350
349- // Error indicating that the component could not be switched on.
350- ELECTRICAL_COMPONENT_ERROR_CODE_SWITCH_ON_FAULT = 2 ;
351+ // The component could not be switched on.
352+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_SWITCH_ON_FAULT = 2 ;
351353
352- // Error indicating that the component is operating under the minimum rated
353- // voltage.
354- ELECTRICAL_COMPONENT_ERROR_CODE_UNDERVOLTAGE = 3 ;
354+ // The component is operating under the minimum rated voltage.
355+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNDERVOLTAGE = 3 ;
355356
356- // Error indicating that the component is operating over the maximum rated
357- // voltage.
358- ELECTRICAL_COMPONENT_ERROR_CODE_OVERVOLTAGE = 4 ;
357+ // The component is operating over the maximum rated voltage.
358+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_OVERVOLTAGE = 4 ;
359359
360- // Error indicating that the component is drawing more current than the
361- // maximum rated value.
362- ELECTRICAL_COMPONENT_ERROR_CODE_OVERCURRENT = 5 ;
360+ // The component is drawing more current than the maximum rated value.
361+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_OVERCURRENT = 5 ;
363362
364- // Error indicating that the component's consumption current is over the
365- // maximum rated value during charging.
366- ELECTRICAL_COMPONENT_ERROR_CODE_OVERCURRENT_CHARGING = 6 ;
363+ // The component's consumption current is over the maximum rated value during
364+ // charging.
365+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_OVERCURRENT_CHARGING = 6 ;
367366
368- // Error indicating that the component's production current is over the
369- // maximum rated value during discharging.
370- ELECTRICAL_COMPONENT_ERROR_CODE_OVERCURRENT_DISCHARGING = 7 ;
367+ // The component's production current is over the maximum rated value during
368+ // discharging.
369+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_OVERCURRENT_DISCHARGING = 7 ;
371370
372- // Error indicating that the component is operating over the maximum rated
373- // temperature.
374- ELECTRICAL_COMPONENT_ERROR_CODE_OVERTEMPERATURE = 8 ;
371+ // The component is operating over the maximum rated temperature.
372+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_OVERTEMPERATURE = 8 ;
375373
376- // Error indicating that the component is operating under the minimum rated
377- // temperature.
378- ELECTRICAL_COMPONENT_ERROR_CODE_UNDERTEMPERATURE = 9 ;
374+ // The component is operating under the minimum rated temperature.
375+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNDERTEMPERATURE = 9 ;
379376
380- // Error indicating that the component is exposed to high humidity levels over
381- // the maximum rated value.
382- ELECTRICAL_COMPONENT_ERROR_CODE_HIGH_HUMIDITY = 10 ;
377+ // The component is exposed to high humidity levels over the maximum rated
378+ // value.
379+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_HIGH_HUMIDITY = 10 ;
383380
384- // Error indicating that the component's fuse has blown.
385- ELECTRICAL_COMPONENT_ERROR_CODE_FUSE_ERROR = 11 ;
381+ // The component's fuse has blown.
382+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_FUSE_ERROR = 11 ;
386383
387- // Error indicating that the component's precharge unit has failed.
388- ELECTRICAL_COMPONENT_ERROR_CODE_PRECHARGE_ERROR = 12 ;
384+ // The component's precharge unit has failed.
385+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_PRECHARGE_ERROR = 12 ;
389386
390- // Error indicating plausibility issues within the system involving this
391- // component .
392- ELECTRICAL_COMPONENT_ERROR_CODE_PLAUSIBILITY_ERROR = 13 ;
387+ // There are plausibility issues within the component, causing its internal
388+ // sanity checks to fail .
389+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_PLAUSIBILITY_ERROR = 13 ;
393390
394- // Error indicating system shutdown due to undervoltage involving this
395- // component.
396- ELECTRICAL_COMPONENT_ERROR_CODE_UNDERVOLTAGE_SHUTDOWN = 14 ;
391+ // There is or was a system shutdown due to undervoltage.
392+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNDERVOLTAGE_SHUTDOWN = 14 ;
397393
398- // Error indicating unexpected pilot failure in an electric vehicle (EV)
399- // component.
400- ELECTRICAL_COMPONENT_ERROR_CODE_EV_UNEXPECTED_PILOT_FAILURE = 15 ;
394+ // There is an unexpected pilot failure in an electric vehicle (EV) component.
395+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_UNEXPECTED_PILOT_FAILURE = 15 ;
401396
402- // Error indicating fault current detected in the component.
403- ELECTRICAL_COMPONENT_ERROR_CODE_FAULT_CURRENT = 16 ;
397+ // A fault current has been detected in the component.
398+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_FAULT_CURRENT = 16 ;
404399
405- // Error indicating a short circuit detected in the component.
406- ELECTRICAL_COMPONENT_ERROR_CODE_SHORT_CIRCUIT = 17 ;
400+ // A short circuit has been detected in the component.
401+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_SHORT_CIRCUIT = 17 ;
407402
408- // Error indicating a configuration error related to the component .
409- ELECTRICAL_COMPONENT_ERROR_CODE_CONFIG_ERROR = 18 ;
403+ // The component has been configured incorrectly .
404+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_CONFIG_ERROR = 18 ;
410405
411- // Error indicating an illegal state requested for the component.
412- ELECTRICAL_COMPONENT_ERROR_CODE_ILLEGAL_COMPONENT_STATE_CODE_REQUESTED = 19 ;
406+ // A illegal state has been requested for the component.
407+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_ILLEGAL_COMPONENT_STATE_CODE_REQUESTED
408+ = 19;
413409
414- // Error indicating that the hardware of the component is inaccessible.
415- ELECTRICAL_COMPONENT_ERROR_CODE_HARDWARE_INACCESSIBLE = 20 ;
410+ // The hardware of the component is inaccessible.
411+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_HARDWARE_INACCESSIBLE = 20 ;
416412
417- // Error indicating an internal error within the component.
418- ELECTRICAL_COMPONENT_ERROR_CODE_INTERNAL = 21 ;
413+ // There is an internal error within the component.
414+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_INTERNAL = 21 ;
419415
420- // Error indicating that the component is unauthorized to perform the
421- // last requested action.
422- ELECTRICAL_COMPONENT_ERROR_CODE_UNAUTHORIZED = 22 ;
416+ // The component is unauthorized to perform the last requested action.
417+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_UNAUTHORIZED = 22 ;
423418
424- // Error indicating electric vehicle (EV) cable was abruptly unplugged from
425- // the charging station.
426- ELECTRICAL_COMPONENT_ERROR_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION = 40 ;
419+ // The electric vehicle (EV) cable was abruptly unplugged from the charging
420+ // station.
421+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION
422+ = 40;
427423
428- // Error indicating electric vehicle (EV) cable was abruptly unplugged from
429- // the vehicle.
430- ELECTRICAL_COMPONENT_ERROR_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_EV = 41 ;
424+ // The electric vehicle (EV) cable was abruptly unplugged from the vehicle.
425+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_EV = 41 ;
431426
432- // Error indicating electric vehicle (EV) cable lock failure .
433- ELECTRICAL_COMPONENT_ERROR_CODE_EV_CHARGING_CABLE_LOCK_FAILED = 42 ;
427+ // There is a cable lock failure with the electric vehicle (EV).
428+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_LOCK_FAILED = 42 ;
434429
435- // Error indicating an invalid electric vehicle (EV) cable.
436- ELECTRICAL_COMPONENT_ERROR_CODE_EV_CHARGING_CABLE_INVALID = 43 ;
430+ // The electric vehicle (EV) charging cable is invalid .
431+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_INVALID = 43 ;
437432
438- // Error indicating an incompatible electric vehicle (EV) plug.
439- ELECTRICAL_COMPONENT_ERROR_CODE_EV_CONSUMER_INCOMPATIBLE = 44 ;
433+ // The incompatible electric vehicle (EV) charging plug is invalid .
434+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CONSUMER_INCOMPATIBLE = 44 ;
440435
441- // Error indicating a battery system imbalance.
442- ELECTRICAL_COMPONENT_ERROR_CODE_BATTERY_IMBALANCE = 50 ;
436+ // There is a battery system imbalance.
437+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_BATTERY_IMBALANCE = 50 ;
443438
444- // Error indicating a low state of health (SOH) detected in the battery .
445- ELECTRICAL_COMPONENT_ERROR_CODE_BATTERY_LOW_SOH = 51 ;
439+ // The battery has a low state of health (SOH).
440+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_BATTERY_LOW_SOH = 51 ;
446441
447- // Error indicating a battery block error.
448- ELECTRICAL_COMPONENT_ERROR_CODE_BATTERY_BLOCK_ERROR = 52 ;
442+ // At least one of the battery blocks is in an error state .
443+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_BATTERY_BLOCK_ERROR = 52 ;
449444
450- // Error indicating a battery controller error.
451- ELECTRICAL_COMPONENT_ERROR_CODE_BATTERY_CONTROLLER_ERROR = 53 ;
445+ // The battery controller is in an error state .
446+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_BATTERY_CONTROLLER_ERROR = 53 ;
452447
453- // Error indicating a battery relay error.
454- ELECTRICAL_COMPONENT_ERROR_CODE_BATTERY_RELAY_ERROR = 54 ;
448+ // The battery's DC contactor or relay is in an error state .
449+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_BATTERY_RELAY_ERROR = 54 ;
455450
456- // Error indicating that battery calibration is needed .
457- ELECTRICAL_COMPONENT_ERROR_CODE_BATTERY_CALIBRATION_NEEDED = 56 ;
451+ // The battery needs calibration .
452+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_BATTERY_CALIBRATION_NEEDED = 56 ;
458453
459- // Error indicating that the relays have been cycled for the maximum number of
460- // times.
461- ELECTRICAL_COMPONENT_ERROR_CODE_RELAY_CYCLE_LIMIT_REACHED = 60 ;
454+ // The battery's DC contactor or relays have reached end of life.
455+ ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_RELAY_CYCLE_LIMIT_REACHED = 60 ;
462456}
463457
464458// Represents an error or warning condition reported by a microgrid electrical
@@ -471,7 +465,8 @@ enum ElectricalComponentErrorCode {
471465// !!! example "Typical Component Error"
472466// ```json
473467// {
474- // "errorCode": "ELECTRICAL_COMPONENT_ERROR_CODE_OVERTEMPERATURE",
468+ // "diagnosticCode":
469+ // "ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_OVERTEMPERATURE",
475470// "vendorErrorCode": 2003,
476471// "message": "Temperature sensor 3 reported 61.5°C (limit: 60°C)"
477472// }
@@ -487,9 +482,9 @@ enum ElectricalComponentErrorCode {
487482// error identifiers, typically exposed via Modbus or similar interfaces.
488483// These codes are vendor- and firmware-specific and must be interpreted
489484// using the vendor's official documentation.
490- message ElectricalComponentError {
485+ message ElectricalComponentDiagnostic {
491486 // A standardized error code representing the category of the issue.
492- ElectricalComponentErrorCode error_code = 1 ;
487+ ElectricalComponentDiagnosticCode diagnostic_code = 1 ;
493488
494489 // Optional vendor-provided error code for the error, for vendor-specific
495490 // insights or more granular diagnostics.
@@ -499,7 +494,7 @@ message ElectricalComponentError {
499494 string message = 3 ;
500495}
501496
502- // Representation of a component state and errors.
497+ // Representation of a component state, warnings, and errors.
503498message ElectricalComponentState {
504499 // The time at which the state was sampled.
505500 google.protobuf.Timestamp sampled_at = 1 ;
@@ -516,13 +511,13 @@ message ElectricalComponentState {
516511 // !!! note
517512 // Warnings may be reported even when the component is operational.
518513 // No duplicate warning codes allowed.
519- repeated ElectricalComponentError warnings = 3 ;
514+ repeated ElectricalComponentDiagnostic warnings = 3 ;
520515
521516 // List of critical errors currently affecting the component.
522517 //
523518 // !!! note
524519 // This list is expected to be populated only when the component is in an
525520 // error state.
526521 // No duplicate error codes allowed.
527- repeated ElectricalComponentError errors = 4 ;
522+ repeated ElectricalComponentDiagnostic errors = 4 ;
528523}
0 commit comments