#ifndef FANCURVE_H_ #define FANCURVE_H_ #include #include #include #include #include struct FanStep { int Temp; int Percent; }; class FanCurve { public: FanCurve(std::vector steps, std::vector> sensors, std::vector> fans, std::unique_ptr aggregator, int hysteresis); void DoFanControl(); private: int AggregateTemperature(); void PrintInfo(); bool ExceedsHysteresis(int temperature); void ApplyFanPower(std::shared_ptr fan, int targetFanPower); std::vector mSteps; std::vector> mTempSensors; std::vector> mFans; std::unique_ptr mAggregator; int mHystersis; int mLastTemperature; }; #endif // FANCURVE_H_