blob: c71880698af38d29507e57725e260b91d30b9854 [file] [log] [blame]
Brian Silverman26e4e522015-12-17 01:56:40 -05001/*----------------------------------------------------------------------------*/
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#pragma once
7
8#define DEFAULT_SAFETY_EXPIRATION 0.1
9
10#include <sstream>
11
12class MotorSafety
13{
14public:
15 virtual void SetExpiration(float timeout) = 0;
16 virtual float GetExpiration() const = 0;
17 virtual bool IsAlive() const = 0;
18 virtual void StopMotor() = 0;
19 virtual void SetSafetyEnabled(bool enabled) = 0;
20 virtual bool IsSafetyEnabled() const = 0;
21 virtual void GetDescription(std::ostringstream& desc) const = 0;
22};