Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 1 | // This file was autogenerated. Do not edit! |
| 2 | // See elog-gen.py for more details |
| 3 | #pragma once |
| 4 | |
Patrick Venture | 02261c0 | 2018-10-31 15:16:23 -0700 | [diff] [blame] | 5 | #include <phosphor-logging/elog.hpp> |
| 6 | #include <phosphor-logging/log.hpp> |
| 7 | #include <sdbusplus/exception.hpp> |
Patrick Williams | 490126f | 2023-05-10 07:50:22 -0500 | [diff] [blame] | 8 | |
Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 9 | #include <string> |
| 10 | #include <tuple> |
| 11 | #include <type_traits> |
Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 12 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 13 | namespace sdbusplus::error::org::open_power::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 14 | { |
| 15 | struct Procedure; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 16 | } // namespace sdbusplus::error::org::open_power::common::callout |
| 17 | namespace sdbusplus::error::org::open_power::host |
Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 18 | { |
Patrick Venture | 02261c0 | 2018-10-31 15:16:23 -0700 | [diff] [blame] | 19 | struct Event; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 20 | } // namespace sdbusplus::error::org::open_power::host |
| 21 | namespace sdbusplus::error::org::open_power::host |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 22 | { |
| 23 | struct MaintenanceProcedure; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 24 | } // namespace sdbusplus::error::org::open_power::host |
| 25 | namespace sdbusplus::error::org::open_power::occ::metrics |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 26 | { |
| 27 | struct Event; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 28 | } // namespace sdbusplus::error::org::open_power::occ::metrics |
| 29 | namespace sdbusplus::error::xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 30 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 31 | struct Device; |
| 32 | } // namespace sdbusplus::error::xyz::openbmc_project::common::callout |
| 33 | namespace sdbusplus::error::xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 34 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 35 | struct GPIO; |
| 36 | } // namespace sdbusplus::error::xyz::openbmc_project::common::callout |
| 37 | namespace sdbusplus::error::xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 38 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 39 | struct IIC; |
| 40 | } // namespace sdbusplus::error::xyz::openbmc_project::common::callout |
| 41 | namespace sdbusplus::error::xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 42 | { |
| 43 | struct IPMISensor; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 44 | } // namespace sdbusplus::error::xyz::openbmc_project::common::callout |
| 45 | namespace sdbusplus::error::xyz::openbmc_project::common::callout |
| 46 | { |
| 47 | struct Inventory; |
| 48 | } // namespace sdbusplus::error::xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 49 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 50 | namespace phosphor::logging |
Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 51 | { |
| 52 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 53 | namespace org::open_power::occ::metrics |
| 54 | { |
| 55 | namespace _Event |
| 56 | { |
| 57 | struct ESEL |
| 58 | { |
| 59 | /* |
| 60 | * We can't use -fsanitize=undefined if we declare a |
| 61 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 62 | * mako template lookups. |
| 63 | */ |
| 64 | static constexpr auto str_short = "ESEL"; |
| 65 | using type = std::tuple<std::decay_t<decltype("ESEL=%s")>, const char*>; |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 66 | explicit constexpr ESEL(const char* a) : _entry(entry("ESEL=%s", a)) {}; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 67 | type _entry; |
| 68 | }; |
| 69 | } // namespace _Event |
| 70 | |
| 71 | struct Event |
| 72 | { |
| 73 | static constexpr auto L = level::INFO; |
| 74 | using ESEL = _Event::ESEL; |
| 75 | using metadata_types = std::tuple<ESEL>; |
| 76 | }; |
| 77 | |
| 78 | } // namespace org::open_power::occ::metrics |
| 79 | |
| 80 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 81 | namespace org::open_power::OCC::Metrics |
| 82 | { |
| 83 | using Event = phosphor::logging::org::open_power::occ::metrics::Event; |
| 84 | } |
| 85 | #endif |
| 86 | |
| 87 | namespace details |
Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 88 | { |
| 89 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 90 | template <> |
| 91 | struct map_exception_type< |
| 92 | sdbusplus::error::org::open_power::occ::metrics::Event> |
Tom Joseph | 56c534b | 2017-10-17 12:38:42 +0530 | [diff] [blame] | 93 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 94 | using type = phosphor::logging::org::open_power::occ::metrics::Event; |
| 95 | }; |
| 96 | |
| 97 | } // namespace details |
| 98 | namespace org::open_power::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 99 | { |
| 100 | namespace _Procedure |
| 101 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 102 | struct PROCEDURE |
| 103 | { |
| 104 | /* |
| 105 | * We can't use -fsanitize=undefined if we declare a |
| 106 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 107 | * mako template lookups. |
| 108 | */ |
| 109 | static constexpr auto str_short = "PROCEDURE"; |
| 110 | using type = std::tuple<std::decay_t<decltype("PROCEDURE=%u")>, uint32_t>; |
| 111 | explicit constexpr PROCEDURE(uint32_t a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 112 | _entry(entry("PROCEDURE=%u", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 113 | type _entry; |
| 114 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 115 | } // namespace _Procedure |
| 116 | |
| 117 | struct Procedure |
| 118 | { |
| 119 | static constexpr auto L = level::ERR; |
| 120 | using PROCEDURE = _Procedure::PROCEDURE; |
| 121 | using metadata_types = std::tuple<PROCEDURE>; |
| 122 | }; |
| 123 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 124 | } // namespace org::open_power::common::callout |
| 125 | |
| 126 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 127 | namespace org::open_power::Common::Callout |
| 128 | { |
| 129 | using Procedure = |
| 130 | phosphor::logging::org::open_power::common::callout::Procedure; |
| 131 | } |
| 132 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 133 | |
| 134 | namespace details |
| 135 | { |
| 136 | |
| 137 | template <> |
| 138 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 139 | sdbusplus::error::org::open_power::common::callout::Procedure> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 140 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 141 | using type = phosphor::logging::org::open_power::common::callout::Procedure; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 142 | }; |
| 143 | |
| 144 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 145 | namespace xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 146 | { |
| 147 | namespace _Device |
| 148 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 149 | struct CALLOUT_ERRNO |
| 150 | { |
| 151 | /* |
| 152 | * We can't use -fsanitize=undefined if we declare a |
| 153 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 154 | * mako template lookups. |
| 155 | */ |
| 156 | static constexpr auto str_short = "CALLOUT_ERRNO"; |
| 157 | using type = |
| 158 | std::tuple<std::decay_t<decltype("CALLOUT_ERRNO=%d")>, int32_t>; |
| 159 | explicit constexpr CALLOUT_ERRNO(int32_t a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 160 | _entry(entry("CALLOUT_ERRNO=%d", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 161 | type _entry; |
| 162 | }; |
| 163 | struct CALLOUT_DEVICE_PATH |
| 164 | { |
| 165 | /* |
| 166 | * We can't use -fsanitize=undefined if we declare a |
| 167 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 168 | * mako template lookups. |
| 169 | */ |
| 170 | static constexpr auto str_short = "CALLOUT_DEVICE_PATH"; |
| 171 | using type = std::tuple<std::decay_t<decltype("CALLOUT_DEVICE_PATH=%s")>, |
| 172 | const char*>; |
| 173 | explicit constexpr CALLOUT_DEVICE_PATH(const char* a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 174 | _entry(entry("CALLOUT_DEVICE_PATH=%s", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 175 | type _entry; |
| 176 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 177 | } // namespace _Device |
| 178 | |
| 179 | struct Device |
| 180 | { |
| 181 | static constexpr auto L = level::ERR; |
| 182 | using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO; |
| 183 | using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH; |
| 184 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
| 185 | }; |
| 186 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 187 | } // namespace xyz::openbmc_project::common::callout |
| 188 | |
| 189 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 190 | namespace xyz::openbmc_project::Common::Callout |
| 191 | { |
| 192 | using Device = phosphor::logging::xyz::openbmc_project::common::callout::Device; |
| 193 | } |
| 194 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 195 | |
| 196 | namespace details |
| 197 | { |
| 198 | |
| 199 | template <> |
| 200 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 201 | sdbusplus::error::xyz::openbmc_project::common::callout::Device> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 202 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 203 | using type = |
| 204 | phosphor::logging::xyz::openbmc_project::common::callout::Device; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 205 | }; |
| 206 | |
| 207 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 208 | namespace xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 209 | { |
| 210 | namespace _GPIO |
| 211 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 212 | struct CALLOUT_GPIO_NUM |
| 213 | { |
| 214 | /* |
| 215 | * We can't use -fsanitize=undefined if we declare a |
| 216 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 217 | * mako template lookups. |
| 218 | */ |
| 219 | static constexpr auto str_short = "CALLOUT_GPIO_NUM"; |
| 220 | using type = |
| 221 | std::tuple<std::decay_t<decltype("CALLOUT_GPIO_NUM=%u")>, uint32_t>; |
| 222 | explicit constexpr CALLOUT_GPIO_NUM(uint32_t a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 223 | _entry(entry("CALLOUT_GPIO_NUM=%u", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 224 | type _entry; |
| 225 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 226 | } // namespace _GPIO |
| 227 | |
| 228 | struct GPIO |
| 229 | { |
| 230 | static constexpr auto L = level::ERR; |
| 231 | using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 232 | using CALLOUT_ERRNO = phosphor::logging::xyz::openbmc_project::common:: |
| 233 | callout::Device::CALLOUT_ERRNO; |
| 234 | using CALLOUT_DEVICE_PATH = phosphor::logging::xyz::openbmc_project:: |
| 235 | common::callout::Device::CALLOUT_DEVICE_PATH; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 236 | using metadata_types = |
| 237 | std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
| 238 | }; |
| 239 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 240 | } // namespace xyz::openbmc_project::common::callout |
| 241 | |
| 242 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 243 | namespace xyz::openbmc_project::Common::Callout |
| 244 | { |
| 245 | using GPIO = phosphor::logging::xyz::openbmc_project::common::callout::GPIO; |
| 246 | } |
| 247 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 248 | |
| 249 | namespace details |
| 250 | { |
| 251 | |
| 252 | template <> |
| 253 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 254 | sdbusplus::error::xyz::openbmc_project::common::callout::GPIO> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 255 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 256 | using type = phosphor::logging::xyz::openbmc_project::common::callout::GPIO; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 257 | }; |
| 258 | |
| 259 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 260 | namespace xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 261 | { |
| 262 | namespace _IIC |
| 263 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 264 | struct CALLOUT_IIC_BUS |
| 265 | { |
| 266 | /* |
| 267 | * We can't use -fsanitize=undefined if we declare a |
| 268 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 269 | * mako template lookups. |
| 270 | */ |
| 271 | static constexpr auto str_short = "CALLOUT_IIC_BUS"; |
| 272 | using type = |
| 273 | std::tuple<std::decay_t<decltype("CALLOUT_IIC_BUS=%s")>, const char*>; |
| 274 | explicit constexpr CALLOUT_IIC_BUS(const char* a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 275 | _entry(entry("CALLOUT_IIC_BUS=%s", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 276 | type _entry; |
| 277 | }; |
| 278 | struct CALLOUT_IIC_ADDR |
| 279 | { |
| 280 | /* |
| 281 | * We can't use -fsanitize=undefined if we declare a |
| 282 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 283 | * mako template lookups. |
| 284 | */ |
| 285 | static constexpr auto str_short = "CALLOUT_IIC_ADDR"; |
| 286 | using type = |
| 287 | std::tuple<std::decay_t<decltype("CALLOUT_IIC_ADDR=0x%hx")>, uint16_t>; |
| 288 | explicit constexpr CALLOUT_IIC_ADDR(uint16_t a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 289 | _entry(entry("CALLOUT_IIC_ADDR=0x%hx", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 290 | type _entry; |
| 291 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 292 | } // namespace _IIC |
| 293 | |
| 294 | struct IIC |
| 295 | { |
| 296 | static constexpr auto L = level::ERR; |
| 297 | using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS; |
| 298 | using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 299 | using CALLOUT_ERRNO = phosphor::logging::xyz::openbmc_project::common:: |
| 300 | callout::Device::CALLOUT_ERRNO; |
| 301 | using CALLOUT_DEVICE_PATH = phosphor::logging::xyz::openbmc_project:: |
| 302 | common::callout::Device::CALLOUT_DEVICE_PATH; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 303 | using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR, |
| 304 | CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
| 305 | }; |
| 306 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 307 | } // namespace xyz::openbmc_project::common::callout |
| 308 | |
| 309 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 310 | namespace xyz::openbmc_project::Common::Callout |
| 311 | { |
| 312 | using IIC = phosphor::logging::xyz::openbmc_project::common::callout::IIC; |
| 313 | } |
| 314 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 315 | |
| 316 | namespace details |
| 317 | { |
| 318 | |
| 319 | template <> |
| 320 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 321 | sdbusplus::error::xyz::openbmc_project::common::callout::IIC> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 322 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 323 | using type = phosphor::logging::xyz::openbmc_project::common::callout::IIC; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 324 | }; |
| 325 | |
| 326 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 327 | namespace xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 328 | { |
| 329 | namespace _Inventory |
| 330 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 331 | struct CALLOUT_INVENTORY_PATH |
| 332 | { |
| 333 | /* |
| 334 | * We can't use -fsanitize=undefined if we declare a |
| 335 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 336 | * mako template lookups. |
| 337 | */ |
| 338 | static constexpr auto str_short = "CALLOUT_INVENTORY_PATH"; |
| 339 | using type = std::tuple<std::decay_t<decltype("CALLOUT_INVENTORY_PATH=%s")>, |
| 340 | const char*>; |
| 341 | explicit constexpr CALLOUT_INVENTORY_PATH(const char* a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 342 | _entry(entry("CALLOUT_INVENTORY_PATH=%s", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 343 | type _entry; |
| 344 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 345 | } // namespace _Inventory |
| 346 | |
| 347 | struct Inventory |
| 348 | { |
| 349 | static constexpr auto L = level::ERR; |
| 350 | using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH; |
| 351 | using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>; |
| 352 | }; |
| 353 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 354 | } // namespace xyz::openbmc_project::common::callout |
| 355 | |
| 356 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 357 | namespace xyz::openbmc_project::Common::Callout |
| 358 | { |
| 359 | using Inventory = |
| 360 | phosphor::logging::xyz::openbmc_project::common::callout::Inventory; |
| 361 | } |
| 362 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 363 | |
| 364 | namespace details |
| 365 | { |
| 366 | |
| 367 | template <> |
| 368 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 369 | sdbusplus::error::xyz::openbmc_project::common::callout::Inventory> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 370 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 371 | using type = |
| 372 | phosphor::logging::xyz::openbmc_project::common::callout::Inventory; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 373 | }; |
| 374 | |
| 375 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 376 | namespace xyz::openbmc_project::common::callout |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 377 | { |
| 378 | namespace _IPMISensor |
| 379 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 380 | struct CALLOUT_IPMI_SENSOR_NUM |
| 381 | { |
| 382 | /* |
| 383 | * We can't use -fsanitize=undefined if we declare a |
| 384 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 385 | * mako template lookups. |
| 386 | */ |
| 387 | static constexpr auto str_short = "CALLOUT_IPMI_SENSOR_NUM"; |
| 388 | using type = |
| 389 | std::tuple<std::decay_t<decltype("CALLOUT_IPMI_SENSOR_NUM=%u")>, |
| 390 | uint32_t>; |
| 391 | explicit constexpr CALLOUT_IPMI_SENSOR_NUM(uint32_t a) : |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 392 | _entry(entry("CALLOUT_IPMI_SENSOR_NUM=%u", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 393 | type _entry; |
| 394 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 395 | } // namespace _IPMISensor |
| 396 | |
| 397 | struct IPMISensor |
| 398 | { |
| 399 | static constexpr auto L = level::ERR; |
| 400 | using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM; |
| 401 | using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>; |
| 402 | }; |
| 403 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 404 | } // namespace xyz::openbmc_project::common::callout |
| 405 | |
| 406 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 407 | namespace xyz::openbmc_project::Common::Callout |
| 408 | { |
| 409 | using IPMISensor = |
| 410 | phosphor::logging::xyz::openbmc_project::common::callout::IPMISensor; |
| 411 | } |
| 412 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 413 | |
| 414 | namespace details |
| 415 | { |
| 416 | |
| 417 | template <> |
| 418 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 419 | sdbusplus::error::xyz::openbmc_project::common::callout::IPMISensor> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 420 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 421 | using type = |
| 422 | phosphor::logging::xyz::openbmc_project::common::callout::IPMISensor; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 423 | }; |
| 424 | |
| 425 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 426 | namespace org::open_power::host |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 427 | { |
| 428 | namespace _Event |
| 429 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 430 | struct ESEL |
| 431 | { |
| 432 | /* |
| 433 | * We can't use -fsanitize=undefined if we declare a |
| 434 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 435 | * mako template lookups. |
| 436 | */ |
| 437 | static constexpr auto str_short = "ESEL"; |
| 438 | using type = std::tuple<std::decay_t<decltype("ESEL=%s")>, const char*>; |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 439 | explicit constexpr ESEL(const char* a) : _entry(entry("ESEL=%s", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 440 | type _entry; |
| 441 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 442 | } // namespace _Event |
| 443 | |
| 444 | struct Event |
| 445 | { |
| 446 | static constexpr auto L = level::ERR; |
| 447 | using ESEL = _Event::ESEL; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 448 | using CALLOUT_INVENTORY_PATH = phosphor::logging::xyz::openbmc_project:: |
| 449 | common::callout::Inventory::CALLOUT_INVENTORY_PATH; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 450 | using metadata_types = std::tuple<ESEL, CALLOUT_INVENTORY_PATH>; |
| 451 | }; |
| 452 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 453 | } // namespace org::open_power::host |
| 454 | |
| 455 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 456 | namespace org::open_power::Host |
| 457 | { |
| 458 | using Event = phosphor::logging::org::open_power::host::Event; |
| 459 | } |
| 460 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 461 | |
| 462 | namespace details |
| 463 | { |
| 464 | |
| 465 | template <> |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 466 | struct map_exception_type<sdbusplus::error::org::open_power::host::Event> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 467 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 468 | using type = phosphor::logging::org::open_power::host::Event; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 469 | }; |
| 470 | |
| 471 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 472 | namespace org::open_power::host |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 473 | { |
| 474 | namespace _MaintenanceProcedure |
| 475 | { |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 476 | struct ESEL |
| 477 | { |
| 478 | /* |
| 479 | * We can't use -fsanitize=undefined if we declare a |
| 480 | * 'static constexpr auto str' member, so don't. Instead, open-code the |
| 481 | * mako template lookups. |
| 482 | */ |
| 483 | static constexpr auto str_short = "ESEL"; |
| 484 | using type = std::tuple<std::decay_t<decltype("ESEL=%s")>, const char*>; |
Patrick Williams | d9c74ac | 2024-08-16 15:20:03 -0400 | [diff] [blame] | 485 | explicit constexpr ESEL(const char* a) : _entry(entry("ESEL=%s", a)) {}; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 486 | type _entry; |
| 487 | }; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 488 | } // namespace _MaintenanceProcedure |
| 489 | |
| 490 | struct MaintenanceProcedure |
| 491 | { |
| 492 | static constexpr auto L = level::ERR; |
| 493 | using ESEL = _MaintenanceProcedure::ESEL; |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 494 | using PROCEDURE = phosphor::logging::org::open_power::common::callout:: |
| 495 | Procedure::PROCEDURE; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 496 | using metadata_types = std::tuple<ESEL, PROCEDURE>; |
| 497 | }; |
| 498 | |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 499 | } // namespace org::open_power::host |
| 500 | |
| 501 | #ifndef SDBUSPP_REMOVE_DEPRECATED_NAMESPACE |
| 502 | namespace org::open_power::Host |
| 503 | { |
| 504 | using MaintenanceProcedure = |
| 505 | phosphor::logging::org::open_power::host::MaintenanceProcedure; |
| 506 | } |
| 507 | #endif |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 508 | |
| 509 | namespace details |
| 510 | { |
| 511 | |
| 512 | template <> |
| 513 | struct map_exception_type< |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 514 | sdbusplus::error::org::open_power::host::MaintenanceProcedure> |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 515 | { |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 516 | using type = phosphor::logging::org::open_power::host::MaintenanceProcedure; |
Tom Joseph | 3503fdc | 2019-01-10 11:25:27 +0530 | [diff] [blame] | 517 | }; |
| 518 | |
| 519 | } // namespace details |
Patrick Williams | da755ed | 2023-09-01 15:49:14 -0500 | [diff] [blame] | 520 | } // namespace phosphor::logging |