WPILibC++
2019.1.1-4-g308bdbe
|
Gamepad Interface. More...
#include <GamepadBase.h>
Public Member Functions | |
GamepadBase (int port) | |
GamepadBase (GamepadBase &&)=default | |
GamepadBase & | operator= (GamepadBase &&)=default |
virtual bool | GetBumper (JoystickHand hand=kRightHand) const =0 |
virtual bool | GetStickButton (JoystickHand hand) const =0 |
![]() | |
GenericHID (int port) | |
GenericHID (GenericHID &&)=default | |
GenericHID & | operator= (GenericHID &&)=default |
virtual double | GetX (JoystickHand hand=kRightHand) const =0 |
virtual double | GetY (JoystickHand hand=kRightHand) const =0 |
bool | GetRawButton (int button) const |
Get the button value (starting at button 1). More... | |
bool | GetRawButtonPressed (int button) |
Whether the button was pressed since the last check. More... | |
bool | GetRawButtonReleased (int button) |
Whether the button was released since the last check. More... | |
double | GetRawAxis (int axis) const |
Get the value of the axis. More... | |
int | GetPOV (int pov=0) const |
Get the angle in degrees of a POV on the HID. More... | |
int | GetAxisCount () const |
Get the number of axes for the HID. More... | |
int | GetPOVCount () const |
Get the number of POVs for the HID. More... | |
int | GetButtonCount () const |
Get the number of buttons for the HID. More... | |
GenericHID::HIDType | GetType () const |
Get the type of the HID. More... | |
std::string | GetName () const |
Get the name of the HID. More... | |
int | GetAxisType (int axis) const |
Get the axis type of a joystick axis. More... | |
int | GetPort () const |
Get the port number of the HID. More... | |
void | SetOutput (int outputNumber, bool value) |
Set a single HID output value for the HID. More... | |
void | SetOutputs (int value) |
Set all output values for the HID. More... | |
void | SetRumble (RumbleType type, double value) |
Set the rumble output for the HID. More... | |
![]() | |
ErrorBase (ErrorBase &&)=default | |
ErrorBase & | operator= (ErrorBase &&)=default |
virtual Error & | GetError () |
Retrieve the current error. More... | |
virtual const Error & | GetError () const |
Retrieve the current error. More... | |
virtual void | ClearError () const |
Clear the current error information associated with this sensor. | |
virtual void | SetErrnoError (const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
Set error information associated with a C library call that set an error to the "errno" global variable. More... | |
virtual void | SetImaqError (int success, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
Set the current error information associated from the nivision Imaq API. More... | |
virtual void | SetError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | SetErrorRange (Error::Code code, int32_t minRange, int32_t maxRange, int32_t requestedValue, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | SetWPIError (const wpi::Twine &errorMessage, Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | CloneError (const ErrorBase &rhs) const |
virtual bool | StatusIsFatal () const |
Check if the current error code represents a fatal error. More... | |
Additional Inherited Members | |
![]() | |
enum | RumbleType { kLeftRumble, kRightRumble } |
enum | HIDType { kUnknown = -1, kXInputUnknown = 0, kXInputGamepad = 1, kXInputWheel = 2, kXInputArcadeStick = 3, kXInputFlightStick = 4, kXInputDancePad = 5, kXInputGuitar = 6, kXInputGuitar2 = 7, kXInputDrumKit = 8, kXInputGuitar3 = 11, kXInputArcadePad = 19, kHIDJoystick = 20, kHIDGamepad = 21, kHIDDriving = 22, kHIDFlight = 23, kHID1stPerson = 24 } |
enum | JoystickHand { kLeftHand = 0, kRightHand = 1 } |
![]() | |
static void | SetGlobalError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) |
static void | SetGlobalWPIError (const wpi::Twine &errorMessage, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) |
static const Error & | GetGlobalError () |
Retrieve the current global error. | |
![]() | |
Error | m_error |
Gamepad Interface.