component: Efu
proto_imports:
  - vehicle/common/proto/efuse.proto
metric: ::l3_power::EfuseStatus
namespace: l3_efu

# TODO(SWAT-2908): Nicely setup l3_power diagnostic collector
faults:
    # Fault should be an ERROR.
  - id: 0
    name: RESERVED
    severity: WARNING
    description: ""
    # Fault should be an ERROR.
  - id: 1
    name: I2C_CURRENT_TX_ERROR
    severity: WARNING
    description: "Failure communicating with i2c devices on current bus."
    # Fault should be an ERROR.
  - id: 2
    name: I2C_CURRENT_INIT_ERROR
    severity: WARNING
    description: "Failed to initialize i2c current bus."
  - id: 3
    name: I2C_FUSE_12V_TX_ERROR
    severity: WARNING
    description: "Failure communicating with i2c devices on 12v fuse bus."
    # Fault should be an ERROR.
  - id: 4
    name: I2C_FUSE_12V_INIT_ERROR
    severity: WARNING
    description: "Failed to initialize i2c 12v fuse bus."
  - id: 5
    name: I2C_FUSE_24V_TX_ERROR
    severity: WARNING
    description: "Failure communicating with i2c devices on 24v fuse bus."
    # Fault should be an ERROR.
  - id: 6
    name: I2C_FUSE_24V_INIT_ERROR
    severity: WARNING
    description: "Failed to initialize i2c 24v fuse bus."
  - id: 7
    name: AI_CAN_ERROR
    severity: INFO
    description: "Unimplemented."
  - id: 8
    name: AI_CAN_RX_ERROR
    severity: INFO
    description: "Unimplemented."
  - id: 9
    name: AI_CAN_TX_ERROR
    severity: INFO
    description: "Unimplemented."
  - id: 10
    name: BACKGROUND_WATCHDOG
    severity: INFO
    description: "Unimplemented."
  - id: 11
    name: MONITOR_WATCHDOG
    severity: INFO
    description: "Unimplemented."
  - id: 12
    name: WATCHDOG_FAILURE
    severity: INFO
    description: "Unimplemented."
    # Fault should be an ERROR.
  - id: 13
    name: POWERBOARD_FAULTED
    severity: WARNING
    description: "powerboard is reporting a fault and causing eFuse to enter a fault state."
  - id: 14
    name: POWERBOARD_MIA
    severity: INFO
    description: "Unimplemented."
    # Fault should be an ERROR.
  - id: 15
    name: OVERCURRENT_FAILURE
    severity: WARNING
    description: "The eFuse has detected a critical influx of current with hall effect sensor."
  - id: 16
    name: UNDERVOLTAGE_FAILURE
    severity: INFO
    description: "Unimplemented."
  - id: 17
    name: OVERVOLTAGE_FAILURE
    severity: INFO
    description: "Unimplemented."
  - id: 18
    name: SOFTWARE_ASSERT
    severity: INFO
    description: "Unimplemented."
  - id: 19
    name: INITIALIZATION_FAILURE
    severity: INFO
    description: "Unimplemented."
  - id: 20
    name: STATE_ERROR
    severity: WARNING
    description: "eFuse state machine in an invalid state."
  - id: 21
    name: FUSE_24V_FAULTED
    severity: WARNING
    description: "24v fuse faulted due to: overcurrent, overvoltage, or undervoltage."
  - id: 22
    name: FUSE_12V_FAULTED
    severity: WARNING
    description: "12v fuse faulted due to: overcurrent, overvoltage, or undervoltage."
  - id: 23
    name: CURRENT_24V_SENSOR_FAILURE
    severity: WARNING
    description: "24v current sensor faulted due to: overcurrent, overvoltage, or undervoltage."
  - id: 24
    name: CURRENT_12V_SENSOR_FAILURE
    severity: WARNING
    description: "12v current sensor faulted due to: overcurrent, overvoltage, or undervoltage."
    # Fault should be an ERROR.
  - id: 25
    name: EFUSE_TEMP_SENSOR_OVERTEMP
    severity: WARNING
    description: "eFuse has reached critical temperature and needs to cool down."
    # Fault should be an ERROR.
  - id: 26
    name: SENSOR_12V_OVER_CURRENT
    severity: WARNING
    description: "efuse 12v shunt at critical current levels."
    # Fault should be an ERROR.
  - id: 27
    name: SENSOR_12V_OVER_VOLTAGE
    severity: WARNING
    description: "efuse 12v shunt voltage too high."
    # Fault should be an ERROR.
  - id: 28
    name: SENSOR_12V_UNDER_VOLTAGE
    severity: WARNING
    description: "efuse 12v shunt voltage too low."
  - id: 29
    name: I2C_PANEL_LED_TX_ERROR
    severity: WARNING
    description: "I2C transmission error for eFuse power panel LEDs."
  - id: 30
    name: I2C_PANEL_LED_RX_ERROR
    severity: WARNING
    description: "I2C receive error for eFuse power panel LEDs."
    # Fault should be an ERROR.
  - id: 31
    name: EFUSE_TEMP_SENSOR_UNDERTEMP
    severity: WARNING
    description: "eFuse temperature is critically low and needs to warm up."
    # Fault should be an ERROR.
  - id: 32
    name: PUMP_FAILURE
    severity: WARNING
    description: "Coolant pump flow rate is below minimum threshold."
