![]() |
NDEVR
API Documentation
|
ControllerInterface implementation for Sony DualSense (PS5) and DualSense Edge controllers. More...
Public Member Functions | |
| DualSenseController (const DS5W::DeviceContext &context) | |
| Constructs the controller from a DualSense device context. | |
| virtual Buffer< Battery * > | batteries () const override |
| Returns the batteries associated with this controller. | |
| virtual Buffer< ControlButton > | centerButtons () const override |
| Returns the center buttons on the controller (e.g., start, select). | |
| virtual RGBColor | color () const override |
| Returns the current LED color of the controller, if supported. | |
| Buffer< HapticFeedback > | hapticFeedback () const override |
| Returns the haptic feedback outputs available on this controller. | |
| virtual UUID | id () const override |
| Returns the unique identifier of this controller. | |
| virtual Buffer< ControlButton > | leftButtons () const override |
| Returns the left-side buttons on the controller (e.g., D-pad). | |
| virtual Buffer< ControlStick > | leftSticks () const override |
| Returns the left-side analog sticks on the controller. | |
| virtual Buffer< ControlTrigger > | leftTriggers () const override |
| Returns the left-side triggers on the controller. | |
| virtual bool | requestColor (const RGBColor &color) override |
| Requests the controller LED to display the given color. | |
| virtual bool | requestVibrating (fltp08 left, fltp08 right) override |
| Requests the controller to vibrate with the given intensities. | |
| virtual Buffer< ControlButton > | rightButtons () const override |
| Returns the right-side buttons on the controller. | |
| virtual Buffer< ControlStick > | rightSticks () const override |
| Returns the right-side analog sticks on the controller. | |
| virtual Buffer< ControlTrigger > | rightTriggers () const override |
| Returns the right-side triggers on the controller. | |
| virtual void | setWindowInstance (WindowInstance *instance) override |
| Associates a window instance with this controller for input routing. | |
| void | updateState () override |
| Polls the controller hardware and updates the internal input state. | |
| virtual Vector< 2, fltp08 > | vibration () const override |
| Returns the current vibration intensity for both motors. | |
| Public Member Functions inherited from ControllerInterface | |
| void | onUpdated () |
| Emitted after the controller state has been updated. | |
Protected Member Functions | |
| void | processTouchEvent () |
| Processes touchpad events from the controller and generates input events. | |
Protected Attributes | |
| uint04 | failure_count = 0 |
| Number of consecutive communication failures. | |
| Battery * | m_battery |
| Battery sensor for the controller. | |
| DS5W::DeviceContext | m_context |
| Low-level device context handle. | |
| uint04 | m_drag_points = 0 |
| Number of active touch-drag points. | |
| UUID | m_id |
| Unique identifier for this controller. | |
| DS5W::DS5InputState | m_input_state |
| Current input state from the controller. | |
| bool | m_needs_to_write_params |
| Whether output parameters need to be sent. | |
| DS5W::DS5OutputState | m_output_state |
| Desired output state to send to the controller. | |
| WindowInstance * | m_window_instance = nullptr |
| Associated window instance for input events. | |
ControllerInterface implementation for Sony DualSense (PS5) and DualSense Edge controllers.
Definition at line 11 of file DualSenseController.h.
| DualSenseController::DualSenseController | ( | const DS5W::DeviceContext & | context | ) |
Constructs the controller from a DualSense device context.
| [in] | context | The device context obtained from device enumeration. |
Returns the batteries associated with this controller.
Implements ControllerInterface.
|
overridevirtual |
Returns the center buttons on the controller (e.g., start, select).
Implements ControllerInterface.
|
overridevirtual |
Returns the current LED color of the controller, if supported.
Implements ControllerInterface.
Referenced by requestColor().
|
overridevirtual |
Returns the haptic feedback outputs available on this controller.
Implements ControllerInterface.
|
overridevirtual |
Returns the unique identifier of this controller.
Implements ControllerInterface.
|
overridevirtual |
Returns the left-side buttons on the controller (e.g., D-pad).
Implements ControllerInterface.
|
overridevirtual |
Returns the left-side analog sticks on the controller.
Implements ControllerInterface.
|
overridevirtual |
Returns the left-side triggers on the controller.
Implements ControllerInterface.
|
overridevirtual |
Requests the controller LED to display the given color.
| [in] | color | The desired LED color. |
Implements ControllerInterface.
References color().
Requests the controller to vibrate with the given intensities.
| [in] | left | Left motor intensity from 0 (off) to 1 (full vibration). |
| [in] | right | Right motor intensity from 0 (off) to 1 (full vibration). |
Implements ControllerInterface.
|
overridevirtual |
Returns the right-side buttons on the controller.
Implements ControllerInterface.
|
overridevirtual |
Returns the right-side analog sticks on the controller.
Implements ControllerInterface.
|
overridevirtual |
Returns the right-side triggers on the controller.
Implements ControllerInterface.
|
overridevirtual |
Associates a window instance with this controller for input routing.
| [in] | WindowInstance | pointer to associate. Can be nullptr. |
Reimplemented from ControllerInterface.
Returns the current vibration intensity for both motors.
Implements ControllerInterface.