blob: b93c52a79fe64f970b28e4c3b3c0e146ec3b7c55 [file] [log] [blame]
jerrymf1579332013-02-07 01:56:28 +00001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008. All Rights Reserved. */
3/* Open Source Software - may be modified and shared by FRC teams. The code */
4/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5/*----------------------------------------------------------------------------*/
6
7#ifndef CONTROLLER_H
8#define CONTROLLER_H
9
10#include <vxWorks.h>
11
12/**
13 * Interface for Controllers
14 * Common interface for controllers. Controllers run control loops, the most common
15 * are PID controllers and their variants, but this includes anything that is controlling
16 * an actuator in a separate thread.
17 */
18class Controller
19{
20public:
21 virtual ~Controller() {};
22
23 /**
24 * Allows the control loop to run
25 */
26 virtual void Enable() = 0;
27
28 /**
29 * Stops the control loop from running until explicitly re-enabled by calling enable()
30 */
31 virtual void Disable() = 0;
32};
33
34#endif
35