Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "ucd90x_monitor.hpp" |
| 4 | |
| 5 | #include <sdbusplus/bus.hpp> |
| 6 | |
| 7 | #include <cstdint> |
Shawn McCarney | 328ca31 | 2023-07-11 08:18:41 -0500 | [diff] [blame] | 8 | #include <map> |
| 9 | #include <string> |
| 10 | #include <vector> |
Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 11 | |
| 12 | namespace phosphor::power::sequencer |
| 13 | { |
| 14 | |
| 15 | /** |
| 16 | * @class UCD90160Monitor |
| 17 | * This class implements fault analysis for the UCD90160 |
| 18 | * power sequencer device. |
| 19 | */ |
| 20 | class UCD90160Monitor : public UCD90xMonitor |
| 21 | { |
| 22 | public: |
| 23 | UCD90160Monitor() = delete; |
| 24 | UCD90160Monitor(const UCD90160Monitor&) = delete; |
| 25 | UCD90160Monitor& operator=(const UCD90160Monitor&) = delete; |
| 26 | UCD90160Monitor(UCD90160Monitor&&) = delete; |
| 27 | UCD90160Monitor& operator=(UCD90160Monitor&&) = delete; |
| 28 | virtual ~UCD90160Monitor() = default; |
| 29 | |
| 30 | /** |
| 31 | * Create a device object for UCD90160 monitoring. |
| 32 | * @param bus D-Bus bus object |
| 33 | * @param i2cBus The bus number of the power sequencer device |
| 34 | * @param i2cAddress The I2C address of the power sequencer device |
| 35 | */ |
| 36 | UCD90160Monitor(sdbusplus::bus_t& bus, std::uint8_t i2cBus, |
| 37 | std::uint16_t i2cAddress); |
Shawn McCarney | 328ca31 | 2023-07-11 08:18:41 -0500 | [diff] [blame] | 38 | |
| 39 | protected: |
| 40 | /** @copydoc UCD90xMonitor::formatGpioValues() */ |
| 41 | void formatGpioValues( |
| 42 | const std::vector<int>& values, unsigned int numberLines, |
| 43 | std::map<std::string, std::string>& additionalData) const override; |
Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | } // namespace phosphor::power::sequencer |