blob: 55308436bb41f9ee8cbc61017ecfc050819df394 [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 Venture5f59c0f2018-11-11 12:55:14 -080018 virtual double inputProc(void) = 0;
James Feist22c257a2018-08-31 14:07:12 -070019
Patrick Venture5f59c0f2018-11-11 12:55:14 -080020 virtual void outputProc(double 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};