2013-12-15 18:30:16 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-01-02 03:02:34 -08:00
|
|
|
/* Copyright (c) FIRST 2008-2016. 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-25 22:38:11 -07:00
|
|
|
#include <memory>
|
|
|
|
|
|
2016-05-20 17:30:37 -07:00
|
|
|
#include "SensorBase.h"
|
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;
|
2016-09-06 00:01:45 -07:00
|
|
|
int GetAll(int module = 0) const;
|
2015-06-25 15:07:55 -04:00
|
|
|
|
2016-09-06 00:01:45 -07:00
|
|
|
int GetPCMSolenoidBlackList(int module) const;
|
2015-06-25 15:07:55 -04:00
|
|
|
bool GetPCMSolenoidVoltageStickyFault(int module) const;
|
|
|
|
|
bool GetPCMSolenoidVoltageFault(int module) const;
|
|
|
|
|
void ClearAllPCMStickyFaults(int module);
|
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;
|
2016-07-02 09:24:54 -07:00
|
|
|
// static void* m_ports[m_maxModules][m_maxPorts];
|
2016-09-06 00:01:45 -07:00
|
|
|
int m_moduleNumber; ///< Slot number where the module is plugged into
|
|
|
|
|
/// the chassis.
|
2013-12-15 18:30:16 -05:00
|
|
|
};
|