summaryrefslogtreecommitdiffstats
path: root/phosphor-logging/elog-errors-HostEvent.hpp
blob: 2bff9814bc114c295ef38f0a7fd35693db9b77db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// This file was autogenerated.  Do not edit!
// See elog-gen.py for more details
#pragma once

#include <map>
#include <string>
#include <tuple>
#include <type_traits>
#include <vector>
#include <sdbusplus/exception.hpp>
#include <phosphor-logging/log.hpp>

namespace phosphor
{

namespace logging
{

std::map<std::string,std::vector<std::string>> g_errMetaMapHostEvent = {
     {"org.open_power.Error.Host.Event.Event",{"ESEL"}},
};

std::map<std::string,level> g_errLevelMapHostEvent = {
     {"org.open_power.Error.Host.Event.Event",level::ERR},
};

namespace org
{
namespace open_power
{
namespace Error
{
namespace Host
{
namespace _Event
{
struct ESEL
{
    static constexpr auto str = "ESEL=%s";
    static constexpr auto str_short = "ESEL";
    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
    explicit constexpr ESEL(const char* a) : _entry(entry(str, a)) {};
    type _entry;
};

}  // namespace _Event

struct Event : public sdbusplus::exception_t
{
    static constexpr auto errName = "org.open_power.Error.Host.Event.Event";
    static constexpr auto errDesc = "A host system event was received";
    static constexpr auto L = level::ERR;
    using ESEL = _Event::ESEL;
    using metadata_types = std::tuple<ESEL>;
    const char* name() const noexcept
    {
        return errName;
    }

    const char* description() const noexcept
    {
        return errDesc;
    }

    const char* what() const noexcept
    {
        return errName;
    }

};
} // namespace Host
} // namespace Error
} // namespace open_power
} // namespace org
} // namespace logging
} // namespace phosphor
OpenPOWER on IntegriCloud