diff options
author | Matt Spinler <spinler@us.ibm.com> | 2018-02-19 13:34:43 -0600 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2018-02-23 13:51:48 -0600 |
commit | abe43ab439bba463f4727a98ed0cc0c6a5e8251f (patch) | |
tree | 84416bf5d4d38ce4d7ced993596e5b661e3e38da /src/data_types.hpp | |
parent | c458deea83b4356f07194691e301037d8e831d46 (diff) | |
download | phosphor-dbus-monitor-abe43ab439bba463f4727a98ed0cc0c6a5e8251f.tar.gz phosphor-dbus-monitor-abe43ab439bba463f4727a98ed0cc0c6a5e8251f.zip |
Extend storage array to contain additional data
This array was originally just an array of objects of
type 'any'. This commit changes it to be an array of
tuples of type <any, any> to add an extra field for
use by anything that needs it.
For example, the storage is currently used to store
property values, and a future change to the CountCondition
class will now also store the result of the comparisons done
between the property values and another value specified in
the rule YAML. Then, a callback will be able to see the
result of whether each property passed the check.
Tested: Build and run unit tests
Change-Id: I58f32c9f4068b15a02b1ff7f28871161cafebddb
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'src/data_types.hpp')
-rw-r--r-- | src/data_types.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/data_types.hpp b/src/data_types.hpp index 12d1d6d..f1512db 100644 --- a/src/data_types.hpp +++ b/src/data_types.hpp @@ -18,7 +18,8 @@ constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper"; constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper"; constexpr auto pathIndex = 0; constexpr auto propertyIndex = 2; -constexpr auto valueIndex = 2; +constexpr auto storageIndex = 2; +constexpr auto valueIndex = 0; constexpr auto metaIndex = 1; enum class Context @@ -70,7 +71,7 @@ using PropertyIndex = TupleRefMap < TupleOfRefs< const std::string, const std::string, - any_ns::any>, + std::tuple<any_ns::any, any_ns::any>>, const std::string, const std::string, const std::string >; |