#pragma once namespace openpower { namespace vpd { /** @brief OpenPOWER VPD records we're interested in */ enum class Record { VINI, /**< Initial information, common to all OpenPOWER FRUs */ OPFR, /**< OpenPOWER FRU information, common to all OpenPOWER FRUs */ OSYS /**< Information specific to a system board */ }; /** @brief Convert VPD Record name from enum to string * @tparam R - VPD Record * @returns string representation of Record name */ template constexpr const char* getRecord() = delete; template <> constexpr const char* getRecord() { return "VINI"; } template <> constexpr const char* getRecord() { return "OPFR"; } template <> constexpr const char* getRecord() { return "OSYS"; } namespace record { /** @brief OpenPOWER VPD keywords we're interested in */ enum class Keyword { DR, /**< FRU name/description */ PN, /**< FRU part number */ SN, /**< FRU serial number */ CC, /**< Customer Card Identification Number (CCIN) */ HW, /**< FRU version */ B1, /**< MAC Address */ VN, /**< FRU manufacturer name */ MB, /**< FRU manufacture date */ MM, /**< FRU model */ UD, /**< System UUID */ VS, /**< OpenPower serial number */ VP /**< OpenPower part number */ }; /** @brief Convert VPD Keyword name from enum to string * @tparam K - VPD Keyword * @returns string representation of Keyword name */ template constexpr const char* getKeyword() = delete; template <> constexpr const char* getKeyword() { return "DR"; } template <> constexpr const char* getKeyword() { return "PN"; } template <> constexpr const char* getKeyword() { return "SN"; } template <> constexpr const char* getKeyword() { return "CC"; } template <> constexpr const char* getKeyword() { return "HW"; } template <> constexpr const char* getKeyword() { return "B1"; } template <> constexpr const char* getKeyword() { return "VN"; } template <> constexpr const char* getKeyword() { return "MB"; } template <> constexpr const char* getKeyword() { return "MM"; } template <> constexpr const char* getKeyword() { return "UD"; } template <> constexpr const char* getKeyword() { return "VS"; } template <> constexpr const char* getKeyword() { return "VP"; } } // namespace record /** @brief FRUs whose VPD we're interested in * * BMC The VPD on the BMC planar, for eg * ETHERNET The ethernet card on the BMC */ enum Fru { BMC, ETHERNET }; } // namespace vpd } // namespace openpower