mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
AnalogModule and DigitalModule classes still exist, at least until they are refactored into the classes that use them. Change-Id: I5544d5418822f19d54ba0a5d651e64fad8b7b10d
34 lines
996 B
C++
34 lines
996 B
C++
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) FIRST 2008. 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 $(WIND_BASE)/WPILib. */
|
|
/*----------------------------------------------------------------------------*/
|
|
#pragma once
|
|
|
|
#include "Resource.h"
|
|
#include "SensorBase.h"
|
|
#include "HAL/HAL.hpp"
|
|
#include "HAL/cpp/Synchronized.hpp"
|
|
|
|
/**
|
|
* SolenoidBase class is the common base class for the Solenoid and
|
|
* DoubleSolenoid classes.
|
|
*/
|
|
class SolenoidBase : public SensorBase
|
|
{
|
|
public:
|
|
virtual ~SolenoidBase();
|
|
uint8_t GetAll();
|
|
|
|
protected:
|
|
explicit SolenoidBase(uint8_t pcmID);
|
|
void Set(uint8_t value, uint8_t mask);
|
|
virtual void InitSolenoid() = 0;
|
|
|
|
uint32_t m_moduleNumber; ///< Slot number where the module is plugged into the chassis.
|
|
static Resource *m_allocated;
|
|
|
|
private:
|
|
void* m_ports[kSolenoidChannels];
|
|
};
|