summaryrefslogtreecommitdiffstats
path: root/elog-errors.hpp
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-06-29 18:35:00 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-07-29 23:57:59 +0530
commitee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb (patch)
tree4d186ddf133d77880e857fccdddb71fcc155a6bf /elog-errors.hpp
parent554d60059e7d0b699b3cdcbe8de2c341613e9931 (diff)
downloadopenpower-occ-control-ee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb.tar.gz
openpower-occ-control-ee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb.zip
Add support to watch for OCC errors
Change-Id: I98d95020a2d01e281e5c8efa825d6b4bd4c6c160 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'elog-errors.hpp')
-rw-r--r--elog-errors.hpp1290
1 files changed, 539 insertions, 751 deletions
diff --git a/elog-errors.hpp b/elog-errors.hpp
index c9abdfa..823ffdb 100644
--- a/elog-errors.hpp
+++ b/elog-errors.hpp
@@ -65,6 +65,26 @@ namespace Error
namespace sdbusplus
{
+namespace org
+{
+namespace open_power
+{
+namespace OCC
+{
+namespace Device
+{
+namespace Error
+{
+ struct WriteFailure;
+} // namespace Error
+} // namespace Device
+} // namespace OCC
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
namespace xyz
{
namespace openbmc_project
@@ -206,58 +226,58 @@ namespace xyz
{
namespace openbmc_project
{
-namespace Common
+namespace Sensor
{
-namespace File
+namespace Device
{
namespace Error
{
- struct Seek;
+ struct ReadFailure;
} // namespace Error
-} // namespace File
-} // namespace Common
+} // namespace Device
+} // namespace Sensor
} // namespace openbmc_project
} // namespace xyz
} // namespace sdbusplus
namespace sdbusplus
{
-namespace org
+namespace xyz
{
-namespace open_power
+namespace openbmc_project
{
-namespace OCC
+namespace Common
{
-namespace PassThrough
+namespace File
{
namespace Error
{
- struct OpenFailure;
+ struct Seek;
} // namespace Error
-} // namespace PassThrough
-} // namespace OCC
-} // namespace open_power
-} // namespace org
+} // namespace File
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
} // namespace sdbusplus
namespace sdbusplus
{
-namespace xyz
+namespace org
{
-namespace openbmc_project
+namespace open_power
{
-namespace Sensor
+namespace OCC
{
namespace Device
{
namespace Error
{
- struct ReadFailure;
+ struct ConfigFailure;
} // namespace Error
} // namespace Device
-} // namespace Sensor
-} // namespace openbmc_project
-} // namespace xyz
+} // namespace OCC
+} // namespace open_power
+} // namespace org
} // namespace sdbusplus
namespace sdbusplus
@@ -268,13 +288,13 @@ namespace open_power
{
namespace OCC
{
-namespace PassThrough
+namespace Device
{
namespace Error
{
- struct ReadFailure;
+ struct OpenFailure;
} // namespace Error
-} // namespace PassThrough
+} // namespace Device
} // namespace OCC
} // namespace open_power
} // namespace org
@@ -308,13 +328,13 @@ namespace open_power
{
namespace OCC
{
-namespace PassThrough
+namespace Device
{
namespace Error
{
- struct WriteFailure;
+ struct ReadFailure;
} // namespace Error
-} // namespace PassThrough
+} // namespace Device
} // namespace OCC
} // namespace open_power
} // namespace org
@@ -351,6 +371,44 @@ namespace xyz
{
namespace openbmc_project
{
+namespace Control
+{
+namespace Host
+{
+namespace _CommandNotSupported
+{
+
+
+} // namespace _CommandNotSupported
+
+struct CommandNotSupported
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+
+};
+
+} // namespace Host
+} // namespace Control
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Control::Host::Error::CommandNotSupported>
+{
+ using type = xyz::openbmc_project::Control::Host::CommandNotSupported;
+};
+
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
namespace Common
{
namespace _Timeout
@@ -367,28 +425,12 @@ struct TIMEOUT_IN_MSEC
} // namespace _Timeout
-struct Timeout : public sdbusplus::exception_t
+struct Timeout
{
- static constexpr auto errName = "xyz.openbmc_project.Common.Timeout";
- static constexpr auto errDesc = "Operation timed out.";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using TIMEOUT_IN_MSEC = _Timeout::TIMEOUT_IN_MSEC;
using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Common
@@ -413,6 +455,41 @@ namespace openbmc_project
{
namespace Common
{
+namespace _InternalFailure
+{
+
+
+} // namespace _InternalFailure
+
+struct InternalFailure
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+
+};
+
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>
+{
+ using type = xyz::openbmc_project::Common::InternalFailure;
+};
+
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
namespace _InvalidArgument
{
@@ -435,15 +512,211 @@ struct ARGUMENT_VALUE
} // namespace _InvalidArgument
-struct InvalidArgument : public sdbusplus::exception_t
+struct InvalidArgument
{
- static constexpr auto errName = "xyz.openbmc_project.Common.InvalidArgument";
- static constexpr auto errDesc = "Invalid argument was given.";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using ARGUMENT_NAME = _InvalidArgument::ARGUMENT_NAME;
using ARGUMENT_VALUE = _InvalidArgument::ARGUMENT_VALUE;
using metadata_types = std::tuple<ARGUMENT_NAME, ARGUMENT_VALUE>;
+};
+
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>
+{
+ using type = xyz::openbmc_project::Common::InvalidArgument;
+};
+
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
+namespace File
+{
+namespace _Open
+{
+
+struct ERRNO
+{
+ static constexpr auto str = "ERRNO=%d";
+ static constexpr auto str_short = "ERRNO";
+ using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
+ explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct PATH
+{
+ static constexpr auto str = "PATH=%s";
+ static constexpr auto str_short = "PATH";
+ using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+ explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+
+} // namespace _Open
+
+struct Open
+{
+ static constexpr auto L = level::ERR;
+ using ERRNO = _Open::ERRNO;
+ using PATH = _Open::PATH;
+ using metadata_types = std::tuple<ERRNO, PATH>;
+
+};
+
+} // namespace File
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::File::Error::Open>
+{
+ using type = xyz::openbmc_project::Common::File::Open;
+};
+
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
+namespace File
+{
+namespace _Seek
+{
+
+struct OFFSET
+{
+ static constexpr auto str = "OFFSET=%ll";
+ static constexpr auto str_short = "OFFSET";
+ using type = std::tuple<std::decay_t<decltype(str)>,int64_t>;
+ explicit constexpr OFFSET(int64_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct WHENCE
+{
+ static constexpr auto str = "WHENCE=%d";
+ static constexpr auto str_short = "WHENCE";
+ using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
+ explicit constexpr WHENCE(int32_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct ERRNO
+{
+ static constexpr auto str = "ERRNO=%d";
+ static constexpr auto str_short = "ERRNO";
+ using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
+ explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct PATH
+{
+ static constexpr auto str = "PATH=%s";
+ static constexpr auto str_short = "PATH";
+ using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+ explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+
+} // namespace _Seek
+
+struct Seek
+{
+ static constexpr auto L = level::ERR;
+ using OFFSET = _Seek::OFFSET;
+ using WHENCE = _Seek::WHENCE;
+ using ERRNO = _Seek::ERRNO;
+ using PATH = _Seek::PATH;
+ using metadata_types = std::tuple<OFFSET, WHENCE, ERRNO, PATH>;
+
+};
+
+} // namespace File
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::File::Error::Seek>
+{
+ using type = xyz::openbmc_project::Common::File::Seek;
+};
+
+}
+
+namespace example
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Example
+{
+namespace Elog
+{
+namespace _TestErrorTwo
+{
+
+struct DEV_ADDR
+{
+ static constexpr auto str = "DEV_ADDR=0x%.8X";
+ static constexpr auto str_short = "DEV_ADDR";
+ using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
+ explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct DEV_ID
+{
+ static constexpr auto str = "DEV_ID=%u";
+ static constexpr auto str_short = "DEV_ID";
+ using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
+ explicit constexpr DEV_ID(uint32_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct DEV_NAME
+{
+ static constexpr auto str = "DEV_NAME=%s";
+ static constexpr auto str_short = "DEV_NAME";
+ using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+ explicit constexpr DEV_NAME(const char* a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+
+} // namespace _TestErrorTwo
+
+struct TestErrorTwo : public sdbusplus::exception_t
+{
+ static constexpr auto errName = "example.xyz.openbmc_project.Example.Elog.TestErrorTwo";
+ static constexpr auto errDesc = "This is test error two";
+ static constexpr auto L = level::ERR;
+ using DEV_ADDR = _TestErrorTwo::DEV_ADDR;
+ using DEV_ID = _TestErrorTwo::DEV_ID;
+ using DEV_NAME = _TestErrorTwo::DEV_NAME;
+ using metadata_types = std::tuple<DEV_ADDR, DEV_ID, DEV_NAME>;
+
const char* name() const noexcept
{
return errName;
@@ -460,40 +733,45 @@ struct InvalidArgument : public sdbusplus::exception_t
}
};
-} // namespace Common
+} // namespace Elog
+} // namespace Example
} // namespace openbmc_project
} // namespace xyz
+} // namespace example
-namespace details
-{
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>
+namespace example
{
- using type = xyz::openbmc_project::Common::InvalidArgument;
-};
-
-}
-
namespace xyz
{
namespace openbmc_project
{
-namespace Common
+namespace Example
{
-namespace _InternalFailure
+namespace Elog
+{
+namespace _AutoTestSimple
{
+struct STRING
+{
+ static constexpr auto str = "STRING=%s";
+ static constexpr auto str_short = "STRING";
+ using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+ explicit constexpr STRING(const char* a) : _entry(entry(str, a)) {};
+ type _entry;
+};
-} // namespace _InternalFailure
+} // namespace _AutoTestSimple
-struct InternalFailure : public sdbusplus::exception_t
+struct AutoTestSimple : public sdbusplus::exception_t
{
- static constexpr auto errName = "xyz.openbmc_project.Common.InternalFailure";
- static constexpr auto errDesc = "The operation failed internally.";
+ static constexpr auto errName = "example.xyz.openbmc_project.Example.Elog.AutoTestSimple";
+ static constexpr auto errDesc = "This is a simple test error.";
static constexpr auto L = level::ERR;
- using metadata_types = std::tuple<>;
+ using STRING = _AutoTestSimple::STRING;
+ using metadata_types = std::tuple<STRING>;
const char* name() const noexcept
{
@@ -511,21 +789,78 @@ struct InternalFailure : public sdbusplus::exception_t
}
};
-} // namespace Common
+} // namespace Elog
+} // namespace Example
} // namespace openbmc_project
} // namespace xyz
+} // namespace example
-namespace details
+
+namespace example
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Example
+{
+namespace Device
+{
+namespace _Callout
{
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>
+struct CALLOUT_ERRNO_TEST
{
- using type = xyz::openbmc_project::Common::InternalFailure;
+ static constexpr auto str = "CALLOUT_ERRNO_TEST=%d";
+ static constexpr auto str_short = "CALLOUT_ERRNO_TEST";
+ using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
+ explicit constexpr CALLOUT_ERRNO_TEST(int32_t a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+struct CALLOUT_DEVICE_PATH_TEST
+{
+ static constexpr auto str = "CALLOUT_DEVICE_PATH_TEST=%s";
+ static constexpr auto str_short = "CALLOUT_DEVICE_PATH_TEST";
+ using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+ explicit constexpr CALLOUT_DEVICE_PATH_TEST(const char* a) : _entry(entry(str, a)) {};
+ type _entry;
};
-}
+} // namespace _Callout
+
+struct Callout : public sdbusplus::exception_t
+{
+ static constexpr auto errName = "example.xyz.openbmc_project.Example.Device.Callout";
+ static constexpr auto errDesc = "Generic device callout";
+ static constexpr auto L = level::ERR;
+ using CALLOUT_ERRNO_TEST = _Callout::CALLOUT_ERRNO_TEST;
+ using CALLOUT_DEVICE_PATH_TEST = _Callout::CALLOUT_DEVICE_PATH_TEST;
+ using metadata_types = std::tuple<CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
+
+ const char* name() const noexcept
+ {
+ return errName;
+ }
+
+ const char* description() const noexcept
+ {
+ return errDesc;
+ }
+
+ const char* what() const noexcept
+ {
+ return errName;
+ }
+};
+
+} // namespace Device
+} // namespace Example
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace example
+
+
namespace xyz
{
@@ -557,29 +892,13 @@ struct CALLOUT_DEVICE_PATH
} // namespace _Device
-struct Device : public sdbusplus::exception_t
+struct Device
{
- static constexpr auto errName = "xyz.openbmc_project.Common.Callout.Device";
- static constexpr auto errDesc = "Generic device callout";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Callout
@@ -621,30 +940,14 @@ struct CALLOUT_GPIO_NUM
} // namespace _GPIO
-struct GPIO : public sdbusplus::exception_t
+struct GPIO
{
- static constexpr auto errName = "xyz.openbmc_project.Common.Callout.GPIO";
- static constexpr auto errDesc = "Callout GPIO pin";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM;
using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Callout
@@ -694,31 +997,15 @@ struct CALLOUT_IIC_ADDR
} // namespace _IIC
-struct IIC : public sdbusplus::exception_t
+struct IIC
{
- static constexpr auto errName = "xyz.openbmc_project.Common.Callout.IIC";
- static constexpr auto errDesc = "Callout IIC device";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS;
using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR;
using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Callout
@@ -760,28 +1047,12 @@ struct CALLOUT_INVENTORY_PATH
} // namespace _Inventory
-struct Inventory : public sdbusplus::exception_t
+struct Inventory
{
- static constexpr auto errName = "xyz.openbmc_project.Common.Callout.Inventory";
- static constexpr auto errDesc = "Inventory item callout";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH;
using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Callout
@@ -823,28 +1094,12 @@ struct CALLOUT_IPMI_SENSOR_NUM
} // namespace _IPMISensor
-struct IPMISensor : public sdbusplus::exception_t
+struct IPMISensor
{
- static constexpr auto errName = "xyz.openbmc_project.Common.Callout.IPMISensor";
- static constexpr auto errDesc = "Callout IPMI sensor";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM;
using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Callout
@@ -868,40 +1123,65 @@ namespace xyz
{
namespace openbmc_project
{
-namespace Control
+namespace State
{
namespace Host
{
-namespace _CommandNotSupported
+namespace _SoftOffTimeout
{
-} // namespace _CommandNotSupported
+} // namespace _SoftOffTimeout
-struct CommandNotSupported : public sdbusplus::exception_t
+struct SoftOffTimeout
{
- static constexpr auto errName = "xyz.openbmc_project.Control.Host.CommandNotSupported";
- static constexpr auto errDesc = "Command is not supported";
static constexpr auto L = level::ERR;
- using metadata_types = std::tuple<>;
+ using TIMEOUT_IN_MSEC = xyz::openbmc_project::Common::Timeout::TIMEOUT_IN_MSEC;
+ using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
- const char* name() const noexcept
- {
- return errName;
- }
+};
- const char* description() const noexcept
- {
- return errDesc;
- }
+} // namespace Host
+} // namespace State
+} // namespace openbmc_project
+} // namespace xyz
- const char* what() const noexcept
- {
- return errName;
- }
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout>
+{
+ using type = xyz::openbmc_project::State::Host::SoftOffTimeout;
};
-} // namespace Host
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Control
+{
+namespace Device
+{
+namespace _WriteFailure
+{
+
+
+} // namespace _WriteFailure
+
+struct WriteFailure
+{
+ static constexpr auto L = level::ERR;
+ using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
+ using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
+ using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
+
+};
+
+} // namespace Device
} // namespace Control
} // namespace openbmc_project
} // namespace xyz
@@ -911,9 +1191,9 @@ namespace details
{
template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Control::Host::Error::CommandNotSupported>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Control::Device::Error::WriteFailure>
{
- using type = xyz::openbmc_project::Control::Host::CommandNotSupported;
+ using type = xyz::openbmc_project::Control::Device::WriteFailure;
};
}
@@ -924,7 +1204,7 @@ namespace open_power
{
namespace OCC
{
-namespace PassThrough
+namespace Device
{
namespace _OpenFailure
{
@@ -932,32 +1212,16 @@ namespace _OpenFailure
} // namespace _OpenFailure
-struct OpenFailure : public sdbusplus::exception_t
+struct OpenFailure
{
- static constexpr auto errName = "org.open_power.OCC.PassThrough.OpenFailure";
- static constexpr auto errDesc = "Opening OCC device failed.";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
-} // namespace PassThrough
+} // namespace Device
} // namespace OCC
} // namespace open_power
} // namespace org
@@ -967,9 +1231,9 @@ namespace details
{
template <>
-struct map_exception_type<sdbusplus::org::open_power::OCC::PassThrough::Error::OpenFailure>
+struct map_exception_type<sdbusplus::org::open_power::OCC::Device::Error::OpenFailure>
{
- using type = org::open_power::OCC::PassThrough::OpenFailure;
+ using type = org::open_power::OCC::Device::OpenFailure;
};
}
@@ -980,7 +1244,7 @@ namespace open_power
{
namespace OCC
{
-namespace PassThrough
+namespace Device
{
namespace _ReadFailure
{
@@ -988,32 +1252,16 @@ namespace _ReadFailure
} // namespace _ReadFailure
-struct ReadFailure : public sdbusplus::exception_t
+struct ReadFailure
{
- static constexpr auto errName = "org.open_power.OCC.PassThrough.ReadFailure";
- static constexpr auto errDesc = "Reading from OCC failed.";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
-} // namespace PassThrough
+} // namespace Device
} // namespace OCC
} // namespace open_power
} // namespace org
@@ -1023,9 +1271,9 @@ namespace details
{
template <>
-struct map_exception_type<sdbusplus::org::open_power::OCC::PassThrough::Error::ReadFailure>
+struct map_exception_type<sdbusplus::org::open_power::OCC::Device::Error::ReadFailure>
{
- using type = org::open_power::OCC::PassThrough::ReadFailure;
+ using type = org::open_power::OCC::Device::ReadFailure;
};
}
@@ -1036,7 +1284,7 @@ namespace open_power
{
namespace OCC
{
-namespace PassThrough
+namespace Device
{
namespace _WriteFailure
{
@@ -1044,32 +1292,16 @@ namespace _WriteFailure
} // namespace _WriteFailure
-struct WriteFailure : public sdbusplus::exception_t
+struct WriteFailure
{
- static constexpr auto errName = "org.open_power.OCC.PassThrough.WriteFailure";
- static constexpr auto errDesc = "Writing to OCC failed.";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
-} // namespace PassThrough
+} // namespace Device
} // namespace OCC
} // namespace open_power
} // namespace org
@@ -1079,133 +1311,92 @@ namespace details
{
template <>
-struct map_exception_type<sdbusplus::org::open_power::OCC::PassThrough::Error::WriteFailure>
+struct map_exception_type<sdbusplus::org::open_power::OCC::Device::Error::WriteFailure>
{
- using type = org::open_power::OCC::PassThrough::WriteFailure;
+ using type = org::open_power::OCC::Device::WriteFailure;
};
}
-namespace xyz
+namespace org
{
-namespace openbmc_project
+namespace open_power
{
-namespace Control
+namespace OCC
{
namespace Device
{
-namespace _WriteFailure
+namespace _ConfigFailure
{
-} // namespace _WriteFailure
+} // namespace _ConfigFailure
-struct WriteFailure : public sdbusplus::exception_t
+struct ConfigFailure
{
- static constexpr auto errName = "xyz.openbmc_project.Control.Device.WriteFailure";
- static constexpr auto errDesc = "Failed to write to device.";
- static constexpr auto L = level::INFO;
+ static constexpr auto L = level::ERR;
using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Device
-} // namespace Control
-} // namespace openbmc_project
-} // namespace xyz
+} // namespace OCC
+} // namespace open_power
+} // namespace org
namespace details
{
template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Control::Device::Error::WriteFailure>
+struct map_exception_type<sdbusplus::org::open_power::OCC::Device::Error::ConfigFailure>
{
- using type = xyz::openbmc_project::Control::Device::WriteFailure;
+ using type = org::open_power::OCC::Device::ConfigFailure;
};
}
-namespace example
-{
namespace xyz
{
namespace openbmc_project
{
-namespace Example
+namespace Sensor
{
namespace Device
{
-namespace _Callout
+namespace _ReadFailure
{
-struct CALLOUT_ERRNO_TEST
-{
- static constexpr auto str = "CALLOUT_ERRNO_TEST=%d";
- static constexpr auto str_short = "CALLOUT_ERRNO_TEST";
- using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
- explicit constexpr CALLOUT_ERRNO_TEST(int32_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct CALLOUT_DEVICE_PATH_TEST
-{
- static constexpr auto str = "CALLOUT_DEVICE_PATH_TEST=%s";
- static constexpr auto str_short = "CALLOUT_DEVICE_PATH_TEST";
- using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr CALLOUT_DEVICE_PATH_TEST(const char* a) : _entry(entry(str, a)) {};
- type _entry;
-};
-} // namespace _Callout
+} // namespace _ReadFailure
-struct Callout : public sdbusplus::exception_t
+struct ReadFailure
{
- static constexpr auto errName = "example.xyz.openbmc_project.Example.Device.Callout";
- static constexpr auto errDesc = "Generic device callout";
- static constexpr auto L = level::INFO;
- using CALLOUT_ERRNO_TEST = _Callout::CALLOUT_ERRNO_TEST;
- using CALLOUT_DEVICE_PATH_TEST = _Callout::CALLOUT_DEVICE_PATH_TEST;
- using metadata_types = std::tuple<CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
+ static constexpr auto L = level::ERR;
+ using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
+ using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
+ using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
- const char* what() const noexcept
- {
- return errName;
- }
};
} // namespace Device
-} // namespace Example
+} // namespace Sensor
} // namespace openbmc_project
} // namespace xyz
-} // namespace example
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Sensor::Device::Error::ReadFailure>
+{
+ using type = xyz::openbmc_project::Sensor::Device::ReadFailure;
+};
+
+}
namespace example
{
@@ -1217,101 +1408,48 @@ namespace Example
{
namespace Elog
{
-namespace _TestErrorTwo
+namespace _TestErrorOne
{
-struct DEV_ADDR
-{
- static constexpr auto str = "DEV_ADDR=0x%.8X";
- static constexpr auto str_short = "DEV_ADDR";
- using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
- explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct DEV_ID
+struct ERRNUM
{
- static constexpr auto str = "DEV_ID=%u";
- static constexpr auto str_short = "DEV_ID";
- using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
- explicit constexpr DEV_ID(uint32_t a) : _entry(entry(str, a)) {};
+ static constexpr auto str = "ERRNUM=0x%.4X";
+ static constexpr auto str_short = "ERRNUM";
+ using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
+ explicit constexpr ERRNUM(uint16_t a) : _entry(entry(str, a)) {};
type _entry;
};
-struct DEV_NAME
+struct FILE_PATH
{
- static constexpr auto str = "DEV_NAME=%s";
- static constexpr auto str_short = "DEV_NAME";
+ static constexpr auto str = "FILE_PATH=%s";
+ static constexpr auto str_short = "FILE_PATH";
using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr DEV_NAME(const char* a) : _entry(entry(str, a)) {};
+ explicit constexpr FILE_PATH(const char* a) : _entry(entry(str, a)) {};
type _entry;
};
-
-} // namespace _TestErrorTwo
-
-struct TestErrorTwo : public sdbusplus::exception_t
-{
- static constexpr auto errName = "example.xyz.openbmc_project.Example.Elog.TestErrorTwo";
- static constexpr auto errDesc = "This is test error two";
- static constexpr auto L = level::ERR;
- using DEV_ADDR = _TestErrorTwo::DEV_ADDR;
- using DEV_ID = _TestErrorTwo::DEV_ID;
- using DEV_NAME = _TestErrorTwo::DEV_NAME;
- using metadata_types = std::tuple<DEV_ADDR, DEV_ID, DEV_NAME>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
-};
-
-} // namespace Elog
-} // namespace Example
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace example
-
-
-
-namespace example
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Example
-{
-namespace Elog
-{
-namespace _AutoTestSimple
-{
-
-struct STRING
+struct FILE_NAME
{
- static constexpr auto str = "STRING=%s";
- static constexpr auto str_short = "STRING";
+ static constexpr auto str = "FILE_NAME=%s";
+ static constexpr auto str_short = "FILE_NAME";
using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr STRING(const char* a) : _entry(entry(str, a)) {};
+ explicit constexpr FILE_NAME(const char* a) : _entry(entry(str, a)) {};
type _entry;
};
-} // namespace _AutoTestSimple
+} // namespace _TestErrorOne
-struct AutoTestSimple : public sdbusplus::exception_t
+struct TestErrorOne : public sdbusplus::exception_t
{
- static constexpr auto errName = "example.xyz.openbmc_project.Example.Elog.AutoTestSimple";
- static constexpr auto errDesc = "This is a simple test error.";
- static constexpr auto L = level::ERR;
- using STRING = _AutoTestSimple::STRING;
- using metadata_types = std::tuple<STRING>;
+ static constexpr auto errName = "example.xyz.openbmc_project.Example.Elog.TestErrorOne";
+ static constexpr auto errDesc = "this is test error one";
+ static constexpr auto L = level::INFO;
+ using ERRNUM = _TestErrorOne::ERRNUM;
+ using FILE_PATH = _TestErrorOne::FILE_PATH;
+ using FILE_NAME = _TestErrorOne::FILE_NAME;
+ using DEV_ADDR = example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
+ using DEV_ID = example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
+ using DEV_NAME = example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
+ using metadata_types = std::tuple<ERRNUM, FILE_PATH, FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>;
const char* name() const noexcept
{
@@ -1395,356 +1533,6 @@ struct TestCallout : public sdbusplus::exception_t
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Common
-{
-namespace File
-{
-namespace _Open
-{
-
-struct ERRNO
-{
- static constexpr auto str = "ERRNO=%d";
- static constexpr auto str_short = "ERRNO";
- using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
- explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct PATH
-{
- static constexpr auto str = "PATH=%s";
- static constexpr auto str_short = "PATH";
- using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
- type _entry;
-};
-
-} // namespace _Open
-
-struct Open : public sdbusplus::exception_t
-{
- static constexpr auto errName = "xyz.openbmc_project.Common.File.Open";
- static constexpr auto errDesc = "Failed to open a file";
- static constexpr auto L = level::INFO;
- using ERRNO = _Open::ERRNO;
- using PATH = _Open::PATH;
- using metadata_types = std::tuple<ERRNO, PATH>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
-};
-
-} // namespace File
-} // namespace Common
-} // namespace openbmc_project
-} // namespace xyz
-
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::File::Error::Open>
-{
- using type = xyz::openbmc_project::Common::File::Open;
-};
-
-}
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Common
-{
-namespace File
-{
-namespace _Seek
-{
-
-struct OFFSET
-{
- static constexpr auto str = "OFFSET=%ll";
- static constexpr auto str_short = "OFFSET";
- using type = std::tuple<std::decay_t<decltype(str)>,int64_t>;
- explicit constexpr OFFSET(int64_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct WHENCE
-{
- static constexpr auto str = "WHENCE=%d";
- static constexpr auto str_short = "WHENCE";
- using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
- explicit constexpr WHENCE(int32_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct ERRNO
-{
- static constexpr auto str = "ERRNO=%d";
- static constexpr auto str_short = "ERRNO";
- using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
- explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct PATH
-{
- static constexpr auto str = "PATH=%s";
- static constexpr auto str_short = "PATH";
- using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
- type _entry;
-};
-
-} // namespace _Seek
-
-struct Seek : public sdbusplus::exception_t
-{
- static constexpr auto errName = "xyz.openbmc_project.Common.File.Seek";
- static constexpr auto errDesc = "Failed to seek a file";
- static constexpr auto L = level::INFO;
- using OFFSET = _Seek::OFFSET;
- using WHENCE = _Seek::WHENCE;
- using ERRNO = _Seek::ERRNO;
- using PATH = _Seek::PATH;
- using metadata_types = std::tuple<OFFSET, WHENCE, ERRNO, PATH>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
-};
-
-} // namespace File
-} // namespace Common
-} // namespace openbmc_project
-} // namespace xyz
-
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::File::Error::Seek>
-{
- using type = xyz::openbmc_project::Common::File::Seek;
-};
-
-}
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace State
-{
-namespace Host
-{
-namespace _SoftOffTimeout
-{
-
-
-} // namespace _SoftOffTimeout
-
-struct SoftOffTimeout : public sdbusplus::exception_t
-{
- static constexpr auto errName = "xyz.openbmc_project.State.Host.SoftOffTimeout";
- static constexpr auto errDesc = "Host did not shutdown within configured time.";
- static constexpr auto L = level::INFO;
- using TIMEOUT_IN_MSEC = xyz::openbmc_project::Common::Timeout::TIMEOUT_IN_MSEC;
- using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
-};
-
-} // namespace Host
-} // namespace State
-} // namespace openbmc_project
-} // namespace xyz
-
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout>
-{
- using type = xyz::openbmc_project::State::Host::SoftOffTimeout;
-};
-
-}
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Sensor
-{
-namespace Device
-{
-namespace _ReadFailure
-{
-
-
-} // namespace _ReadFailure
-
-struct ReadFailure : public sdbusplus::exception_t
-{
- static constexpr auto errName = "xyz.openbmc_project.Sensor.Device.ReadFailure";
- static constexpr auto errDesc = "Failed to read from device.";
- static constexpr auto L = level::INFO;
- using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
- using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
- using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
-};
-
-} // namespace Device
-} // namespace Sensor
-} // namespace openbmc_project
-} // namespace xyz
-
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Sensor::Device::Error::ReadFailure>
-{
- using type = xyz::openbmc_project::Sensor::Device::ReadFailure;
-};
-
-}
-
-namespace example
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Example
-{
-namespace Elog
-{
-namespace _TestErrorOne
-{
-
-struct ERRNUM
-{
- static constexpr auto str = "ERRNUM=0x%.4X";
- static constexpr auto str_short = "ERRNUM";
- using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
- explicit constexpr ERRNUM(uint16_t a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct FILE_PATH
-{
- static constexpr auto str = "FILE_PATH=%s";
- static constexpr auto str_short = "FILE_PATH";
- using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr FILE_PATH(const char* a) : _entry(entry(str, a)) {};
- type _entry;
-};
-struct FILE_NAME
-{
- static constexpr auto str = "FILE_NAME=%s";
- static constexpr auto str_short = "FILE_NAME";
- using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
- explicit constexpr FILE_NAME(const char* a) : _entry(entry(str, a)) {};
- type _entry;
-};
-
-} // namespace _TestErrorOne
-
-struct TestErrorOne : public sdbusplus::exception_t
-{
- static constexpr auto errName = "example.xyz.openbmc_project.Example.Elog.TestErrorOne";
- static constexpr auto errDesc = "this is test error one";
- static constexpr auto L = level::INFO;
- using ERRNUM = _TestErrorOne::ERRNUM;
- using FILE_PATH = _TestErrorOne::FILE_PATH;
- using FILE_NAME = _TestErrorOne::FILE_NAME;
- using DEV_ADDR = example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
- using DEV_ID = example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
- using DEV_NAME = example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
- using metadata_types = std::tuple<ERRNUM, FILE_PATH, FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>;
-
- const char* name() const noexcept
- {
- return errName;
- }
-
- const char* description() const noexcept
- {
- return errDesc;
- }
-
- const char* what() const noexcept
- {
- return errName;
- }
-};
-
-} // namespace Elog
-} // namespace Example
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace example
-
-
-
namespace example
{
namespace xyz
OpenPOWER on IntegriCloud