blob: 6f87a57a39e0386dc6a6d9c22ef3068126e67598 [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>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05308#include <string>
9#include <tuple>
10#include <type_traits>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053011
12namespace sdbusplus
13{
14namespace xyz
15{
16namespace openbmc_project
17{
18namespace Common
19{
20namespace Error
21{
Gunnar Mills94df8c92018-09-14 14:50:03 -050022struct Timeout;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053023} // namespace Error
24} // namespace Common
25} // namespace openbmc_project
26} // namespace xyz
27} // namespace sdbusplus
28
29namespace sdbusplus
30{
31namespace xyz
32{
33namespace openbmc_project
34{
35namespace Common
36{
37namespace Callout
38{
39namespace Error
40{
Gunnar Mills94df8c92018-09-14 14:50:03 -050041struct GPIO;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053042} // namespace Error
43} // namespace Callout
44} // namespace Common
45} // namespace openbmc_project
46} // namespace xyz
47} // namespace sdbusplus
48
49namespace sdbusplus
50{
51namespace xyz
52{
53namespace openbmc_project
54{
55namespace Common
56{
57namespace Error
58{
Gunnar Mills94df8c92018-09-14 14:50:03 -050059struct InvalidArgument;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053060} // namespace Error
61} // namespace Common
62} // namespace openbmc_project
63} // namespace xyz
64} // namespace sdbusplus
65
66namespace sdbusplus
67{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053068namespace org
69{
70namespace open_power
71{
72namespace OCC
73{
74namespace Device
75{
76namespace Error
77{
Gunnar Mills94df8c92018-09-14 14:50:03 -050078struct WriteFailure;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053079} // namespace Error
80} // namespace Device
81} // namespace OCC
82} // namespace open_power
83} // namespace org
84} // namespace sdbusplus
85
86namespace sdbusplus
87{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053088namespace xyz
89{
90namespace openbmc_project
91{
92namespace State
93{
94namespace Host
95{
96namespace Error
97{
Gunnar Mills94df8c92018-09-14 14:50:03 -050098struct SoftOffTimeout;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053099} // namespace Error
100} // namespace Host
101} // namespace State
102} // namespace openbmc_project
103} // namespace xyz
104} // namespace sdbusplus
105
106namespace sdbusplus
107{
108namespace xyz
109{
110namespace openbmc_project
111{
112namespace Common
113{
114namespace Callout
115{
116namespace Error
117{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500118struct Inventory;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530119} // namespace Error
120} // namespace Callout
121} // namespace Common
122} // namespace openbmc_project
123} // namespace xyz
124} // namespace sdbusplus
125
126namespace sdbusplus
127{
128namespace xyz
129{
130namespace openbmc_project
131{
132namespace Common
133{
134namespace Callout
135{
136namespace Error
137{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500138struct IIC;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530139} // namespace Error
140} // namespace Callout
141} // namespace Common
142} // namespace openbmc_project
143} // namespace xyz
144} // namespace sdbusplus
145
146namespace sdbusplus
147{
148namespace xyz
149{
150namespace openbmc_project
151{
152namespace Common
153{
154namespace File
155{
156namespace Error
157{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500158struct Open;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530159} // namespace Error
160} // namespace File
161} // namespace Common
162} // namespace openbmc_project
163} // namespace xyz
164} // namespace sdbusplus
165
166namespace sdbusplus
167{
168namespace xyz
169{
170namespace openbmc_project
171{
172namespace Common
173{
174namespace Error
175{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500176struct InternalFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530177} // namespace Error
178} // namespace Common
179} // namespace openbmc_project
180} // namespace xyz
181} // namespace sdbusplus
182
183namespace sdbusplus
184{
185namespace xyz
186{
187namespace openbmc_project
188{
189namespace Common
190{
191namespace Callout
192{
193namespace Error
194{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500195struct Device;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530196} // namespace Error
197} // namespace Callout
198} // namespace Common
199} // namespace openbmc_project
200} // namespace xyz
201} // namespace sdbusplus
202
203namespace sdbusplus
204{
205namespace xyz
206{
207namespace openbmc_project
208{
209namespace Control
210{
211namespace Device
212{
213namespace Error
214{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500215struct WriteFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530216} // namespace Error
217} // namespace Device
218} // namespace Control
219} // namespace openbmc_project
220} // namespace xyz
221} // namespace sdbusplus
222
223namespace sdbusplus
224{
225namespace xyz
226{
227namespace openbmc_project
228{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530229namespace Sensor
230{
231namespace Device
232{
233namespace Error
234{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500235struct ReadFailure;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530236} // namespace Error
237} // namespace Device
238} // namespace Sensor
239} // namespace openbmc_project
240} // namespace xyz
241} // namespace sdbusplus
242
243namespace sdbusplus
244{
245namespace xyz
246{
247namespace openbmc_project
248{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530249namespace Common
250{
251namespace File
252{
253namespace Error
254{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500255struct Seek;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530256} // namespace Error
257} // namespace File
258} // namespace Common
259} // namespace openbmc_project
260} // namespace xyz
261} // namespace sdbusplus
262
263namespace sdbusplus
264{
265namespace org
266{
267namespace open_power
268{
269namespace OCC
270{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530271namespace Device
272{
273namespace Error
274{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500275struct ConfigFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530276} // namespace Error
277} // namespace Device
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530278} // namespace OCC
279} // namespace open_power
280} // namespace org
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530281} // namespace sdbusplus
282
283namespace sdbusplus
284{
285namespace org
286{
287namespace open_power
288{
289namespace OCC
290{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530291namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530292{
293namespace Error
294{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500295struct OpenFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530296} // namespace Error
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530297} // namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530298} // namespace OCC
299} // namespace open_power
300} // namespace org
301} // namespace sdbusplus
302
303namespace sdbusplus
304{
305namespace xyz
306{
307namespace openbmc_project
308{
309namespace Common
310{
311namespace Callout
312{
313namespace Error
314{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500315struct IPMISensor;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530316} // namespace Error
317} // namespace Callout
318} // namespace Common
319} // namespace openbmc_project
320} // namespace xyz
321} // namespace sdbusplus
322
323namespace sdbusplus
324{
325namespace org
326{
327namespace open_power
328{
329namespace OCC
330{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530331namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530332{
333namespace Error
334{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500335struct ReadFailure;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530336} // namespace Error
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530337} // namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530338} // namespace OCC
339} // namespace open_power
340} // namespace org
341} // namespace sdbusplus
342
343namespace sdbusplus
344{
345namespace xyz
346{
347namespace openbmc_project
348{
349namespace Control
350{
351namespace Host
352{
353namespace Error
354{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500355struct CommandNotSupported;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530356} // namespace Error
357} // namespace Host
358} // namespace Control
359} // namespace openbmc_project
360} // namespace xyz
361} // namespace sdbusplus
362
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530363namespace phosphor
364{
365
366namespace logging
367{
368
369namespace xyz
370{
371namespace openbmc_project
372{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530373namespace Control
374{
375namespace Host
376{
377namespace _CommandNotSupported
378{
379
Gunnar Mills94df8c92018-09-14 14:50:03 -0500380} // namespace _CommandNotSupported
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530381
382struct CommandNotSupported
383{
384 static constexpr auto L = level::ERR;
385 using metadata_types = std::tuple<>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530386};
387
388} // namespace Host
389} // namespace Control
390} // namespace openbmc_project
391} // namespace xyz
392
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530393namespace details
394{
395
396template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500397struct map_exception_type<
398 sdbusplus::xyz::openbmc_project::Control::Host::Error::CommandNotSupported>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530399{
400 using type = xyz::openbmc_project::Control::Host::CommandNotSupported;
401};
402
Gunnar Mills94df8c92018-09-14 14:50:03 -0500403} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530404
405namespace xyz
406{
407namespace openbmc_project
408{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530409namespace Common
410{
411namespace _Timeout
412{
413
414struct TIMEOUT_IN_MSEC
415{
416 static constexpr auto str = "TIMEOUT_IN_MSEC=%llu";
417 static constexpr auto str_short = "TIMEOUT_IN_MSEC";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500418 using type = std::tuple<std::decay_t<decltype(str)>, uint64_t>;
419 explicit constexpr TIMEOUT_IN_MSEC(uint64_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530420 type _entry;
421};
422
Gunnar Mills94df8c92018-09-14 14:50:03 -0500423} // namespace _Timeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530424
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530425struct Timeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530426{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530427 static constexpr auto L = level::ERR;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530428 using TIMEOUT_IN_MSEC = _Timeout::TIMEOUT_IN_MSEC;
429 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530430};
431
432} // namespace Common
433} // namespace openbmc_project
434} // namespace xyz
435
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530436namespace details
437{
438
439template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500440struct map_exception_type<
441 sdbusplus::xyz::openbmc_project::Common::Error::Timeout>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530442{
443 using type = xyz::openbmc_project::Common::Timeout;
444};
445
Gunnar Mills94df8c92018-09-14 14:50:03 -0500446} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530447
448namespace xyz
449{
450namespace openbmc_project
451{
452namespace Common
453{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530454namespace _InternalFailure
455{
456
Gunnar Mills94df8c92018-09-14 14:50:03 -0500457} // namespace _InternalFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530458
459struct InternalFailure
460{
461 static constexpr auto L = level::ERR;
462 using metadata_types = std::tuple<>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530463};
464
465} // namespace Common
466} // namespace openbmc_project
467} // namespace xyz
468
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530469namespace details
470{
471
472template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500473struct map_exception_type<
474 sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530475{
476 using type = xyz::openbmc_project::Common::InternalFailure;
477};
478
Gunnar Mills94df8c92018-09-14 14:50:03 -0500479} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530480
481namespace xyz
482{
483namespace openbmc_project
484{
485namespace Common
486{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530487namespace _InvalidArgument
488{
489
490struct ARGUMENT_NAME
491{
492 static constexpr auto str = "ARGUMENT_NAME=%s";
493 static constexpr auto str_short = "ARGUMENT_NAME";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500494 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
495 explicit constexpr ARGUMENT_NAME(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530496 type _entry;
497};
498struct ARGUMENT_VALUE
499{
500 static constexpr auto str = "ARGUMENT_VALUE=%s";
501 static constexpr auto str_short = "ARGUMENT_VALUE";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500502 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
503 explicit constexpr ARGUMENT_VALUE(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530504 type _entry;
505};
506
Gunnar Mills94df8c92018-09-14 14:50:03 -0500507} // namespace _InvalidArgument
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530508
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530509struct InvalidArgument
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530510{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530511 static constexpr auto L = level::ERR;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530512 using ARGUMENT_NAME = _InvalidArgument::ARGUMENT_NAME;
513 using ARGUMENT_VALUE = _InvalidArgument::ARGUMENT_VALUE;
514 using metadata_types = std::tuple<ARGUMENT_NAME, ARGUMENT_VALUE>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530515};
516
517} // namespace Common
518} // namespace openbmc_project
519} // namespace xyz
520
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530521namespace details
522{
523
524template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500525struct map_exception_type<
526 sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530527{
528 using type = xyz::openbmc_project::Common::InvalidArgument;
529};
530
Gunnar Mills94df8c92018-09-14 14:50:03 -0500531} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530532
533namespace xyz
534{
535namespace openbmc_project
536{
537namespace Common
538{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530539namespace File
540{
541namespace _Open
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530542{
543
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530544struct ERRNO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530545{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530546 static constexpr auto str = "ERRNO=%d";
547 static constexpr auto str_short = "ERRNO";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500548 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
549 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530550 type _entry;
551};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530552struct PATH
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530553{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530554 static constexpr auto str = "PATH=%s";
555 static constexpr auto str_short = "PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500556 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
557 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530558 type _entry;
559};
560
Gunnar Mills94df8c92018-09-14 14:50:03 -0500561} // namespace _Open
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530562
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530563struct Open
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530564{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530565 static constexpr auto L = level::ERR;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530566 using ERRNO = _Open::ERRNO;
567 using PATH = _Open::PATH;
568 using metadata_types = std::tuple<ERRNO, PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530569};
570
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530571} // namespace File
572} // namespace Common
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530573} // namespace openbmc_project
574} // namespace xyz
575
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530576namespace details
577{
578
579template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500580struct map_exception_type<
581 sdbusplus::xyz::openbmc_project::Common::File::Error::Open>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530582{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530583 using type = xyz::openbmc_project::Common::File::Open;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530584};
585
Gunnar Mills94df8c92018-09-14 14:50:03 -0500586} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530587
588namespace xyz
589{
590namespace openbmc_project
591{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530592namespace Common
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530593{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530594namespace File
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530595{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530596namespace _Seek
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530597{
598
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530599struct OFFSET
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530600{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530601 static constexpr auto str = "OFFSET=%ll";
602 static constexpr auto str_short = "OFFSET";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500603 using type = std::tuple<std::decay_t<decltype(str)>, int64_t>;
604 explicit constexpr OFFSET(int64_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530605 type _entry;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530606};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530607struct WHENCE
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530608{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530609 static constexpr auto str = "WHENCE=%d";
610 static constexpr auto str_short = "WHENCE";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500611 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
612 explicit constexpr WHENCE(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530613 type _entry;
614};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530615struct ERRNO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530616{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530617 static constexpr auto str = "ERRNO=%d";
618 static constexpr auto str_short = "ERRNO";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500619 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
620 explicit constexpr ERRNO(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530621 type _entry;
622};
623struct PATH
624{
625 static constexpr auto str = "PATH=%s";
626 static constexpr auto str_short = "PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500627 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
628 explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530629 type _entry;
630};
631
Gunnar Mills94df8c92018-09-14 14:50:03 -0500632} // namespace _Seek
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530633
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530634struct Seek
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530635{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530636 static constexpr auto L = level::ERR;
637 using OFFSET = _Seek::OFFSET;
638 using WHENCE = _Seek::WHENCE;
639 using ERRNO = _Seek::ERRNO;
640 using PATH = _Seek::PATH;
641 using metadata_types = std::tuple<OFFSET, WHENCE, ERRNO, PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530642};
643
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530644} // namespace File
645} // namespace Common
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530646} // namespace openbmc_project
647} // namespace xyz
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530648
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530649namespace details
650{
651
652template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500653struct map_exception_type<
654 sdbusplus::xyz::openbmc_project::Common::File::Error::Seek>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530655{
656 using type = xyz::openbmc_project::Common::File::Seek;
657};
658
Gunnar Mills94df8c92018-09-14 14:50:03 -0500659} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530660
661namespace example
662{
663namespace xyz
664{
665namespace openbmc_project
666{
667namespace Example
668{
669namespace Elog
670{
671namespace _TestErrorTwo
672{
673
674struct DEV_ADDR
675{
676 static constexpr auto str = "DEV_ADDR=0x%.8X";
677 static constexpr auto str_short = "DEV_ADDR";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500678 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
679 explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530680 type _entry;
681};
682struct DEV_ID
683{
684 static constexpr auto str = "DEV_ID=%u";
685 static constexpr auto str_short = "DEV_ID";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500686 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
687 explicit constexpr DEV_ID(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530688 type _entry;
689};
690struct DEV_NAME
691{
692 static constexpr auto str = "DEV_NAME=%s";
693 static constexpr auto str_short = "DEV_NAME";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500694 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
695 explicit constexpr DEV_NAME(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530696 type _entry;
697};
698
Gunnar Mills94df8c92018-09-14 14:50:03 -0500699} // namespace _TestErrorTwo
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530700
701struct TestErrorTwo : public sdbusplus::exception_t
702{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500703 static constexpr auto errName =
704 "example.xyz.openbmc_project.Example.Elog.TestErrorTwo";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530705 static constexpr auto errDesc = "This is test error two";
706 static constexpr auto L = level::ERR;
707 using DEV_ADDR = _TestErrorTwo::DEV_ADDR;
708 using DEV_ID = _TestErrorTwo::DEV_ID;
709 using DEV_NAME = _TestErrorTwo::DEV_NAME;
710 using metadata_types = std::tuple<DEV_ADDR, DEV_ID, DEV_NAME>;
711
712 const char* name() const noexcept
713 {
714 return errName;
715 }
716
717 const char* description() const noexcept
718 {
719 return errDesc;
720 }
721
722 const char* what() const noexcept
723 {
724 return errName;
725 }
726};
727
728} // namespace Elog
729} // namespace Example
730} // namespace openbmc_project
731} // namespace xyz
732} // namespace example
733
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530734namespace example
735{
736namespace xyz
737{
738namespace openbmc_project
739{
740namespace Example
741{
742namespace Elog
743{
744namespace _AutoTestSimple
745{
746
747struct STRING
748{
749 static constexpr auto str = "STRING=%s";
750 static constexpr auto str_short = "STRING";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500751 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
752 explicit constexpr STRING(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530753 type _entry;
754};
755
Gunnar Mills94df8c92018-09-14 14:50:03 -0500756} // namespace _AutoTestSimple
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530757
758struct AutoTestSimple : public sdbusplus::exception_t
759{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500760 static constexpr auto errName =
761 "example.xyz.openbmc_project.Example.Elog.AutoTestSimple";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530762 static constexpr auto errDesc = "This is a simple test error.";
763 static constexpr auto L = level::ERR;
764 using STRING = _AutoTestSimple::STRING;
765 using metadata_types = std::tuple<STRING>;
766
767 const char* name() const noexcept
768 {
769 return errName;
770 }
771
772 const char* description() const noexcept
773 {
774 return errDesc;
775 }
776
777 const char* what() const noexcept
778 {
779 return errName;
780 }
781};
782
783} // namespace Elog
784} // namespace Example
785} // namespace openbmc_project
786} // namespace xyz
787} // namespace example
788
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530789namespace example
790{
791namespace xyz
792{
793namespace openbmc_project
794{
795namespace Example
796{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530797namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530798{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530799namespace _Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530800{
801
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530802struct CALLOUT_ERRNO_TEST
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530803{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530804 static constexpr auto str = "CALLOUT_ERRNO_TEST=%d";
805 static constexpr auto str_short = "CALLOUT_ERRNO_TEST";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500806 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
807 explicit constexpr CALLOUT_ERRNO_TEST(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530808 type _entry;
809};
810struct CALLOUT_DEVICE_PATH_TEST
811{
812 static constexpr auto str = "CALLOUT_DEVICE_PATH_TEST=%s";
813 static constexpr auto str_short = "CALLOUT_DEVICE_PATH_TEST";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500814 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
815 explicit constexpr CALLOUT_DEVICE_PATH_TEST(const char* a) :
816 _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530817 type _entry;
818};
819
Gunnar Mills94df8c92018-09-14 14:50:03 -0500820} // namespace _Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530821
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530822struct Callout : public sdbusplus::exception_t
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530823{
Gunnar Mills94df8c92018-09-14 14:50:03 -0500824 static constexpr auto errName =
825 "example.xyz.openbmc_project.Example.Device.Callout";
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530826 static constexpr auto errDesc = "Generic device callout";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530827 static constexpr auto L = level::ERR;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530828 using CALLOUT_ERRNO_TEST = _Callout::CALLOUT_ERRNO_TEST;
829 using CALLOUT_DEVICE_PATH_TEST = _Callout::CALLOUT_DEVICE_PATH_TEST;
Gunnar Mills94df8c92018-09-14 14:50:03 -0500830 using metadata_types =
831 std::tuple<CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530832
833 const char* name() const noexcept
834 {
835 return errName;
836 }
837
838 const char* description() const noexcept
839 {
840 return errDesc;
841 }
842
843 const char* what() const noexcept
844 {
845 return errName;
846 }
847};
848
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530849} // namespace Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530850} // namespace Example
851} // namespace openbmc_project
852} // namespace xyz
853} // namespace example
854
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530855namespace xyz
856{
857namespace openbmc_project
858{
859namespace Common
860{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530861namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530862{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530863namespace _Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530864{
865
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530866struct CALLOUT_ERRNO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530867{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530868 static constexpr auto str = "CALLOUT_ERRNO=%d";
869 static constexpr auto str_short = "CALLOUT_ERRNO";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500870 using type = std::tuple<std::decay_t<decltype(str)>, int32_t>;
871 explicit constexpr CALLOUT_ERRNO(int32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530872 type _entry;
873};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530874struct CALLOUT_DEVICE_PATH
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530875{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530876 static constexpr auto str = "CALLOUT_DEVICE_PATH=%s";
877 static constexpr auto str_short = "CALLOUT_DEVICE_PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500878 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
879 explicit constexpr CALLOUT_DEVICE_PATH(const char* a) :
880 _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530881 type _entry;
882};
883
Gunnar Mills94df8c92018-09-14 14:50:03 -0500884} // namespace _Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530885
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530886struct Device
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530887{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530888 static constexpr auto L = level::ERR;
889 using CALLOUT_ERRNO = _Device::CALLOUT_ERRNO;
890 using CALLOUT_DEVICE_PATH = _Device::CALLOUT_DEVICE_PATH;
891 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530892};
893
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530894} // namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530895} // namespace Common
896} // namespace openbmc_project
897} // namespace xyz
898
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530899namespace details
900{
901
902template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500903struct map_exception_type<
904 sdbusplus::xyz::openbmc_project::Common::Callout::Error::Device>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530905{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530906 using type = xyz::openbmc_project::Common::Callout::Device;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530907};
908
Gunnar Mills94df8c92018-09-14 14:50:03 -0500909} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530910
911namespace xyz
912{
913namespace openbmc_project
914{
915namespace Common
916{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530917namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530918{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530919namespace _GPIO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530920{
921
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530922struct CALLOUT_GPIO_NUM
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530923{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530924 static constexpr auto str = "CALLOUT_GPIO_NUM=%u";
925 static constexpr auto str_short = "CALLOUT_GPIO_NUM";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500926 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
927 explicit constexpr CALLOUT_GPIO_NUM(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530928 type _entry;
929};
930
Gunnar Mills94df8c92018-09-14 14:50:03 -0500931} // namespace _GPIO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530932
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530933struct GPIO
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530934{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530935 static constexpr auto L = level::ERR;
936 using CALLOUT_GPIO_NUM = _GPIO::CALLOUT_GPIO_NUM;
Gunnar Mills94df8c92018-09-14 14:50:03 -0500937 using CALLOUT_ERRNO =
938 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
939 using CALLOUT_DEVICE_PATH =
940 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
941 using metadata_types =
942 std::tuple<CALLOUT_GPIO_NUM, CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530943};
944
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530945} // namespace Callout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530946} // namespace Common
947} // namespace openbmc_project
948} // namespace xyz
949
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530950namespace details
951{
952
953template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -0500954struct map_exception_type<
955 sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +0530956{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530957 using type = xyz::openbmc_project::Common::Callout::GPIO;
958};
959
Gunnar Mills94df8c92018-09-14 14:50:03 -0500960} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530961
962namespace xyz
963{
964namespace openbmc_project
965{
966namespace Common
967{
968namespace Callout
969{
970namespace _IIC
971{
972
973struct CALLOUT_IIC_BUS
974{
975 static constexpr auto str = "CALLOUT_IIC_BUS=%s";
976 static constexpr auto str_short = "CALLOUT_IIC_BUS";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500977 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
978 explicit constexpr CALLOUT_IIC_BUS(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530979 type _entry;
980};
981struct CALLOUT_IIC_ADDR
982{
983 static constexpr auto str = "CALLOUT_IIC_ADDR=0x%hx";
984 static constexpr auto str_short = "CALLOUT_IIC_ADDR";
Gunnar Mills94df8c92018-09-14 14:50:03 -0500985 using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>;
986 explicit constexpr CALLOUT_IIC_ADDR(uint16_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530987 type _entry;
988};
989
Gunnar Mills94df8c92018-09-14 14:50:03 -0500990} // namespace _IIC
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +0530991
992struct IIC
993{
994 static constexpr auto L = level::ERR;
995 using CALLOUT_IIC_BUS = _IIC::CALLOUT_IIC_BUS;
996 using CALLOUT_IIC_ADDR = _IIC::CALLOUT_IIC_ADDR;
Gunnar Mills94df8c92018-09-14 14:50:03 -0500997 using CALLOUT_ERRNO =
998 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
999 using CALLOUT_DEVICE_PATH =
1000 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
1001 using metadata_types = std::tuple<CALLOUT_IIC_BUS, CALLOUT_IIC_ADDR,
1002 CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301003};
1004
1005} // namespace Callout
1006} // namespace Common
1007} // namespace openbmc_project
1008} // namespace xyz
1009
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301010namespace details
1011{
1012
1013template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001014struct map_exception_type<
1015 sdbusplus::xyz::openbmc_project::Common::Callout::Error::IIC>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301016{
1017 using type = xyz::openbmc_project::Common::Callout::IIC;
1018};
1019
Gunnar Mills94df8c92018-09-14 14:50:03 -05001020} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301021
1022namespace xyz
1023{
1024namespace openbmc_project
1025{
1026namespace Common
1027{
1028namespace Callout
1029{
1030namespace _Inventory
1031{
1032
1033struct CALLOUT_INVENTORY_PATH
1034{
1035 static constexpr auto str = "CALLOUT_INVENTORY_PATH=%s";
1036 static constexpr auto str_short = "CALLOUT_INVENTORY_PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001037 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1038 explicit constexpr CALLOUT_INVENTORY_PATH(const char* a) :
1039 _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301040 type _entry;
1041};
1042
Gunnar Mills94df8c92018-09-14 14:50:03 -05001043} // namespace _Inventory
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301044
1045struct Inventory
1046{
1047 static constexpr auto L = level::ERR;
1048 using CALLOUT_INVENTORY_PATH = _Inventory::CALLOUT_INVENTORY_PATH;
1049 using metadata_types = std::tuple<CALLOUT_INVENTORY_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301050};
1051
1052} // namespace Callout
1053} // namespace Common
1054} // namespace openbmc_project
1055} // namespace xyz
1056
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301057namespace details
1058{
1059
1060template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001061struct map_exception_type<
1062 sdbusplus::xyz::openbmc_project::Common::Callout::Error::Inventory>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301063{
1064 using type = xyz::openbmc_project::Common::Callout::Inventory;
1065};
1066
Gunnar Mills94df8c92018-09-14 14:50:03 -05001067} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301068
1069namespace xyz
1070{
1071namespace openbmc_project
1072{
1073namespace Common
1074{
1075namespace Callout
1076{
1077namespace _IPMISensor
1078{
1079
1080struct CALLOUT_IPMI_SENSOR_NUM
1081{
1082 static constexpr auto str = "CALLOUT_IPMI_SENSOR_NUM=%u";
1083 static constexpr auto str_short = "CALLOUT_IPMI_SENSOR_NUM";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001084 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1085 explicit constexpr CALLOUT_IPMI_SENSOR_NUM(uint32_t a) :
1086 _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301087 type _entry;
1088};
1089
Gunnar Mills94df8c92018-09-14 14:50:03 -05001090} // namespace _IPMISensor
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301091
1092struct IPMISensor
1093{
1094 static constexpr auto L = level::ERR;
1095 using CALLOUT_IPMI_SENSOR_NUM = _IPMISensor::CALLOUT_IPMI_SENSOR_NUM;
1096 using metadata_types = std::tuple<CALLOUT_IPMI_SENSOR_NUM>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301097};
1098
1099} // namespace Callout
1100} // namespace Common
1101} // namespace openbmc_project
1102} // namespace xyz
1103
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301104namespace details
1105{
1106
1107template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001108struct map_exception_type<
1109 sdbusplus::xyz::openbmc_project::Common::Callout::Error::IPMISensor>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301110{
1111 using type = xyz::openbmc_project::Common::Callout::IPMISensor;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301112};
1113
Gunnar Mills94df8c92018-09-14 14:50:03 -05001114} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301115
1116namespace xyz
1117{
1118namespace openbmc_project
1119{
1120namespace State
1121{
1122namespace Host
1123{
1124namespace _SoftOffTimeout
1125{
1126
Gunnar Mills94df8c92018-09-14 14:50:03 -05001127} // namespace _SoftOffTimeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301128
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301129struct SoftOffTimeout
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301130{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301131 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001132 using TIMEOUT_IN_MSEC =
1133 xyz::openbmc_project::Common::Timeout::TIMEOUT_IN_MSEC;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301134 using metadata_types = std::tuple<TIMEOUT_IN_MSEC>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301135};
1136
1137} // namespace Host
1138} // namespace State
1139} // namespace openbmc_project
1140} // namespace xyz
1141
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301142namespace details
1143{
1144
1145template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001146struct map_exception_type<
1147 sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301148{
1149 using type = xyz::openbmc_project::State::Host::SoftOffTimeout;
1150};
1151
Gunnar Mills94df8c92018-09-14 14:50:03 -05001152} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301153
1154namespace xyz
1155{
1156namespace openbmc_project
1157{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301158namespace Control
1159{
1160namespace Device
1161{
1162namespace _WriteFailure
1163{
1164
Gunnar Mills94df8c92018-09-14 14:50:03 -05001165} // namespace _WriteFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301166
1167struct WriteFailure
1168{
1169 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001170 using CALLOUT_ERRNO =
1171 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1172 using CALLOUT_DEVICE_PATH =
1173 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301174 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301175};
1176
1177} // namespace Device
1178} // namespace Control
1179} // namespace openbmc_project
1180} // namespace xyz
1181
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301182namespace details
1183{
1184
1185template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001186struct map_exception_type<
1187 sdbusplus::xyz::openbmc_project::Control::Device::Error::WriteFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301188{
1189 using type = xyz::openbmc_project::Control::Device::WriteFailure;
1190};
1191
Gunnar Mills94df8c92018-09-14 14:50:03 -05001192} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301193
1194namespace org
1195{
1196namespace open_power
1197{
1198namespace OCC
1199{
1200namespace Device
1201{
1202namespace _OpenFailure
1203{
1204
Gunnar Mills94df8c92018-09-14 14:50:03 -05001205} // namespace _OpenFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301206
1207struct OpenFailure
1208{
1209 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001210 using CALLOUT_ERRNO =
1211 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1212 using CALLOUT_DEVICE_PATH =
1213 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301214 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301215};
1216
1217} // namespace Device
1218} // namespace OCC
1219} // namespace open_power
1220} // namespace org
1221
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301222namespace details
1223{
1224
1225template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001226struct map_exception_type<
1227 sdbusplus::org::open_power::OCC::Device::Error::OpenFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301228{
1229 using type = org::open_power::OCC::Device::OpenFailure;
1230};
1231
Gunnar Mills94df8c92018-09-14 14:50:03 -05001232} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301233
1234namespace org
1235{
1236namespace open_power
1237{
1238namespace OCC
1239{
1240namespace Device
1241{
1242namespace _ReadFailure
1243{
1244
Gunnar Mills94df8c92018-09-14 14:50:03 -05001245} // namespace _ReadFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301246
1247struct ReadFailure
1248{
1249 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001250 using CALLOUT_ERRNO =
1251 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1252 using CALLOUT_DEVICE_PATH =
1253 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301254 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301255};
1256
1257} // namespace Device
1258} // namespace OCC
1259} // namespace open_power
1260} // namespace org
1261
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301262namespace details
1263{
1264
1265template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001266struct map_exception_type<
1267 sdbusplus::org::open_power::OCC::Device::Error::ReadFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301268{
1269 using type = org::open_power::OCC::Device::ReadFailure;
1270};
1271
Gunnar Mills94df8c92018-09-14 14:50:03 -05001272} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301273
1274namespace org
1275{
1276namespace open_power
1277{
1278namespace OCC
1279{
1280namespace Device
1281{
1282namespace _WriteFailure
1283{
1284
Gunnar Mills94df8c92018-09-14 14:50:03 -05001285} // namespace _WriteFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301286
1287struct WriteFailure
1288{
1289 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001290 using CALLOUT_ERRNO =
1291 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1292 using CALLOUT_DEVICE_PATH =
1293 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301294 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301295};
1296
1297} // namespace Device
1298} // namespace OCC
1299} // namespace open_power
1300} // namespace org
1301
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301302namespace details
1303{
1304
1305template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001306struct map_exception_type<
1307 sdbusplus::org::open_power::OCC::Device::Error::WriteFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301308{
1309 using type = org::open_power::OCC::Device::WriteFailure;
1310};
1311
Gunnar Mills94df8c92018-09-14 14:50:03 -05001312} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301313
1314namespace org
1315{
1316namespace open_power
1317{
1318namespace OCC
1319{
1320namespace Device
1321{
1322namespace _ConfigFailure
1323{
1324
Gunnar Mills94df8c92018-09-14 14:50:03 -05001325} // namespace _ConfigFailure
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301326
1327struct ConfigFailure
1328{
1329 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001330 using CALLOUT_ERRNO =
1331 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1332 using CALLOUT_DEVICE_PATH =
1333 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301334 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301335};
1336
1337} // namespace Device
1338} // namespace OCC
1339} // namespace open_power
1340} // namespace org
1341
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301342namespace details
1343{
1344
1345template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001346struct map_exception_type<
1347 sdbusplus::org::open_power::OCC::Device::Error::ConfigFailure>
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301348{
1349 using type = org::open_power::OCC::Device::ConfigFailure;
1350};
1351
Gunnar Mills94df8c92018-09-14 14:50:03 -05001352} // namespace details
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301353
1354namespace xyz
1355{
1356namespace openbmc_project
1357{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301358namespace Sensor
1359{
1360namespace Device
1361{
1362namespace _ReadFailure
1363{
1364
Gunnar Mills94df8c92018-09-14 14:50:03 -05001365} // namespace _ReadFailure
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301366
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301367struct ReadFailure
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301368{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301369 static constexpr auto L = level::ERR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001370 using CALLOUT_ERRNO =
1371 xyz::openbmc_project::Common::Callout::Device::CALLOUT_ERRNO;
1372 using CALLOUT_DEVICE_PATH =
1373 xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301374 using metadata_types = std::tuple<CALLOUT_ERRNO, CALLOUT_DEVICE_PATH>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301375};
1376
1377} // namespace Device
1378} // namespace Sensor
1379} // namespace openbmc_project
1380} // namespace xyz
1381
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301382namespace details
1383{
1384
1385template <>
Gunnar Mills94df8c92018-09-14 14:50:03 -05001386struct map_exception_type<
1387 sdbusplus::xyz::openbmc_project::Sensor::Device::Error::ReadFailure>
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301388{
1389 using type = xyz::openbmc_project::Sensor::Device::ReadFailure;
1390};
1391
Gunnar Mills94df8c92018-09-14 14:50:03 -05001392} // namespace details
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301393
1394namespace example
1395{
1396namespace xyz
1397{
1398namespace openbmc_project
1399{
1400namespace Example
1401{
1402namespace Elog
1403{
1404namespace _TestErrorOne
1405{
1406
1407struct ERRNUM
1408{
1409 static constexpr auto str = "ERRNUM=0x%.4X";
1410 static constexpr auto str_short = "ERRNUM";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001411 using type = std::tuple<std::decay_t<decltype(str)>, uint16_t>;
1412 explicit constexpr ERRNUM(uint16_t a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301413 type _entry;
1414};
1415struct FILE_PATH
1416{
1417 static constexpr auto str = "FILE_PATH=%s";
1418 static constexpr auto str_short = "FILE_PATH";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001419 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1420 explicit constexpr FILE_PATH(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301421 type _entry;
1422};
1423struct FILE_NAME
1424{
1425 static constexpr auto str = "FILE_NAME=%s";
1426 static constexpr auto str_short = "FILE_NAME";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001427 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1428 explicit constexpr FILE_NAME(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301429 type _entry;
1430};
1431
Gunnar Mills94df8c92018-09-14 14:50:03 -05001432} // namespace _TestErrorOne
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301433
1434struct TestErrorOne : public sdbusplus::exception_t
1435{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001436 static constexpr auto errName =
1437 "example.xyz.openbmc_project.Example.Elog.TestErrorOne";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301438 static constexpr auto errDesc = "this is test error one";
1439 static constexpr auto L = level::INFO;
1440 using ERRNUM = _TestErrorOne::ERRNUM;
1441 using FILE_PATH = _TestErrorOne::FILE_PATH;
1442 using FILE_NAME = _TestErrorOne::FILE_NAME;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001443 using DEV_ADDR =
1444 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
1445 using DEV_ID =
1446 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
1447 using DEV_NAME =
1448 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
1449 using metadata_types =
1450 std::tuple<ERRNUM, FILE_PATH, FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301451
1452 const char* name() const noexcept
1453 {
1454 return errName;
1455 }
1456
1457 const char* description() const noexcept
1458 {
1459 return errDesc;
1460 }
1461
1462 const char* what() const noexcept
1463 {
1464 return errName;
1465 }
1466};
1467
1468} // namespace Elog
1469} // namespace Example
1470} // namespace openbmc_project
1471} // namespace xyz
1472} // namespace example
1473
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301474namespace example
1475{
1476namespace xyz
1477{
1478namespace openbmc_project
1479{
1480namespace Example
1481{
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301482namespace Elog
1483{
1484namespace _TestCallout
1485{
1486
1487struct DEV_ADDR
1488{
1489 static constexpr auto str = "DEV_ADDR=0x%.8X";
1490 static constexpr auto str_short = "DEV_ADDR";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001491 using type = std::tuple<std::decay_t<decltype(str)>, uint32_t>;
1492 explicit constexpr DEV_ADDR(uint32_t a) : _entry(entry(str, a)){};
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301493 type _entry;
1494};
1495
Gunnar Mills94df8c92018-09-14 14:50:03 -05001496} // namespace _TestCallout
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301497
1498struct TestCallout : public sdbusplus::exception_t
1499{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001500 static constexpr auto errName =
1501 "example.xyz.openbmc_project.Example.Elog.TestCallout";
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301502 static constexpr auto errDesc = "This is test error TestCallout";
1503 static constexpr auto L = level::ERR;
1504 using DEV_ADDR = _TestCallout::DEV_ADDR;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001505 using CALLOUT_ERRNO_TEST = example::xyz::openbmc_project::Example::Device::
1506 Callout::CALLOUT_ERRNO_TEST;
1507 using CALLOUT_DEVICE_PATH_TEST = example::xyz::openbmc_project::Example::
1508 Device::Callout::CALLOUT_DEVICE_PATH_TEST;
1509 using metadata_types =
1510 std::tuple<DEV_ADDR, CALLOUT_ERRNO_TEST, CALLOUT_DEVICE_PATH_TEST>;
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301511
1512 const char* name() const noexcept
1513 {
1514 return errName;
1515 }
1516
1517 const char* description() const noexcept
1518 {
1519 return errDesc;
1520 }
1521
1522 const char* what() const noexcept
1523 {
1524 return errName;
1525 }
1526};
1527
1528} // namespace Elog
1529} // namespace Example
1530} // namespace openbmc_project
1531} // namespace xyz
1532} // namespace example
1533
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05301534namespace example
1535{
1536namespace xyz
1537{
1538namespace openbmc_project
1539{
1540namespace Example
1541{
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301542namespace Foo
1543{
1544namespace _Foo
1545{
1546
1547struct FOO_DATA
1548{
1549 static constexpr auto str = "FOO_DATA=%s";
1550 static constexpr auto str_short = "FOO_DATA";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001551 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1552 explicit constexpr FOO_DATA(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301553 type _entry;
1554};
1555
Gunnar Mills94df8c92018-09-14 14:50:03 -05001556} // namespace _Foo
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301557
1558struct Foo : public sdbusplus::exception_t
1559{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001560 static constexpr auto errName =
1561 "example.xyz.openbmc_project.Example.Foo.Foo";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301562 static constexpr auto errDesc = "this is test error Foo";
1563 static constexpr auto L = level::INFO;
1564 using FOO_DATA = _Foo::FOO_DATA;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001565 using ERRNUM =
1566 example::xyz::openbmc_project::Example::Elog::TestErrorOne::ERRNUM;
1567 using FILE_PATH =
1568 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_PATH;
1569 using FILE_NAME =
1570 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_NAME;
1571 using DEV_ADDR =
1572 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
1573 using DEV_ID =
1574 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
1575 using DEV_NAME =
1576 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
1577 using metadata_types = std::tuple<FOO_DATA, ERRNUM, FILE_PATH, FILE_NAME,
1578 DEV_ADDR, DEV_ID, DEV_NAME>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301579
1580 const char* name() const noexcept
1581 {
1582 return errName;
1583 }
1584
1585 const char* description() const noexcept
1586 {
1587 return errDesc;
1588 }
1589
1590 const char* what() const noexcept
1591 {
1592 return errName;
1593 }
1594};
1595
1596} // namespace Foo
1597} // namespace Example
1598} // namespace openbmc_project
1599} // namespace xyz
1600} // namespace example
1601
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301602namespace example
1603{
1604namespace xyz
1605{
1606namespace openbmc_project
1607{
1608namespace Example
1609{
1610namespace Bar
1611{
1612namespace _Bar
1613{
1614
1615struct BAR_DATA
1616{
1617 static constexpr auto str = "BAR_DATA=%s";
1618 static constexpr auto str_short = "BAR_DATA";
Gunnar Mills94df8c92018-09-14 14:50:03 -05001619 using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
1620 explicit constexpr BAR_DATA(const char* a) : _entry(entry(str, a)){};
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301621 type _entry;
1622};
1623
Gunnar Mills94df8c92018-09-14 14:50:03 -05001624} // namespace _Bar
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301625
1626struct Bar : public sdbusplus::exception_t
1627{
Gunnar Mills94df8c92018-09-14 14:50:03 -05001628 static constexpr auto errName =
1629 "example.xyz.openbmc_project.Example.Bar.Bar";
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301630 static constexpr auto errDesc = "this is test error Bar";
1631 static constexpr auto L = level::INFO;
1632 using BAR_DATA = _Bar::BAR_DATA;
1633 using FOO_DATA = example::xyz::openbmc_project::Example::Foo::Foo::FOO_DATA;
Gunnar Mills94df8c92018-09-14 14:50:03 -05001634 using ERRNUM =
1635 example::xyz::openbmc_project::Example::Elog::TestErrorOne::ERRNUM;
1636 using FILE_PATH =
1637 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_PATH;
1638 using FILE_NAME =
1639 example::xyz::openbmc_project::Example::Elog::TestErrorOne::FILE_NAME;
1640 using DEV_ADDR =
1641 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ADDR;
1642 using DEV_ID =
1643 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_ID;
1644 using DEV_NAME =
1645 example::xyz::openbmc_project::Example::Elog::TestErrorTwo::DEV_NAME;
1646 using metadata_types = std::tuple<BAR_DATA, FOO_DATA, ERRNUM, FILE_PATH,
1647 FILE_NAME, DEV_ADDR, DEV_ID, DEV_NAME>;
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301648
1649 const char* name() const noexcept
1650 {
1651 return errName;
1652 }
1653
1654 const char* description() const noexcept
1655 {
1656 return errDesc;
1657 }
1658
1659 const char* what() const noexcept
1660 {
1661 return errName;
1662 }
1663};
1664
1665} // namespace Bar
1666} // namespace Example
1667} // namespace openbmc_project
1668} // namespace xyz
1669} // namespace example
1670
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +05301671} // namespace logging
1672
1673} // namespace phosphor