summaryrefslogtreecommitdiffstats
path: root/src/conditions.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-04-17 12:22:50 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-15 16:58:22 -0400
commitc5736432ac09d19cd0e513e11082a7637a196829 (patch)
tree913b2ca0f861f74a7effdd4d6999b4ab569c0ddb /src/conditions.hpp
parentb0b82be89c328ff8205821803592ba08963464ee (diff)
downloadphosphor-dbus-monitor-c5736432ac09d19cd0e513e11082a7637a196829.tar.gz
phosphor-dbus-monitor-c5736432ac09d19cd0e513e11082a7637a196829.zip
Documentation only, no functional change
Added copyrights and comments within headers Change-Id: Iebb17ba34b82a6c80718ad32338105a5245e640c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'src/conditions.hpp')
-rw-r--r--src/conditions.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/conditions.hpp b/src/conditions.hpp
index 54a6dc6..b613679 100644
--- a/src/conditions.hpp
+++ b/src/conditions.hpp
@@ -12,6 +12,22 @@ namespace monitoring
namespace condition
{
+/**
+ * @brief A condition used to trigger an action when a number of items are at
+ * or above a given value
+ * @details A given group of items is updated with their last known item
+ * value, which then the entire group is checked if there are a given number of
+ * them at or above a value which would cause the condition to be true
+ *
+ * @param[in] items - Group of items
+ * @param[in] path - Path of a item within the group
+ * @param[in] count - Number of items needed at or above value
+ * @param[in] value - Value of items to be at or above
+ *
+ * @return Lambda function
+ * A lambda function to determine if the number of items within the group
+ * are at or above the given value
+ */
template <typename T>
auto countAtOrAbove(Group& items, const char* path, size_t count, T&& value)
{
OpenPOWER on IntegriCloud