summaryrefslogtreecommitdiffstats
path: root/group.cpp
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2016-11-29 23:02:06 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2016-12-15 11:05:43 +0530
commit4c8c72bc9131a0ad6a9685678528d95afc7c6a9a (patch)
tree0a188095e165d8da69c68c3c1bb4efa19999ea6f /group.cpp
parentbb8fe0b6e025aaff1b0f0360cf4ddb35f3d0912d (diff)
downloadphosphor-led-manager-4c8c72bc9131a0ad6a9685678528d95afc7c6a9a.tar.gz
phosphor-led-manager-4c8c72bc9131a0ad6a9685678528d95afc7c6a9a.zip
Use generated bindings for Led Group manager
This extends generated sdbusplus interface and provides implementation for handling LED group operations. Change-Id: I9e6f83f2f801de24d33937bc651228b1c0ccdc37 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'group.cpp')
-rw-r--r--group.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/group.cpp b/group.cpp
new file mode 100644
index 0000000..8ed2ab0
--- /dev/null
+++ b/group.cpp
@@ -0,0 +1,21 @@
+#include <sdbusplus/message.hpp>
+#include "group.hpp"
+namespace phosphor
+{
+namespace led
+{
+
+/** @brief Overloaded Property Setter function */
+bool Group::asserted(bool value)
+{
+ // Group management is handled by Manager
+ auto result = manager.setGroupState(path, value);
+
+ // Set the base class's asserted to 'true' since the getter
+ // operation is handled there.
+ return sdbusplus::xyz::openbmc_project::Led::server::
+ Group::asserted(result);
+}
+
+} // namespace led
+} // namespace phosphor
OpenPOWER on IntegriCloud