blob: 276f6e6b2ddf1933fe0e9e1dd2e57b01d01c957b [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#include <memory>
11
12#include "SensorBase.h"
13
14namespace frc {
15
16/**
17 * SolenoidBase class is the common base class for the Solenoid and
18 * DoubleSolenoid classes.
19 */
20class 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];
35 int m_moduleNumber; ///< Slot number where the module is plugged into
36 /// the chassis.
37};
38
39} // namespace frc