blob: 7c937a5b545e873c3e605ed95849d40823385e5e [file] [log] [blame]
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301// This file was autogenerated. Do not edit!
2// See elog-gen.py for more details
3#pragma once
4
Gunnar Mills94df8c92018-09-14 14:50:03 -05005#include <phosphor-logging/elog.hpp>
6#include <phosphor-logging/log.hpp>
7#include <sdbusplus/exception.hpp>
George Liub5ca1012021-09-10 12:53:11 +08008
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05309#include <string>
10#include <tuple>
11#include <type_traits>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053012
13namespace sdbusplus
14{
15namespace xyz
16{
17namespace openbmc_project
18{
19namespace Common
20{
21namespace Error
22{
Gunnar Mills94df8c92018-09-14 14:50:03 -050023struct Timeout;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053024} // namespace Error
25} // namespace Common
26} // namespace openbmc_project
27} // namespace xyz
28} // namespace sdbusplus
29
30namespace sdbusplus
31{
32namespace xyz
33{
34namespace openbmc_project
35{
36namespace Common
37{
38namespace Callout
39{
40namespace Error
41{
Gunnar Mills94df8c92018-09-14 14:50:03 -050042struct GPIO;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053043} // namespace Error
44} // namespace Callout
45} // namespace Common
46} // namespace openbmc_project
47} // namespace xyz
48} // namespace sdbusplus
49
50namespace sdbusplus
51{
52namespace xyz
53{
54namespace openbmc_project
55{
56namespace Common
57{
58namespace Error
59{
Gunnar Mills94df8c92018-09-14 14:50:03 -050060struct InvalidArgument;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053061} // namespace Error
62} // namespace Common
63} // namespace openbmc_project
64} // namespace xyz
65} // namespace sdbusplus
66
67namespace sdbusplus
68{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053069namespace org
70{
71namespace open_power
72{
73namespace OCC
74{
75namespace Device
76{
77namespace Error
78{
Gunnar Mills94df8c92018-09-14 14:50:03 -050079struct WriteFailure;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053080} // namespace Error
81} // namespace Device
82} // namespace OCC
83} // namespace open_power
84} // namespace org
85} // namespace sdbusplus
86
87namespace sdbusplus
88{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053089namespace xyz
90{
91namespace openbmc_project
92{
93namespace State
94{
95namespace Host
96{
97namespace Error
98{
Gunnar Mills94df8c92018-09-14 14:50:03 -050099struct SoftOffTimeout;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530100} // namespace Error
101} // namespace Host
102} // namespace State
103} // namespace openbmc_project
104} // namespace xyz
105} // namespace sdbusplus
106
107namespace sdbusplus
108{
109namespace xyz
110{
111namespace openbmc_project
112{
113namespace Common
114{
115namespace Callout
116{
117namespace Error
118{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500119struct Inventory;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530120} // namespace Error
121} // namespace Callout
122} // namespace Common
123} // namespace openbmc_project
124} // namespace xyz
125} // namespace sdbusplus
126
127namespace sdbusplus
128{
129namespace xyz
130{
131namespace openbmc_project
132{
133namespace Common
134{
135namespace Callout
136{
137namespace Error
138{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500139struct IIC;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530140} // namespace Error
141} // namespace Callout
142} // namespace Common
143} // namespace openbmc_project
144} // namespace xyz
145} // namespace sdbusplus
146
147namespace sdbusplus
148{
149namespace xyz
150{
151namespace openbmc_project
152{
153namespace Common
154{
155namespace File
156{
157namespace Error
158{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500159struct Open;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530160} // namespace Error
161} // namespace File
162} // namespace Common
163} // namespace openbmc_project
164} // namespace xyz
165} // namespace sdbusplus
166
167namespace sdbusplus
168{
169namespace xyz
170{
171namespace openbmc_project
172{
173namespace Common
174{
175namespace Error
176{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500177struct InternalFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530178} // namespace Error
179} // namespace Common
180} // namespace openbmc_project
181} // namespace xyz
182} // namespace sdbusplus
183
184namespace sdbusplus
185{
186namespace xyz
187{
188namespace openbmc_project
189{
190namespace Common
191{
192namespace Callout
193{
194namespace Error
195{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500196struct Device;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530197} // namespace Error
198} // namespace Callout
199} // namespace Common
200} // namespace openbmc_project
201} // namespace xyz
202} // namespace sdbusplus
203
204namespace sdbusplus
205{
206namespace xyz
207{
208namespace openbmc_project
209{
210namespace Control
211{
212namespace Device
213{
214namespace Error
215{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500216struct WriteFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530217} // namespace Error
218} // namespace Device
219} // namespace Control
220} // namespace openbmc_project
221} // namespace xyz
222} // namespace sdbusplus
223
224namespace sdbusplus
225{
226namespace xyz
227{
228namespace openbmc_project
229{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530230namespace Sensor
231{
232namespace Device
233{
234namespace Error
235{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500236struct ReadFailure;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530237} // namespace Error
238} // namespace Device
239} // namespace Sensor
240} // namespace openbmc_project
241} // namespace xyz
242} // namespace sdbusplus
243
244namespace sdbusplus
245{
246namespace xyz
247{
248namespace openbmc_project
249{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530250namespace Common
251{
252namespace File
253{
254namespace Error
255{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500256struct Seek;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530257} // namespace Error
258} // namespace File
259} // namespace Common
260} // namespace openbmc_project
261} // namespace xyz
262} // namespace sdbusplus
263
264namespace sdbusplus
265{
266namespace org
267{
268namespace open_power
269{
270namespace OCC
271{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530272namespace Device
273{
274namespace Error
275{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500276struct ConfigFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530277} // namespace Error
278} // namespace Device
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530279} // namespace OCC
280} // namespace open_power
281} // namespace org
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530282} // namespace sdbusplus
283
284namespace sdbusplus
285{
286namespace org
287{
288namespace open_power
289{
290namespace OCC
291{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530292namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530293{
294namespace Error
295{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500296struct OpenFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530297} // namespace Error
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530298} // namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530299} // namespace OCC
300} // namespace open_power
301} // namespace org
302} // namespace sdbusplus
303
304namespace sdbusplus
305{
306namespace xyz
307{
308namespace openbmc_project
309{
310namespace Common
311{
312namespace Callout
313{
314namespace Error
315{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500316struct IPMISensor;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530317} // namespace Error
318} // namespace Callout
319} // namespace Common
320} // namespace openbmc_project
321} // namespace xyz
322} // namespace sdbusplus
323
324namespace sdbusplus
325{
326namespace org
327{
328namespace open_power
329{
330namespace OCC
331{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530332namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530333{
334namespace Error
335{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500336struct ReadFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530337} // namespace Error
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530338} // namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530339} // namespace OCC
340} // namespace open_power
341} // namespace org
342} // namespace sdbusplus
343
344namespace sdbusplus
345{
346namespace xyz
347{
348namespace openbmc_project
349{
350namespace Control
351{
352namespace Host
353{
354namespace Error
355{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500356struct CommandNotSupported;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530357} // namespace Error
358} // namespace Host
359} // namespace Control
360} // namespace openbmc_project
361} // namespace xyz
362} // namespace sdbusplus
363
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530364namespace phosphor
365{
366
367namespace logging
368{
369
370namespace xyz
371{
372namespace openbmc_project
373{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530374namespace Control
375{
376namespace Host
377{
378namespace _CommandNotSupported
George Liub5ca1012021-09-10 12:53:11 +0800379{} // namespace _CommandNotSupported
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530380
381struct CommandNotSupported
382{
383 static constexpr auto L = level::ERR;
384 using metadata_types = std::tuple<>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530385};
386
387} // namespace Host
388} // namespace Control
389} // namespace openbmc_project
390} // namespace xyz
391
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530392namespace details
393{
394
395template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500396struct map_exception_type<
397 sdbusplus::xyz::openbmc_project::Control::Host::Error::CommandNotSupported>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530398{
399 using type = xyz::openbmc_project::Control::Host::CommandNotSupported;
400};
401
Gunnar Mills94df8c92018-09-14 14:50:03 -0500402} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530403
404namespace xyz
405{
406namespace openbmc_project
407{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530408namespace Common
409{
410namespace _Timeout
411{
412
413struct TIMEOUT_IN_MSEC
414{
415 static constexpr auto str = "TIMEOUT_IN_MSEC=%llu";
416 static constexpr auto str_short = "TIMEOUT_IN_MSEC";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500417 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 Subbanna9bb065b2017-04-18 14:25:26 +0530419 type _entry;
420};
421
Gunnar Mills94df8c92018-09-14 14:50:03 -0500422} // namespace _Timeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530423
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530424struct Timeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530425{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530426 static constexpr auto L = level::ERR;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530427 using TIMEOUT_IN_MSEC = _Timeout::TIMEOUT_IN_MSEC;
428 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530429};
430
431} // namespace Common
432} // namespace openbmc_project
433} // namespace xyz
434
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530435namespace details
436{
437
438template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500439struct map_exception_type<
440 sdbusplus::xyz::openbmc_project::Common::Error::Timeout>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530441{
442 using type = xyz::openbmc_project::Common::Timeout;
443};
444
Gunnar Mills94df8c92018-09-14 14:50:03 -0500445} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530446
447namespace xyz
448{
449namespace openbmc_project
450{
451namespace Common
452{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530453namespace _InternalFailure
George Liub5ca1012021-09-10 12:53:11 +0800454{} // namespace _InternalFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530455
456struct InternalFailure
457{
458 static constexpr auto L = level::ERR;
459 using metadata_types = std::tuple<>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530460};
461
462} // namespace Common
463} // namespace openbmc_project
464} // namespace xyz
465
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530466namespace details
467{
468
469template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500470struct map_exception_type<
471 sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530472{
473 using type = xyz::openbmc_project::Common::InternalFailure;
474};
475
Gunnar Mills94df8c92018-09-14 14:50:03 -0500476} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530477
478namespace xyz
479{
480namespace openbmc_project
481{
482namespace Common
483{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530484namespace _InvalidArgument
485{
486
487struct ARGUMENT_NAME
488{
489 static constexpr auto str = "ARGUMENT_NAME=%s";
490 static constexpr auto str_short = "ARGUMENT_NAME";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500491 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
492 explicit constexpr ARGUMENT_NAME(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530493 type _entry;
494};
495struct ARGUMENT_VALUE
496{
497 static constexpr auto str = "ARGUMENT_VALUE=%s";
498 static constexpr auto str_short = "ARGUMENT_VALUE";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500499 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
500 explicit constexpr ARGUMENT_VALUE(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530501 type _entry;
502};
503
Gunnar Mills94df8c92018-09-14 14:50:03 -0500504} // namespace _InvalidArgument
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530505
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530506struct InvalidArgument
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530507{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530508 static constexpr auto L = level::ERR;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530509 using ARGUMENT_NAME = _InvalidArgument::ARGUMENT_NAME;
510 using ARGUMENT_VALUE = _InvalidArgument::ARGUMENT_VALUE;
511 using metadata_types = std::tuple<ARGUMENT_NAME, ARGUMENT_VALUE>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530512};
513
514} // namespace Common
515} // namespace openbmc_project
516} // namespace xyz
517
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530518namespace details
519{
520
521template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500522struct map_exception_type<
523 sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530524{
525 using type = xyz::openbmc_project::Common::InvalidArgument;
526};
527
Gunnar Mills94df8c92018-09-14 14:50:03 -0500528} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530529
530namespace xyz
531{
532namespace openbmc_project
533{
534namespace Common
535{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530536namespace File
537{
538namespace _Open
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530539{
540
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530541struct ERRNO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530542{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530543 static constexpr auto str = "ERRNO=%d";
544 static constexpr auto str_short = "ERRNO";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500545 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
546 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530547 type _entry;
548};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530549struct PATH
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530550{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530551 static constexpr auto str = "PATH=%s";
552 static constexpr auto str_short = "PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500553 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
554 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530555 type _entry;
556};
557
Gunnar Mills94df8c92018-09-14 14:50:03 -0500558} // namespace _Open
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530559
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530560struct Open
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530561{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530562 static constexpr auto L = level::ERR;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530563 using ERRNO = _Open::ERRNO;
564 using PATH = _Open::PATH;
565 using metadata_types = std::tuple<ERRNO, PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530566};
567
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530568} // namespace File
569} // namespace Common
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530570} // namespace openbmc_project
571} // namespace xyz
572
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530573namespace details
574{
575
576template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500577struct map_exception_type<
578 sdbusplus::xyz::openbmc_project::Common::File::Error::Open>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530579{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530580 using type = xyz::openbmc_project::Common::File::Open;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530581};
582
Gunnar Mills94df8c92018-09-14 14:50:03 -0500583} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530584
585namespace xyz
586{
587namespace openbmc_project
588{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530589namespace Common
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530590{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530591namespace File
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530592{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530593namespace _Seek
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530594{
595
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530596struct OFFSET
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530597{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530598 static constexpr auto str = "OFFSET=%ll";
599 static constexpr auto str_short = "OFFSET";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500600 using type = std::tuple<std::decay_t<decltype(str)>, int64_t>;
601 explicit constexpr OFFSET(int64_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530602 type _entry;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530603};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530604struct WHENCE
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530605{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530606 static constexpr auto str = "WHENCE=%d";
607 static constexpr auto str_short = "WHENCE";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500608 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
609 explicit constexpr WHENCE(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530610 type _entry;
611};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530612struct ERRNO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530613{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530614 static constexpr auto str = "ERRNO=%d";
615 static constexpr auto str_short = "ERRNO";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500616 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
617 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530618 type _entry;
619};
620struct PATH
621{
622 static constexpr auto str = "PATH=%s";
623 static constexpr auto str_short = "PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500624 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
625 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530626 type _entry;
627};
628
Gunnar Mills94df8c92018-09-14 14:50:03 -0500629} // namespace _Seek
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530630
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530631struct Seek
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530632{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530633 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 Subbanna9bb065b2017-04-18 14:25:26 +0530639};
640
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530641} // namespace File
642} // namespace Common
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530643} // namespace openbmc_project
644} // namespace xyz
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530645
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530646namespace details
647{
648
649template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500650struct map_exception_type<
651 sdbusplus::xyz::openbmc_project::Common::File::Error::Seek>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530652{
653 using type = xyz::openbmc_project::Common::File::Seek;
654};
655
Gunnar Mills94df8c92018-09-14 14:50:03 -0500656} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530657
658namespace example
659{
660namespace xyz
661{
662namespace openbmc_project
663{
664namespace Example
665{
666namespace Elog
667{
668namespace _TestErrorTwo
669{
670
671struct DEV_ADDR
672{
673 static constexpr auto str = "DEV_ADDR=0x%.8X";
674 static constexpr auto str_short = "DEV_ADDR";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500675 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
676 explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530677 type _entry;
678};
679struct DEV_ID
680{
681 static constexpr auto str = "DEV_ID=%u";
682 static constexpr auto str_short = "DEV_ID";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500683 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
684 explicit constexpr DEV_ID(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530685 type _entry;
686};
687struct DEV_NAME
688{
689 static constexpr auto str = "DEV_NAME=%s";
690 static constexpr auto str_short = "DEV_NAME";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500691 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
692 explicit constexpr DEV_NAME(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530693 type _entry;
694};
695
Gunnar Mills94df8c92018-09-14 14:50:03 -0500696} // namespace _TestErrorTwo
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530697
698struct TestErrorTwo : public sdbusplus::exception_t
699{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500700 static constexpr auto errName =
701 "example.xyz.openbmc_project.Example.Elog.TestErrorTwo";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530702 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 Subbanna9bb065b2017-04-18 14:25:26 +0530731namespace example
732{
733namespace xyz
734{
735namespace openbmc_project
736{
737namespace Example
738{
739namespace Elog
740{
741namespace _AutoTestSimple
742{
743
744struct STRING
745{
746 static constexpr auto str = "STRING=%s";
747 static constexpr auto str_short = "STRING";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500748 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
749 explicit constexpr STRING(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530750 type _entry;
751};
752
Gunnar Mills94df8c92018-09-14 14:50:03 -0500753} // namespace _AutoTestSimple
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530754
755struct AutoTestSimple : public sdbusplus::exception_t
756{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500757 static constexpr auto errName =
758 "example.xyz.openbmc_project.Example.Elog.AutoTestSimple";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530759 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 Subbanna9bb065b2017-04-18 14:25:26 +0530786namespace example
787{
788namespace xyz
789{
790namespace openbmc_project
791{
792namespace Example
793{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530794namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530795{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530796namespace _Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530797{
798
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530799struct CALLOUT_ERRNO_TEST
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530800{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530801 static constexpr auto str = "CALLOUT_ERRNO_TEST=%d";
802 static constexpr auto str_short = "CALLOUT_ERRNO_TEST";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500803 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 Subbannaee4d83d2017-06-29 18:35:00 +0530805 type _entry;
806};
807struct 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 Mills94df8c92018-09-14 14:50:03 -0500811 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 Subbanna9bb065b2017-04-18 14:25:26 +0530814 type _entry;
815};
816
Gunnar Mills94df8c92018-09-14 14:50:03 -0500817} // namespace _Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530818
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530819struct Callout : public sdbusplus::exception_t
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530820{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500821 static constexpr auto errName =
822 "example.xyz.openbmc_project.Example.Device.Callout";
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530823 static constexpr auto errDesc = "Generic device callout";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530824 static constexpr auto L = level::ERR;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530825 using CALLOUT_ERRNO_TEST = _Callout::CALLOUT_ERRNO_TEST;
826 using CALLOUT_DEVICE_PATH_TEST = _Callout::CALLOUT_DEVICE_PATH_TEST;
Gunnar Mills94df8c92018-09-14 14:50:03 -0500827 using metadata_types =
828 std::tuple<CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530829
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 Subbannaee4d83d2017-06-29 18:35:00 +0530846} // namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530847} // namespace Example
848} // namespace openbmc_project
849} // namespace xyz
850} // namespace example
851
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530852namespace xyz
853{
854namespace openbmc_project
855{
856namespace Common
857{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530858namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530859{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530860namespace _Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530861{
862
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530863struct CALLOUT_ERRNO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530864{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530865 static constexpr auto str = "CALLOUT_ERRNO=%d";
866 static constexpr auto str_short = "CALLOUT_ERRNO";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500867 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
868 explicit constexpr CALLOUT_ERRNO(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530869 type _entry;
870};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530871struct CALLOUT_DEVICE_PATH
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530872{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530873 static constexpr auto str = "CALLOUT_DEVICE_PATH=%s";
874 static constexpr auto str_short = "CALLOUT_DEVICE_PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500875 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 Subbanna9bb065b2017-04-18 14:25:26 +0530878 type _entry;
879};
880
Gunnar Mills94df8c92018-09-14 14:50:03 -0500881} // namespace _Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530882
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530883struct Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530884{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530885 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 Subbanna9bb065b2017-04-18 14:25:26 +0530889};
890
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530891} // namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530892} // namespace Common
893} // namespace openbmc_project
894} // namespace xyz
895
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530896namespace details
897{
898
899template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500900struct map_exception_type<
901 sdbusplus::xyz::openbmc_project::Common::Callout::Error::Device>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530902{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530903 using type = xyz::openbmc_project::Common::Callout::Device;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530904};
905
Gunnar Mills94df8c92018-09-14 14:50:03 -0500906} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530907
908namespace xyz
909{
910namespace openbmc_project
911{
912namespace Common
913{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530914namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530915{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530916namespace _GPIO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530917{
918
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530919struct CALLOUT_GPIO_NUM
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530920{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530921 static constexpr auto str = "CALLOUT_GPIO_NUM=%u";
922 static constexpr auto str_short = "CALLOUT_GPIO_NUM";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500923 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 Subbanna9bb065b2017-04-18 14:25:26 +0530925 type _entry;
926};
927
Gunnar Mills94df8c92018-09-14 14:50:03 -0500928} // namespace _GPIO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530929
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530930struct GPIO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530931{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530932 static constexpr auto L = level::ERR;
933 using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM;
Gunnar Mills94df8c92018-09-14 14:50:03 -0500934 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 Subbanna9bb065b2017-04-18 14:25:26 +0530940};
941
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530942} // namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530943} // namespace Common
944} // namespace openbmc_project
945} // namespace xyz
946
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530947namespace details
948{
949
950template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500951struct map_exception_type<
952 sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530953{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530954 using type = xyz::openbmc_project::Common::Callout::GPIO;
955};
956
Gunnar Mills94df8c92018-09-14 14:50:03 -0500957} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530958
959namespace xyz
960{
961namespace openbmc_project
962{
963namespace Common
964{
965namespace Callout
966{
967namespace _IIC
968{
969
970struct CALLOUT_IIC_BUS
971{
972 static constexpr auto str = "CALLOUT_IIC_BUS=%s";
973 static constexpr auto str_short = "CALLOUT_IIC_BUS";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500974 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 Subbannaee4d83d2017-06-29 18:35:00 +0530976 type _entry;
977};
978struct CALLOUT_IIC_ADDR
979{
980 static constexpr auto str = "CALLOUT_IIC_ADDR=0x%hx";
981 static constexpr auto str_short = "CALLOUT_IIC_ADDR";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500982 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 Subbannaee4d83d2017-06-29 18:35:00 +0530984 type _entry;
985};
986
Gunnar Mills94df8c92018-09-14 14:50:03 -0500987} // namespace _IIC
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530988
989struct 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 Mills94df8c92018-09-14 14:50:03 -0500994 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 Subbannaee4d83d2017-06-29 18:35:00 +05301000};
1001
1002} // namespace Callout
1003} // namespace Common
1004} // namespace openbmc_project
1005} // namespace xyz
1006
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301007namespace details
1008{
1009
1010template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001011struct map_exception_type<
1012 sdbusplus::xyz::openbmc_project::Common::Callout::Error::IIC>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301013{
1014 using type = xyz::openbmc_project::Common::Callout::IIC;
1015};
1016
Gunnar Mills94df8c92018-09-14 14:50:03 -05001017} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301018
1019namespace xyz
1020{
1021namespace openbmc_project
1022{
1023namespace Common
1024{
1025namespace Callout
1026{
1027namespace _Inventory
1028{
1029
1030struct CALLOUT_INVENTORY_PATH
1031{
1032 static constexpr auto str = "CALLOUT_INVENTORY_PATH=%s";
1033 static constexpr auto str_short = "CALLOUT_INVENTORY_PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001034 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 Subbannaee4d83d2017-06-29 18:35:00 +05301037 type _entry;
1038};
1039
Gunnar Mills94df8c92018-09-14 14:50:03 -05001040} // namespace _Inventory
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301041
1042struct 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 Subbannaee4d83d2017-06-29 18:35:00 +05301047};
1048
1049} // namespace Callout
1050} // namespace Common
1051} // namespace openbmc_project
1052} // namespace xyz
1053
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301054namespace details
1055{
1056
1057template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001058struct map_exception_type<
1059 sdbusplus::xyz::openbmc_project::Common::Callout::Error::Inventory>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301060{
1061 using type = xyz::openbmc_project::Common::Callout::Inventory;
1062};
1063
Gunnar Mills94df8c92018-09-14 14:50:03 -05001064} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301065
1066namespace xyz
1067{
1068namespace openbmc_project
1069{
1070namespace Common
1071{
1072namespace Callout
1073{
1074namespace _IPMISensor
1075{
1076
1077struct 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 Mills94df8c92018-09-14 14:50:03 -05001081 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 Subbannaee4d83d2017-06-29 18:35:00 +05301084 type _entry;
1085};
1086
Gunnar Mills94df8c92018-09-14 14:50:03 -05001087} // namespace _IPMISensor
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301088
1089struct 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 Subbannaee4d83d2017-06-29 18:35:00 +05301094};
1095
1096} // namespace Callout
1097} // namespace Common
1098} // namespace openbmc_project
1099} // namespace xyz
1100
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301101namespace details
1102{
1103
1104template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001105struct map_exception_type<
1106 sdbusplus::xyz::openbmc_project::Common::Callout::Error::IPMISensor>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301107{
1108 using type = xyz::openbmc_project::Common::Callout::IPMISensor;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301109};
1110
Gunnar Mills94df8c92018-09-14 14:50:03 -05001111} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301112
1113namespace xyz
1114{
1115namespace openbmc_project
1116{
1117namespace State
1118{
1119namespace Host
1120{
1121namespace _SoftOffTimeout
George Liub5ca1012021-09-10 12:53:11 +08001122{} // namespace _SoftOffTimeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301123
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301124struct SoftOffTimeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301125{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301126 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001127 using TIMEOUT_IN_MSEC =
1128 xyz::openbmc_project::Common::Timeout::TIMEOUT_IN_MSEC;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301129 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301130};
1131
1132} // namespace Host
1133} // namespace State
1134} // namespace openbmc_project
1135} // namespace xyz
1136
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301137namespace details
1138{
1139
1140template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001141struct map_exception_type<
1142 sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301143{
1144 using type = xyz::openbmc_project::State::Host::SoftOffTimeout;
1145};
1146
Gunnar Mills94df8c92018-09-14 14:50:03 -05001147} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301148
1149namespace xyz
1150{
1151namespace openbmc_project
1152{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301153namespace Control
1154{
1155namespace Device
1156{
1157namespace _WriteFailure
George Liub5ca1012021-09-10 12:53:11 +08001158{} // namespace _WriteFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301159
1160struct WriteFailure
1161{
1162 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001163 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 Subbannaee4d83d2017-06-29 18:35:00 +05301167 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301168};
1169
1170} // namespace Device
1171} // namespace Control
1172} // namespace openbmc_project
1173} // namespace xyz
1174
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301175namespace details
1176{
1177
1178template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001179struct map_exception_type<
1180 sdbusplus::xyz::openbmc_project::Control::Device::Error::WriteFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301181{
1182 using type = xyz::openbmc_project::Control::Device::WriteFailure;
1183};
1184
Gunnar Mills94df8c92018-09-14 14:50:03 -05001185} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301186
1187namespace org
1188{
1189namespace open_power
1190{
1191namespace OCC
1192{
1193namespace Device
1194{
1195namespace _OpenFailure
George Liub5ca1012021-09-10 12:53:11 +08001196{} // namespace _OpenFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301197
1198struct OpenFailure
1199{
1200 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001201 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 Subbannaee4d83d2017-06-29 18:35:00 +05301205 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301206};
1207
1208} // namespace Device
1209} // namespace OCC
1210} // namespace open_power
1211} // namespace org
1212
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301213namespace details
1214{
1215
1216template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001217struct map_exception_type<
1218 sdbusplus::org::open_power::OCC::Device::Error::OpenFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301219{
1220 using type = org::open_power::OCC::Device::OpenFailure;
1221};
1222
Gunnar Mills94df8c92018-09-14 14:50:03 -05001223} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301224
1225namespace org
1226{
1227namespace open_power
1228{
1229namespace OCC
1230{
1231namespace Device
1232{
1233namespace _ReadFailure
George Liub5ca1012021-09-10 12:53:11 +08001234{} // namespace _ReadFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301235
1236struct ReadFailure
1237{
1238 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001239 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 Subbannaee4d83d2017-06-29 18:35:00 +05301243 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301244};
1245
1246} // namespace Device
1247} // namespace OCC
1248} // namespace open_power
1249} // namespace org
1250
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301251namespace details
1252{
1253
1254template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001255struct map_exception_type<
1256 sdbusplus::org::open_power::OCC::Device::Error::ReadFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301257{
1258 using type = org::open_power::OCC::Device::ReadFailure;
1259};
1260
Gunnar Mills94df8c92018-09-14 14:50:03 -05001261} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301262
1263namespace org
1264{
1265namespace open_power
1266{
1267namespace OCC
1268{
1269namespace Device
1270{
1271namespace _WriteFailure
George Liub5ca1012021-09-10 12:53:11 +08001272{} // namespace _WriteFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301273
1274struct WriteFailure
1275{
1276 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001277 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 Subbannaee4d83d2017-06-29 18:35:00 +05301281 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301282};
1283
1284} // namespace Device
1285} // namespace OCC
1286} // namespace open_power
1287} // namespace org
1288
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301289namespace details
1290{
1291
1292template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001293struct map_exception_type<
1294 sdbusplus::org::open_power::OCC::Device::Error::WriteFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301295{
1296 using type = org::open_power::OCC::Device::WriteFailure;
1297};
1298
Gunnar Mills94df8c92018-09-14 14:50:03 -05001299} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301300
1301namespace org
1302{
1303namespace open_power
1304{
1305namespace OCC
1306{
1307namespace Device
1308{
1309namespace _ConfigFailure
George Liub5ca1012021-09-10 12:53:11 +08001310{} // namespace _ConfigFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301311
1312struct ConfigFailure
1313{
1314 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001315 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 Subbannaee4d83d2017-06-29 18:35:00 +05301319 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301320};
1321
1322} // namespace Device
1323} // namespace OCC
1324} // namespace open_power
1325} // namespace org
1326
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301327namespace details
1328{
1329
1330template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001331struct map_exception_type<
1332 sdbusplus::org::open_power::OCC::Device::Error::ConfigFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301333{
1334 using type = org::open_power::OCC::Device::ConfigFailure;
1335};
1336
Gunnar Mills94df8c92018-09-14 14:50:03 -05001337} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301338
1339namespace xyz
1340{
1341namespace openbmc_project
1342{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301343namespace Sensor
1344{
1345namespace Device
1346{
1347namespace _ReadFailure
George Liub5ca1012021-09-10 12:53:11 +08001348{} // namespace _ReadFailure
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301349
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301350struct ReadFailure
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301351{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301352 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001353 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 Subbanna9bb065b2017-04-18 14:25:26 +05301357 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301358};
1359
1360} // namespace Device
1361} // namespace Sensor
1362} // namespace openbmc_project
1363} // namespace xyz
1364
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301365namespace details
1366{
1367
1368template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001369struct map_exception_type<
1370 sdbusplus::xyz::openbmc_project::Sensor::Device::Error::ReadFailure>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301371{
1372 using type = xyz::openbmc_project::Sensor::Device::ReadFailure;
1373};
1374
Gunnar Mills94df8c92018-09-14 14:50:03 -05001375} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301376
1377namespace example
1378{
1379namespace xyz
1380{
1381namespace openbmc_project
1382{
1383namespace Example
1384{
1385namespace Elog
1386{
1387namespace _TestErrorOne
1388{
1389
1390struct ERRNUM
1391{
1392 static constexpr auto str = "ERRNUM=0x%.4X";
1393 static constexpr auto str_short = "ERRNUM";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001394 using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>;
1395 explicit constexpr ERRNUM(uint16_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301396 type _entry;
1397};
1398struct FILE_PATH
1399{
1400 static constexpr auto str = "FILE_PATH=%s";
1401 static constexpr auto str_short = "FILE_PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001402 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1403 explicit constexpr FILE_PATH(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301404 type _entry;
1405};
1406struct FILE_NAME
1407{
1408 static constexpr auto str = "FILE_NAME=%s";
1409 static constexpr auto str_short = "FILE_NAME";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001410 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1411 explicit constexpr FILE_NAME(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301412 type _entry;
1413};
1414
Gunnar Mills94df8c92018-09-14 14:50:03 -05001415} // namespace _TestErrorOne
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301416
1417struct TestErrorOne : public sdbusplus::exception_t
1418{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001419 static constexpr auto errName =
1420 "example.xyz.openbmc_project.Example.Elog.TestErrorOne";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301421 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 Mills94df8c92018-09-14 14:50:03 -05001426 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 Subbanna9bb065b2017-04-18 14:25:26 +05301434
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 Subbanna9bb065b2017-04-18 14:25:26 +05301457namespace example
1458{
1459namespace xyz
1460{
1461namespace openbmc_project
1462{
1463namespace Example
1464{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301465namespace Elog
1466{
1467namespace _TestCallout
1468{
1469
1470struct DEV_ADDR
1471{
1472 static constexpr auto str = "DEV_ADDR=0x%.8X";
1473 static constexpr auto str_short = "DEV_ADDR";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001474 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1475 explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301476 type _entry;
1477};
1478
Gunnar Mills94df8c92018-09-14 14:50:03 -05001479} // namespace _TestCallout
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301480
1481struct TestCallout : public sdbusplus::exception_t
1482{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001483 static constexpr auto errName =
1484 "example.xyz.openbmc_project.Example.Elog.TestCallout";
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301485 static constexpr auto errDesc = "This is test error TestCallout";
1486 static constexpr auto L = level::ERR;
1487 using DEV_ADDR = _TestCallout::DEV_ADDR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001488 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 Subbannaee4d83d2017-06-29 18:35:00 +05301494
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 Subbannaee4d83d2017-06-29 18:35:00 +05301517namespace example
1518{
1519namespace xyz
1520{
1521namespace openbmc_project
1522{
1523namespace Example
1524{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301525namespace Foo
1526{
1527namespace _Foo
1528{
1529
1530struct FOO_DATA
1531{
1532 static constexpr auto str = "FOO_DATA=%s";
1533 static constexpr auto str_short = "FOO_DATA";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001534 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1535 explicit constexpr FOO_DATA(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301536 type _entry;
1537};
1538
Gunnar Mills94df8c92018-09-14 14:50:03 -05001539} // namespace _Foo
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301540
1541struct Foo : public sdbusplus::exception_t
1542{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001543 static constexpr auto errName =
1544 "example.xyz.openbmc_project.Example.Foo.Foo";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301545 static constexpr auto errDesc = "this is test error Foo";
1546 static constexpr auto L = level::INFO;
1547 using FOO_DATA = _Foo::FOO_DATA;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001548 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 Subbanna9bb065b2017-04-18 14:25:26 +05301562
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 Subbanna9bb065b2017-04-18 14:25:26 +05301585namespace example
1586{
1587namespace xyz
1588{
1589namespace openbmc_project
1590{
1591namespace Example
1592{
1593namespace Bar
1594{
1595namespace _Bar
1596{
1597
1598struct BAR_DATA
1599{
1600 static constexpr auto str = "BAR_DATA=%s";
1601 static constexpr auto str_short = "BAR_DATA";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001602 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1603 explicit constexpr BAR_DATA(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301604 type _entry;
1605};
1606
Gunnar Mills94df8c92018-09-14 14:50:03 -05001607} // namespace _Bar
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301608
1609struct Bar : public sdbusplus::exception_t
1610{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001611 static constexpr auto errName =
1612 "example.xyz.openbmc_project.Example.Bar.Bar";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301613 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 Mills94df8c92018-09-14 14:50:03 -05001617 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 Subbanna9bb065b2017-04-18 14:25:26 +05301631
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 Subbanna9bb065b2017-04-18 14:25:26 +05301654} // namespace logging
1655
1656} // namespace phosphor