blob: bf79937ad3f3bd1af0a0017d1e3e156bec29908f [file] [log] [blame]
Patrick Ventured8012182018-03-08 08:21:38 -08001#pragma once
2
Patrick Ventureda4a5dd2018-08-31 09:42:48 -07003#include "ec/pid.hpp"
4#include "fan.hpp"
5
James Feist22c257a2018-08-31 14:07:12 -07006#include <string>
Patrick Ventured8012182018-03-08 08:21:38 -08007
8/*
James Feist22c257a2018-08-31 14:07:12 -07009 * Base class for controllers. Each controller that implements this needs to
Patrick Venture563a3562018-10-30 09:31:26 -070010 * provide an inputProc, process, and outputProc.
Patrick Ventured8012182018-03-08 08:21:38 -080011 */
James Feist22c257a2018-08-31 14:07:12 -070012class ZoneInterface;
Patrick Ventured8012182018-03-08 08:21:38 -080013
James Feist22c257a2018-08-31 14:07:12 -070014struct Controller
15{
16 virtual ~Controller() = default;
Patrick Ventured8012182018-03-08 08:21:38 -080017
Patrick Venture563a3562018-10-30 09:31:26 -070018 virtual float inputProc(void) = 0;
James Feist22c257a2018-08-31 14:07:12 -070019
Patrick Venture563a3562018-10-30 09:31:26 -070020 virtual void outputProc(float value) = 0;
Patrick Ventured8012182018-03-08 08:21:38 -080021
James Feist22c257a2018-08-31 14:07:12 -070022 virtual void process(void) = 0;
Patrick Ventured8012182018-03-08 08:21:38 -080023
Patrick Venture563a3562018-10-30 09:31:26 -070024 virtual std::string getID(void) = 0;
Patrick Ventured8012182018-03-08 08:21:38 -080025};