WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
NiDsXboxControllerSim.hpp
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_hids.py. DO NOT MODIFY
6
7#pragma once
8
10
11namespace wpi {
12
14
15namespace sim {
16
17/**
18 * Class to control a simulated NiDsXbox controller.
19 */
21 public:
22 /**
23 * Constructs from a NiDsXboxController object.
24 *
25 * @param joystick controller to simulate
26 */
27 explicit NiDsXboxControllerSim(const NiDsXboxController& joystick);
28
29 /**
30 * Constructs from a joystick port number.
31 *
32 * @param port port number
33 */
34 explicit NiDsXboxControllerSim(int port);
35
36 /**
37 * Change the left X value of the controller's joystick.
38 *
39 * @param value the new value
40 */
41 void SetLeftX(double value);
42
43 /**
44 * Change the right X value of the controller's joystick.
45 *
46 * @param value the new value
47 */
48 void SetRightX(double value);
49
50 /**
51 * Change the left Y value of the controller's joystick.
52 *
53 * @param value the new value
54 */
55 void SetLeftY(double value);
56
57 /**
58 * Change the right Y value of the controller's joystick.
59 *
60 * @param value the new value
61 */
62 void SetRightY(double value);
63
64 /**
65 * Change the value of the left trigger axis on the controller.
66 *
67 * @param value the new value
68 */
69 void SetLeftTriggerAxis(double value);
70
71 /**
72 * Change the value of the right trigger axis on the controller.
73 *
74 * @param value the new value
75 */
76 void SetRightTriggerAxis(double value);
77
78 /**
79 * Change the value of the A button on the controller.
80 *
81 * @param value the new value
82 */
83 void SetAButton(bool value);
84
85 /**
86 * Change the value of the B button on the controller.
87 *
88 * @param value the new value
89 */
90 void SetBButton(bool value);
91
92 /**
93 * Change the value of the X button on the controller.
94 *
95 * @param value the new value
96 */
97 void SetXButton(bool value);
98
99 /**
100 * Change the value of the Y button on the controller.
101 *
102 * @param value the new value
103 */
104 void SetYButton(bool value);
105
106 /**
107 * Change the value of the left bumper button on the controller.
108 *
109 * @param value the new value
110 */
111 void SetLeftBumperButton(bool value);
112
113 /**
114 * Change the value of the right bumper button on the controller.
115 *
116 * @param value the new value
117 */
118 void SetRightBumperButton(bool value);
119
120 /**
121 * Change the value of the back button on the controller.
122 *
123 * @param value the new value
124 */
125 void SetBackButton(bool value);
126
127 /**
128 * Change the value of the start button on the controller.
129 *
130 * @param value the new value
131 */
132 void SetStartButton(bool value);
133
134 /**
135 * Change the value of the left stick button on the controller.
136 *
137 * @param value the new value
138 */
139 void SetLeftStickButton(bool value);
140
141 /**
142 * Change the value of the right stick button on the controller.
143 *
144 * @param value the new value
145 */
146 void SetRightStickButton(bool value);
147};
148
149} // namespace sim
150} // namespace wpi
Handle input from NiDsXbox controllers connected to the Driver Station.
Definition NiDsXboxController.hpp:30
GenericHIDSim(const GenericHID &joystick)
Constructs from a GenericHID object.
NiDsXboxControllerSim(int port)
Constructs from a joystick port number.
void SetLeftX(double value)
Change the left X value of the controller's joystick.
void SetRightStickButton(bool value)
Change the value of the right stick button on the controller.
void SetRightBumperButton(bool value)
Change the value of the right bumper button on the controller.
void SetBButton(bool value)
Change the value of the B button on the controller.
void SetXButton(bool value)
Change the value of the X button on the controller.
void SetStartButton(bool value)
Change the value of the start button on the controller.
void SetRightX(double value)
Change the right X value of the controller's joystick.
void SetLeftTriggerAxis(double value)
Change the value of the left trigger axis on the controller.
void SetLeftY(double value)
Change the left Y value of the controller's joystick.
void SetBackButton(bool value)
Change the value of the back button on the controller.
void SetRightY(double value)
Change the right Y value of the controller's joystick.
NiDsXboxControllerSim(const NiDsXboxController &joystick)
Constructs from a NiDsXboxController object.
void SetLeftBumperButton(bool value)
Change the value of the left bumper button on the controller.
void SetYButton(bool value)
Change the value of the Y button on the controller.
void SetLeftStickButton(bool value)
Change the value of the left stick button on the controller.
void SetRightTriggerAxis(double value)
Change the value of the right trigger axis on the controller.
void SetAButton(bool value)
Change the value of the A button on the controller.
Definition CTREPCMSim.hpp:13
Definition CvSource.hpp:15