Add ability to configure from dbus
This allows configuration of PID control from dbus using
entity manager. Sample configuration will be pushed to
entity-manager repo shortly.
Tested-by: Used yaml configuration and dbus / entity-manager
based configuration and pid seemed to work the same.
Verified printout of configuration matched generated
cpp files.
Change-Id: Ia7b016e53262791ffcccdb9b21c1ccddae2926bc
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/sensors/builder.cpp b/sensors/builder.cpp
index 01b0a64..106b154 100644
--- a/sensors/builder.cpp
+++ b/sensors/builder.cpp
@@ -22,6 +22,7 @@
#include "conf.hpp"
#include "dbus/dbuspassive.hpp"
+#include "dbus/dbuswrite.hpp"
#include "interfaces.hpp"
#include "notimpl/readonly.hpp"
#include "notimpl/writeonly.hpp"
@@ -104,6 +105,23 @@
}
break;
+ case IOInterfaceType::DBUSACTIVE:
+ if (info->max > 0)
+ {
+ wi = std::make_unique<DbusWritePercent>(info->writepath,
+ info->min,
+ info->max,
+ helper);
+ }
+ else
+ {
+ wi = std::make_unique<DbusWrite>(info->writepath,
+ info->min,
+ info->max,
+ helper);
+ }
+
+ break;
default:
wi = std::make_unique<ReadOnlyNoExcept>();
break;