Matthew Barth | ccc7770 | 2017-07-28 13:43:04 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Matthew Barth | 03aff08 | 2018-12-12 15:20:22 -0600 | [diff] [blame^] | 3 | #include "types.hpp" |
Matthew Barth | 604329e | 2017-08-04 11:18:28 -0500 | [diff] [blame] | 4 | |
Matthew Barth | ccc7770 | 2017-07-28 13:43:04 -0500 | [diff] [blame] | 5 | namespace phosphor |
| 6 | { |
| 7 | namespace fan |
| 8 | { |
| 9 | namespace control |
| 10 | { |
| 11 | namespace precondition |
| 12 | { |
| 13 | |
Matthew Barth | 572d406 | 2018-05-08 14:16:04 -0500 | [diff] [blame] | 14 | using namespace phosphor::logging; |
| 15 | |
Matthew Barth | ccc7770 | 2017-07-28 13:43:04 -0500 | [diff] [blame] | 16 | /** |
| 17 | * @brief A precondition to compare a group of property values and |
| 18 | * subscribe/unsubscribe a set speed event group |
| 19 | * @details Compares each entry within the precondition group to a given value |
| 20 | * that when each entry's property value matches the given value, the set speed |
| 21 | * event is then initialized. At any point a precondition entry's value no |
| 22 | * longer matches, the set speed event is removed from being active and fans |
| 23 | * are set to full speed. |
| 24 | * |
| 25 | * @param[in] pg - Precondition property group of property values |
| 26 | * @param[in] sse - Set speed event definition |
| 27 | * |
| 28 | * @return Lambda function |
| 29 | * A lambda function to compare precondition property value states |
| 30 | * and either subscribe or unsubscribe a set speed event group. |
| 31 | */ |
Matthew Barth | 03aff08 | 2018-12-12 15:20:22 -0600 | [diff] [blame^] | 32 | Action property_states_match(std::vector<PrecondGroup>&& pg, |
| 33 | std::vector<SetSpeedEvent>&& sse); |
Matthew Barth | ccc7770 | 2017-07-28 13:43:04 -0500 | [diff] [blame] | 34 | |
| 35 | } // namespace precondition |
| 36 | } // namespace control |
| 37 | } // namespace fan |
| 38 | } // namespace phosphor |