WPILib 2012
WPILibRoboticsLibraryforFRC
|
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 DOUBLE_SOLENOID_H_ 00008 #define DOUBLE_SOLENOID_H_ 00009 00010 #include "SolenoidBase.h" 00011 00019 class DoubleSolenoid : public SolenoidBase { 00020 public: 00021 typedef enum {kOff, kForward, kReverse} Value; 00022 00023 explicit DoubleSolenoid(UINT32 forwardChannel, UINT32 reverseChannel); 00024 DoubleSolenoid(UINT8 moduleNumber, UINT32 forwardChannel, UINT32 reverseChannel); 00025 virtual ~DoubleSolenoid(); 00026 virtual void Set(Value value); 00027 virtual Value Get(); 00028 00029 private: 00030 virtual void InitSolenoid(); 00031 00032 UINT32 m_forwardChannel; 00033 UINT32 m_reverseChannel; 00034 UINT8 m_forwardMask; 00035 UINT8 m_reverseMask; 00036 }; 00037 00038 #endif