xref: /openbmc/phosphor-hwmon/interface.hpp (revision 47fb49ac)
1 #pragma once
2 
3 #include <sdbusplus/server.hpp>
4 #include <xyz/openbmc_project/Common/Priority/server.hpp>
5 #include <xyz/openbmc_project/Control/FanPwm/server.hpp>
6 #include <xyz/openbmc_project/Control/FanSpeed/server.hpp>
7 #include <xyz/openbmc_project/Sensor/Accuracy/server.hpp>
8 #include <xyz/openbmc_project/Sensor/Threshold/Critical/server.hpp>
9 #include <xyz/openbmc_project/Sensor/Threshold/Warning/server.hpp>
10 #include <xyz/openbmc_project/Sensor/Value/server.hpp>
11 #include <xyz/openbmc_project/State/Decorator/OperationalStatus/server.hpp>
12 
13 template <typename... T>
14 using ServerObject = typename sdbusplus::server::object_t<T...>;
15 
16 using ValueInterface = sdbusplus::xyz::openbmc_project::Sensor::server::Value;
17 using ValueObject = ServerObject<ValueInterface>;
18 using WarningInterface =
19     sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Warning;
20 using WarningObject = ServerObject<WarningInterface>;
21 using CriticalInterface =
22     sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Critical;
23 using CriticalObject = ServerObject<CriticalInterface>;
24 using FanSpeedInterface =
25     sdbusplus::xyz::openbmc_project::Control::server::FanSpeed;
26 using FanSpeedObject = ServerObject<FanSpeedInterface>;
27 using FanPwmInterface =
28     sdbusplus::xyz::openbmc_project::Control::server::FanPwm;
29 using FanPwmObject = ServerObject<FanPwmInterface>;
30 using StatusInterface = sdbusplus::xyz::openbmc_project::State::Decorator::
31     server::OperationalStatus;
32 using StatusObject = ServerObject<StatusInterface>;
33 using PriorityInterface =
34     sdbusplus::xyz::openbmc_project::Common::server::Priority;
35 using PriorityObject = ServerObject<PriorityInterface>;
36 
37 using SensorValueType = double;
38 
39 using AccuracyInterface =
40     sdbusplus::xyz::openbmc_project::Sensor::server::Accuracy;
41 using AccuracyObject = ServerObject<AccuracyInterface>;
42 
43 enum class InterfaceType
44 {
45     VALUE,
46     WARN,
47     CRIT,
48     FAN_SPEED,
49     FAN_PWM,
50     STATUS,
51     ACCURACY,
52     PRIORITY,
53 };
54 
55 // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
56