WPILib 2012
WPILibRoboticsLibraryforFRC
SolenoidBase.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2008. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 
00007 #ifndef SOLENOID_BASE_H_
00008 #define SOLENOID_BASE_H_
00009 
00010 #include "Resource.h"
00011 #include "SensorBase.h"
00012 #include "ChipObject.h"
00013 
00018 class SolenoidBase : public SensorBase {
00019 public:
00020         virtual ~SolenoidBase();
00021         UINT8 GetAll();
00022 
00023 protected:
00024         explicit SolenoidBase(UINT8 moduleNumber);
00025         void Set(UINT8 value, UINT8 mask);
00026         virtual void InitSolenoid() = 0;
00027 
00028         UINT32 m_moduleNumber; 
00029         static Resource *m_allocated;
00030 
00031 private:
00032         static tSolenoid *m_fpgaSolenoidModule; 
00033         static UINT32 m_refCount; 
00034         static SEM_ID m_semaphore;
00035 };
00036 
00037 #endif
 All Classes Functions Variables