Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 1 | // This file was autogenerated. Do not edit! |
| 2 | // See elog-gen.py for more details |
| 3 | #pragma once |
| 4 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 5 | #include <phosphor-logging/elog.hpp> |
| 6 | #include <phosphor-logging/log.hpp> |
| 7 | #include <sdbusplus/exception.hpp> |
George Liu | a6c18f8 | 2020-06-22 10:50:04 +0800 | [diff] [blame^] | 8 | |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 9 | #include <string> |
| 10 | #include <tuple> |
| 11 | #include <type_traits> |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 12 | |
| 13 | namespace sdbusplus |
| 14 | { |
| 15 | namespace xyz |
| 16 | { |
| 17 | namespace openbmc_project |
| 18 | { |
| 19 | namespace Led |
| 20 | { |
| 21 | namespace Fru |
| 22 | { |
| 23 | namespace Monitor |
| 24 | { |
| 25 | namespace Error |
| 26 | { |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 27 | struct InventoryPathError; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 28 | } // namespace Error |
| 29 | } // namespace Monitor |
| 30 | } // namespace Fru |
| 31 | } // namespace Led |
| 32 | } // namespace openbmc_project |
| 33 | } // namespace xyz |
| 34 | } // namespace sdbusplus |
| 35 | |
| 36 | namespace sdbusplus |
| 37 | { |
| 38 | namespace xyz |
| 39 | { |
| 40 | namespace openbmc_project |
| 41 | { |
| 42 | namespace Led |
| 43 | { |
| 44 | namespace Mapper |
| 45 | { |
| 46 | namespace Error |
| 47 | { |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 48 | struct ObjectNotFoundError; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 49 | } // namespace Error |
| 50 | } // namespace Mapper |
| 51 | } // namespace Led |
| 52 | } // namespace openbmc_project |
| 53 | } // namespace xyz |
| 54 | } // namespace sdbusplus |
| 55 | |
| 56 | namespace sdbusplus |
| 57 | { |
| 58 | namespace xyz |
| 59 | { |
| 60 | namespace openbmc_project |
| 61 | { |
| 62 | namespace Led |
| 63 | { |
| 64 | namespace Mapper |
| 65 | { |
| 66 | namespace Error |
| 67 | { |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 68 | struct MethodError; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 69 | } // namespace Error |
| 70 | } // namespace Mapper |
| 71 | } // namespace Led |
| 72 | } // namespace openbmc_project |
| 73 | } // namespace xyz |
| 74 | } // namespace sdbusplus |
| 75 | |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 76 | namespace phosphor |
| 77 | { |
| 78 | |
| 79 | namespace logging |
| 80 | { |
| 81 | |
| 82 | namespace xyz |
| 83 | { |
| 84 | namespace openbmc_project |
| 85 | { |
| 86 | namespace Led |
| 87 | { |
| 88 | namespace Fru |
| 89 | { |
| 90 | namespace Monitor |
| 91 | { |
| 92 | namespace _InventoryPathError |
| 93 | { |
| 94 | |
| 95 | struct PATH |
| 96 | { |
| 97 | static constexpr auto str = "PATH=%s"; |
| 98 | static constexpr auto str_short = "PATH"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 99 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 100 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 101 | type _entry; |
| 102 | }; |
| 103 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 104 | } // namespace _InventoryPathError |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 105 | |
| 106 | struct InventoryPathError : public sdbusplus::exception_t |
| 107 | { |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 108 | static constexpr auto errName = |
| 109 | "xyz.openbmc_project.Led.Fru.Monitor.InventoryPathError"; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 110 | static constexpr auto errDesc = "Invalid Inventory Path."; |
| 111 | static constexpr auto L = level::INFO; |
| 112 | using PATH = _InventoryPathError::PATH; |
| 113 | using metadata_types = std::tuple<PATH>; |
| 114 | |
| 115 | const char* name() const noexcept |
| 116 | { |
| 117 | return errName; |
| 118 | } |
| 119 | |
| 120 | const char* description() const noexcept |
| 121 | { |
| 122 | return errDesc; |
| 123 | } |
| 124 | |
| 125 | const char* what() const noexcept |
| 126 | { |
| 127 | return errName; |
| 128 | } |
| 129 | }; |
| 130 | |
| 131 | } // namespace Monitor |
| 132 | } // namespace Fru |
| 133 | } // namespace Led |
| 134 | } // namespace openbmc_project |
| 135 | } // namespace xyz |
| 136 | |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 137 | namespace details |
| 138 | { |
| 139 | |
| 140 | template <> |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 141 | struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor:: |
| 142 | Error::InventoryPathError> |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 143 | { |
| 144 | using type = xyz::openbmc_project::Led::Fru::Monitor::InventoryPathError; |
| 145 | }; |
| 146 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 147 | } // namespace details |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 148 | |
| 149 | namespace xyz |
| 150 | { |
| 151 | namespace openbmc_project |
| 152 | { |
| 153 | namespace Led |
| 154 | { |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 155 | namespace Mapper |
| 156 | { |
| 157 | namespace _MethodError |
| 158 | { |
| 159 | |
| 160 | struct METHOD_NAME |
| 161 | { |
| 162 | static constexpr auto str = "METHOD_NAME=%s"; |
| 163 | static constexpr auto str_short = "METHOD_NAME"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 164 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 165 | explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 166 | type _entry; |
| 167 | }; |
| 168 | struct PATH |
| 169 | { |
| 170 | static constexpr auto str = "PATH=%s"; |
| 171 | static constexpr auto str_short = "PATH"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 172 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 173 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 174 | type _entry; |
| 175 | }; |
| 176 | struct INTERFACE |
| 177 | { |
| 178 | static constexpr auto str = "INTERFACE=%s"; |
| 179 | static constexpr auto str_short = "INTERFACE"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 180 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 181 | explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 182 | type _entry; |
| 183 | }; |
| 184 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 185 | } // namespace _MethodError |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 186 | |
| 187 | struct MethodError : public sdbusplus::exception_t |
| 188 | { |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 189 | static constexpr auto errName = |
| 190 | "xyz.openbmc_project.Led.Mapper.MethodError"; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 191 | static constexpr auto errDesc = "Failed to invoke ObjectMapper method"; |
| 192 | static constexpr auto L = level::INFO; |
| 193 | using METHOD_NAME = _MethodError::METHOD_NAME; |
| 194 | using PATH = _MethodError::PATH; |
| 195 | using INTERFACE = _MethodError::INTERFACE; |
| 196 | using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>; |
| 197 | |
| 198 | const char* name() const noexcept |
| 199 | { |
| 200 | return errName; |
| 201 | } |
| 202 | |
| 203 | const char* description() const noexcept |
| 204 | { |
| 205 | return errDesc; |
| 206 | } |
| 207 | |
| 208 | const char* what() const noexcept |
| 209 | { |
| 210 | return errName; |
| 211 | } |
| 212 | }; |
| 213 | |
| 214 | } // namespace Mapper |
| 215 | } // namespace Led |
| 216 | } // namespace openbmc_project |
| 217 | } // namespace xyz |
| 218 | |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 219 | namespace details |
| 220 | { |
| 221 | |
| 222 | template <> |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 223 | struct map_exception_type< |
| 224 | sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError> |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 225 | { |
| 226 | using type = xyz::openbmc_project::Led::Mapper::MethodError; |
| 227 | }; |
| 228 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 229 | } // namespace details |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 230 | |
| 231 | namespace xyz |
| 232 | { |
| 233 | namespace openbmc_project |
| 234 | { |
| 235 | namespace Led |
| 236 | { |
| 237 | namespace Mapper |
| 238 | { |
| 239 | namespace _ObjectNotFoundError |
| 240 | { |
| 241 | |
| 242 | struct METHOD_NAME |
| 243 | { |
| 244 | static constexpr auto str = "METHOD_NAME=%s"; |
| 245 | static constexpr auto str_short = "METHOD_NAME"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 246 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 247 | explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 248 | type _entry; |
| 249 | }; |
| 250 | struct PATH |
| 251 | { |
| 252 | static constexpr auto str = "PATH=%s"; |
| 253 | static constexpr auto str_short = "PATH"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 254 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 255 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 256 | type _entry; |
| 257 | }; |
| 258 | struct INTERFACE |
| 259 | { |
| 260 | static constexpr auto str = "INTERFACE=%s"; |
| 261 | static constexpr auto str_short = "INTERFACE"; |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 262 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 263 | explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)){}; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 264 | type _entry; |
| 265 | }; |
| 266 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 267 | } // namespace _ObjectNotFoundError |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 268 | |
| 269 | struct ObjectNotFoundError : public sdbusplus::exception_t |
| 270 | { |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 271 | static constexpr auto errName = |
| 272 | "xyz.openbmc_project.Led.Mapper.ObjectNotFoundError"; |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 273 | static constexpr auto errDesc = "Failed to get response from the method."; |
| 274 | static constexpr auto L = level::INFO; |
| 275 | using METHOD_NAME = _ObjectNotFoundError::METHOD_NAME; |
| 276 | using PATH = _ObjectNotFoundError::PATH; |
| 277 | using INTERFACE = _ObjectNotFoundError::INTERFACE; |
| 278 | using metadata_types = std::tuple<METHOD_NAME, PATH, INTERFACE>; |
| 279 | |
| 280 | const char* name() const noexcept |
| 281 | { |
| 282 | return errName; |
| 283 | } |
| 284 | |
| 285 | const char* description() const noexcept |
| 286 | { |
| 287 | return errDesc; |
| 288 | } |
| 289 | |
| 290 | const char* what() const noexcept |
| 291 | { |
| 292 | return errName; |
| 293 | } |
| 294 | }; |
| 295 | |
| 296 | } // namespace Mapper |
| 297 | } // namespace Led |
| 298 | } // namespace openbmc_project |
| 299 | } // namespace xyz |
| 300 | |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 301 | namespace details |
| 302 | { |
| 303 | |
| 304 | template <> |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 305 | struct map_exception_type< |
| 306 | sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError> |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 307 | { |
| 308 | using type = xyz::openbmc_project::Led::Mapper::ObjectNotFoundError; |
| 309 | }; |
| 310 | |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 311 | } // namespace details |
Dhruvaraj Subhashchandran | 3c6f29a | 2017-04-20 09:47:28 -0500 | [diff] [blame] | 312 | |
| 313 | } // namespace logging |
| 314 | |
| 315 | } // namespace phosphor |