1 #pragma once
2 
3 #include "types.hpp"
4 
5 namespace phosphor
6 {
7 namespace fan
8 {
9 namespace monitor
10 {
11 
12 /**
13  * @brief Create a condition function object
14  *
15  * @param[in] condition - The condition being created
16  *
17  * @return - The created condition function object
18  */
19 template <typename T>
20 auto make_condition(T&& condition)
21 {
22     return Condition(std::forward<T>(condition));
23 }
24 
25 namespace condition
26 {
27 
28 /**
29  * @brief A condition that checks all properties match the given values
30  * @details Checks each property entry against its given value where all
31  * property values must match their given value for the condition to pass
32  *
33  * @param[in] propStates - List of property identifiers and their value
34  *
35  * @return Condition lambda function
36  *     A Condition function that checks all properties match
37  */
38 Condition propertiesMatch(std::vector<PropertyState>&& propStates);
39 
40 } // namespace condition
41 } // namespace monitor
42 } // namespace fan
43 } // namespace phosphor
44