Files
allwpilib/wpilibc/athena/include/SolenoidBase.h
Thad House e1fc60b8dd SolenoidBase functions are now static (#530)
Instance methods were kept around for backwards compat in Java. In C++,
the instance methods were changed to match Java. Also some cleanup to
the JNI layer to match updated variable types we missed.

Closes #416
2017-05-08 21:55:11 -07:00

43 lines
1.3 KiB
C++

/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008-2017. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <memory>
#include "SensorBase.h"
namespace frc {
/**
* SolenoidBase class is the common base class for the Solenoid and
* DoubleSolenoid classes.
*/
class SolenoidBase : public SensorBase {
public:
virtual ~SolenoidBase() = default;
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();
protected:
explicit SolenoidBase(int pcmID);
static const int m_maxModules = 63;
static const int m_maxPorts = 8;
int m_moduleNumber; // PCM module number
};
} // namespace frc