platform-mc: use Metric.Value interface name
Pull the interface name from the PDI header instead of defining it here.
Tested: Inspection only.
Change-Id: Id229514ab9811127ed9f5fac835903b5f301fc24
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/platform-mc/numeric_sensor.cpp b/platform-mc/numeric_sensor.cpp
index a964224..f07c193 100644
--- a/platform-mc/numeric_sensor.cpp
+++ b/platform-mc/numeric_sensor.cpp
@@ -190,7 +190,7 @@
std::string interface = ValueIntf::interface;
if (useMetricInterface)
{
- interface = METRIC_VALUE_INTF;
+ interface = MetricIntf::interface;
}
tmp = pldm::utils::DBusHandler().getService(path.c_str(),
interface.c_str());
@@ -447,7 +447,7 @@
std::string interface = ValueIntf::interface;
if (useMetricInterface)
{
- interface = METRIC_VALUE_INTF;
+ interface = MetricIntf::interface;
}
tmp = pldm::utils::DBusHandler().getService(path.c_str(),
interface.c_str());
diff --git a/platform-mc/numeric_sensor.hpp b/platform-mc/numeric_sensor.hpp
index 9abaf17..1ecceb1 100644
--- a/platform-mc/numeric_sensor.hpp
+++ b/platform-mc/numeric_sensor.hpp
@@ -24,8 +24,6 @@
namespace platform_mc
{
-constexpr const char* METRIC_VALUE_INTF = "xyz.openbmc_project.Metric.Value";
-
using SensorUnit = sdbusplus::xyz::openbmc_project::Sensor::server::Value::Unit;
using ValueIntf = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Sensor::server::Value>;