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