WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
SolenoidBase.h
1 /*----------------------------------------------------------------------------*/
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 #include <memory>
11 
12 #include "SensorBase.h"
13 
14 namespace frc {
15 
20 class SolenoidBase : public SensorBase {
21  public:
22  virtual ~SolenoidBase() = default;
23  static int GetAll(int module);
24  int GetAll() const;
25 
26  static int GetPCMSolenoidBlackList(int module);
27  int GetPCMSolenoidBlackList() const;
28  static bool GetPCMSolenoidVoltageStickyFault(int module);
30  static bool GetPCMSolenoidVoltageFault(int module);
31  bool GetPCMSolenoidVoltageFault() const;
32  static void ClearAllPCMStickyFaults(int module);
34 
35  protected:
36  explicit SolenoidBase(int pcmID);
37  static const int m_maxModules = 63;
38  static const int m_maxPorts = 8;
39  int m_moduleNumber; // PCM module number
40 };
41 
42 } // namespace frc
Base class for all sensors.
Definition: SensorBase.h:22
SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.
Definition: SolenoidBase.h:20
int GetAll() const
Read all 8 solenoids as a single byte.
Definition: SolenoidBase.cpp:41
void ClearAllPCMStickyFaults()
Clear ALL sticky faults inside PCM that Compressor is wired to.
Definition: SolenoidBase.cpp:136
bool GetPCMSolenoidVoltageStickyFault() const
Definition: SolenoidBase.cpp:87
SolenoidBase(int pcmID)
Constructor.
Definition: SolenoidBase.cpp:20
int GetPCMSolenoidBlackList() const
Reads complete solenoid blacklist for all 8 solenoids as a single byte.
Definition: SolenoidBase.cpp:69
bool GetPCMSolenoidVoltageFault() const
Definition: SolenoidBase.cpp:105