blob: 27c938cd9d3ec3b558ec98c5cab15aa71b0614e9 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008-2017. 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 the root directory of */
5/* the project. */
6/*----------------------------------------------------------------------------*/
7
8#pragma once
9
10#define DEFAULT_SAFETY_EXPIRATION 0.1
11
12#include <sstream>
13
14namespace frc {
15
16class MotorSafety {
17 public:
18 virtual void SetExpiration(double timeout) = 0;
19 virtual double GetExpiration() const = 0;
20 virtual bool IsAlive() const = 0;
21 virtual void StopMotor() = 0;
22 virtual void SetSafetyEnabled(bool enabled) = 0;
23 virtual bool IsSafetyEnabled() const = 0;
24 virtual void GetDescription(std::ostringstream& desc) const = 0;
25};
26
27} // namespace frc