Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1 | // This file was autogenerated. Do not edit! |
| 2 | // See elog-gen.py for more details |
| 3 | #pragma once |
| 4 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 5 | #include <phosphor-logging/elog.hpp> |
| 6 | #include <phosphor-logging/log.hpp> |
| 7 | #include <sdbusplus/exception.hpp> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <tuple> |
| 10 | #include <type_traits> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 11 | |
| 12 | namespace sdbusplus |
| 13 | { |
| 14 | namespace xyz |
| 15 | { |
| 16 | namespace openbmc_project |
| 17 | { |
| 18 | namespace Common |
| 19 | { |
| 20 | namespace Error |
| 21 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 22 | struct Timeout; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 23 | } // namespace Error |
| 24 | } // namespace Common |
| 25 | } // namespace openbmc_project |
| 26 | } // namespace xyz |
| 27 | } // namespace sdbusplus |
| 28 | |
| 29 | namespace sdbusplus |
| 30 | { |
| 31 | namespace xyz |
| 32 | { |
| 33 | namespace openbmc_project |
| 34 | { |
| 35 | namespace Common |
| 36 | { |
| 37 | namespace Callout |
| 38 | { |
| 39 | namespace Error |
| 40 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 41 | struct GPIO; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 42 | } // namespace Error |
| 43 | } // namespace Callout |
| 44 | } // namespace Common |
| 45 | } // namespace openbmc_project |
| 46 | } // namespace xyz |
| 47 | } // namespace sdbusplus |
| 48 | |
| 49 | namespace sdbusplus |
| 50 | { |
| 51 | namespace xyz |
| 52 | { |
| 53 | namespace openbmc_project |
| 54 | { |
| 55 | namespace Common |
| 56 | { |
| 57 | namespace Error |
| 58 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 59 | struct InvalidArgument; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 60 | } // namespace Error |
| 61 | } // namespace Common |
| 62 | } // namespace openbmc_project |
| 63 | } // namespace xyz |
| 64 | } // namespace sdbusplus |
| 65 | |
| 66 | namespace sdbusplus |
| 67 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 68 | namespace org |
| 69 | { |
| 70 | namespace open_power |
| 71 | { |
| 72 | namespace OCC |
| 73 | { |
| 74 | namespace Device |
| 75 | { |
| 76 | namespace Error |
| 77 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 78 | struct WriteFailure; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 79 | } // namespace Error |
| 80 | } // namespace Device |
| 81 | } // namespace OCC |
| 82 | } // namespace open_power |
| 83 | } // namespace org |
| 84 | } // namespace sdbusplus |
| 85 | |
| 86 | namespace sdbusplus |
| 87 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 88 | namespace xyz |
| 89 | { |
| 90 | namespace openbmc_project |
| 91 | { |
| 92 | namespace State |
| 93 | { |
| 94 | namespace Host |
| 95 | { |
| 96 | namespace Error |
| 97 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 98 | struct SoftOffTimeout; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 99 | } // namespace Error |
| 100 | } // namespace Host |
| 101 | } // namespace State |
| 102 | } // namespace openbmc_project |
| 103 | } // namespace xyz |
| 104 | } // namespace sdbusplus |
| 105 | |
| 106 | namespace sdbusplus |
| 107 | { |
| 108 | namespace xyz |
| 109 | { |
| 110 | namespace openbmc_project |
| 111 | { |
| 112 | namespace Common |
| 113 | { |
| 114 | namespace Callout |
| 115 | { |
| 116 | namespace Error |
| 117 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 118 | struct Inventory; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 119 | } // namespace Error |
| 120 | } // namespace Callout |
| 121 | } // namespace Common |
| 122 | } // namespace openbmc_project |
| 123 | } // namespace xyz |
| 124 | } // namespace sdbusplus |
| 125 | |
| 126 | namespace sdbusplus |
| 127 | { |
| 128 | namespace xyz |
| 129 | { |
| 130 | namespace openbmc_project |
| 131 | { |
| 132 | namespace Common |
| 133 | { |
| 134 | namespace Callout |
| 135 | { |
| 136 | namespace Error |
| 137 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 138 | struct IIC; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 139 | } // namespace Error |
| 140 | } // namespace Callout |
| 141 | } // namespace Common |
| 142 | } // namespace openbmc_project |
| 143 | } // namespace xyz |
| 144 | } // namespace sdbusplus |
| 145 | |
| 146 | namespace sdbusplus |
| 147 | { |
| 148 | namespace xyz |
| 149 | { |
| 150 | namespace openbmc_project |
| 151 | { |
| 152 | namespace Common |
| 153 | { |
| 154 | namespace File |
| 155 | { |
| 156 | namespace Error |
| 157 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 158 | struct Open; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 159 | } // namespace Error |
| 160 | } // namespace File |
| 161 | } // namespace Common |
| 162 | } // namespace openbmc_project |
| 163 | } // namespace xyz |
| 164 | } // namespace sdbusplus |
| 165 | |
| 166 | namespace sdbusplus |
| 167 | { |
| 168 | namespace xyz |
| 169 | { |
| 170 | namespace openbmc_project |
| 171 | { |
| 172 | namespace Common |
| 173 | { |
| 174 | namespace Error |
| 175 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 176 | struct InternalFailure; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 177 | } // namespace Error |
| 178 | } // namespace Common |
| 179 | } // namespace openbmc_project |
| 180 | } // namespace xyz |
| 181 | } // namespace sdbusplus |
| 182 | |
| 183 | namespace sdbusplus |
| 184 | { |
| 185 | namespace xyz |
| 186 | { |
| 187 | namespace openbmc_project |
| 188 | { |
| 189 | namespace Common |
| 190 | { |
| 191 | namespace Callout |
| 192 | { |
| 193 | namespace Error |
| 194 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 195 | struct Device; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 196 | } // namespace Error |
| 197 | } // namespace Callout |
| 198 | } // namespace Common |
| 199 | } // namespace openbmc_project |
| 200 | } // namespace xyz |
| 201 | } // namespace sdbusplus |
| 202 | |
| 203 | namespace sdbusplus |
| 204 | { |
| 205 | namespace xyz |
| 206 | { |
| 207 | namespace openbmc_project |
| 208 | { |
| 209 | namespace Control |
| 210 | { |
| 211 | namespace Device |
| 212 | { |
| 213 | namespace Error |
| 214 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 215 | struct WriteFailure; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 216 | } // namespace Error |
| 217 | } // namespace Device |
| 218 | } // namespace Control |
| 219 | } // namespace openbmc_project |
| 220 | } // namespace xyz |
| 221 | } // namespace sdbusplus |
| 222 | |
| 223 | namespace sdbusplus |
| 224 | { |
| 225 | namespace xyz |
| 226 | { |
| 227 | namespace openbmc_project |
| 228 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 229 | namespace Sensor |
| 230 | { |
| 231 | namespace Device |
| 232 | { |
| 233 | namespace Error |
| 234 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 235 | struct ReadFailure; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 236 | } // namespace Error |
| 237 | } // namespace Device |
| 238 | } // namespace Sensor |
| 239 | } // namespace openbmc_project |
| 240 | } // namespace xyz |
| 241 | } // namespace sdbusplus |
| 242 | |
| 243 | namespace sdbusplus |
| 244 | { |
| 245 | namespace xyz |
| 246 | { |
| 247 | namespace openbmc_project |
| 248 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 249 | namespace Common |
| 250 | { |
| 251 | namespace File |
| 252 | { |
| 253 | namespace Error |
| 254 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 255 | struct Seek; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 256 | } // namespace Error |
| 257 | } // namespace File |
| 258 | } // namespace Common |
| 259 | } // namespace openbmc_project |
| 260 | } // namespace xyz |
| 261 | } // namespace sdbusplus |
| 262 | |
| 263 | namespace sdbusplus |
| 264 | { |
| 265 | namespace org |
| 266 | { |
| 267 | namespace open_power |
| 268 | { |
| 269 | namespace OCC |
| 270 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 271 | namespace Device |
| 272 | { |
| 273 | namespace Error |
| 274 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 275 | struct ConfigFailure; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 276 | } // namespace Error |
| 277 | } // namespace Device |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 278 | } // namespace OCC |
| 279 | } // namespace open_power |
| 280 | } // namespace org |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 281 | } // namespace sdbusplus |
| 282 | |
| 283 | namespace sdbusplus |
| 284 | { |
| 285 | namespace org |
| 286 | { |
| 287 | namespace open_power |
| 288 | { |
| 289 | namespace OCC |
| 290 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 291 | namespace Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 292 | { |
| 293 | namespace Error |
| 294 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 295 | struct OpenFailure; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 296 | } // namespace Error |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 297 | } // namespace Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 298 | } // namespace OCC |
| 299 | } // namespace open_power |
| 300 | } // namespace org |
| 301 | } // namespace sdbusplus |
| 302 | |
| 303 | namespace sdbusplus |
| 304 | { |
| 305 | namespace xyz |
| 306 | { |
| 307 | namespace openbmc_project |
| 308 | { |
| 309 | namespace Common |
| 310 | { |
| 311 | namespace Callout |
| 312 | { |
| 313 | namespace Error |
| 314 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 315 | struct IPMISensor; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 316 | } // namespace Error |
| 317 | } // namespace Callout |
| 318 | } // namespace Common |
| 319 | } // namespace openbmc_project |
| 320 | } // namespace xyz |
| 321 | } // namespace sdbusplus |
| 322 | |
| 323 | namespace sdbusplus |
| 324 | { |
| 325 | namespace org |
| 326 | { |
| 327 | namespace open_power |
| 328 | { |
| 329 | namespace OCC |
| 330 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 331 | namespace Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 332 | { |
| 333 | namespace Error |
| 334 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 335 | struct ReadFailure; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 336 | } // namespace Error |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 337 | } // namespace Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 338 | } // namespace OCC |
| 339 | } // namespace open_power |
| 340 | } // namespace org |
| 341 | } // namespace sdbusplus |
| 342 | |
| 343 | namespace sdbusplus |
| 344 | { |
| 345 | namespace xyz |
| 346 | { |
| 347 | namespace openbmc_project |
| 348 | { |
| 349 | namespace Control |
| 350 | { |
| 351 | namespace Host |
| 352 | { |
| 353 | namespace Error |
| 354 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 355 | struct CommandNotSupported; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 356 | } // namespace Error |
| 357 | } // namespace Host |
| 358 | } // namespace Control |
| 359 | } // namespace openbmc_project |
| 360 | } // namespace xyz |
| 361 | } // namespace sdbusplus |
| 362 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 363 | namespace phosphor |
| 364 | { |
| 365 | |
| 366 | namespace logging |
| 367 | { |
| 368 | |
| 369 | namespace xyz |
| 370 | { |
| 371 | namespace openbmc_project |
| 372 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 373 | namespace Control |
| 374 | { |
| 375 | namespace Host |
| 376 | { |
| 377 | namespace _CommandNotSupported |
| 378 | { |
| 379 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 380 | } // namespace _CommandNotSupported |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 381 | |
| 382 | struct CommandNotSupported |
| 383 | { |
| 384 | static constexpr auto L = level::ERR; |
| 385 | using metadata_types = std::tuple<>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 386 | }; |
| 387 | |
| 388 | } // namespace Host |
| 389 | } // namespace Control |
| 390 | } // namespace openbmc_project |
| 391 | } // namespace xyz |
| 392 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 393 | namespace details |
| 394 | { |
| 395 | |
| 396 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 397 | struct map_exception_type< |
| 398 | sdbusplus::xyz::openbmc_project::Control::Host::Error::CommandNotSupported> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 399 | { |
| 400 | using type = xyz::openbmc_project::Control::Host::CommandNotSupported; |
| 401 | }; |
| 402 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 403 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 404 | |
| 405 | namespace xyz |
| 406 | { |
| 407 | namespace openbmc_project |
| 408 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 409 | namespace Common |
| 410 | { |
| 411 | namespace _Timeout |
| 412 | { |
| 413 | |
| 414 | struct TIMEOUT_IN_MSEC |
| 415 | { |
| 416 | static constexpr auto str = "TIMEOUT_IN_MSEC=%llu"; |
| 417 | static constexpr auto str_short = "TIMEOUT_IN_MSEC"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 418 | using type = std::tuple<std::decay_t<decltype(str)>, uint64_t>; |
| 419 | explicit constexpr TIMEOUT_IN_MSEC(uint64_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 420 | type _entry; |
| 421 | }; |
| 422 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 423 | } // namespace _Timeout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 424 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 425 | struct Timeout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 426 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 427 | static constexpr auto L = level::ERR; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 428 | using TIMEOUT_IN_MSEC = _Timeout::TIMEOUT_IN_MSEC; |
| 429 | using metadata_types = std::tuple<TIMEOUT_IN_MSEC>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 430 | }; |
| 431 | |
| 432 | } // namespace Common |
| 433 | } // namespace openbmc_project |
| 434 | } // namespace xyz |
| 435 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 436 | namespace details |
| 437 | { |
| 438 | |
| 439 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 440 | struct map_exception_type< |
| 441 | sdbusplus::xyz::openbmc_project::Common::Error::Timeout> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 442 | { |
| 443 | using type = xyz::openbmc_project::Common::Timeout; |
| 444 | }; |
| 445 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 446 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 447 | |
| 448 | namespace xyz |
| 449 | { |
| 450 | namespace openbmc_project |
| 451 | { |
| 452 | namespace Common |
| 453 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 454 | namespace _InternalFailure |
| 455 | { |
| 456 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 457 | } // namespace _InternalFailure |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 458 | |
| 459 | struct InternalFailure |
| 460 | { |
| 461 | static constexpr auto L = level::ERR; |
| 462 | using metadata_types = std::tuple<>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 463 | }; |
| 464 | |
| 465 | } // namespace Common |
| 466 | } // namespace openbmc_project |
| 467 | } // namespace xyz |
| 468 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 469 | namespace details |
| 470 | { |
| 471 | |
| 472 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 473 | struct map_exception_type< |
| 474 | sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 475 | { |
| 476 | using type = xyz::openbmc_project::Common::InternalFailure; |
| 477 | }; |
| 478 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 479 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 480 | |
| 481 | namespace xyz |
| 482 | { |
| 483 | namespace openbmc_project |
| 484 | { |
| 485 | namespace Common |
| 486 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 487 | namespace _InvalidArgument |
| 488 | { |
| 489 | |
| 490 | struct ARGUMENT_NAME |
| 491 | { |
| 492 | static constexpr auto str = "ARGUMENT_NAME=%s"; |
| 493 | static constexpr auto str_short = "ARGUMENT_NAME"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 494 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 495 | explicit constexpr ARGUMENT_NAME(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 496 | type _entry; |
| 497 | }; |
| 498 | struct ARGUMENT_VALUE |
| 499 | { |
| 500 | static constexpr auto str = "ARGUMENT_VALUE=%s"; |
| 501 | static constexpr auto str_short = "ARGUMENT_VALUE"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 502 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 503 | explicit constexpr ARGUMENT_VALUE(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 504 | type _entry; |
| 505 | }; |
| 506 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 507 | } // namespace _InvalidArgument |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 508 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 509 | struct InvalidArgument |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 510 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 511 | static constexpr auto L = level::ERR; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 512 | using ARGUMENT_NAME = _InvalidArgument::ARGUMENT_NAME; |
| 513 | using ARGUMENT_VALUE = _InvalidArgument::ARGUMENT_VALUE; |
| 514 | using metadata_types = std::tuple<ARGUMENT_NAME, ARGUMENT_VALUE>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 515 | }; |
| 516 | |
| 517 | } // namespace Common |
| 518 | } // namespace openbmc_project |
| 519 | } // namespace xyz |
| 520 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 521 | namespace details |
| 522 | { |
| 523 | |
| 524 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 525 | struct map_exception_type< |
| 526 | sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 527 | { |
| 528 | using type = xyz::openbmc_project::Common::InvalidArgument; |
| 529 | }; |
| 530 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 531 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 532 | |
| 533 | namespace xyz |
| 534 | { |
| 535 | namespace openbmc_project |
| 536 | { |
| 537 | namespace Common |
| 538 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 539 | namespace File |
| 540 | { |
| 541 | namespace _Open |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 542 | { |
| 543 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 544 | struct ERRNO |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 545 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 546 | static constexpr auto str = "ERRNO=%d"; |
| 547 | static constexpr auto str_short = "ERRNO"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 548 | using type = std::tuple<std::decay_t<decltype(str)>, int32_t>; |
| 549 | explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 550 | type _entry; |
| 551 | }; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 552 | struct PATH |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 553 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 554 | static constexpr auto str = "PATH=%s"; |
| 555 | static constexpr auto str_short = "PATH"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 556 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 557 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 558 | type _entry; |
| 559 | }; |
| 560 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 561 | } // namespace _Open |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 562 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 563 | struct Open |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 564 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 565 | static constexpr auto L = level::ERR; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 566 | using ERRNO = _Open::ERRNO; |
| 567 | using PATH = _Open::PATH; |
| 568 | using metadata_types = std::tuple<ERRNO, PATH>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 569 | }; |
| 570 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 571 | } // namespace File |
| 572 | } // namespace Common |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 573 | } // namespace openbmc_project |
| 574 | } // namespace xyz |
| 575 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 576 | namespace details |
| 577 | { |
| 578 | |
| 579 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 580 | struct map_exception_type< |
| 581 | sdbusplus::xyz::openbmc_project::Common::File::Error::Open> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 582 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 583 | using type = xyz::openbmc_project::Common::File::Open; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 584 | }; |
| 585 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 586 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 587 | |
| 588 | namespace xyz |
| 589 | { |
| 590 | namespace openbmc_project |
| 591 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 592 | namespace Common |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 593 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 594 | namespace File |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 595 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 596 | namespace _Seek |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 597 | { |
| 598 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 599 | struct OFFSET |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 600 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 601 | static constexpr auto str = "OFFSET=%ll"; |
| 602 | static constexpr auto str_short = "OFFSET"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 603 | using type = std::tuple<std::decay_t<decltype(str)>, int64_t>; |
| 604 | explicit constexpr OFFSET(int64_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 605 | type _entry; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 606 | }; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 607 | struct WHENCE |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 608 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 609 | static constexpr auto str = "WHENCE=%d"; |
| 610 | static constexpr auto str_short = "WHENCE"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 611 | using type = std::tuple<std::decay_t<decltype(str)>, int32_t>; |
| 612 | explicit constexpr WHENCE(int32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 613 | type _entry; |
| 614 | }; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 615 | struct ERRNO |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 616 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 617 | static constexpr auto str = "ERRNO=%d"; |
| 618 | static constexpr auto str_short = "ERRNO"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 619 | using type = std::tuple<std::decay_t<decltype(str)>, int32_t>; |
| 620 | explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 621 | type _entry; |
| 622 | }; |
| 623 | struct PATH |
| 624 | { |
| 625 | static constexpr auto str = "PATH=%s"; |
| 626 | static constexpr auto str_short = "PATH"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 627 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 628 | explicit constexpr PATH(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 629 | type _entry; |
| 630 | }; |
| 631 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 632 | } // namespace _Seek |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 633 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 634 | struct Seek |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 635 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 636 | static constexpr auto L = level::ERR; |
| 637 | using OFFSET = _Seek::OFFSET; |
| 638 | using WHENCE = _Seek::WHENCE; |
| 639 | using ERRNO = _Seek::ERRNO; |
| 640 | using PATH = _Seek::PATH; |
| 641 | using metadata_types = std::tuple<OFFSET, WHENCE, ERRNO, PATH>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 642 | }; |
| 643 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 644 | } // namespace File |
| 645 | } // namespace Common |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 646 | } // namespace openbmc_project |
| 647 | } // namespace xyz |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 648 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 649 | namespace details |
| 650 | { |
| 651 | |
| 652 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 653 | struct map_exception_type< |
| 654 | sdbusplus::xyz::openbmc_project::Common::File::Error::Seek> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 655 | { |
| 656 | using type = xyz::openbmc_project::Common::File::Seek; |
| 657 | }; |
| 658 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 659 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 660 | |
| 661 | namespace example |
| 662 | { |
| 663 | namespace xyz |
| 664 | { |
| 665 | namespace openbmc_project |
| 666 | { |
| 667 | namespace Example |
| 668 | { |
| 669 | namespace Elog |
| 670 | { |
| 671 | namespace _TestErrorTwo |
| 672 | { |
| 673 | |
| 674 | struct DEV_ADDR |
| 675 | { |
| 676 | static constexpr auto str = "DEV_ADDR=0x%.8X"; |
| 677 | static constexpr auto str_short = "DEV_ADDR"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 678 | using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>; |
| 679 | explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 680 | type _entry; |
| 681 | }; |
| 682 | struct DEV_ID |
| 683 | { |
| 684 | static constexpr auto str = "DEV_ID=%u"; |
| 685 | static constexpr auto str_short = "DEV_ID"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 686 | using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>; |
| 687 | explicit constexpr DEV_ID(uint32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 688 | type _entry; |
| 689 | }; |
| 690 | struct DEV_NAME |
| 691 | { |
| 692 | static constexpr auto str = "DEV_NAME=%s"; |
| 693 | static constexpr auto str_short = "DEV_NAME"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 694 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 695 | explicit constexpr DEV_NAME(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 696 | type _entry; |
| 697 | }; |
| 698 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 699 | } // namespace _TestErrorTwo |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 700 | |
| 701 | struct TestErrorTwo : public sdbusplus::exception_t |
| 702 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 703 | static constexpr auto errName = |
| 704 | "example.xyz.openbmc_project.Example.Elog.TestErrorTwo"; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 705 | static constexpr auto errDesc = "This is test error two"; |
| 706 | static constexpr auto L = level::ERR; |
| 707 | using DEV_ADDR = _TestErrorTwo::DEV_ADDR; |
| 708 | using DEV_ID = _TestErrorTwo::DEV_ID; |
| 709 | using DEV_NAME = _TestErrorTwo::DEV_NAME; |
| 710 | using metadata_types = std::tuple<DEV_ADDR, DEV_ID, DEV_NAME>; |
| 711 | |
| 712 | const char* name() const noexcept |
| 713 | { |
| 714 | return errName; |
| 715 | } |
| 716 | |
| 717 | const char* description() const noexcept |
| 718 | { |
| 719 | return errDesc; |
| 720 | } |
| 721 | |
| 722 | const char* what() const noexcept |
| 723 | { |
| 724 | return errName; |
| 725 | } |
| 726 | }; |
| 727 | |
| 728 | } // namespace Elog |
| 729 | } // namespace Example |
| 730 | } // namespace openbmc_project |
| 731 | } // namespace xyz |
| 732 | } // namespace example |
| 733 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 734 | namespace example |
| 735 | { |
| 736 | namespace xyz |
| 737 | { |
| 738 | namespace openbmc_project |
| 739 | { |
| 740 | namespace Example |
| 741 | { |
| 742 | namespace Elog |
| 743 | { |
| 744 | namespace _AutoTestSimple |
| 745 | { |
| 746 | |
| 747 | struct STRING |
| 748 | { |
| 749 | static constexpr auto str = "STRING=%s"; |
| 750 | static constexpr auto str_short = "STRING"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 751 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 752 | explicit constexpr STRING(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 753 | type _entry; |
| 754 | }; |
| 755 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 756 | } // namespace _AutoTestSimple |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 757 | |
| 758 | struct AutoTestSimple : public sdbusplus::exception_t |
| 759 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 760 | static constexpr auto errName = |
| 761 | "example.xyz.openbmc_project.Example.Elog.AutoTestSimple"; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 762 | static constexpr auto errDesc = "This is a simple test error."; |
| 763 | static constexpr auto L = level::ERR; |
| 764 | using STRING = _AutoTestSimple::STRING; |
| 765 | using metadata_types = std::tuple<STRING>; |
| 766 | |
| 767 | const char* name() const noexcept |
| 768 | { |
| 769 | return errName; |
| 770 | } |
| 771 | |
| 772 | const char* description() const noexcept |
| 773 | { |
| 774 | return errDesc; |
| 775 | } |
| 776 | |
| 777 | const char* what() const noexcept |
| 778 | { |
| 779 | return errName; |
| 780 | } |
| 781 | }; |
| 782 | |
| 783 | } // namespace Elog |
| 784 | } // namespace Example |
| 785 | } // namespace openbmc_project |
| 786 | } // namespace xyz |
| 787 | } // namespace example |
| 788 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 789 | namespace example |
| 790 | { |
| 791 | namespace xyz |
| 792 | { |
| 793 | namespace openbmc_project |
| 794 | { |
| 795 | namespace Example |
| 796 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 797 | namespace Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 798 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 799 | namespace _Callout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 800 | { |
| 801 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 802 | struct CALLOUT_ERRNO_TEST |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 803 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 804 | static constexpr auto str = "CALLOUT_ERRNO_TEST=%d"; |
| 805 | static constexpr auto str_short = "CALLOUT_ERRNO_TEST"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 806 | using type = std::tuple<std::decay_t<decltype(str)>, int32_t>; |
| 807 | explicit constexpr CALLOUT_ERRNO_TEST(int32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 808 | type _entry; |
| 809 | }; |
| 810 | struct CALLOUT_DEVICE_PATH_TEST |
| 811 | { |
| 812 | static constexpr auto str = "CALLOUT_DEVICE_PATH_TEST=%s"; |
| 813 | static constexpr auto str_short = "CALLOUT_DEVICE_PATH_TEST"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 814 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 815 | explicit constexpr CALLOUT_DEVICE_PATH_TEST(const char* a) : |
| 816 | _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 817 | type _entry; |
| 818 | }; |
| 819 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 820 | } // namespace _Callout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 821 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 822 | struct Callout : public sdbusplus::exception_t |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 823 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 824 | static constexpr auto errName = |
| 825 | "example.xyz.openbmc_project.Example.Device.Callout"; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 826 | static constexpr auto errDesc = "Generic device callout"; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 827 | static constexpr auto L = level::ERR; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 828 | using CALLOUT_ERRNO_TEST = _Callout::CALLOUT_ERRNO_TEST; |
| 829 | using CALLOUT_DEVICE_PATH_TEST = _Callout::CALLOUT_DEVICE_PATH_TEST; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 830 | using metadata_types = |
| 831 | std::tuple<CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 832 | |
| 833 | const char* name() const noexcept |
| 834 | { |
| 835 | return errName; |
| 836 | } |
| 837 | |
| 838 | const char* description() const noexcept |
| 839 | { |
| 840 | return errDesc; |
| 841 | } |
| 842 | |
| 843 | const char* what() const noexcept |
| 844 | { |
| 845 | return errName; |
| 846 | } |
| 847 | }; |
| 848 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 849 | } // namespace Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 850 | } // namespace Example |
| 851 | } // namespace openbmc_project |
| 852 | } // namespace xyz |
| 853 | } // namespace example |
| 854 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 855 | namespace xyz |
| 856 | { |
| 857 | namespace openbmc_project |
| 858 | { |
| 859 | namespace Common |
| 860 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 861 | namespace Callout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 862 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 863 | namespace _Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 864 | { |
| 865 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 866 | struct CALLOUT_ERRNO |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 867 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 868 | static constexpr auto str = "CALLOUT_ERRNO=%d"; |
| 869 | static constexpr auto str_short = "CALLOUT_ERRNO"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 870 | using type = std::tuple<std::decay_t<decltype(str)>, int32_t>; |
| 871 | explicit constexpr CALLOUT_ERRNO(int32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 872 | type _entry; |
| 873 | }; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 874 | struct CALLOUT_DEVICE_PATH |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 875 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 876 | static constexpr auto str = "CALLOUT_DEVICE_PATH=%s"; |
| 877 | static constexpr auto str_short = "CALLOUT_DEVICE_PATH"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 878 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 879 | explicit constexpr CALLOUT_DEVICE_PATH(const char* a) : |
| 880 | _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 881 | type _entry; |
| 882 | }; |
| 883 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 884 | } // namespace _Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 885 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 886 | struct Device |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 887 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 888 | static constexpr auto L = level::ERR; |
| 889 | using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO; |
| 890 | using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH; |
| 891 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 892 | }; |
| 893 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 894 | } // namespace Callout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 895 | } // namespace Common |
| 896 | } // namespace openbmc_project |
| 897 | } // namespace xyz |
| 898 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 899 | namespace details |
| 900 | { |
| 901 | |
| 902 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 903 | struct map_exception_type< |
| 904 | sdbusplus::xyz::openbmc_project::Common::Callout::Error::Device> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 905 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 906 | using type = xyz::openbmc_project::Common::Callout::Device; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 907 | }; |
| 908 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 909 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 910 | |
| 911 | namespace xyz |
| 912 | { |
| 913 | namespace openbmc_project |
| 914 | { |
| 915 | namespace Common |
| 916 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 917 | namespace Callout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 918 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 919 | namespace _GPIO |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 920 | { |
| 921 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 922 | struct CALLOUT_GPIO_NUM |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 923 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 924 | static constexpr auto str = "CALLOUT_GPIO_NUM=%u"; |
| 925 | static constexpr auto str_short = "CALLOUT_GPIO_NUM"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 926 | using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>; |
| 927 | explicit constexpr CALLOUT_GPIO_NUM(uint32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 928 | type _entry; |
| 929 | }; |
| 930 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 931 | } // namespace _GPIO |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 932 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 933 | struct GPIO |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 934 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 935 | static constexpr auto L = level::ERR; |
| 936 | using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 937 | using CALLOUT_ERRNO = |
| 938 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 939 | using CALLOUT_DEVICE_PATH = |
| 940 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
| 941 | using metadata_types = |
| 942 | std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 943 | }; |
| 944 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 945 | } // namespace Callout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 946 | } // namespace Common |
| 947 | } // namespace openbmc_project |
| 948 | } // namespace xyz |
| 949 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 950 | namespace details |
| 951 | { |
| 952 | |
| 953 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 954 | struct map_exception_type< |
| 955 | sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 956 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 957 | using type = xyz::openbmc_project::Common::Callout::GPIO; |
| 958 | }; |
| 959 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 960 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 961 | |
| 962 | namespace xyz |
| 963 | { |
| 964 | namespace openbmc_project |
| 965 | { |
| 966 | namespace Common |
| 967 | { |
| 968 | namespace Callout |
| 969 | { |
| 970 | namespace _IIC |
| 971 | { |
| 972 | |
| 973 | struct CALLOUT_IIC_BUS |
| 974 | { |
| 975 | static constexpr auto str = "CALLOUT_IIC_BUS=%s"; |
| 976 | static constexpr auto str_short = "CALLOUT_IIC_BUS"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 977 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 978 | explicit constexpr CALLOUT_IIC_BUS(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 979 | type _entry; |
| 980 | }; |
| 981 | struct CALLOUT_IIC_ADDR |
| 982 | { |
| 983 | static constexpr auto str = "CALLOUT_IIC_ADDR=0x%hx"; |
| 984 | static constexpr auto str_short = "CALLOUT_IIC_ADDR"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 985 | using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>; |
| 986 | explicit constexpr CALLOUT_IIC_ADDR(uint16_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 987 | type _entry; |
| 988 | }; |
| 989 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 990 | } // namespace _IIC |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 991 | |
| 992 | struct IIC |
| 993 | { |
| 994 | static constexpr auto L = level::ERR; |
| 995 | using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS; |
| 996 | using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 997 | using CALLOUT_ERRNO = |
| 998 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 999 | using CALLOUT_DEVICE_PATH = |
| 1000 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
| 1001 | using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR, |
| 1002 | CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1003 | }; |
| 1004 | |
| 1005 | } // namespace Callout |
| 1006 | } // namespace Common |
| 1007 | } // namespace openbmc_project |
| 1008 | } // namespace xyz |
| 1009 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1010 | namespace details |
| 1011 | { |
| 1012 | |
| 1013 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1014 | struct map_exception_type< |
| 1015 | sdbusplus::xyz::openbmc_project::Common::Callout::Error::IIC> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1016 | { |
| 1017 | using type = xyz::openbmc_project::Common::Callout::IIC; |
| 1018 | }; |
| 1019 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1020 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1021 | |
| 1022 | namespace xyz |
| 1023 | { |
| 1024 | namespace openbmc_project |
| 1025 | { |
| 1026 | namespace Common |
| 1027 | { |
| 1028 | namespace Callout |
| 1029 | { |
| 1030 | namespace _Inventory |
| 1031 | { |
| 1032 | |
| 1033 | struct CALLOUT_INVENTORY_PATH |
| 1034 | { |
| 1035 | static constexpr auto str = "CALLOUT_INVENTORY_PATH=%s"; |
| 1036 | static constexpr auto str_short = "CALLOUT_INVENTORY_PATH"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1037 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 1038 | explicit constexpr CALLOUT_INVENTORY_PATH(const char* a) : |
| 1039 | _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1040 | type _entry; |
| 1041 | }; |
| 1042 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1043 | } // namespace _Inventory |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1044 | |
| 1045 | struct Inventory |
| 1046 | { |
| 1047 | static constexpr auto L = level::ERR; |
| 1048 | using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH; |
| 1049 | using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1050 | }; |
| 1051 | |
| 1052 | } // namespace Callout |
| 1053 | } // namespace Common |
| 1054 | } // namespace openbmc_project |
| 1055 | } // namespace xyz |
| 1056 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1057 | namespace details |
| 1058 | { |
| 1059 | |
| 1060 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1061 | struct map_exception_type< |
| 1062 | sdbusplus::xyz::openbmc_project::Common::Callout::Error::Inventory> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1063 | { |
| 1064 | using type = xyz::openbmc_project::Common::Callout::Inventory; |
| 1065 | }; |
| 1066 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1067 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1068 | |
| 1069 | namespace xyz |
| 1070 | { |
| 1071 | namespace openbmc_project |
| 1072 | { |
| 1073 | namespace Common |
| 1074 | { |
| 1075 | namespace Callout |
| 1076 | { |
| 1077 | namespace _IPMISensor |
| 1078 | { |
| 1079 | |
| 1080 | struct CALLOUT_IPMI_SENSOR_NUM |
| 1081 | { |
| 1082 | static constexpr auto str = "CALLOUT_IPMI_SENSOR_NUM=%u"; |
| 1083 | static constexpr auto str_short = "CALLOUT_IPMI_SENSOR_NUM"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1084 | using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>; |
| 1085 | explicit constexpr CALLOUT_IPMI_SENSOR_NUM(uint32_t a) : |
| 1086 | _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1087 | type _entry; |
| 1088 | }; |
| 1089 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1090 | } // namespace _IPMISensor |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1091 | |
| 1092 | struct IPMISensor |
| 1093 | { |
| 1094 | static constexpr auto L = level::ERR; |
| 1095 | using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM; |
| 1096 | using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1097 | }; |
| 1098 | |
| 1099 | } // namespace Callout |
| 1100 | } // namespace Common |
| 1101 | } // namespace openbmc_project |
| 1102 | } // namespace xyz |
| 1103 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1104 | namespace details |
| 1105 | { |
| 1106 | |
| 1107 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1108 | struct map_exception_type< |
| 1109 | sdbusplus::xyz::openbmc_project::Common::Callout::Error::IPMISensor> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1110 | { |
| 1111 | using type = xyz::openbmc_project::Common::Callout::IPMISensor; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1112 | }; |
| 1113 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1114 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1115 | |
| 1116 | namespace xyz |
| 1117 | { |
| 1118 | namespace openbmc_project |
| 1119 | { |
| 1120 | namespace State |
| 1121 | { |
| 1122 | namespace Host |
| 1123 | { |
| 1124 | namespace _SoftOffTimeout |
| 1125 | { |
| 1126 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1127 | } // namespace _SoftOffTimeout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1128 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1129 | struct SoftOffTimeout |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1130 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1131 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1132 | using TIMEOUT_IN_MSEC = |
| 1133 | xyz::openbmc_project::Common::Timeout::TIMEOUT_IN_MSEC; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1134 | using metadata_types = std::tuple<TIMEOUT_IN_MSEC>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1135 | }; |
| 1136 | |
| 1137 | } // namespace Host |
| 1138 | } // namespace State |
| 1139 | } // namespace openbmc_project |
| 1140 | } // namespace xyz |
| 1141 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1142 | namespace details |
| 1143 | { |
| 1144 | |
| 1145 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1146 | struct map_exception_type< |
| 1147 | sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1148 | { |
| 1149 | using type = xyz::openbmc_project::State::Host::SoftOffTimeout; |
| 1150 | }; |
| 1151 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1152 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1153 | |
| 1154 | namespace xyz |
| 1155 | { |
| 1156 | namespace openbmc_project |
| 1157 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1158 | namespace Control |
| 1159 | { |
| 1160 | namespace Device |
| 1161 | { |
| 1162 | namespace _WriteFailure |
| 1163 | { |
| 1164 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1165 | } // namespace _WriteFailure |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1166 | |
| 1167 | struct WriteFailure |
| 1168 | { |
| 1169 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1170 | using CALLOUT_ERRNO = |
| 1171 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 1172 | using CALLOUT_DEVICE_PATH = |
| 1173 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1174 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1175 | }; |
| 1176 | |
| 1177 | } // namespace Device |
| 1178 | } // namespace Control |
| 1179 | } // namespace openbmc_project |
| 1180 | } // namespace xyz |
| 1181 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1182 | namespace details |
| 1183 | { |
| 1184 | |
| 1185 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1186 | struct map_exception_type< |
| 1187 | sdbusplus::xyz::openbmc_project::Control::Device::Error::WriteFailure> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1188 | { |
| 1189 | using type = xyz::openbmc_project::Control::Device::WriteFailure; |
| 1190 | }; |
| 1191 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1192 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1193 | |
| 1194 | namespace org |
| 1195 | { |
| 1196 | namespace open_power |
| 1197 | { |
| 1198 | namespace OCC |
| 1199 | { |
| 1200 | namespace Device |
| 1201 | { |
| 1202 | namespace _OpenFailure |
| 1203 | { |
| 1204 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1205 | } // namespace _OpenFailure |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1206 | |
| 1207 | struct OpenFailure |
| 1208 | { |
| 1209 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1210 | using CALLOUT_ERRNO = |
| 1211 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 1212 | using CALLOUT_DEVICE_PATH = |
| 1213 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1214 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1215 | }; |
| 1216 | |
| 1217 | } // namespace Device |
| 1218 | } // namespace OCC |
| 1219 | } // namespace open_power |
| 1220 | } // namespace org |
| 1221 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1222 | namespace details |
| 1223 | { |
| 1224 | |
| 1225 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1226 | struct map_exception_type< |
| 1227 | sdbusplus::org::open_power::OCC::Device::Error::OpenFailure> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1228 | { |
| 1229 | using type = org::open_power::OCC::Device::OpenFailure; |
| 1230 | }; |
| 1231 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1232 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1233 | |
| 1234 | namespace org |
| 1235 | { |
| 1236 | namespace open_power |
| 1237 | { |
| 1238 | namespace OCC |
| 1239 | { |
| 1240 | namespace Device |
| 1241 | { |
| 1242 | namespace _ReadFailure |
| 1243 | { |
| 1244 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1245 | } // namespace _ReadFailure |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1246 | |
| 1247 | struct ReadFailure |
| 1248 | { |
| 1249 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1250 | using CALLOUT_ERRNO = |
| 1251 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 1252 | using CALLOUT_DEVICE_PATH = |
| 1253 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1254 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1255 | }; |
| 1256 | |
| 1257 | } // namespace Device |
| 1258 | } // namespace OCC |
| 1259 | } // namespace open_power |
| 1260 | } // namespace org |
| 1261 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1262 | namespace details |
| 1263 | { |
| 1264 | |
| 1265 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1266 | struct map_exception_type< |
| 1267 | sdbusplus::org::open_power::OCC::Device::Error::ReadFailure> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1268 | { |
| 1269 | using type = org::open_power::OCC::Device::ReadFailure; |
| 1270 | }; |
| 1271 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1272 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1273 | |
| 1274 | namespace org |
| 1275 | { |
| 1276 | namespace open_power |
| 1277 | { |
| 1278 | namespace OCC |
| 1279 | { |
| 1280 | namespace Device |
| 1281 | { |
| 1282 | namespace _WriteFailure |
| 1283 | { |
| 1284 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1285 | } // namespace _WriteFailure |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1286 | |
| 1287 | struct WriteFailure |
| 1288 | { |
| 1289 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1290 | using CALLOUT_ERRNO = |
| 1291 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 1292 | using CALLOUT_DEVICE_PATH = |
| 1293 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1294 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1295 | }; |
| 1296 | |
| 1297 | } // namespace Device |
| 1298 | } // namespace OCC |
| 1299 | } // namespace open_power |
| 1300 | } // namespace org |
| 1301 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1302 | namespace details |
| 1303 | { |
| 1304 | |
| 1305 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1306 | struct map_exception_type< |
| 1307 | sdbusplus::org::open_power::OCC::Device::Error::WriteFailure> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1308 | { |
| 1309 | using type = org::open_power::OCC::Device::WriteFailure; |
| 1310 | }; |
| 1311 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1312 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1313 | |
| 1314 | namespace org |
| 1315 | { |
| 1316 | namespace open_power |
| 1317 | { |
| 1318 | namespace OCC |
| 1319 | { |
| 1320 | namespace Device |
| 1321 | { |
| 1322 | namespace _ConfigFailure |
| 1323 | { |
| 1324 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1325 | } // namespace _ConfigFailure |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1326 | |
| 1327 | struct ConfigFailure |
| 1328 | { |
| 1329 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1330 | using CALLOUT_ERRNO = |
| 1331 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 1332 | using CALLOUT_DEVICE_PATH = |
| 1333 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1334 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1335 | }; |
| 1336 | |
| 1337 | } // namespace Device |
| 1338 | } // namespace OCC |
| 1339 | } // namespace open_power |
| 1340 | } // namespace org |
| 1341 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1342 | namespace details |
| 1343 | { |
| 1344 | |
| 1345 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1346 | struct map_exception_type< |
| 1347 | sdbusplus::org::open_power::OCC::Device::Error::ConfigFailure> |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1348 | { |
| 1349 | using type = org::open_power::OCC::Device::ConfigFailure; |
| 1350 | }; |
| 1351 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1352 | } // namespace details |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1353 | |
| 1354 | namespace xyz |
| 1355 | { |
| 1356 | namespace openbmc_project |
| 1357 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1358 | namespace Sensor |
| 1359 | { |
| 1360 | namespace Device |
| 1361 | { |
| 1362 | namespace _ReadFailure |
| 1363 | { |
| 1364 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1365 | } // namespace _ReadFailure |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1366 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1367 | struct ReadFailure |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1368 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1369 | static constexpr auto L = level::ERR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1370 | using CALLOUT_ERRNO = |
| 1371 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO; |
| 1372 | using CALLOUT_DEVICE_PATH = |
| 1373 | xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1374 | using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1375 | }; |
| 1376 | |
| 1377 | } // namespace Device |
| 1378 | } // namespace Sensor |
| 1379 | } // namespace openbmc_project |
| 1380 | } // namespace xyz |
| 1381 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1382 | namespace details |
| 1383 | { |
| 1384 | |
| 1385 | template <> |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1386 | struct map_exception_type< |
| 1387 | sdbusplus::xyz::openbmc_project::Sensor::Device::Error::ReadFailure> |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1388 | { |
| 1389 | using type = xyz::openbmc_project::Sensor::Device::ReadFailure; |
| 1390 | }; |
| 1391 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1392 | } // namespace details |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1393 | |
| 1394 | namespace example |
| 1395 | { |
| 1396 | namespace xyz |
| 1397 | { |
| 1398 | namespace openbmc_project |
| 1399 | { |
| 1400 | namespace Example |
| 1401 | { |
| 1402 | namespace Elog |
| 1403 | { |
| 1404 | namespace _TestErrorOne |
| 1405 | { |
| 1406 | |
| 1407 | struct ERRNUM |
| 1408 | { |
| 1409 | static constexpr auto str = "ERRNUM=0x%.4X"; |
| 1410 | static constexpr auto str_short = "ERRNUM"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1411 | using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>; |
| 1412 | explicit constexpr ERRNUM(uint16_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1413 | type _entry; |
| 1414 | }; |
| 1415 | struct FILE_PATH |
| 1416 | { |
| 1417 | static constexpr auto str = "FILE_PATH=%s"; |
| 1418 | static constexpr auto str_short = "FILE_PATH"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1419 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 1420 | explicit constexpr FILE_PATH(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1421 | type _entry; |
| 1422 | }; |
| 1423 | struct FILE_NAME |
| 1424 | { |
| 1425 | static constexpr auto str = "FILE_NAME=%s"; |
| 1426 | static constexpr auto str_short = "FILE_NAME"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1427 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 1428 | explicit constexpr FILE_NAME(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1429 | type _entry; |
| 1430 | }; |
| 1431 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1432 | } // namespace _TestErrorOne |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1433 | |
| 1434 | struct TestErrorOne : public sdbusplus::exception_t |
| 1435 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1436 | static constexpr auto errName = |
| 1437 | "example.xyz.openbmc_project.Example.Elog.TestErrorOne"; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1438 | static constexpr auto errDesc = "this is test error one"; |
| 1439 | static constexpr auto L = level::INFO; |
| 1440 | using ERRNUM = _TestErrorOne::ERRNUM; |
| 1441 | using FILE_PATH = _TestErrorOne::FILE_PATH; |
| 1442 | using FILE_NAME = _TestErrorOne::FILE_NAME; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1443 | using DEV_ADDR = |
| 1444 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR; |
| 1445 | using DEV_ID = |
| 1446 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID; |
| 1447 | using DEV_NAME = |
| 1448 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME; |
| 1449 | using metadata_types = |
| 1450 | std::tuple<ERRNUM, FILE_PATH, FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1451 | |
| 1452 | const char* name() const noexcept |
| 1453 | { |
| 1454 | return errName; |
| 1455 | } |
| 1456 | |
| 1457 | const char* description() const noexcept |
| 1458 | { |
| 1459 | return errDesc; |
| 1460 | } |
| 1461 | |
| 1462 | const char* what() const noexcept |
| 1463 | { |
| 1464 | return errName; |
| 1465 | } |
| 1466 | }; |
| 1467 | |
| 1468 | } // namespace Elog |
| 1469 | } // namespace Example |
| 1470 | } // namespace openbmc_project |
| 1471 | } // namespace xyz |
| 1472 | } // namespace example |
| 1473 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1474 | namespace example |
| 1475 | { |
| 1476 | namespace xyz |
| 1477 | { |
| 1478 | namespace openbmc_project |
| 1479 | { |
| 1480 | namespace Example |
| 1481 | { |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1482 | namespace Elog |
| 1483 | { |
| 1484 | namespace _TestCallout |
| 1485 | { |
| 1486 | |
| 1487 | struct DEV_ADDR |
| 1488 | { |
| 1489 | static constexpr auto str = "DEV_ADDR=0x%.8X"; |
| 1490 | static constexpr auto str_short = "DEV_ADDR"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1491 | using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>; |
| 1492 | explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1493 | type _entry; |
| 1494 | }; |
| 1495 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1496 | } // namespace _TestCallout |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1497 | |
| 1498 | struct TestCallout : public sdbusplus::exception_t |
| 1499 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1500 | static constexpr auto errName = |
| 1501 | "example.xyz.openbmc_project.Example.Elog.TestCallout"; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1502 | static constexpr auto errDesc = "This is test error TestCallout"; |
| 1503 | static constexpr auto L = level::ERR; |
| 1504 | using DEV_ADDR = _TestCallout::DEV_ADDR; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1505 | using CALLOUT_ERRNO_TEST = example::xyz::openbmc_project::Example::Device:: |
| 1506 | Callout::CALLOUT_ERRNO_TEST; |
| 1507 | using CALLOUT_DEVICE_PATH_TEST = example::xyz::openbmc_project::Example:: |
| 1508 | Device::Callout::CALLOUT_DEVICE_PATH_TEST; |
| 1509 | using metadata_types = |
| 1510 | std::tuple<DEV_ADDR, CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>; |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1511 | |
| 1512 | const char* name() const noexcept |
| 1513 | { |
| 1514 | return errName; |
| 1515 | } |
| 1516 | |
| 1517 | const char* description() const noexcept |
| 1518 | { |
| 1519 | return errDesc; |
| 1520 | } |
| 1521 | |
| 1522 | const char* what() const noexcept |
| 1523 | { |
| 1524 | return errName; |
| 1525 | } |
| 1526 | }; |
| 1527 | |
| 1528 | } // namespace Elog |
| 1529 | } // namespace Example |
| 1530 | } // namespace openbmc_project |
| 1531 | } // namespace xyz |
| 1532 | } // namespace example |
| 1533 | |
Vishwanatha Subbanna | ee4d83d | 2017-06-29 18:35:00 +0530 | [diff] [blame] | 1534 | namespace example |
| 1535 | { |
| 1536 | namespace xyz |
| 1537 | { |
| 1538 | namespace openbmc_project |
| 1539 | { |
| 1540 | namespace Example |
| 1541 | { |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1542 | namespace Foo |
| 1543 | { |
| 1544 | namespace _Foo |
| 1545 | { |
| 1546 | |
| 1547 | struct FOO_DATA |
| 1548 | { |
| 1549 | static constexpr auto str = "FOO_DATA=%s"; |
| 1550 | static constexpr auto str_short = "FOO_DATA"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1551 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 1552 | explicit constexpr FOO_DATA(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1553 | type _entry; |
| 1554 | }; |
| 1555 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1556 | } // namespace _Foo |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1557 | |
| 1558 | struct Foo : public sdbusplus::exception_t |
| 1559 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1560 | static constexpr auto errName = |
| 1561 | "example.xyz.openbmc_project.Example.Foo.Foo"; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1562 | static constexpr auto errDesc = "this is test error Foo"; |
| 1563 | static constexpr auto L = level::INFO; |
| 1564 | using FOO_DATA = _Foo::FOO_DATA; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1565 | using ERRNUM = |
| 1566 | example::xyz::openbmc_project::Example::Elog::TestErrorOne::ERRNUM; |
| 1567 | using FILE_PATH = |
| 1568 | example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_PATH; |
| 1569 | using FILE_NAME = |
| 1570 | example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_NAME; |
| 1571 | using DEV_ADDR = |
| 1572 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR; |
| 1573 | using DEV_ID = |
| 1574 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID; |
| 1575 | using DEV_NAME = |
| 1576 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME; |
| 1577 | using metadata_types = std::tuple<FOO_DATA, ERRNUM, FILE_PATH, FILE_NAME, |
| 1578 | DEV_ADDR, DEV_ID, DEV_NAME>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1579 | |
| 1580 | const char* name() const noexcept |
| 1581 | { |
| 1582 | return errName; |
| 1583 | } |
| 1584 | |
| 1585 | const char* description() const noexcept |
| 1586 | { |
| 1587 | return errDesc; |
| 1588 | } |
| 1589 | |
| 1590 | const char* what() const noexcept |
| 1591 | { |
| 1592 | return errName; |
| 1593 | } |
| 1594 | }; |
| 1595 | |
| 1596 | } // namespace Foo |
| 1597 | } // namespace Example |
| 1598 | } // namespace openbmc_project |
| 1599 | } // namespace xyz |
| 1600 | } // namespace example |
| 1601 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1602 | namespace example |
| 1603 | { |
| 1604 | namespace xyz |
| 1605 | { |
| 1606 | namespace openbmc_project |
| 1607 | { |
| 1608 | namespace Example |
| 1609 | { |
| 1610 | namespace Bar |
| 1611 | { |
| 1612 | namespace _Bar |
| 1613 | { |
| 1614 | |
| 1615 | struct BAR_DATA |
| 1616 | { |
| 1617 | static constexpr auto str = "BAR_DATA=%s"; |
| 1618 | static constexpr auto str_short = "BAR_DATA"; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1619 | using type = std::tuple<std::decay_t<decltype(str)>, const char*>; |
| 1620 | explicit constexpr BAR_DATA(const char* a) : _entry(entry(str, a)){}; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1621 | type _entry; |
| 1622 | }; |
| 1623 | |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1624 | } // namespace _Bar |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1625 | |
| 1626 | struct Bar : public sdbusplus::exception_t |
| 1627 | { |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1628 | static constexpr auto errName = |
| 1629 | "example.xyz.openbmc_project.Example.Bar.Bar"; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1630 | static constexpr auto errDesc = "this is test error Bar"; |
| 1631 | static constexpr auto L = level::INFO; |
| 1632 | using BAR_DATA = _Bar::BAR_DATA; |
| 1633 | using FOO_DATA = example::xyz::openbmc_project::Example::Foo::Foo::FOO_DATA; |
Gunnar Mills | 94df8c9 | 2018-09-14 14:50:03 -0500 | [diff] [blame] | 1634 | using ERRNUM = |
| 1635 | example::xyz::openbmc_project::Example::Elog::TestErrorOne::ERRNUM; |
| 1636 | using FILE_PATH = |
| 1637 | example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_PATH; |
| 1638 | using FILE_NAME = |
| 1639 | example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_NAME; |
| 1640 | using DEV_ADDR = |
| 1641 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR; |
| 1642 | using DEV_ID = |
| 1643 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID; |
| 1644 | using DEV_NAME = |
| 1645 | example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME; |
| 1646 | using metadata_types = std::tuple<BAR_DATA, FOO_DATA, ERRNUM, FILE_PATH, |
| 1647 | FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>; |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1648 | |
| 1649 | const char* name() const noexcept |
| 1650 | { |
| 1651 | return errName; |
| 1652 | } |
| 1653 | |
| 1654 | const char* description() const noexcept |
| 1655 | { |
| 1656 | return errDesc; |
| 1657 | } |
| 1658 | |
| 1659 | const char* what() const noexcept |
| 1660 | { |
| 1661 | return errName; |
| 1662 | } |
| 1663 | }; |
| 1664 | |
| 1665 | } // namespace Bar |
| 1666 | } // namespace Example |
| 1667 | } // namespace openbmc_project |
| 1668 | } // namespace xyz |
| 1669 | } // namespace example |
| 1670 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 1671 | } // namespace logging |
| 1672 | |
| 1673 | } // namespace phosphor |