Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 1 | #pragma once |
2 | |||||
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 3 | #include "ec/pid.hpp" |
4 | #include "fan.hpp" | ||||
5 | |||||
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 6 | #include <string> |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 7 | |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 8 | namespace pid_control |
9 | { | ||||
10 | |||||
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 11 | /* |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 12 | * Base class for controllers. Each controller that implements this needs to |
Patrick Venture | 563a356 | 2018-10-30 09:31:26 -0700 | [diff] [blame] | 13 | * provide an inputProc, process, and outputProc. |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 14 | */ |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 15 | class ZoneInterface; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 16 | |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 17 | struct Controller |
18 | { | ||||
19 | virtual ~Controller() = default; | ||||
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 20 | |
Patrick Venture | 5f59c0f | 2018-11-11 12:55:14 -0800 | [diff] [blame] | 21 | virtual double inputProc(void) = 0; |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 22 | |
Patrick Venture | 5f59c0f | 2018-11-11 12:55:14 -0800 | [diff] [blame] | 23 | virtual void outputProc(double value) = 0; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 24 | |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 25 | virtual void process(void) = 0; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 26 | |
Patrick Venture | 563a356 | 2018-10-30 09:31:26 -0700 | [diff] [blame] | 27 | virtual std::string getID(void) = 0; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 28 | }; |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 29 | |
30 | } // namespace pid_control |