blob: 00a3cd830940e8c4730381b36002ffe619c3ee29 [file] [log] [blame]
Jim Wrightc48551a2022-12-22 15:43:14 -06001#pragma once
2
3#include "ucd90x_monitor.hpp"
4
5#include <sdbusplus/bus.hpp>
6
7#include <cstdint>
Shawn McCarney328ca312023-07-11 08:18:41 -05008#include <map>
9#include <string>
10#include <vector>
Jim Wrightc48551a2022-12-22 15:43:14 -060011
12namespace phosphor::power::sequencer
13{
14
15/**
16 * @class UCD90160Monitor
17 * This class implements fault analysis for the UCD90160
18 * power sequencer device.
19 */
20class 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 McCarney328ca312023-07-11 08:18:41 -050038
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 Wrightc48551a2022-12-22 15:43:14 -060044};
45
46} // namespace phosphor::power::sequencer