Skip to content

Commit

Permalink
Add Fan item interface
Browse files Browse the repository at this point in the history
This interface identifies an associated inventory item
as a Fan.

Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
Change-Id: I2edeaad42df44c19872fb0489ac74d940f289cc3
  • Loading branch information
antwil committed May 7, 2019
1 parent 71779ab commit d9a580a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion presence/fan.cpp
Expand Up @@ -31,6 +31,7 @@ using namespace std::literals::string_literals;
static const auto invNamespace = "/xyz/openbmc_project/inventory"s;
static const auto itemIface = "xyz.openbmc_project.Inventory.Item"s;
static const auto invMgrIface = "xyz.openbmc_project.Inventory.Manager"s;
static const auto fanIface = "xyz.openbmc_project.Inventory.Item.Fan"s;

void setPresence(const Fan& fan, bool newState)
{
Expand All @@ -48,7 +49,10 @@ void setPresence(const Fan& fan, bool newState)
{"Present"s, newState},
{"PrettyName"s, std::get<0>(fan)},
}
}}
},
{
fanIface, {}
}},
}};

util::SDBusPlus::lookupAndCallMethod(
Expand Down

0 comments on commit d9a580a

Please sign in to comment.