blob: 00a3cd830940e8c4730381b36002ffe619c3ee29 [file] [log] [blame]
#pragma once
#include "ucd90x_monitor.hpp"
#include <sdbusplus/bus.hpp>
#include <cstdint>
#include <map>
#include <string>
#include <vector>
namespace phosphor::power::sequencer
{
/**
* @class UCD90160Monitor
* This class implements fault analysis for the UCD90160
* power sequencer device.
*/
class UCD90160Monitor : public UCD90xMonitor
{
public:
UCD90160Monitor() = delete;
UCD90160Monitor(const UCD90160Monitor&) = delete;
UCD90160Monitor& operator=(const UCD90160Monitor&) = delete;
UCD90160Monitor(UCD90160Monitor&&) = delete;
UCD90160Monitor& operator=(UCD90160Monitor&&) = delete;
virtual ~UCD90160Monitor() = default;
/**
* Create a device object for UCD90160 monitoring.
* @param bus D-Bus bus object
* @param i2cBus The bus number of the power sequencer device
* @param i2cAddress The I2C address of the power sequencer device
*/
UCD90160Monitor(sdbusplus::bus_t& bus, std::uint8_t i2cBus,
std::uint16_t i2cAddress);
protected:
/** @copydoc UCD90xMonitor::formatGpioValues() */
void formatGpioValues(
const std::vector<int>& values, unsigned int numberLines,
std::map<std::string, std::string>& additionalData) const override;
};
} // namespace phosphor::power::sequencer