blob: 234af4c4575a14a730d25ba978b28964a5df17f9 [file] [log] [blame]
Brad Bishop8e068d92016-12-23 23:41:22 -05001#pragma once
2
Brad Bishop8e068d92016-12-23 23:41:22 -05003#include <sdbusplus/server.hpp>
Lakshmi Yadlapati47fb49a2023-10-19 14:47:08 -05004#include <xyz/openbmc_project/Common/Priority/server.hpp>
Patrick Venture043d3232018-08-31 10:10:53 -07005#include <xyz/openbmc_project/Control/FanPwm/server.hpp>
6#include <xyz/openbmc_project/Control/FanSpeed/server.hpp>
George Liuc9d61612022-10-12 14:31:39 +08007#include <xyz/openbmc_project/Sensor/Accuracy/server.hpp>
Patrick Venture043d3232018-08-31 10:10:53 -07008#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>
Brad Bishop8e068d92016-12-23 23:41:22 -050012
Brad Bishopd9f06ab2017-01-17 14:53:30 -050013template <typename... T>
Patrick Williamsad6043f2022-07-22 19:26:56 -050014using ServerObject = typename sdbusplus::server::object_t<T...>;
Brad Bishop8e068d92016-12-23 23:41:22 -050015
16using ValueInterface = sdbusplus::xyz::openbmc_project::Sensor::server::Value;
17using ValueObject = ServerObject<ValueInterface>;
Brad Bishopcad57db2017-01-06 14:55:16 -050018using WarningInterface =
19 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Warning;
20using WarningObject = ServerObject<WarningInterface>;
21using CriticalInterface =
22 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Critical;
23using CriticalObject = ServerObject<CriticalInterface>;
Matthew Barthbf7b7b12017-03-07 15:46:59 -060024using FanSpeedInterface =
25 sdbusplus::xyz::openbmc_project::Control::server::FanSpeed;
26using FanSpeedObject = ServerObject<FanSpeedInterface>;
Patrick Venture9331ab72018-01-29 09:48:47 -080027using FanPwmInterface =
28 sdbusplus::xyz::openbmc_project::Control::server::FanPwm;
29using FanPwmObject = ServerObject<FanPwmInterface>;
Patrick Venture043d3232018-08-31 10:10:53 -070030using StatusInterface = sdbusplus::xyz::openbmc_project::State::Decorator::
31 server::OperationalStatus;
Matthew Barth35819382018-04-18 14:53:01 -050032using StatusObject = ServerObject<StatusInterface>;
Lakshmi Yadlapati47fb49a2023-10-19 14:47:08 -050033using PriorityInterface =
34 sdbusplus::xyz::openbmc_project::Common::server::Priority;
35using PriorityObject = ServerObject<PriorityInterface>;
Brad Bishop8e068d92016-12-23 23:41:22 -050036
Matt Spinlere32ce162021-05-12 08:55:12 -050037using SensorValueType = double;
James Feistee73f5b2018-08-01 16:31:42 -070038
George Liuc9d61612022-10-12 14:31:39 +080039using AccuracyInterface =
40 sdbusplus::xyz::openbmc_project::Sensor::server::Accuracy;
41using AccuracyObject = ServerObject<AccuracyInterface>;
42
Brad Bishop075f7a22017-01-06 09:45:08 -050043enum class InterfaceType
44{
45 VALUE,
Brad Bishopcad57db2017-01-06 14:55:16 -050046 WARN,
47 CRIT,
Matthew Barthbf7b7b12017-03-07 15:46:59 -060048 FAN_SPEED,
Patrick Venture9331ab72018-01-29 09:48:47 -080049 FAN_PWM,
Matthew Barth35819382018-04-18 14:53:01 -050050 STATUS,
George Liuc9d61612022-10-12 14:31:39 +080051 ACCURACY,
Lakshmi Yadlapati47fb49a2023-10-19 14:47:08 -050052 PRIORITY,
Brad Bishop075f7a22017-01-06 09:45:08 -050053};
54
Brad Bishop8e068d92016-12-23 23:41:22 -050055// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4