blob: f52c412a787e8f4811afd2337106769627cd84bd [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
10 * provide an input_proc, process, and output_proc.
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 Ventureda4a5dd2018-08-31 09:42:48 -070018 virtual float input_proc(void) = 0;
James Feist22c257a2018-08-31 14:07:12 -070019
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070020 virtual void output_proc(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
James Feist22c257a2018-08-31 14:07:12 -070024 virtual std::string get_id(void) = 0;
Patrick Ventured8012182018-03-08 08:21:38 -080025};