WPILib 2012
WPILibRoboticsLibraryforFRC
GenericHID.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 GENERIC_HID_H
00008 #define GENERIC_HID_H
00009 
00010 #include <vxWorks.h>
00011 
00014 class GenericHID
00015 {
00016 public:
00017         typedef enum {
00018                 kLeftHand = 0,
00019                 kRightHand = 1
00020         } JoystickHand;
00021 
00022         virtual ~GenericHID() {}
00023 
00024         virtual float GetX(JoystickHand hand = kRightHand) = 0;
00025         virtual float GetY(JoystickHand hand = kRightHand) = 0;
00026         virtual float GetZ() = 0;
00027         virtual float GetTwist() = 0;
00028         virtual float GetThrottle() = 0;
00029         virtual float GetRawAxis(UINT32 axis) = 0;
00030 
00031         virtual bool GetTrigger(JoystickHand hand = kRightHand) = 0;
00032         virtual bool GetTop(JoystickHand hand = kRightHand) = 0;
00033         virtual bool GetBumper(JoystickHand hand = kRightHand) = 0;
00034         virtual bool GetRawButton(UINT32 button) = 0;
00035 };
00036 
00037 #endif
00038 
 All Classes Functions Variables