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