control: Use group objects in actions
Switch to use the group objects created from JSON in the actions which
allows the zone and fan YAML objects to be removed from the JSON based
binary. In switching to the JSON based group objects, the
`default_floor` action required additional methods to be added to the
appropriate objects. These additional methods were copied over from the
associated YAML based object classes.
To reduce the amount of changes in this commit, the `requestIncrease`
method was not copied over and will be in a following commit. An
additional commit will also remove the use of YAML based objects from
the JSON based zone object.
Change-Id: I5fea29f099d0176b2ffe486e79f0c585e744d807
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/group.hpp b/control/json/group.hpp
index e8d607f..e99687f 100644
--- a/control/json/group.hpp
+++ b/control/json/group.hpp
@@ -79,6 +79,38 @@
return _service;
}
+ /**
+ * @brief Set the dbus interface name for the group
+ */
+ inline void setInterface(std::string& intf)
+ {
+ _interface = intf;
+ }
+
+ /**
+ * @brief Get the group's dbus interface name
+ */
+ inline const auto& getInterface() const
+ {
+ return _interface;
+ }
+
+ /**
+ * @brief Set the dbus property name for the group
+ */
+ inline void setProperty(std::string& prop)
+ {
+ _property = prop;
+ }
+
+ /**
+ * @brief Get the group's dbus property name
+ */
+ inline const auto& getProperty() const
+ {
+ return _property;
+ }
+
private:
/* Members of the group */
std::vector<std::string> _members;
@@ -86,6 +118,12 @@
/* Service name serving all the members */
std::string _service;
+ /* Dbus interface name for all the members */
+ std::string _interface;
+
+ /* Dbus property name for all the members */
+ std::string _property;
+
/**
* @brief Parse and set the members list
*