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 | |
8 | /* | ||||
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 9 | * Base class for controllers. Each controller that implements this needs to |
Patrick Venture | 563a356 | 2018-10-30 09:31:26 -0700 | [diff] [blame] | 10 | * provide an inputProc, process, and outputProc. |
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 | class ZoneInterface; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 13 | |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 14 | struct Controller |
15 | { | ||||
16 | virtual ~Controller() = default; | ||||
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 17 | |
Patrick Venture | 5f59c0f | 2018-11-11 12:55:14 -0800 | [diff] [blame] | 18 | virtual double inputProc(void) = 0; |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 19 | |
Patrick Venture | 5f59c0f | 2018-11-11 12:55:14 -0800 | [diff] [blame] | 20 | virtual void outputProc(double value) = 0; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 21 | |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 22 | virtual void process(void) = 0; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 23 | |
Patrick Venture | 563a356 | 2018-10-30 09:31:26 -0700 | [diff] [blame] | 24 | virtual std::string getID(void) = 0; |
Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 25 | }; |