xref: /openbmc/phosphor-hwmon/interface.hpp (revision 043d3230)
1 #pragma once
2 
3 #include <sdbusplus/server.hpp>
4 #include <xyz/openbmc_project/Control/FanPwm/server.hpp>
5 #include <xyz/openbmc_project/Control/FanSpeed/server.hpp>
6 #include <xyz/openbmc_project/Sensor/Threshold/Critical/server.hpp>
7 #include <xyz/openbmc_project/Sensor/Threshold/Warning/server.hpp>
8 #include <xyz/openbmc_project/Sensor/Value/server.hpp>
9 #include <xyz/openbmc_project/State/Decorator/OperationalStatus/server.hpp>
10 
11 template <typename... T>
12 using ServerObject = typename sdbusplus::server::object::object<T...>;
13 
14 using ValueInterface = sdbusplus::xyz::openbmc_project::Sensor::server::Value;
15 using ValueObject = ServerObject<ValueInterface>;
16 using WarningInterface =
17     sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Warning;
18 using WarningObject = ServerObject<WarningInterface>;
19 using CriticalInterface =
20     sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Critical;
21 using CriticalObject = ServerObject<CriticalInterface>;
22 using FanSpeedInterface =
23     sdbusplus::xyz::openbmc_project::Control::server::FanSpeed;
24 using FanSpeedObject = ServerObject<FanSpeedInterface>;
25 using FanPwmInterface =
26     sdbusplus::xyz::openbmc_project::Control::server::FanPwm;
27 using FanPwmObject = ServerObject<FanPwmInterface>;
28 using StatusInterface = sdbusplus::xyz::openbmc_project::State::Decorator::
29     server::OperationalStatus;
30 using StatusObject = ServerObject<StatusInterface>;
31 
32 enum class InterfaceType
33 {
34     VALUE,
35     WARN,
36     CRIT,
37     FAN_SPEED,
38     FAN_PWM,
39     STATUS,
40 };
41 
42 // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
43