Class to control a simulated generic joystick.
More...
#include <wpi/simulation/GenericHIDSim.hpp>
Class to control a simulated generic joystick.
◆ GenericHIDSim() [1/2]
| wpi::sim::GenericHIDSim::GenericHIDSim |
( |
const GenericHID & | joystick | ) |
|
|
explicit |
Constructs from a GenericHID object.
- Parameters
-
| joystick | joystick to simulate |
◆ GenericHIDSim() [2/2]
| wpi::sim::GenericHIDSim::GenericHIDSim |
( |
int | port | ) |
|
|
explicit |
Constructs from a joystick port number.
- Parameters
-
◆ GetLeds()
| int32_t wpi::sim::GenericHIDSim::GetLeds |
( |
| ) |
|
Get the value of set LEDs.
- Returns
- the led color
◆ GetRumble()
Get the joystick rumble.
- Parameters
-
- Returns
- the rumble value
◆ NotifyNewData()
| void wpi::sim::GenericHIDSim::NotifyNewData |
( |
| ) |
|
Updates joystick data so that new values are visible to the user program.
◆ SetAxesAvailable()
| void wpi::sim::GenericHIDSim::SetAxesAvailable |
( |
int | count | ) |
|
Set the axis count of this device.
- Parameters
-
◆ SetAxesMaximumIndex()
| void wpi::sim::GenericHIDSim::SetAxesMaximumIndex |
( |
int | maximumIndex | ) |
|
◆ SetButtonsAvailable()
| void wpi::sim::GenericHIDSim::SetButtonsAvailable |
( |
uint64_t | count | ) |
|
Set the button count of this device.
- Parameters
-
| count | the new button count |
◆ SetButtonsMaximumIndex()
| void wpi::sim::GenericHIDSim::SetButtonsMaximumIndex |
( |
int | maximumIndex | ) |
|
◆ SetGamepadType()
Set the type of this device.
- Parameters
-
◆ SetName()
| void wpi::sim::GenericHIDSim::SetName |
( |
const char * | name | ) |
|
Set the name of this device.
- Parameters
-
◆ SetPOV() [1/2]
Set the value of the default POV (port 0).
- Parameters
-
◆ SetPOV() [2/2]
Set the value of a given POV.
- Parameters
-
| pov | the POV to set |
| value | the new value |
◆ SetPOVsAvailable()
| void wpi::sim::GenericHIDSim::SetPOVsAvailable |
( |
int | count | ) |
|
Set the POV count of this device.
- Parameters
-
◆ SetPOVsMaximumIndex()
| void wpi::sim::GenericHIDSim::SetPOVsMaximumIndex |
( |
int | maximumIndex | ) |
|
◆ SetRawAxis()
| void wpi::sim::GenericHIDSim::SetRawAxis |
( |
int | axis, |
|
|
double | value ) |
Set the value of a given axis.
- Parameters
-
| axis | the axis to set |
| value | the new value |
◆ SetRawButton()
| void wpi::sim::GenericHIDSim::SetRawButton |
( |
int | button, |
|
|
bool | value ) |
Set the value of a given button.
- Parameters
-
| button | the button to set |
| value | the new value |
◆ SetSupportedOutputs()
◆ m_port
| int wpi::sim::GenericHIDSim::m_port |
|
protected |
The documentation for this class was generated from the following file: