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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
#pragma once
#include <tuple>
#include <systemd/sd-bus.h>
#include <sdbusplus/server.hpp>
namespace sdbusplus
{
namespace xyz
{
namespace openbmc_project
{
namespace Sensor
{
namespace Threshold
{
namespace server
{
class Warning
{
public:
/* Define all of the basic class operations:
* Not allowed:
* - Default constructor to avoid nullptrs.
* - Copy operations due to internal unique_ptr.
* Allowed:
* - Move operations.
* - Destructor.
*/
Warning() = delete;
Warning(const Warning&) = delete;
Warning& operator=(const Warning&) = delete;
Warning(Warning&&) = default;
Warning& operator=(Warning&&) = default;
virtual ~Warning() = default;
/** @brief Constructor to put object onto bus at a dbus path.
* @param[in] bus - Bus to attach to.
* @param[in] path - Path to attach at.
*/
Warning(bus::bus& bus, const char* path);
/** Get value of WarningHigh */
virtual int64_t warningHigh() const;
/** Set value of WarningHigh */
virtual int64_t warningHigh(int64_t value);
/** Get value of WarningLow */
virtual int64_t warningLow() const;
/** Set value of WarningLow */
virtual int64_t warningLow(int64_t value);
/** Get value of WarningAlarmHigh */
virtual bool warningAlarmHigh() const;
/** Set value of WarningAlarmHigh */
virtual bool warningAlarmHigh(bool value);
/** Get value of WarningAlarmLow */
virtual bool warningAlarmLow() const;
/** Set value of WarningAlarmLow */
virtual bool warningAlarmLow(bool value);
private:
/** @brief sd-bus callback for get-property 'WarningHigh' */
static int _callback_get_WarningHigh(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for set-property 'WarningHigh' */
static int _callback_set_WarningHigh(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for get-property 'WarningLow' */
static int _callback_get_WarningLow(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for set-property 'WarningLow' */
static int _callback_set_WarningLow(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for get-property 'WarningAlarmHigh' */
static int _callback_get_WarningAlarmHigh(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for set-property 'WarningAlarmHigh' */
static int _callback_set_WarningAlarmHigh(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for get-property 'WarningAlarmLow' */
static int _callback_get_WarningAlarmLow(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
/** @brief sd-bus callback for set-property 'WarningAlarmLow' */
static int _callback_set_WarningAlarmLow(
sd_bus*, const char*, const char*, const char*,
sd_bus_message*, void*, sd_bus_error*);
static constexpr auto _interface = "xyz.openbmc_project.Sensor.Threshold.Warning";
static const vtable::vtable_t _vtable[];
sdbusplus::server::interface::interface
_xyz_openbmc_project_Sensor_Threshold_Warning_interface;
int64_t _warningHigh{};
int64_t _warningLow{};
bool _warningAlarmHigh{};
bool _warningAlarmLow{};
};
} // namespace server
} // namespace Threshold
} // namespace Sensor
} // namespace openbmc_project
} // namespace xyz
} // namespace sdbusplus
|