| 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 |
| 10 | * provide an input_proc, process, and output_proc. | ||||
| 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 | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 18 | virtual float input_proc(void) = 0; |
| James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame^] | 19 | |
| Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 20 | virtual void output_proc(float 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 | |
| James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame^] | 24 | virtual std::string get_id(void) = 0; |
| Patrick Venture | d801218 | 2018-03-08 08:21:38 -0800 | [diff] [blame] | 25 | }; |