zone: Add debug interface to zone dbus path
- Add xyz.openbmc_project.Debug.Pid.Zone interface to fanctrl/zoneX dbus
to record the PID config name which is driving this zone.
TEST:
```
busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0 xyz.openbmc_project.Debug.Pid.Zone
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.Leader property s "CPU0_PID" emits-change
```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I6fcfa596eec6b51a7727c2a01e7d36e3698eebcf
diff --git a/pid/zone.cpp b/pid/zone.cpp
index a8c388a..995b2aa 100644
--- a/pid/zone.cpp
+++ b/pid/zone.cpp
@@ -516,4 +516,9 @@
_pidsFailSafePercent[name] = percent;
}
+std::string DbusPidZone::leader() const
+{
+ return _maximumSetPointName;
+}
+
} // namespace pid_control