blob: 6e2d71d5368f2d90fe49fe6de40dc935f9f3a892 [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>
Patrick Venture043d3232018-08-31 10:10:53 -07004#include <xyz/openbmc_project/Control/FanPwm/server.hpp>
5#include <xyz/openbmc_project/Control/FanSpeed/server.hpp>
George Liuc9d61612022-10-12 14:31:39 +08006#include <xyz/openbmc_project/Sensor/Accuracy/server.hpp>
Patrick Venture043d3232018-08-31 10:10:53 -07007#include <xyz/openbmc_project/Sensor/Threshold/Critical/server.hpp>
8#include <xyz/openbmc_project/Sensor/Threshold/Warning/server.hpp>
9#include <xyz/openbmc_project/Sensor/Value/server.hpp>
10#include <xyz/openbmc_project/State/Decorator/OperationalStatus/server.hpp>
Brad Bishop8e068d92016-12-23 23:41:22 -050011
Brad Bishopd9f06ab2017-01-17 14:53:30 -050012template <typename... T>
Patrick Williamsad6043f2022-07-22 19:26:56 -050013using ServerObject = typename sdbusplus::server::object_t<T...>;
Brad Bishop8e068d92016-12-23 23:41:22 -050014
15using ValueInterface = sdbusplus::xyz::openbmc_project::Sensor::server::Value;
16using ValueObject = ServerObject<ValueInterface>;
Brad Bishopcad57db2017-01-06 14:55:16 -050017using WarningInterface =
18 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Warning;
19using WarningObject = ServerObject<WarningInterface>;
20using CriticalInterface =
21 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Critical;
22using CriticalObject = ServerObject<CriticalInterface>;
Matthew Barthbf7b7b12017-03-07 15:46:59 -060023using FanSpeedInterface =
24 sdbusplus::xyz::openbmc_project::Control::server::FanSpeed;
25using FanSpeedObject = ServerObject<FanSpeedInterface>;
Patrick Venture9331ab72018-01-29 09:48:47 -080026using FanPwmInterface =
27 sdbusplus::xyz::openbmc_project::Control::server::FanPwm;
28using FanPwmObject = ServerObject<FanPwmInterface>;
Patrick Venture043d3232018-08-31 10:10:53 -070029using StatusInterface = sdbusplus::xyz::openbmc_project::State::Decorator::
30 server::OperationalStatus;
Matthew Barth35819382018-04-18 14:53:01 -050031using StatusObject = ServerObject<StatusInterface>;
Brad Bishop8e068d92016-12-23 23:41:22 -050032
Matt Spinlere32ce162021-05-12 08:55:12 -050033using SensorValueType = double;
James Feistee73f5b2018-08-01 16:31:42 -070034
George Liuc9d61612022-10-12 14:31:39 +080035using AccuracyInterface =
36 sdbusplus::xyz::openbmc_project::Sensor::server::Accuracy;
37using AccuracyObject = ServerObject<AccuracyInterface>;
38
Brad Bishop075f7a22017-01-06 09:45:08 -050039enum class InterfaceType
40{
41 VALUE,
Brad Bishopcad57db2017-01-06 14:55:16 -050042 WARN,
43 CRIT,
Matthew Barthbf7b7b12017-03-07 15:46:59 -060044 FAN_SPEED,
Patrick Venture9331ab72018-01-29 09:48:47 -080045 FAN_PWM,
Matthew Barth35819382018-04-18 14:53:01 -050046 STATUS,
George Liuc9d61612022-10-12 14:31:39 +080047 ACCURACY,
Brad Bishop075f7a22017-01-06 09:45:08 -050048};
49
Brad Bishop8e068d92016-12-23 23:41:22 -050050// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4