2013-12-15 18:30:16 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2017-08-23 22:06:13 -07:00
|
|
|
/* Copyright (c) 2008-2017 FIRST. All Rights Reserved. */
|
2013-12-15 18:30:16 -05:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
2013-12-15 18:30:16 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-01-02 03:02:34 -08:00
|
|
|
|
2014-05-02 17:54:01 -04:00
|
|
|
#pragma once
|
2013-12-15 18:30:16 -05:00
|
|
|
|
2016-05-20 17:30:37 -07:00
|
|
|
#include "SensorBase.h"
|
2013-12-15 18:30:16 -05:00
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
namespace frc {
|
|
|
|
|
|
2013-12-15 18:30:16 -05:00
|
|
|
/**
|
|
|
|
|
* SolenoidBase class is the common base class for the Solenoid and
|
|
|
|
|
* DoubleSolenoid classes.
|
|
|
|
|
*/
|
2015-06-25 15:07:55 -04:00
|
|
|
class SolenoidBase : public SensorBase {
|
|
|
|
|
public:
|
2015-06-24 01:06:29 -07:00
|
|
|
virtual ~SolenoidBase() = default;
|
2017-05-08 21:55:11 -07:00
|
|
|
static int GetAll(int module);
|
|
|
|
|
int GetAll() const;
|
|
|
|
|
|
|
|
|
|
static int GetPCMSolenoidBlackList(int module);
|
|
|
|
|
int GetPCMSolenoidBlackList() const;
|
|
|
|
|
static bool GetPCMSolenoidVoltageStickyFault(int module);
|
|
|
|
|
bool GetPCMSolenoidVoltageStickyFault() const;
|
|
|
|
|
static bool GetPCMSolenoidVoltageFault(int module);
|
|
|
|
|
bool GetPCMSolenoidVoltageFault() const;
|
|
|
|
|
static void ClearAllPCMStickyFaults(int module);
|
|
|
|
|
void ClearAllPCMStickyFaults();
|
2015-06-19 17:23:54 -07:00
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
protected:
|
2016-09-06 00:01:45 -07:00
|
|
|
explicit SolenoidBase(int pcmID);
|
2016-07-10 17:47:44 -07:00
|
|
|
static const int m_maxModules = 63;
|
|
|
|
|
static const int m_maxPorts = 8;
|
2017-05-08 21:55:11 -07:00
|
|
|
int m_moduleNumber; // PCM module number
|
2013-12-15 18:30:16 -05:00
|
|
|
};
|
2016-11-01 22:33:12 -07:00
|
|
|
|
|
|
|
|
} // namespace frc
|