diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-04-10 13:58:08 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-04-26 12:48:24 -0500 |
commit | 48087591e350c013cfeb937ba8a87d0989374882 (patch) | |
tree | 8ff6738afdfdefceb94ef047463c246606755860 /control/types.hpp | |
parent | 1048401e89b63e23d7466c2188b6ac49fdb3db74 (diff) | |
download | phosphor-fan-presence-48087591e350c013cfeb937ba8a87d0989374882.tar.gz phosphor-fan-presence-48087591e350c013cfeb937ba8a87d0989374882.zip |
Fan control: Add types for use with generated data
Change-Id: I9cb2037dc459516f577fc2bff91cccafea539eff
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'control/types.hpp')
-rw-r--r-- | control/types.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/control/types.hpp b/control/types.hpp new file mode 100644 index 0000000..e4c3725 --- /dev/null +++ b/control/types.hpp @@ -0,0 +1,34 @@ +#pragma once +#include <string> +#include <tuple> +#include <vector> + +namespace phosphor +{ +namespace fan +{ +namespace control +{ + +//Placeholder. Conditions are completely TBD. +using Condition = bool; + +constexpr auto fanNamePos = 0; +constexpr auto sensorListPos = 1; +using FanDefinition = std::tuple<std::string, std::vector<std::string>>; + +constexpr auto zoneNumPos = 0; +constexpr auto fullSpeedPos = 1; +constexpr auto fanListPos = 2; +using ZoneDefinition = std::tuple<size_t, + unsigned int, + std::vector<FanDefinition>>; + +constexpr auto conditionListPos = 0; +constexpr auto zoneListPos = 1; +using ZoneGroup = std::tuple<std::vector<Condition>, + std::vector<ZoneDefinition>>; + +} +} +} |