blob: f11a20389703b081b8461517935fcdf6aabc4e02 [file] [log] [blame]
Tom Joseph448e74e2017-07-24 23:08:56 +05301// This file was autogenerated. Do not edit!
2// See elog-gen.py for more details
3#pragma once
4
Patrick Venture0b02be92018-08-31 11:55:55 -07005#include <phosphor-logging/elog.hpp>
6#include <phosphor-logging/log.hpp>
7#include <sdbusplus/exception.hpp>
Tom Joseph448e74e2017-07-24 23:08:56 +05308#include <string>
9#include <tuple>
10#include <type_traits>
Tom Joseph448e74e2017-07-24 23:08:56 +053011
12namespace sdbusplus
13{
14namespace xyz
15{
16namespace openbmc_project
17{
18namespace Dump
19{
20namespace Create
21{
22namespace Error
23{
Patrick Venture0b02be92018-08-31 11:55:55 -070024struct QuotaExceeded;
Tom Joseph448e74e2017-07-24 23:08:56 +053025} // namespace Error
26} // namespace Create
27} // namespace Dump
28} // namespace openbmc_project
29} // namespace xyz
30} // namespace sdbusplus
31
32namespace sdbusplus
33{
34namespace org
35{
36namespace open_power
37{
38namespace Host
39{
Tom Joseph448e74e2017-07-24 23:08:56 +053040namespace Error
41{
Patrick Venture0b02be92018-08-31 11:55:55 -070042struct Event;
Tom Joseph448e74e2017-07-24 23:08:56 +053043} // namespace Error
Tom Joseph448e74e2017-07-24 23:08:56 +053044} // namespace Host
45} // namespace open_power
46} // namespace org
47} // namespace sdbusplus
48
49namespace sdbusplus
50{
51namespace xyz
52{
53namespace openbmc_project
54{
55namespace State
56{
57namespace Host
58{
59namespace Error
60{
Patrick Venture0b02be92018-08-31 11:55:55 -070061struct SoftOffTimeout;
Tom Joseph448e74e2017-07-24 23:08:56 +053062} // namespace Error
63} // namespace Host
64} // namespace State
65} // namespace openbmc_project
66} // namespace xyz
67} // namespace sdbusplus
68
69namespace sdbusplus
70{
71namespace xyz
72{
73namespace openbmc_project
74{
75namespace Sensor
76{
77namespace Device
78{
79namespace Error
80{
Patrick Venture0b02be92018-08-31 11:55:55 -070081struct ReadFailure;
Tom Joseph448e74e2017-07-24 23:08:56 +053082} // namespace Error
83} // namespace Device
84} // namespace Sensor
85} // namespace openbmc_project
86} // namespace xyz
87} // namespace sdbusplus
88
89namespace sdbusplus
90{
91namespace xyz
92{
93namespace openbmc_project
94{
95namespace Control
96{
97namespace Device
98{
99namespace Error
100{
Patrick Venture0b02be92018-08-31 11:55:55 -0700101struct WriteFailure;
Tom Joseph448e74e2017-07-24 23:08:56 +0530102} // namespace Error
103} // namespace Device
104} // namespace Control
105} // namespace openbmc_project
106} // namespace xyz
107} // namespace sdbusplus
108
109namespace sdbusplus
110{
111namespace xyz
112{
113namespace openbmc_project
114{
115namespace Common
116{
117namespace File
118{
119namespace Error
120{
Patrick Venture0b02be92018-08-31 11:55:55 -0700121struct Seek;
Tom Joseph448e74e2017-07-24 23:08:56 +0530122} // namespace Error
123} // namespace File
124} // namespace Common
125} // namespace openbmc_project
126} // namespace xyz
127} // namespace sdbusplus
128
129namespace sdbusplus
130{
Tom Josephb647d5b2017-10-31 17:25:33 +0530131namespace org
132{
133namespace open_power
134{
135namespace Common
136{
137namespace Callout
138{
139namespace Error
140{
Patrick Venture0b02be92018-08-31 11:55:55 -0700141struct Procedure;
Tom Josephb647d5b2017-10-31 17:25:33 +0530142} // namespace Error
143} // namespace Callout
144} // namespace Common
145} // namespace open_power
146} // namespace org
147} // namespace sdbusplus
148
149namespace sdbusplus
150{
Tom Joseph448e74e2017-07-24 23:08:56 +0530151namespace xyz
152{
153namespace openbmc_project
154{
155namespace Control
156{
157namespace Host
158{
159namespace Error
160{
Patrick Venture0b02be92018-08-31 11:55:55 -0700161struct CommandNotSupported;
Tom Joseph448e74e2017-07-24 23:08:56 +0530162} // namespace Error
163} // namespace Host
164} // namespace Control
165} // namespace openbmc_project
166} // namespace xyz
167} // namespace sdbusplus
168
169namespace sdbusplus
170{
171namespace xyz
172{
173namespace openbmc_project
174{
175namespace Common
176{
177namespace Error
178{
Patrick Venture0b02be92018-08-31 11:55:55 -0700179struct InternalFailure;
Tom Joseph448e74e2017-07-24 23:08:56 +0530180} // namespace Error
181} // namespace Common
182} // namespace openbmc_project
183} // namespace xyz
184} // namespace sdbusplus
185
186namespace sdbusplus
187{
188namespace xyz
189{
190namespace openbmc_project
191{
192namespace Common
193{
194namespace Callout
195{
196namespace Error
197{
Patrick Venture0b02be92018-08-31 11:55:55 -0700198struct Device;
Tom Joseph448e74e2017-07-24 23:08:56 +0530199} // namespace Error
200} // namespace Callout
201} // namespace Common
202} // namespace openbmc_project
203} // namespace xyz
204} // namespace sdbusplus
205
206namespace sdbusplus
207{
208namespace org
209{
210namespace open_power
211{
212namespace Host
213{
214namespace Access
215{
216namespace Error
217{
Patrick Venture0b02be92018-08-31 11:55:55 -0700218struct WriteCFAM;
Tom Joseph448e74e2017-07-24 23:08:56 +0530219} // namespace Error
220} // namespace Access
221} // namespace Host
222} // namespace open_power
223} // namespace org
224} // namespace sdbusplus
225
226namespace sdbusplus
227{
228namespace xyz
229{
230namespace openbmc_project
231{
232namespace Common
233{
234namespace File
235{
236namespace Error
237{
Patrick Venture0b02be92018-08-31 11:55:55 -0700238struct Open;
Tom Joseph448e74e2017-07-24 23:08:56 +0530239} // namespace Error
240} // namespace File
241} // namespace Common
242} // namespace openbmc_project
243} // namespace xyz
244} // namespace sdbusplus
245
246namespace sdbusplus
247{
248namespace org
249{
250namespace open_power
251{
252namespace Host
253{
254namespace Error
255{
Patrick Venture0b02be92018-08-31 11:55:55 -0700256struct Checkstop;
Tom Joseph448e74e2017-07-24 23:08:56 +0530257} // namespace Error
258} // namespace Host
259} // namespace open_power
260} // namespace org
261} // namespace sdbusplus
262
263namespace sdbusplus
264{
265namespace xyz
266{
267namespace openbmc_project
268{
269namespace Common
270{
271namespace File
272{
273namespace Error
274{
Patrick Venture0b02be92018-08-31 11:55:55 -0700275struct Write;
Tom Joseph448e74e2017-07-24 23:08:56 +0530276} // namespace Error
277} // namespace File
278} // namespace Common
279} // namespace openbmc_project
280} // namespace xyz
281} // namespace sdbusplus
282
283namespace sdbusplus
284{
285namespace xyz
286{
287namespace openbmc_project
288{
289namespace Common
290{
291namespace Callout
292{
293namespace Error
294{
Patrick Venture0b02be92018-08-31 11:55:55 -0700295struct GPIO;
Tom Joseph448e74e2017-07-24 23:08:56 +0530296} // namespace Error
297} // namespace Callout
298} // namespace Common
299} // namespace openbmc_project
300} // namespace xyz
301} // namespace sdbusplus
302
303namespace sdbusplus
304{
305namespace xyz
306{
307namespace openbmc_project
308{
309namespace Common
310{
311namespace Error
312{
Patrick Venture0b02be92018-08-31 11:55:55 -0700313struct InvalidArgument;
Tom Joseph448e74e2017-07-24 23:08:56 +0530314} // namespace Error
315} // namespace Common
316} // namespace openbmc_project
317} // namespace xyz
318} // namespace sdbusplus
319
320namespace sdbusplus
321{
322namespace xyz
323{
324namespace openbmc_project
325{
326namespace Dump
327{
328namespace Create
329{
330namespace Error
331{
Patrick Venture0b02be92018-08-31 11:55:55 -0700332struct Disabled;
Tom Joseph448e74e2017-07-24 23:08:56 +0530333} // namespace Error
334} // namespace Create
335} // namespace Dump
336} // namespace openbmc_project
337} // namespace xyz
338} // namespace sdbusplus
339
340namespace sdbusplus
341{
342namespace xyz
343{
344namespace openbmc_project
345{
346namespace Common
347{
348namespace Callout
349{
350namespace Error
351{
Patrick Venture0b02be92018-08-31 11:55:55 -0700352struct IPMISensor;
Tom Joseph448e74e2017-07-24 23:08:56 +0530353} // namespace Error
354} // namespace Callout
355} // namespace Common
356} // namespace openbmc_project
357} // namespace xyz
358} // namespace sdbusplus
359
360namespace sdbusplus
361{
362namespace xyz
363{
364namespace openbmc_project
365{
366namespace Common
367{
368namespace Error
369{
Patrick Venture0b02be92018-08-31 11:55:55 -0700370struct Timeout;
Tom Joseph448e74e2017-07-24 23:08:56 +0530371} // namespace Error
372} // namespace Common
373} // namespace openbmc_project
374} // namespace xyz
375} // namespace sdbusplus
376
377namespace sdbusplus
378{
379namespace xyz
380{
381namespace openbmc_project
382{
383namespace Common
384{
385namespace Callout
386{
387namespace Error
388{
Patrick Venture0b02be92018-08-31 11:55:55 -0700389struct Inventory;
Tom Joseph448e74e2017-07-24 23:08:56 +0530390} // namespace Error
391} // namespace Callout
392} // namespace Common
393} // namespace openbmc_project
394} // namespace xyz
395} // namespace sdbusplus
396
397namespace sdbusplus
398{
399namespace xyz
400{
401namespace openbmc_project
402{
403namespace Common
404{
405namespace Callout
406{
407namespace Error
408{
Patrick Venture0b02be92018-08-31 11:55:55 -0700409struct IIC;
Tom Joseph448e74e2017-07-24 23:08:56 +0530410} // namespace Error
411} // namespace Callout
412} // namespace Common
413} // namespace openbmc_project
414} // namespace xyz
415} // namespace sdbusplus
416
417namespace sdbusplus
418{
419namespace org
420{
421namespace open_power
422{
423namespace Host
424{
425namespace Error
426{
Patrick Venture0b02be92018-08-31 11:55:55 -0700427struct WatchdogTimedOut;
Tom Joseph448e74e2017-07-24 23:08:56 +0530428} // namespace Error
429} // namespace Host
430} // namespace open_power
431} // namespace org
432} // namespace sdbusplus
433
434namespace sdbusplus
435{
436namespace org
437{
438namespace open_power
439{
440namespace Host
441{
442namespace Access
443{
444namespace Error
445{
Patrick Venture0b02be92018-08-31 11:55:55 -0700446struct ReadCFAM;
Tom Joseph448e74e2017-07-24 23:08:56 +0530447} // namespace Error
448} // namespace Access
449} // namespace Host
450} // namespace open_power
451} // namespace org
452} // namespace sdbusplus
453
Tom Josephb647d5b2017-10-31 17:25:33 +0530454namespace sdbusplus
455{
456namespace org
457{
458namespace open_power
459{
460namespace Host
461{
462namespace Error
463{
Patrick Venture0b02be92018-08-31 11:55:55 -0700464struct MaintenanceProcedure;
Tom Josephb647d5b2017-10-31 17:25:33 +0530465} // namespace Error
466} // namespace Host
467} // namespace open_power
468} // namespace org
469} // namespace sdbusplus
Tom Joseph448e74e2017-07-24 23:08:56 +0530470
471namespace phosphor
472{
473
474namespace logging
475{
476
477namespace xyz
478{
479namespace openbmc_project
480{
481namespace Common
482{
483namespace Callout
484{
485namespace _Device
486{
487
488struct CALLOUT_ERRNO
489{
490 static constexpr auto str = "CALLOUT_ERRNO=%d";
491 static constexpr auto str_short = "CALLOUT_ERRNO";
Patrick Venture0b02be92018-08-31 11:55:55 -0700492 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
493 explicit constexpr CALLOUT_ERRNO(int32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530494 type _entry;
495};
496struct CALLOUT_DEVICE_PATH
497{
498 static constexpr auto str = "CALLOUT_DEVICE_PATH=%s";
499 static constexpr auto str_short = "CALLOUT_DEVICE_PATH";
Patrick Venture0b02be92018-08-31 11:55:55 -0700500 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
501 explicit constexpr CALLOUT_DEVICE_PATH(const char* a) :
502 _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530503 type _entry;
504};
505
Patrick Venture0b02be92018-08-31 11:55:55 -0700506} // namespace _Device
Tom Joseph448e74e2017-07-24 23:08:56 +0530507
508struct Device
509{
510 static constexpr auto L = level::ERR;
511 using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO;
512 using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH;
513 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530514};
515
516} // namespace Callout
517} // namespace Common
518} // namespace openbmc_project
519} // namespace xyz
520
Tom Joseph448e74e2017-07-24 23:08:56 +0530521namespace details
522{
523
524template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700525struct map_exception_type<
526 sdbusplus::xyz::openbmc_project::Common::Callout::Error::Device>
Tom Joseph448e74e2017-07-24 23:08:56 +0530527{
528 using type = xyz::openbmc_project::Common::Callout::Device;
529};
530
Patrick Venture0b02be92018-08-31 11:55:55 -0700531} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530532
533namespace xyz
534{
535namespace openbmc_project
536{
537namespace Common
538{
539namespace Callout
540{
541namespace _GPIO
542{
543
544struct CALLOUT_GPIO_NUM
545{
546 static constexpr auto str = "CALLOUT_GPIO_NUM=%u";
547 static constexpr auto str_short = "CALLOUT_GPIO_NUM";
Patrick Venture0b02be92018-08-31 11:55:55 -0700548 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
549 explicit constexpr CALLOUT_GPIO_NUM(uint32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530550 type _entry;
551};
552
Patrick Venture0b02be92018-08-31 11:55:55 -0700553} // namespace _GPIO
Tom Joseph448e74e2017-07-24 23:08:56 +0530554
555struct GPIO
556{
557 static constexpr auto L = level::ERR;
558 using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM;
Patrick Venture0b02be92018-08-31 11:55:55 -0700559 using CALLOUT_ERRNO =
560 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
561 using CALLOUT_DEVICE_PATH =
562 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
563 using metadata_types =
564 std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530565};
566
567} // namespace Callout
568} // namespace Common
569} // namespace openbmc_project
570} // namespace xyz
571
Tom Joseph448e74e2017-07-24 23:08:56 +0530572namespace details
573{
574
575template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700576struct map_exception_type<
577 sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>
Tom Joseph448e74e2017-07-24 23:08:56 +0530578{
579 using type = xyz::openbmc_project::Common::Callout::GPIO;
580};
581
Patrick Venture0b02be92018-08-31 11:55:55 -0700582} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530583
584namespace xyz
585{
586namespace openbmc_project
587{
588namespace Common
589{
590namespace Callout
591{
592namespace _IIC
593{
594
595struct CALLOUT_IIC_BUS
596{
597 static constexpr auto str = "CALLOUT_IIC_BUS=%s";
598 static constexpr auto str_short = "CALLOUT_IIC_BUS";
Patrick Venture0b02be92018-08-31 11:55:55 -0700599 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
600 explicit constexpr CALLOUT_IIC_BUS(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530601 type _entry;
602};
603struct CALLOUT_IIC_ADDR
604{
605 static constexpr auto str = "CALLOUT_IIC_ADDR=0x%hx";
606 static constexpr auto str_short = "CALLOUT_IIC_ADDR";
Patrick Venture0b02be92018-08-31 11:55:55 -0700607 using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>;
608 explicit constexpr CALLOUT_IIC_ADDR(uint16_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530609 type _entry;
610};
611
Patrick Venture0b02be92018-08-31 11:55:55 -0700612} // namespace _IIC
Tom Joseph448e74e2017-07-24 23:08:56 +0530613
614struct IIC
615{
616 static constexpr auto L = level::ERR;
617 using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS;
618 using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR;
Patrick Venture0b02be92018-08-31 11:55:55 -0700619 using CALLOUT_ERRNO =
620 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
621 using CALLOUT_DEVICE_PATH =
622 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
623 using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR,
624 CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530625};
626
627} // namespace Callout
628} // namespace Common
629} // namespace openbmc_project
630} // namespace xyz
631
Tom Joseph448e74e2017-07-24 23:08:56 +0530632namespace details
633{
634
635template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700636struct map_exception_type<
637 sdbusplus::xyz::openbmc_project::Common::Callout::Error::IIC>
Tom Joseph448e74e2017-07-24 23:08:56 +0530638{
639 using type = xyz::openbmc_project::Common::Callout::IIC;
640};
641
Patrick Venture0b02be92018-08-31 11:55:55 -0700642} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530643
644namespace xyz
645{
646namespace openbmc_project
647{
648namespace Common
649{
650namespace Callout
651{
652namespace _Inventory
653{
654
655struct CALLOUT_INVENTORY_PATH
656{
657 static constexpr auto str = "CALLOUT_INVENTORY_PATH=%s";
658 static constexpr auto str_short = "CALLOUT_INVENTORY_PATH";
Patrick Venture0b02be92018-08-31 11:55:55 -0700659 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
660 explicit constexpr CALLOUT_INVENTORY_PATH(const char* a) :
661 _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530662 type _entry;
663};
664
Patrick Venture0b02be92018-08-31 11:55:55 -0700665} // namespace _Inventory
Tom Joseph448e74e2017-07-24 23:08:56 +0530666
667struct Inventory
668{
669 static constexpr auto L = level::ERR;
670 using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH;
671 using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530672};
673
674} // namespace Callout
675} // namespace Common
676} // namespace openbmc_project
677} // namespace xyz
678
Tom Joseph448e74e2017-07-24 23:08:56 +0530679namespace details
680{
681
682template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700683struct map_exception_type<
684 sdbusplus::xyz::openbmc_project::Common::Callout::Error::Inventory>
Tom Joseph448e74e2017-07-24 23:08:56 +0530685{
686 using type = xyz::openbmc_project::Common::Callout::Inventory;
687};
688
Patrick Venture0b02be92018-08-31 11:55:55 -0700689} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530690
691namespace xyz
692{
693namespace openbmc_project
694{
695namespace Common
696{
697namespace Callout
698{
699namespace _IPMISensor
700{
701
702struct CALLOUT_IPMI_SENSOR_NUM
703{
704 static constexpr auto str = "CALLOUT_IPMI_SENSOR_NUM=%u";
705 static constexpr auto str_short = "CALLOUT_IPMI_SENSOR_NUM";
Patrick Venture0b02be92018-08-31 11:55:55 -0700706 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
707 explicit constexpr CALLOUT_IPMI_SENSOR_NUM(uint32_t a) :
708 _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530709 type _entry;
710};
711
Patrick Venture0b02be92018-08-31 11:55:55 -0700712} // namespace _IPMISensor
Tom Joseph448e74e2017-07-24 23:08:56 +0530713
714struct IPMISensor
715{
716 static constexpr auto L = level::ERR;
717 using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM;
718 using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530719};
720
721} // namespace Callout
722} // namespace Common
723} // namespace openbmc_project
724} // namespace xyz
725
Tom Joseph448e74e2017-07-24 23:08:56 +0530726namespace details
727{
728
729template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700730struct map_exception_type<
731 sdbusplus::xyz::openbmc_project::Common::Callout::Error::IPMISensor>
Tom Joseph448e74e2017-07-24 23:08:56 +0530732{
733 using type = xyz::openbmc_project::Common::Callout::IPMISensor;
734};
735
Patrick Venture0b02be92018-08-31 11:55:55 -0700736} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530737
Tom Josephb647d5b2017-10-31 17:25:33 +0530738namespace org
739{
740namespace open_power
741{
742namespace Common
743{
744namespace Callout
745{
746namespace _Procedure
747{
748
749struct PROCEDURE
750{
751 static constexpr auto str = "PROCEDURE=%u";
752 static constexpr auto str_short = "PROCEDURE";
Patrick Venture0b02be92018-08-31 11:55:55 -0700753 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
754 explicit constexpr PROCEDURE(uint32_t a) : _entry(entry(str, a)){};
Tom Josephb647d5b2017-10-31 17:25:33 +0530755 type _entry;
756};
757
Patrick Venture0b02be92018-08-31 11:55:55 -0700758} // namespace _Procedure
Tom Josephb647d5b2017-10-31 17:25:33 +0530759
760struct Procedure
761{
762 static constexpr auto L = level::ERR;
763 using PROCEDURE = _Procedure::PROCEDURE;
764 using metadata_types = std::tuple<PROCEDURE>;
Tom Josephb647d5b2017-10-31 17:25:33 +0530765};
766
767} // namespace Callout
768} // namespace Common
769} // namespace open_power
770} // namespace org
771
Tom Josephb647d5b2017-10-31 17:25:33 +0530772namespace details
773{
774
775template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700776struct map_exception_type<
777 sdbusplus::org::open_power::Common::Callout::Error::Procedure>
Tom Josephb647d5b2017-10-31 17:25:33 +0530778{
779 using type = org::open_power::Common::Callout::Procedure;
780};
781
Patrick Venture0b02be92018-08-31 11:55:55 -0700782} // namespace details
Tom Josephb647d5b2017-10-31 17:25:33 +0530783
Tom Joseph448e74e2017-07-24 23:08:56 +0530784namespace xyz
785{
786namespace openbmc_project
787{
788namespace Common
789{
790namespace _Timeout
791{
792
793struct TIMEOUT_IN_MSEC
794{
795 static constexpr auto str = "TIMEOUT_IN_MSEC=%llu";
796 static constexpr auto str_short = "TIMEOUT_IN_MSEC";
Patrick Venture0b02be92018-08-31 11:55:55 -0700797 using type = std::tuple<std::decay_t<decltype(str)>, uint64_t>;
798 explicit constexpr TIMEOUT_IN_MSEC(uint64_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530799 type _entry;
800};
801
Patrick Venture0b02be92018-08-31 11:55:55 -0700802} // namespace _Timeout
Tom Joseph448e74e2017-07-24 23:08:56 +0530803
804struct Timeout
805{
806 static constexpr auto L = level::ERR;
807 using TIMEOUT_IN_MSEC = _Timeout::TIMEOUT_IN_MSEC;
808 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530809};
810
811} // namespace Common
812} // namespace openbmc_project
813} // namespace xyz
814
Tom Joseph448e74e2017-07-24 23:08:56 +0530815namespace details
816{
817
818template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700819struct map_exception_type<
820 sdbusplus::xyz::openbmc_project::Common::Error::Timeout>
Tom Joseph448e74e2017-07-24 23:08:56 +0530821{
822 using type = xyz::openbmc_project::Common::Timeout;
823};
824
Patrick Venture0b02be92018-08-31 11:55:55 -0700825} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530826
827namespace xyz
828{
829namespace openbmc_project
830{
831namespace Common
832{
833namespace _InternalFailure
834{
835
Patrick Venture0b02be92018-08-31 11:55:55 -0700836} // namespace _InternalFailure
Tom Joseph448e74e2017-07-24 23:08:56 +0530837
838struct InternalFailure
839{
840 static constexpr auto L = level::ERR;
841 using metadata_types = std::tuple<>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530842};
843
844} // namespace Common
845} // namespace openbmc_project
846} // namespace xyz
847
Tom Joseph448e74e2017-07-24 23:08:56 +0530848namespace details
849{
850
851template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700852struct map_exception_type<
853 sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>
Tom Joseph448e74e2017-07-24 23:08:56 +0530854{
855 using type = xyz::openbmc_project::Common::InternalFailure;
856};
857
Patrick Venture0b02be92018-08-31 11:55:55 -0700858} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530859
860namespace xyz
861{
862namespace openbmc_project
863{
864namespace Common
865{
866namespace _InvalidArgument
867{
868
869struct ARGUMENT_NAME
870{
871 static constexpr auto str = "ARGUMENT_NAME=%s";
872 static constexpr auto str_short = "ARGUMENT_NAME";
Patrick Venture0b02be92018-08-31 11:55:55 -0700873 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
874 explicit constexpr ARGUMENT_NAME(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530875 type _entry;
876};
877struct ARGUMENT_VALUE
878{
879 static constexpr auto str = "ARGUMENT_VALUE=%s";
880 static constexpr auto str_short = "ARGUMENT_VALUE";
Patrick Venture0b02be92018-08-31 11:55:55 -0700881 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
882 explicit constexpr ARGUMENT_VALUE(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530883 type _entry;
884};
885
Patrick Venture0b02be92018-08-31 11:55:55 -0700886} // namespace _InvalidArgument
Tom Joseph448e74e2017-07-24 23:08:56 +0530887
888struct InvalidArgument
889{
890 static constexpr auto L = level::ERR;
891 using ARGUMENT_NAME = _InvalidArgument::ARGUMENT_NAME;
892 using ARGUMENT_VALUE = _InvalidArgument::ARGUMENT_VALUE;
893 using metadata_types = std::tuple<ARGUMENT_NAME, ARGUMENT_VALUE>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530894};
895
896} // namespace Common
897} // namespace openbmc_project
898} // namespace xyz
899
Tom Joseph448e74e2017-07-24 23:08:56 +0530900namespace details
901{
902
903template <>
Patrick Venture0b02be92018-08-31 11:55:55 -0700904struct map_exception_type<
905 sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>
Tom Joseph448e74e2017-07-24 23:08:56 +0530906{
907 using type = xyz::openbmc_project::Common::InvalidArgument;
908};
909
Patrick Venture0b02be92018-08-31 11:55:55 -0700910} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +0530911
912namespace example
913{
914namespace xyz
915{
916namespace openbmc_project
917{
918namespace Example
919{
920namespace Device
921{
922namespace _Callout
923{
924
925struct CALLOUT_ERRNO_TEST
926{
927 static constexpr auto str = "CALLOUT_ERRNO_TEST=%d";
928 static constexpr auto str_short = "CALLOUT_ERRNO_TEST";
Patrick Venture0b02be92018-08-31 11:55:55 -0700929 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
930 explicit constexpr CALLOUT_ERRNO_TEST(int32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530931 type _entry;
932};
933struct CALLOUT_DEVICE_PATH_TEST
934{
935 static constexpr auto str = "CALLOUT_DEVICE_PATH_TEST=%s";
936 static constexpr auto str_short = "CALLOUT_DEVICE_PATH_TEST";
Patrick Venture0b02be92018-08-31 11:55:55 -0700937 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
938 explicit constexpr CALLOUT_DEVICE_PATH_TEST(const char* a) :
939 _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +0530940 type _entry;
941};
942
Patrick Venture0b02be92018-08-31 11:55:55 -0700943} // namespace _Callout
Tom Joseph448e74e2017-07-24 23:08:56 +0530944
945struct Callout : public sdbusplus::exception_t
946{
Patrick Venture0b02be92018-08-31 11:55:55 -0700947 static constexpr auto errName =
948 "example.xyz.openbmc_project.Example.Device.Callout";
Tom Joseph448e74e2017-07-24 23:08:56 +0530949 static constexpr auto errDesc = "Generic device callout";
950 static constexpr auto L = level::ERR;
951 using CALLOUT_ERRNO_TEST = _Callout::CALLOUT_ERRNO_TEST;
952 using CALLOUT_DEVICE_PATH_TEST = _Callout::CALLOUT_DEVICE_PATH_TEST;
Patrick Venture0b02be92018-08-31 11:55:55 -0700953 using metadata_types =
954 std::tuple<CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530955
956 const char* name() const noexcept
957 {
958 return errName;
959 }
960
961 const char* description() const noexcept
962 {
963 return errDesc;
964 }
965
966 const char* what() const noexcept
967 {
968 return errName;
969 }
970};
971
972} // namespace Device
973} // namespace Example
974} // namespace openbmc_project
975} // namespace xyz
976} // namespace example
977
Tom Joseph448e74e2017-07-24 23:08:56 +0530978namespace xyz
979{
980namespace openbmc_project
981{
982namespace Sensor
983{
984namespace Device
985{
986namespace _ReadFailure
987{
988
Patrick Venture0b02be92018-08-31 11:55:55 -0700989} // namespace _ReadFailure
Tom Joseph448e74e2017-07-24 23:08:56 +0530990
991struct ReadFailure
992{
993 static constexpr auto L = level::ERR;
Patrick Venture0b02be92018-08-31 11:55:55 -0700994 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;
Tom Joseph448e74e2017-07-24 23:08:56 +0530998 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +0530999};
1000
1001} // namespace Device
1002} // namespace Sensor
1003} // namespace openbmc_project
1004} // namespace xyz
1005
Tom Joseph448e74e2017-07-24 23:08:56 +05301006namespace details
1007{
1008
1009template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001010struct map_exception_type<
1011 sdbusplus::xyz::openbmc_project::Sensor::Device::Error::ReadFailure>
Tom Joseph448e74e2017-07-24 23:08:56 +05301012{
1013 using type = xyz::openbmc_project::Sensor::Device::ReadFailure;
1014};
1015
Patrick Venture0b02be92018-08-31 11:55:55 -07001016} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301017
1018namespace org
1019{
1020namespace open_power
1021{
1022namespace Host
1023{
1024namespace _Checkstop
1025{
1026
Patrick Venture0b02be92018-08-31 11:55:55 -07001027} // namespace _Checkstop
Tom Joseph448e74e2017-07-24 23:08:56 +05301028
1029struct Checkstop
1030{
1031 static constexpr auto L = level::ERR;
1032 using metadata_types = std::tuple<>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301033};
1034
1035} // namespace Host
1036} // namespace open_power
1037} // namespace org
1038
Tom Joseph448e74e2017-07-24 23:08:56 +05301039namespace details
1040{
1041
1042template <>
1043struct map_exception_type<sdbusplus::org::open_power::Host::Error::Checkstop>
1044{
1045 using type = org::open_power::Host::Checkstop;
1046};
1047
Patrick Venture0b02be92018-08-31 11:55:55 -07001048} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301049
1050namespace org
1051{
1052namespace open_power
1053{
1054namespace Host
1055{
1056namespace _WatchdogTimedOut
1057{
1058
Patrick Venture0b02be92018-08-31 11:55:55 -07001059} // namespace _WatchdogTimedOut
Tom Joseph448e74e2017-07-24 23:08:56 +05301060
1061struct WatchdogTimedOut
1062{
1063 static constexpr auto L = level::ERR;
1064 using metadata_types = std::tuple<>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301065};
1066
1067} // namespace Host
1068} // namespace open_power
1069} // namespace org
1070
Tom Joseph448e74e2017-07-24 23:08:56 +05301071namespace details
1072{
1073
1074template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001075struct map_exception_type<
1076 sdbusplus::org::open_power::Host::Error::WatchdogTimedOut>
Tom Joseph448e74e2017-07-24 23:08:56 +05301077{
1078 using type = org::open_power::Host::WatchdogTimedOut;
1079};
1080
Patrick Venture0b02be92018-08-31 11:55:55 -07001081} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301082
1083namespace example
1084{
1085namespace xyz
1086{
1087namespace openbmc_project
1088{
1089namespace Example
1090{
1091namespace Elog
1092{
1093namespace _TestErrorTwo
1094{
1095
1096struct DEV_ADDR
1097{
1098 static constexpr auto str = "DEV_ADDR=0x%.8X";
1099 static constexpr auto str_short = "DEV_ADDR";
Patrick Venture0b02be92018-08-31 11:55:55 -07001100 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1101 explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301102 type _entry;
1103};
1104struct DEV_ID
1105{
1106 static constexpr auto str = "DEV_ID=%u";
1107 static constexpr auto str_short = "DEV_ID";
Patrick Venture0b02be92018-08-31 11:55:55 -07001108 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1109 explicit constexpr DEV_ID(uint32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301110 type _entry;
1111};
1112struct DEV_NAME
1113{
1114 static constexpr auto str = "DEV_NAME=%s";
1115 static constexpr auto str_short = "DEV_NAME";
Patrick Venture0b02be92018-08-31 11:55:55 -07001116 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1117 explicit constexpr DEV_NAME(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301118 type _entry;
1119};
1120
Patrick Venture0b02be92018-08-31 11:55:55 -07001121} // namespace _TestErrorTwo
Tom Joseph448e74e2017-07-24 23:08:56 +05301122
1123struct TestErrorTwo : public sdbusplus::exception_t
1124{
Patrick Venture0b02be92018-08-31 11:55:55 -07001125 static constexpr auto errName =
1126 "example.xyz.openbmc_project.Example.Elog.TestErrorTwo";
Tom Joseph448e74e2017-07-24 23:08:56 +05301127 static constexpr auto errDesc = "This is test error two";
1128 static constexpr auto L = level::ERR;
1129 using DEV_ADDR = _TestErrorTwo::DEV_ADDR;
1130 using DEV_ID = _TestErrorTwo::DEV_ID;
1131 using DEV_NAME = _TestErrorTwo::DEV_NAME;
1132 using metadata_types = std::tuple<DEV_ADDR, DEV_ID, DEV_NAME>;
1133
1134 const char* name() const noexcept
1135 {
1136 return errName;
1137 }
1138
1139 const char* description() const noexcept
1140 {
1141 return errDesc;
1142 }
1143
1144 const char* what() const noexcept
1145 {
1146 return errName;
1147 }
1148};
1149
1150} // namespace Elog
1151} // namespace Example
1152} // namespace openbmc_project
1153} // namespace xyz
1154} // namespace example
1155
Tom Joseph448e74e2017-07-24 23:08:56 +05301156namespace example
1157{
1158namespace xyz
1159{
1160namespace openbmc_project
1161{
1162namespace Example
1163{
1164namespace Elog
1165{
1166namespace _AutoTestSimple
1167{
1168
1169struct STRING
1170{
1171 static constexpr auto str = "STRING=%s";
1172 static constexpr auto str_short = "STRING";
Patrick Venture0b02be92018-08-31 11:55:55 -07001173 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1174 explicit constexpr STRING(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301175 type _entry;
1176};
1177
Patrick Venture0b02be92018-08-31 11:55:55 -07001178} // namespace _AutoTestSimple
Tom Joseph448e74e2017-07-24 23:08:56 +05301179
1180struct AutoTestSimple : public sdbusplus::exception_t
1181{
Patrick Venture0b02be92018-08-31 11:55:55 -07001182 static constexpr auto errName =
1183 "example.xyz.openbmc_project.Example.Elog.AutoTestSimple";
Tom Joseph448e74e2017-07-24 23:08:56 +05301184 static constexpr auto errDesc = "This is a simple test error.";
1185 static constexpr auto L = level::ERR;
1186 using STRING = _AutoTestSimple::STRING;
1187 using metadata_types = std::tuple<STRING>;
1188
1189 const char* name() const noexcept
1190 {
1191 return errName;
1192 }
1193
1194 const char* description() const noexcept
1195 {
1196 return errDesc;
1197 }
1198
1199 const char* what() const noexcept
1200 {
1201 return errName;
1202 }
1203};
1204
1205} // namespace Elog
1206} // namespace Example
1207} // namespace openbmc_project
1208} // namespace xyz
1209} // namespace example
1210
Tom Joseph448e74e2017-07-24 23:08:56 +05301211namespace example
1212{
1213namespace xyz
1214{
1215namespace openbmc_project
1216{
1217namespace Example
1218{
1219namespace Elog
1220{
1221namespace _TestCallout
1222{
1223
1224struct DEV_ADDR
1225{
1226 static constexpr auto str = "DEV_ADDR=0x%.8X";
1227 static constexpr auto str_short = "DEV_ADDR";
Patrick Venture0b02be92018-08-31 11:55:55 -07001228 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1229 explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301230 type _entry;
1231};
1232
Patrick Venture0b02be92018-08-31 11:55:55 -07001233} // namespace _TestCallout
Tom Joseph448e74e2017-07-24 23:08:56 +05301234
1235struct TestCallout : public sdbusplus::exception_t
1236{
Patrick Venture0b02be92018-08-31 11:55:55 -07001237 static constexpr auto errName =
1238 "example.xyz.openbmc_project.Example.Elog.TestCallout";
Tom Joseph448e74e2017-07-24 23:08:56 +05301239 static constexpr auto errDesc = "This is test error TestCallout";
1240 static constexpr auto L = level::ERR;
1241 using DEV_ADDR = _TestCallout::DEV_ADDR;
Patrick Venture0b02be92018-08-31 11:55:55 -07001242 using CALLOUT_ERRNO_TEST = example::xyz::openbmc_project::Example::Device::
1243 Callout::CALLOUT_ERRNO_TEST;
1244 using CALLOUT_DEVICE_PATH_TEST = example::xyz::openbmc_project::Example::
1245 Device::Callout::CALLOUT_DEVICE_PATH_TEST;
1246 using metadata_types =
1247 std::tuple<DEV_ADDR, CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301248
1249 const char* name() const noexcept
1250 {
1251 return errName;
1252 }
1253
1254 const char* description() const noexcept
1255 {
1256 return errDesc;
1257 }
1258
1259 const char* what() const noexcept
1260 {
1261 return errName;
1262 }
1263};
1264
1265} // namespace Elog
1266} // namespace Example
1267} // namespace openbmc_project
1268} // namespace xyz
1269} // namespace example
1270
Tom Joseph448e74e2017-07-24 23:08:56 +05301271namespace org
1272{
1273namespace open_power
1274{
1275namespace Host
1276{
Tom Joseph448e74e2017-07-24 23:08:56 +05301277namespace _Event
1278{
1279
1280struct ESEL
1281{
1282 static constexpr auto str = "ESEL=%s";
1283 static constexpr auto str_short = "ESEL";
Patrick Venture0b02be92018-08-31 11:55:55 -07001284 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1285 explicit constexpr ESEL(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301286 type _entry;
1287};
1288
Patrick Venture0b02be92018-08-31 11:55:55 -07001289} // namespace _Event
Tom Joseph448e74e2017-07-24 23:08:56 +05301290
1291struct Event
1292{
1293 static constexpr auto L = level::ERR;
1294 using ESEL = _Event::ESEL;
Patrick Venture0b02be92018-08-31 11:55:55 -07001295 using CALLOUT_INVENTORY_PATH = xyz::openbmc_project::Common::Callout::
1296 Inventory::CALLOUT_INVENTORY_PATH;
Tom Joseph448e74e2017-07-24 23:08:56 +05301297 using metadata_types = std::tuple<ESEL, CALLOUT_INVENTORY_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301298};
1299
Tom Joseph448e74e2017-07-24 23:08:56 +05301300} // namespace Host
1301} // namespace open_power
1302} // namespace org
1303
Tom Joseph448e74e2017-07-24 23:08:56 +05301304namespace details
1305{
1306
1307template <>
Marri Devender Raob0b395b2017-10-24 10:14:14 -05001308struct map_exception_type<sdbusplus::org::open_power::Host::Error::Event>
Tom Joseph448e74e2017-07-24 23:08:56 +05301309{
Marri Devender Raob0b395b2017-10-24 10:14:14 -05001310 using type = org::open_power::Host::Event;
Tom Joseph448e74e2017-07-24 23:08:56 +05301311};
1312
Patrick Venture0b02be92018-08-31 11:55:55 -07001313} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301314
Tom Josephb647d5b2017-10-31 17:25:33 +05301315namespace org
1316{
1317namespace open_power
1318{
1319namespace Host
1320{
1321namespace _MaintenanceProcedure
1322{
1323
1324struct ESEL
1325{
1326 static constexpr auto str = "ESEL=%s";
1327 static constexpr auto str_short = "ESEL";
Patrick Venture0b02be92018-08-31 11:55:55 -07001328 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1329 explicit constexpr ESEL(const char* a) : _entry(entry(str, a)){};
Tom Josephb647d5b2017-10-31 17:25:33 +05301330 type _entry;
1331};
1332
Patrick Venture0b02be92018-08-31 11:55:55 -07001333} // namespace _MaintenanceProcedure
Tom Josephb647d5b2017-10-31 17:25:33 +05301334
1335struct MaintenanceProcedure
1336{
1337 static constexpr auto L = level::ERR;
1338 using ESEL = _MaintenanceProcedure::ESEL;
1339 using PROCEDURE = org::open_power::Common::Callout::Procedure::PROCEDURE;
1340 using metadata_types = std::tuple<ESEL, PROCEDURE>;
Tom Josephb647d5b2017-10-31 17:25:33 +05301341};
1342
1343} // namespace Host
1344} // namespace open_power
1345} // namespace org
1346
Tom Josephb647d5b2017-10-31 17:25:33 +05301347namespace details
1348{
1349
1350template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001351struct map_exception_type<
1352 sdbusplus::org::open_power::Host::Error::MaintenanceProcedure>
Tom Josephb647d5b2017-10-31 17:25:33 +05301353{
1354 using type = org::open_power::Host::MaintenanceProcedure;
1355};
1356
Patrick Venture0b02be92018-08-31 11:55:55 -07001357} // namespace details
Tom Josephb647d5b2017-10-31 17:25:33 +05301358
Tom Joseph448e74e2017-07-24 23:08:56 +05301359namespace xyz
1360{
1361namespace openbmc_project
1362{
1363namespace Control
1364{
1365namespace Device
1366{
1367namespace _WriteFailure
1368{
1369
Patrick Venture0b02be92018-08-31 11:55:55 -07001370} // namespace _WriteFailure
Tom Joseph448e74e2017-07-24 23:08:56 +05301371
1372struct WriteFailure
1373{
1374 static constexpr auto L = level::ERR;
Patrick Venture0b02be92018-08-31 11:55:55 -07001375 using CALLOUT_ERRNO =
1376 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1377 using CALLOUT_DEVICE_PATH =
1378 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Tom Joseph448e74e2017-07-24 23:08:56 +05301379 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301380};
1381
1382} // namespace Device
1383} // namespace Control
1384} // namespace openbmc_project
1385} // namespace xyz
1386
Tom Joseph448e74e2017-07-24 23:08:56 +05301387namespace details
1388{
1389
1390template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001391struct map_exception_type<
1392 sdbusplus::xyz::openbmc_project::Control::Device::Error::WriteFailure>
Tom Joseph448e74e2017-07-24 23:08:56 +05301393{
1394 using type = xyz::openbmc_project::Control::Device::WriteFailure;
1395};
1396
Patrick Venture0b02be92018-08-31 11:55:55 -07001397} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301398
1399namespace xyz
1400{
1401namespace openbmc_project
1402{
1403namespace Common
1404{
1405namespace File
1406{
1407namespace _Open
1408{
1409
1410struct ERRNO
1411{
1412 static constexpr auto str = "ERRNO=%d";
1413 static constexpr auto str_short = "ERRNO";
Patrick Venture0b02be92018-08-31 11:55:55 -07001414 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
1415 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301416 type _entry;
1417};
1418struct PATH
1419{
1420 static constexpr auto str = "PATH=%s";
1421 static constexpr auto str_short = "PATH";
Patrick Venture0b02be92018-08-31 11:55:55 -07001422 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1423 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301424 type _entry;
1425};
1426
Patrick Venture0b02be92018-08-31 11:55:55 -07001427} // namespace _Open
Tom Joseph448e74e2017-07-24 23:08:56 +05301428
1429struct Open
1430{
1431 static constexpr auto L = level::ERR;
1432 using ERRNO = _Open::ERRNO;
1433 using PATH = _Open::PATH;
1434 using metadata_types = std::tuple<ERRNO, PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301435};
1436
1437} // namespace File
1438} // namespace Common
1439} // namespace openbmc_project
1440} // namespace xyz
1441
Tom Joseph448e74e2017-07-24 23:08:56 +05301442namespace details
1443{
1444
1445template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001446struct map_exception_type<
1447 sdbusplus::xyz::openbmc_project::Common::File::Error::Open>
Tom Joseph448e74e2017-07-24 23:08:56 +05301448{
1449 using type = xyz::openbmc_project::Common::File::Open;
1450};
1451
Patrick Venture0b02be92018-08-31 11:55:55 -07001452} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301453
1454namespace xyz
1455{
1456namespace openbmc_project
1457{
1458namespace Common
1459{
1460namespace File
1461{
1462namespace _Seek
1463{
1464
1465struct OFFSET
1466{
1467 static constexpr auto str = "OFFSET=%ll";
1468 static constexpr auto str_short = "OFFSET";
Patrick Venture0b02be92018-08-31 11:55:55 -07001469 using type = std::tuple<std::decay_t<decltype(str)>, int64_t>;
1470 explicit constexpr OFFSET(int64_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301471 type _entry;
1472};
1473struct WHENCE
1474{
1475 static constexpr auto str = "WHENCE=%d";
1476 static constexpr auto str_short = "WHENCE";
Patrick Venture0b02be92018-08-31 11:55:55 -07001477 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
1478 explicit constexpr WHENCE(int32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301479 type _entry;
1480};
1481struct ERRNO
1482{
1483 static constexpr auto str = "ERRNO=%d";
1484 static constexpr auto str_short = "ERRNO";
Patrick Venture0b02be92018-08-31 11:55:55 -07001485 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
1486 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301487 type _entry;
1488};
1489struct PATH
1490{
1491 static constexpr auto str = "PATH=%s";
1492 static constexpr auto str_short = "PATH";
Patrick Venture0b02be92018-08-31 11:55:55 -07001493 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1494 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301495 type _entry;
1496};
1497
Patrick Venture0b02be92018-08-31 11:55:55 -07001498} // namespace _Seek
Tom Joseph448e74e2017-07-24 23:08:56 +05301499
1500struct Seek
1501{
1502 static constexpr auto L = level::ERR;
1503 using OFFSET = _Seek::OFFSET;
1504 using WHENCE = _Seek::WHENCE;
1505 using ERRNO = _Seek::ERRNO;
1506 using PATH = _Seek::PATH;
1507 using metadata_types = std::tuple<OFFSET, WHENCE, ERRNO, PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301508};
1509
1510} // namespace File
1511} // namespace Common
1512} // namespace openbmc_project
1513} // namespace xyz
1514
Tom Joseph448e74e2017-07-24 23:08:56 +05301515namespace details
1516{
1517
1518template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001519struct map_exception_type<
1520 sdbusplus::xyz::openbmc_project::Common::File::Error::Seek>
Tom Joseph448e74e2017-07-24 23:08:56 +05301521{
1522 using type = xyz::openbmc_project::Common::File::Seek;
1523};
1524
Patrick Venture0b02be92018-08-31 11:55:55 -07001525} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301526
1527namespace xyz
1528{
1529namespace openbmc_project
1530{
1531namespace Common
1532{
1533namespace File
1534{
1535namespace _Write
1536{
1537
1538struct ERRNO
1539{
1540 static constexpr auto str = "ERRNO=%d";
1541 static constexpr auto str_short = "ERRNO";
Patrick Venture0b02be92018-08-31 11:55:55 -07001542 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
1543 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301544 type _entry;
1545};
1546struct PATH
1547{
1548 static constexpr auto str = "PATH=%s";
1549 static constexpr auto str_short = "PATH";
Patrick Venture0b02be92018-08-31 11:55:55 -07001550 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1551 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301552 type _entry;
1553};
1554
Patrick Venture0b02be92018-08-31 11:55:55 -07001555} // namespace _Write
Tom Joseph448e74e2017-07-24 23:08:56 +05301556
1557struct Write
1558{
1559 static constexpr auto L = level::ERR;
1560 using ERRNO = _Write::ERRNO;
1561 using PATH = _Write::PATH;
1562 using metadata_types = std::tuple<ERRNO, PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301563};
1564
1565} // namespace File
1566} // namespace Common
1567} // namespace openbmc_project
1568} // namespace xyz
1569
Tom Joseph448e74e2017-07-24 23:08:56 +05301570namespace details
1571{
1572
1573template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001574struct map_exception_type<
1575 sdbusplus::xyz::openbmc_project::Common::File::Error::Write>
Tom Joseph448e74e2017-07-24 23:08:56 +05301576{
1577 using type = xyz::openbmc_project::Common::File::Write;
1578};
1579
Patrick Venture0b02be92018-08-31 11:55:55 -07001580} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301581
1582namespace org
1583{
1584namespace open_power
1585{
1586namespace Host
1587{
1588namespace Access
1589{
1590namespace _WriteCFAM
1591{
1592
1593struct ADDRESS
1594{
1595 static constexpr auto str = "ADDRESS=0x%X";
1596 static constexpr auto str_short = "ADDRESS";
Patrick Venture0b02be92018-08-31 11:55:55 -07001597 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1598 explicit constexpr ADDRESS(uint32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301599 type _entry;
1600};
1601
Patrick Venture0b02be92018-08-31 11:55:55 -07001602} // namespace _WriteCFAM
Tom Joseph448e74e2017-07-24 23:08:56 +05301603
1604struct WriteCFAM
1605{
1606 static constexpr auto L = level::ERR;
1607 using ADDRESS = _WriteCFAM::ADDRESS;
Patrick Venture0b02be92018-08-31 11:55:55 -07001608 using CALLOUT_ERRNO =
1609 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1610 using CALLOUT_DEVICE_PATH =
1611 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
1612 using metadata_types =
1613 std::tuple<ADDRESS, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301614};
1615
1616} // namespace Access
1617} // namespace Host
1618} // namespace open_power
1619} // namespace org
1620
Tom Joseph448e74e2017-07-24 23:08:56 +05301621namespace details
1622{
1623
1624template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001625struct map_exception_type<
1626 sdbusplus::org::open_power::Host::Access::Error::WriteCFAM>
Tom Joseph448e74e2017-07-24 23:08:56 +05301627{
1628 using type = org::open_power::Host::Access::WriteCFAM;
1629};
1630
Patrick Venture0b02be92018-08-31 11:55:55 -07001631} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301632
1633namespace org
1634{
1635namespace open_power
1636{
1637namespace Host
1638{
1639namespace Access
1640{
1641namespace _ReadCFAM
1642{
1643
1644struct ADDRESS
1645{
1646 static constexpr auto str = "ADDRESS=0x%X";
1647 static constexpr auto str_short = "ADDRESS";
Patrick Venture0b02be92018-08-31 11:55:55 -07001648 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1649 explicit constexpr ADDRESS(uint32_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301650 type _entry;
1651};
1652
Patrick Venture0b02be92018-08-31 11:55:55 -07001653} // namespace _ReadCFAM
Tom Joseph448e74e2017-07-24 23:08:56 +05301654
1655struct ReadCFAM
1656{
1657 static constexpr auto L = level::ERR;
1658 using ADDRESS = _ReadCFAM::ADDRESS;
Patrick Venture0b02be92018-08-31 11:55:55 -07001659 using CALLOUT_ERRNO =
1660 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1661 using CALLOUT_DEVICE_PATH =
1662 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
1663 using metadata_types =
1664 std::tuple<ADDRESS, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301665};
1666
1667} // namespace Access
1668} // namespace Host
1669} // namespace open_power
1670} // namespace org
1671
Tom Joseph448e74e2017-07-24 23:08:56 +05301672namespace details
1673{
1674
1675template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001676struct map_exception_type<
1677 sdbusplus::org::open_power::Host::Access::Error::ReadCFAM>
Tom Joseph448e74e2017-07-24 23:08:56 +05301678{
1679 using type = org::open_power::Host::Access::ReadCFAM;
1680};
1681
Patrick Venture0b02be92018-08-31 11:55:55 -07001682} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301683
1684namespace xyz
1685{
1686namespace openbmc_project
1687{
1688namespace State
1689{
1690namespace Host
1691{
1692namespace _SoftOffTimeout
1693{
1694
Patrick Venture0b02be92018-08-31 11:55:55 -07001695} // namespace _SoftOffTimeout
Tom Joseph448e74e2017-07-24 23:08:56 +05301696
1697struct SoftOffTimeout
1698{
1699 static constexpr auto L = level::ERR;
Patrick Venture0b02be92018-08-31 11:55:55 -07001700 using TIMEOUT_IN_MSEC =
1701 xyz::openbmc_project::Common::Timeout::TIMEOUT_IN_MSEC;
Tom Joseph448e74e2017-07-24 23:08:56 +05301702 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301703};
1704
1705} // namespace Host
1706} // namespace State
1707} // namespace openbmc_project
1708} // namespace xyz
1709
Tom Joseph448e74e2017-07-24 23:08:56 +05301710namespace details
1711{
1712
1713template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001714struct map_exception_type<
1715 sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout>
Tom Joseph448e74e2017-07-24 23:08:56 +05301716{
1717 using type = xyz::openbmc_project::State::Host::SoftOffTimeout;
1718};
1719
Patrick Venture0b02be92018-08-31 11:55:55 -07001720} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301721
1722namespace xyz
1723{
1724namespace openbmc_project
1725{
1726namespace Dump
1727{
1728namespace Create
1729{
1730namespace _Disabled
1731{
1732
Patrick Venture0b02be92018-08-31 11:55:55 -07001733} // namespace _Disabled
Tom Joseph448e74e2017-07-24 23:08:56 +05301734
1735struct Disabled
1736{
1737 static constexpr auto L = level::ERR;
1738 using metadata_types = std::tuple<>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301739};
1740
1741} // namespace Create
1742} // namespace Dump
1743} // namespace openbmc_project
1744} // namespace xyz
1745
Tom Joseph448e74e2017-07-24 23:08:56 +05301746namespace details
1747{
1748
1749template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001750struct map_exception_type<
1751 sdbusplus::xyz::openbmc_project::Dump::Create::Error::Disabled>
Tom Joseph448e74e2017-07-24 23:08:56 +05301752{
1753 using type = xyz::openbmc_project::Dump::Create::Disabled;
1754};
1755
Patrick Venture0b02be92018-08-31 11:55:55 -07001756} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301757
1758namespace xyz
1759{
1760namespace openbmc_project
1761{
1762namespace Dump
1763{
1764namespace Create
1765{
1766namespace _QuotaExceeded
1767{
1768
Gunnar Millsd8249ee2018-04-12 16:33:53 -05001769struct REASON
Tom Joseph448e74e2017-07-24 23:08:56 +05301770{
1771 static constexpr auto str = "REASON = %s";
1772 static constexpr auto str_short = "REASON ";
Patrick Venture0b02be92018-08-31 11:55:55 -07001773 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1774 explicit constexpr REASON(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301775 type _entry;
1776};
1777
Patrick Venture0b02be92018-08-31 11:55:55 -07001778} // namespace _QuotaExceeded
Tom Joseph448e74e2017-07-24 23:08:56 +05301779
1780struct QuotaExceeded
1781{
1782 static constexpr auto L = level::ERR;
Patrick Venture0b02be92018-08-31 11:55:55 -07001783 using REASON = _QuotaExceeded::REASON;
1784 using metadata_types = std::tuple<REASON>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301785};
1786
1787} // namespace Create
1788} // namespace Dump
1789} // namespace openbmc_project
1790} // namespace xyz
1791
Tom Joseph448e74e2017-07-24 23:08:56 +05301792namespace details
1793{
1794
1795template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001796struct map_exception_type<
1797 sdbusplus::xyz::openbmc_project::Dump::Create::Error::QuotaExceeded>
Tom Joseph448e74e2017-07-24 23:08:56 +05301798{
1799 using type = xyz::openbmc_project::Dump::Create::QuotaExceeded;
1800};
1801
Patrick Venture0b02be92018-08-31 11:55:55 -07001802} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301803
1804namespace xyz
1805{
1806namespace openbmc_project
1807{
1808namespace Control
1809{
1810namespace Host
1811{
1812namespace _CommandNotSupported
1813{
1814
Patrick Venture0b02be92018-08-31 11:55:55 -07001815} // namespace _CommandNotSupported
Tom Joseph448e74e2017-07-24 23:08:56 +05301816
1817struct CommandNotSupported
1818{
1819 static constexpr auto L = level::ERR;
1820 using metadata_types = std::tuple<>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301821};
1822
1823} // namespace Host
1824} // namespace Control
1825} // namespace openbmc_project
1826} // namespace xyz
1827
Tom Joseph448e74e2017-07-24 23:08:56 +05301828namespace details
1829{
1830
1831template <>
Patrick Venture0b02be92018-08-31 11:55:55 -07001832struct map_exception_type<
1833 sdbusplus::xyz::openbmc_project::Control::Host::Error::CommandNotSupported>
Tom Joseph448e74e2017-07-24 23:08:56 +05301834{
1835 using type = xyz::openbmc_project::Control::Host::CommandNotSupported;
1836};
1837
Patrick Venture0b02be92018-08-31 11:55:55 -07001838} // namespace details
Tom Joseph448e74e2017-07-24 23:08:56 +05301839
1840namespace example
1841{
1842namespace xyz
1843{
1844namespace openbmc_project
1845{
1846namespace Example
1847{
1848namespace Elog
1849{
1850namespace _TestErrorOne
1851{
1852
1853struct ERRNUM
1854{
1855 static constexpr auto str = "ERRNUM=0x%.4X";
1856 static constexpr auto str_short = "ERRNUM";
Patrick Venture0b02be92018-08-31 11:55:55 -07001857 using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>;
1858 explicit constexpr ERRNUM(uint16_t a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301859 type _entry;
1860};
1861struct FILE_PATH
1862{
1863 static constexpr auto str = "FILE_PATH=%s";
1864 static constexpr auto str_short = "FILE_PATH";
Patrick Venture0b02be92018-08-31 11:55:55 -07001865 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1866 explicit constexpr FILE_PATH(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301867 type _entry;
1868};
1869struct FILE_NAME
1870{
1871 static constexpr auto str = "FILE_NAME=%s";
1872 static constexpr auto str_short = "FILE_NAME";
Patrick Venture0b02be92018-08-31 11:55:55 -07001873 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1874 explicit constexpr FILE_NAME(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301875 type _entry;
1876};
1877
Patrick Venture0b02be92018-08-31 11:55:55 -07001878} // namespace _TestErrorOne
Tom Joseph448e74e2017-07-24 23:08:56 +05301879
1880struct TestErrorOne : public sdbusplus::exception_t
1881{
Patrick Venture0b02be92018-08-31 11:55:55 -07001882 static constexpr auto errName =
1883 "example.xyz.openbmc_project.Example.Elog.TestErrorOne";
Tom Joseph448e74e2017-07-24 23:08:56 +05301884 static constexpr auto errDesc = "this is test error one";
1885 static constexpr auto L = level::INFO;
1886 using ERRNUM = _TestErrorOne::ERRNUM;
1887 using FILE_PATH = _TestErrorOne::FILE_PATH;
1888 using FILE_NAME = _TestErrorOne::FILE_NAME;
Patrick Venture0b02be92018-08-31 11:55:55 -07001889 using DEV_ADDR =
1890 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
1891 using DEV_ID =
1892 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
1893 using DEV_NAME =
1894 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
1895 using metadata_types =
1896 std::tuple<ERRNUM, FILE_PATH, FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301897
1898 const char* name() const noexcept
1899 {
1900 return errName;
1901 }
1902
1903 const char* description() const noexcept
1904 {
1905 return errDesc;
1906 }
1907
1908 const char* what() const noexcept
1909 {
1910 return errName;
1911 }
1912};
1913
1914} // namespace Elog
1915} // namespace Example
1916} // namespace openbmc_project
1917} // namespace xyz
1918} // namespace example
1919
Tom Joseph448e74e2017-07-24 23:08:56 +05301920namespace example
1921{
1922namespace xyz
1923{
1924namespace openbmc_project
1925{
1926namespace Example
1927{
1928namespace Foo
1929{
1930namespace _Foo
1931{
1932
1933struct FOO_DATA
1934{
1935 static constexpr auto str = "FOO_DATA=%s";
1936 static constexpr auto str_short = "FOO_DATA";
Patrick Venture0b02be92018-08-31 11:55:55 -07001937 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1938 explicit constexpr FOO_DATA(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05301939 type _entry;
1940};
1941
Patrick Venture0b02be92018-08-31 11:55:55 -07001942} // namespace _Foo
Tom Joseph448e74e2017-07-24 23:08:56 +05301943
1944struct Foo : public sdbusplus::exception_t
1945{
Patrick Venture0b02be92018-08-31 11:55:55 -07001946 static constexpr auto errName =
1947 "example.xyz.openbmc_project.Example.Foo.Foo";
Tom Joseph448e74e2017-07-24 23:08:56 +05301948 static constexpr auto errDesc = "this is test error Foo";
1949 static constexpr auto L = level::INFO;
1950 using FOO_DATA = _Foo::FOO_DATA;
Patrick Venture0b02be92018-08-31 11:55:55 -07001951 using ERRNUM =
1952 example::xyz::openbmc_project::Example::Elog::TestErrorOne::ERRNUM;
1953 using FILE_PATH =
1954 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_PATH;
1955 using FILE_NAME =
1956 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_NAME;
1957 using DEV_ADDR =
1958 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
1959 using DEV_ID =
1960 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
1961 using DEV_NAME =
1962 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
1963 using metadata_types = std::tuple<FOO_DATA, ERRNUM, FILE_PATH, FILE_NAME,
1964 DEV_ADDR, DEV_ID, DEV_NAME>;
Tom Joseph448e74e2017-07-24 23:08:56 +05301965
1966 const char* name() const noexcept
1967 {
1968 return errName;
1969 }
1970
1971 const char* description() const noexcept
1972 {
1973 return errDesc;
1974 }
1975
1976 const char* what() const noexcept
1977 {
1978 return errName;
1979 }
1980};
1981
1982} // namespace Foo
1983} // namespace Example
1984} // namespace openbmc_project
1985} // namespace xyz
1986} // namespace example
1987
Tom Joseph448e74e2017-07-24 23:08:56 +05301988namespace example
1989{
1990namespace xyz
1991{
1992namespace openbmc_project
1993{
1994namespace Example
1995{
1996namespace Bar
1997{
1998namespace _Bar
1999{
2000
2001struct BAR_DATA
2002{
2003 static constexpr auto str = "BAR_DATA=%s";
2004 static constexpr auto str_short = "BAR_DATA";
Patrick Venture0b02be92018-08-31 11:55:55 -07002005 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
2006 explicit constexpr BAR_DATA(const char* a) : _entry(entry(str, a)){};
Tom Joseph448e74e2017-07-24 23:08:56 +05302007 type _entry;
2008};
2009
Patrick Venture0b02be92018-08-31 11:55:55 -07002010} // namespace _Bar
Tom Joseph448e74e2017-07-24 23:08:56 +05302011
2012struct Bar : public sdbusplus::exception_t
2013{
Patrick Venture0b02be92018-08-31 11:55:55 -07002014 static constexpr auto errName =
2015 "example.xyz.openbmc_project.Example.Bar.Bar";
Tom Joseph448e74e2017-07-24 23:08:56 +05302016 static constexpr auto errDesc = "this is test error Bar";
2017 static constexpr auto L = level::INFO;
2018 using BAR_DATA = _Bar::BAR_DATA;
2019 using FOO_DATA = example::xyz::openbmc_project::Example::Foo::Foo::FOO_DATA;
Patrick Venture0b02be92018-08-31 11:55:55 -07002020 using ERRNUM =
2021 example::xyz::openbmc_project::Example::Elog::TestErrorOne::ERRNUM;
2022 using FILE_PATH =
2023 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_PATH;
2024 using FILE_NAME =
2025 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_NAME;
2026 using DEV_ADDR =
2027 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
2028 using DEV_ID =
2029 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
2030 using DEV_NAME =
2031 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
2032 using metadata_types = std::tuple<BAR_DATA, FOO_DATA, ERRNUM, FILE_PATH,
2033 FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>;
Tom Joseph448e74e2017-07-24 23:08:56 +05302034
2035 const char* name() const noexcept
2036 {
2037 return errName;
2038 }
2039
2040 const char* description() const noexcept
2041 {
2042 return errDesc;
2043 }
2044
2045 const char* what() const noexcept
2046 {
2047 return errName;
2048 }
2049};
2050
2051} // namespace Bar
2052} // namespace Example
2053} // namespace openbmc_project
2054} // namespace xyz
2055} // namespace example
2056
Tom Joseph448e74e2017-07-24 23:08:56 +05302057} // namespace logging
2058
2059} // namespace phosphor