blob: b833f342de4ceb517986d79333cdc21a0f41aa26 [file] [log] [blame]
Dhruvaraj Subhashchandran2de0cfa2017-04-25 07:26:39 -05001// This file was autogenerated. Do not edit!
2// See elog-gen.py for more details
3#pragma once
4
5#include <string>
6#include <tuple>
7#include <type_traits>
8#include <sdbusplus/exception.hpp>
9#include <phosphor-logging/log.hpp>
10#include <phosphor-logging/elog.hpp>
11
12namespace sdbusplus
13{
14namespace xyz
15{
16namespace openbmc_project
17{
18namespace Common
19{
20namespace Callout
21{
22namespace Error
23{
24 struct GPIO;
25} // namespace Error
26} // namespace Callout
27} // namespace Common
28} // namespace openbmc_project
29} // namespace xyz
30} // namespace sdbusplus
31
32namespace sdbusplus
33{
34namespace org
35{
36namespace open_power
37{
38namespace Proc
39{
40namespace CFAM
41{
42namespace Error
43{
44 struct ReadFailure;
45} // namespace Error
46} // namespace CFAM
47} // namespace Proc
48} // namespace open_power
49} // namespace org
50} // namespace sdbusplus
51
52namespace sdbusplus
53{
54namespace xyz
55{
56namespace openbmc_project
57{
58namespace Common
59{
60namespace Callout
61{
62namespace Error
63{
64 struct Inventory;
65} // namespace Error
66} // namespace Callout
67} // namespace Common
68} // namespace openbmc_project
69} // namespace xyz
70} // namespace sdbusplus
71
72namespace sdbusplus
73{
74namespace xyz
75{
76namespace openbmc_project
77{
78namespace Common
79{
80namespace Callout
81{
82namespace Error
83{
84 struct IIC;
85} // namespace Error
86} // namespace Callout
87} // namespace Common
88} // namespace openbmc_project
89} // namespace xyz
90} // namespace sdbusplus
91
92namespace sdbusplus
93{
94namespace org
95{
96namespace open_power
97{
98namespace Proc
99{
100namespace CFAM
101{
102namespace Error
103{
104 struct WriteFailure;
105} // namespace Error
106} // namespace CFAM
107} // namespace Proc
108} // namespace open_power
109} // namespace org
110} // namespace sdbusplus
111
112namespace sdbusplus
113{
114namespace xyz
115{
116namespace openbmc_project
117{
118namespace Common
119{
120namespace Callout
121{
122namespace Error
123{
124 struct Device;
125} // namespace Error
126} // namespace Callout
127} // namespace Common
128} // namespace openbmc_project
129} // namespace xyz
130} // namespace sdbusplus
131
132namespace sdbusplus
133{
134namespace org
135{
136namespace open_power
137{
138namespace Proc
139{
140namespace CFAM
141{
142namespace Error
143{
144 struct OpenFailure;
145} // namespace Error
146} // namespace CFAM
147} // namespace Proc
148} // namespace open_power
149} // namespace org
150} // namespace sdbusplus
151
152namespace sdbusplus
153{
154namespace org
155{
156namespace open_power
157{
158namespace Proc
159{
160namespace CFAM
161{
162namespace Error
163{
164 struct SeekFailure;
165} // namespace Error
166} // namespace CFAM
167} // namespace Proc
168} // namespace open_power
169} // namespace org
170} // namespace sdbusplus
171
172namespace sdbusplus
173{
174namespace xyz
175{
176namespace openbmc_project
177{
178namespace Common
179{
180namespace Callout
181{
182namespace Error
183{
184 struct IPMISensor;
185} // namespace Error
186} // namespace Callout
187} // namespace Common
188} // namespace openbmc_project
189} // namespace xyz
190} // namespace sdbusplus
191
192
193namespace phosphor
194{
195
196namespace logging
197{
198
199namespace xyz
200{
201namespace openbmc_project
202{
203namespace Common
204{
205namespace Callout
206{
207namespace _Device
208{
209
210struct CALLOUT_ERRNO
211{
212 static constexpr auto str = "CALLOUT_ERRNO=%d";
213 static constexpr auto str_short = "CALLOUT_ERRNO";
214 using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
215 explicit constexpr CALLOUT_ERRNO(int32_t a) : _entry(entry(str, a)) {};
216 type _entry;
217};
218struct CALLOUT_DEVICE_PATH
219{
220 static constexpr auto str = "CALLOUT_DEVICE_PATH=%s";
221 static constexpr auto str_short = "CALLOUT_DEVICE_PATH";
222 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
223 explicit constexpr CALLOUT_DEVICE_PATH(const char* a) : _entry(entry(str, a)) {};
224 type _entry;
225};
226
227} // namespace _Device
228
229struct Device : public sdbusplus::exception_t
230{
231 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.Device";
232 static constexpr auto errDesc = "Generic device callout";
233 static constexpr auto L = level::INFO;
234 using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO;
235 using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH;
236 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
237
238 const char* name() const noexcept
239 {
240 return errName;
241 }
242
243 const char* description() const noexcept
244 {
245 return errDesc;
246 }
247
248 const char* what() const noexcept
249 {
250 return errName;
251 }
252};
253
254} // namespace Callout
255} // namespace Common
256} // namespace openbmc_project
257} // namespace xyz
258
259
260namespace details
261{
262
263template <>
264struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::Device>
265{
266 using type = xyz::openbmc_project::Common::Callout::Device;
267};
268
269}
270
271namespace xyz
272{
273namespace openbmc_project
274{
275namespace Common
276{
277namespace Callout
278{
279namespace _GPIO
280{
281
282struct CALLOUT_GPIO_NUM
283{
284 static constexpr auto str = "CALLOUT_GPIO_NUM=%u";
285 static constexpr auto str_short = "CALLOUT_GPIO_NUM";
286 using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
287 explicit constexpr CALLOUT_GPIO_NUM(uint32_t a) : _entry(entry(str, a)) {};
288 type _entry;
289};
290
291} // namespace _GPIO
292
293struct GPIO : public sdbusplus::exception_t
294{
295 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.GPIO";
296 static constexpr auto errDesc = "Callout GPIO pin";
297 static constexpr auto L = level::INFO;
298 using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM;
299 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
300 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
301 using metadata_types = std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
302
303 const char* name() const noexcept
304 {
305 return errName;
306 }
307
308 const char* description() const noexcept
309 {
310 return errDesc;
311 }
312
313 const char* what() const noexcept
314 {
315 return errName;
316 }
317};
318
319} // namespace Callout
320} // namespace Common
321} // namespace openbmc_project
322} // namespace xyz
323
324
325namespace details
326{
327
328template <>
329struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>
330{
331 using type = xyz::openbmc_project::Common::Callout::GPIO;
332};
333
334}
335
336namespace xyz
337{
338namespace openbmc_project
339{
340namespace Common
341{
342namespace Callout
343{
344namespace _IIC
345{
346
347struct CALLOUT_IIC_BUS
348{
349 static constexpr auto str = "CALLOUT_IIC_BUS=%s";
350 static constexpr auto str_short = "CALLOUT_IIC_BUS";
351 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
352 explicit constexpr CALLOUT_IIC_BUS(const char* a) : _entry(entry(str, a)) {};
353 type _entry;
354};
355struct CALLOUT_IIC_ADDR
356{
357 static constexpr auto str = "CALLOUT_IIC_ADDR=0x%hx";
358 static constexpr auto str_short = "CALLOUT_IIC_ADDR";
359 using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
360 explicit constexpr CALLOUT_IIC_ADDR(uint16_t a) : _entry(entry(str, a)) {};
361 type _entry;
362};
363
364} // namespace _IIC
365
366struct IIC : public sdbusplus::exception_t
367{
368 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.IIC";
369 static constexpr auto errDesc = "Callout IIC device";
370 static constexpr auto L = level::INFO;
371 using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS;
372 using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR;
373 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
374 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
375 using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
376
377 const char* name() const noexcept
378 {
379 return errName;
380 }
381
382 const char* description() const noexcept
383 {
384 return errDesc;
385 }
386
387 const char* what() const noexcept
388 {
389 return errName;
390 }
391};
392
393} // namespace Callout
394} // namespace Common
395} // namespace openbmc_project
396} // namespace xyz
397
398
399namespace details
400{
401
402template <>
403struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::IIC>
404{
405 using type = xyz::openbmc_project::Common::Callout::IIC;
406};
407
408}
409
410namespace xyz
411{
412namespace openbmc_project
413{
414namespace Common
415{
416namespace Callout
417{
418namespace _Inventory
419{
420
421struct CALLOUT_INVENTORY_PATH
422{
423 static constexpr auto str = "CALLOUT_INVENTORY_PATH=%s";
424 static constexpr auto str_short = "CALLOUT_INVENTORY_PATH";
425 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
426 explicit constexpr CALLOUT_INVENTORY_PATH(const char* a) : _entry(entry(str, a)) {};
427 type _entry;
428};
429
430} // namespace _Inventory
431
432struct Inventory : public sdbusplus::exception_t
433{
434 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.Inventory";
435 static constexpr auto errDesc = "Inventory item callout";
436 static constexpr auto L = level::INFO;
437 using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH;
438 using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>;
439
440 const char* name() const noexcept
441 {
442 return errName;
443 }
444
445 const char* description() const noexcept
446 {
447 return errDesc;
448 }
449
450 const char* what() const noexcept
451 {
452 return errName;
453 }
454};
455
456} // namespace Callout
457} // namespace Common
458} // namespace openbmc_project
459} // namespace xyz
460
461
462namespace details
463{
464
465template <>
466struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::Inventory>
467{
468 using type = xyz::openbmc_project::Common::Callout::Inventory;
469};
470
471}
472
473namespace xyz
474{
475namespace openbmc_project
476{
477namespace Common
478{
479namespace Callout
480{
481namespace _IPMISensor
482{
483
484struct CALLOUT_IPMI_SENSOR_NUM
485{
486 static constexpr auto str = "CALLOUT_IPMI_SENSOR_NUM=%u";
487 static constexpr auto str_short = "CALLOUT_IPMI_SENSOR_NUM";
488 using type = std::tuple<std::decay_t<decltype(str)>,uint32_t>;
489 explicit constexpr CALLOUT_IPMI_SENSOR_NUM(uint32_t a) : _entry(entry(str, a)) {};
490 type _entry;
491};
492
493} // namespace _IPMISensor
494
495struct IPMISensor : public sdbusplus::exception_t
496{
497 static constexpr auto errName = "xyz.openbmc_project.Common.Callout.IPMISensor";
498 static constexpr auto errDesc = "Callout IPMI sensor";
499 static constexpr auto L = level::INFO;
500 using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM;
501 using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>;
502
503 const char* name() const noexcept
504 {
505 return errName;
506 }
507
508 const char* description() const noexcept
509 {
510 return errDesc;
511 }
512
513 const char* what() const noexcept
514 {
515 return errName;
516 }
517};
518
519} // namespace Callout
520} // namespace Common
521} // namespace openbmc_project
522} // namespace xyz
523
524
525namespace details
526{
527
528template <>
529struct map_exception_type<sdbusplus::xyz::openbmc_project::Common::Callout::Error::IPMISensor>
530{
531 using type = xyz::openbmc_project::Common::Callout::IPMISensor;
532};
533
534}
535
536namespace org
537{
538namespace open_power
539{
540namespace Proc
541{
542namespace CFAM
543{
544namespace _OpenFailure
545{
546
547struct ERRNO
548{
549 static constexpr auto str = "ERRNO=%d";
550 static constexpr auto str_short = "ERRNO";
551 using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
552 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
553 type _entry;
554};
555struct PATH
556{
557 static constexpr auto str = "PATH=%s";
558 static constexpr auto str_short = "PATH";
559 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
560 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
561 type _entry;
562};
563
564} // namespace _OpenFailure
565
566struct OpenFailure : public sdbusplus::exception_t
567{
568 static constexpr auto errName = "org.open_power.Proc.CFAM.OpenFailure";
569 static constexpr auto errDesc = "Failed to open the device.";
570 static constexpr auto L = level::INFO;
571 using ERRNO = _OpenFailure::ERRNO;
572 using PATH = _OpenFailure::PATH;
573 using metadata_types = std::tuple<ERRNO, PATH>;
574
575 const char* name() const noexcept
576 {
577 return errName;
578 }
579
580 const char* description() const noexcept
581 {
582 return errDesc;
583 }
584
585 const char* what() const noexcept
586 {
587 return errName;
588 }
589};
590
591} // namespace CFAM
592} // namespace Proc
593} // namespace open_power
594} // namespace org
595
596
597namespace details
598{
599
600template <>
601struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::OpenFailure>
602{
603 using type = org::open_power::Proc::CFAM::OpenFailure;
604};
605
606}
607
608namespace org
609{
610namespace open_power
611{
612namespace Proc
613{
614namespace CFAM
615{
616namespace _ReadFailure
617{
618
619
620} // namespace _ReadFailure
621
622struct ReadFailure : public sdbusplus::exception_t
623{
624 static constexpr auto errName = "org.open_power.Proc.CFAM.ReadFailure";
625 static constexpr auto errDesc = "Failed to read from the device.";
626 static constexpr auto L = level::INFO;
627 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
628 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
629 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
630
631 const char* name() const noexcept
632 {
633 return errName;
634 }
635
636 const char* description() const noexcept
637 {
638 return errDesc;
639 }
640
641 const char* what() const noexcept
642 {
643 return errName;
644 }
645};
646
647} // namespace CFAM
648} // namespace Proc
649} // namespace open_power
650} // namespace org
651
652
653namespace details
654{
655
656template <>
657struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::ReadFailure>
658{
659 using type = org::open_power::Proc::CFAM::ReadFailure;
660};
661
662}
663
664namespace org
665{
666namespace open_power
667{
668namespace Proc
669{
670namespace CFAM
671{
672namespace _WriteFailure
673{
674
675
676} // namespace _WriteFailure
677
678struct WriteFailure : public sdbusplus::exception_t
679{
680 static constexpr auto errName = "org.open_power.Proc.CFAM.WriteFailure";
681 static constexpr auto errDesc = "Failed to write to the device.";
682 static constexpr auto L = level::INFO;
683 using CALLOUT_ERRNO = xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
684 using CALLOUT_DEVICE_PATH = xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
685 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
686
687 const char* name() const noexcept
688 {
689 return errName;
690 }
691
692 const char* description() const noexcept
693 {
694 return errDesc;
695 }
696
697 const char* what() const noexcept
698 {
699 return errName;
700 }
701};
702
703} // namespace CFAM
704} // namespace Proc
705} // namespace open_power
706} // namespace org
707
708
709namespace details
710{
711
712template <>
713struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::WriteFailure>
714{
715 using type = org::open_power::Proc::CFAM::WriteFailure;
716};
717
718}
719
720namespace org
721{
722namespace open_power
723{
724namespace Proc
725{
726namespace CFAM
727{
728namespace _SeekFailure
729{
730
731struct ERRNO
732{
733 static constexpr auto str = "ERRNO=%d";
734 static constexpr auto str_short = "ERRNO";
735 using type = std::tuple<std::decay_t<decltype(str)>,int32_t>;
736 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)) {};
737 type _entry;
738};
739struct ADDRESS
740{
741 static constexpr auto str = "ADDRESS=0x%0x";
742 static constexpr auto str_short = "ADDRESS";
743 using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
744 explicit constexpr ADDRESS(uint16_t a) : _entry(entry(str, a)) {};
745 type _entry;
746};
747struct OFFSET
748{
749 static constexpr auto str = "OFFSET=%d";
750 static constexpr auto str_short = "OFFSET";
751 using type = std::tuple<std::decay_t<decltype(str)>,uint16_t>;
752 explicit constexpr OFFSET(uint16_t a) : _entry(entry(str, a)) {};
753 type _entry;
754};
755struct PATH
756{
757 static constexpr auto str = "PATH=%s";
758 static constexpr auto str_short = "PATH";
759 using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
760 explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
761 type _entry;
762};
763
764} // namespace _SeekFailure
765
766struct SeekFailure : public sdbusplus::exception_t
767{
768 static constexpr auto errName = "org.open_power.Proc.CFAM.SeekFailure";
769 static constexpr auto errDesc = "Failed to seek on the device.";
770 static constexpr auto L = level::INFO;
771 using ERRNO = _SeekFailure::ERRNO;
772 using ADDRESS = _SeekFailure::ADDRESS;
773 using OFFSET = _SeekFailure::OFFSET;
774 using PATH = _SeekFailure::PATH;
775 using metadata_types = std::tuple<ERRNO, ADDRESS, OFFSET, PATH>;
776
777 const char* name() const noexcept
778 {
779 return errName;
780 }
781
782 const char* description() const noexcept
783 {
784 return errDesc;
785 }
786
787 const char* what() const noexcept
788 {
789 return errName;
790 }
791};
792
793} // namespace CFAM
794} // namespace Proc
795} // namespace open_power
796} // namespace org
797
798
799namespace details
800{
801
802template <>
803struct map_exception_type<sdbusplus::org::open_power::Proc::CFAM::Error::SeekFailure>
804{
805 using type = org::open_power::Proc::CFAM::SeekFailure;
806};
807
808}
809
810
811} // namespace logging
812
813} // namespace phosphor