blob: 464a8e459cdf2d134422a31e05e7beb93f964b3d [file] [log] [blame]
Patrick Ventured8012182018-03-08 08:21:38 -08001#pragma once
2
James Feist22c257a2018-08-31 14:07:12 -07003#include <string>
Patrick Ventured8012182018-03-08 08:21:38 -08004
Patrick Venturea0764872020-08-08 07:48:43 -07005namespace pid_control
6{
7
Patrick Ventured8012182018-03-08 08:21:38 -08008/*
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};
Patrick Venturea0764872020-08-08 07:48:43 -070026
27} // namespace pid_control