blob: 00ac05e453ab31e00f4e3d6a9b120bbf9159bbde [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>
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>
Brad Bishop8e068d92016-12-23 23:41:22 -050010
Brad Bishopd9f06ab2017-01-17 14:53:30 -050011template <typename... T>
Patrick Williamsad6043f2022-07-22 19:26:56 -050012using ServerObject = typename sdbusplus::server::object_t<T...>;
Brad Bishop8e068d92016-12-23 23:41:22 -050013
14using ValueInterface = sdbusplus::xyz::openbmc_project::Sensor::server::Value;
15using ValueObject = ServerObject<ValueInterface>;
Brad Bishopcad57db2017-01-06 14:55:16 -050016using WarningInterface =
17 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Warning;
18using WarningObject = ServerObject<WarningInterface>;
19using CriticalInterface =
20 sdbusplus::xyz::openbmc_project::Sensor::Threshold::server::Critical;
21using CriticalObject = ServerObject<CriticalInterface>;
Matthew Barthbf7b7b12017-03-07 15:46:59 -060022using FanSpeedInterface =
23 sdbusplus::xyz::openbmc_project::Control::server::FanSpeed;
24using FanSpeedObject = ServerObject<FanSpeedInterface>;
Patrick Venture9331ab72018-01-29 09:48:47 -080025using FanPwmInterface =
26 sdbusplus::xyz::openbmc_project::Control::server::FanPwm;
27using FanPwmObject = ServerObject<FanPwmInterface>;
Patrick Venture043d3232018-08-31 10:10:53 -070028using StatusInterface = sdbusplus::xyz::openbmc_project::State::Decorator::
29 server::OperationalStatus;
Matthew Barth35819382018-04-18 14:53:01 -050030using StatusObject = ServerObject<StatusInterface>;
Brad Bishop8e068d92016-12-23 23:41:22 -050031
Matt Spinlere32ce162021-05-12 08:55:12 -050032using SensorValueType = double;
James Feistee73f5b2018-08-01 16:31:42 -070033
Brad Bishop075f7a22017-01-06 09:45:08 -050034enum class InterfaceType
35{
36 VALUE,
Brad Bishopcad57db2017-01-06 14:55:16 -050037 WARN,
38 CRIT,
Matthew Barthbf7b7b12017-03-07 15:46:59 -060039 FAN_SPEED,
Patrick Venture9331ab72018-01-29 09:48:47 -080040 FAN_PWM,
Matthew Barth35819382018-04-18 14:53:01 -050041 STATUS,
Brad Bishop075f7a22017-01-06 09:45:08 -050042};
43
Brad Bishop8e068d92016-12-23 23:41:22 -050044// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4