blob: e8ec28e81fbd3820d6dff7d19f94a9aff3f62638 [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>
12using ServerObject = typename sdbusplus::server::object::object<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
Brad Bishop075f7a22017-01-06 09:45:08 -050032enum class InterfaceType
33{
34 VALUE,
Brad Bishopcad57db2017-01-06 14:55:16 -050035 WARN,
36 CRIT,
Matthew Barthbf7b7b12017-03-07 15:46:59 -060037 FAN_SPEED,
Patrick Venture9331ab72018-01-29 09:48:47 -080038 FAN_PWM,
Matthew Barth35819382018-04-18 14:53:01 -050039 STATUS,
Brad Bishop075f7a22017-01-06 09:45:08 -050040};
41
Brad Bishop8e068d92016-12-23 23:41:22 -050042// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4