WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
SolenoidBase.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008-2016. 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  int GetAll(int module = 0) const;
24 
25  int GetPCMSolenoidBlackList(int module) const;
26  bool GetPCMSolenoidVoltageStickyFault(int module) const;
27  bool GetPCMSolenoidVoltageFault(int module) const;
28  void ClearAllPCMStickyFaults(int module);
29 
30  protected:
31  explicit SolenoidBase(int pcmID);
32  static const int m_maxModules = 63;
33  static const int m_maxPorts = 8;
34  // static void* m_ports[m_maxModules][m_maxPorts];
36 };
38 
39 } // namespace frc
bool GetPCMSolenoidVoltageStickyFault(int module) const
Definition: SolenoidBase.cpp:53
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(int module=0) const
Read all 8 solenoids as a single byte.
Definition: SolenoidBase.cpp:27
void ClearAllPCMStickyFaults(int module)
Clear ALL sticky faults inside PCM that Compressor is wired to.
Definition: SolenoidBase.cpp:78
int GetPCMSolenoidBlackList(int module) const
Reads complete solenoid blacklist for all 8 solenoids as a single byte.
Definition: SolenoidBase.cpp:44
int m_moduleNumber
Slot number where the module is plugged into the chassis.
Definition: SolenoidBase.h:35
bool GetPCMSolenoidVoltageFault(int module) const
Definition: SolenoidBase.cpp:63
SolenoidBase(int pcmID)
Constructor.
Definition: SolenoidBase.cpp:20