RumbleManager Class Reference
#include <RumbleManager.h>
![](../class_rumble_manager.png)
# Public Types | |
typedef const RumbleEffectSpec | RumbleEffectROMSpec |
# Public Member Functions | |
override bool | onEvent (ListenerObject eventFirer, uint16 eventCode) |
void | reset () |
Reset the manager's state. |
# Static Public Member Functions | |
static void | startEffect (const RumbleEffectSpec *rumbleEffectSpec) |
static void | stopEffect (const RumbleEffectSpec *rumbleEffectSpec) |
static void | setAsync (bool async) |
static void | setOverridePreviousEffect (bool overridePreviousEffect) |
# Protected Attributes | |
uint8 | rumbleCommands [10] |
Queue of commands to broadcast. | |
bool | async |
bool | overridePreviousEffect |
uint8 | rumbleCommandIndex |
Index of the command in the queue to broadcast next. | |
const RumbleEffectSpec * | rumbleEffectSpec |
Rumble effect spec being broadcasted. | |
RumbleEffectSpec | cachedRumbleEffect |
Cached rumble effect to prevent broadcasting again previous send commands. |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
void | destructor () |
Class' destructor. | |
void | addEventListener (ListenerObject listener, uint16 eventCode) |
void | removeEventListener (ListenerObject listener, uint16 eventCode) |
void | removeEventListeners (uint16 eventCode) |
void | removeAllEventListeners () |
Remove all listener objects. | |
bool | hasActiveEventListeners () |
void | fireEvent (uint16 eventCode) |
void | sendMessageTo (ListenerObject receiver, uint32 message, uint32 delay, uint32 randomDelay) |
void | sendMessageToSelf (uint32 message, uint32 delay, uint32 randomDelay) |
void | discardAllMessages () |
Discard all messages, both to be sent and to be received. | |
void | discardMessages (uint32 message) |
virtual bool | handleMessage (Telegram telegram) |
![]() | |
VirtualList | events |
List of registered events. | |
int8 | eventFirings |
Counter that keeps track of the number of fired events to prevent race conditions in nested firings. |
# Detailed Description
Class RumbleManager
Inherits from Object
Manages rumble effects.
Definition at line 108 of file RumbleManager.h.
# Member Typedef Documentation
# RumbleEffectROMSpec
typedef const RumbleEffectSpec RumbleEffectROMSpec |
A RumbleEffect spec that is stored in ROM
Definition at line 97 of file RumbleManager.h.
# Member Function Documentation
# onEvent()
|
virtual |
Process an event that the instance is listen for.
- Parameters
-
eventFirer ListenerObject that signals the event eventCode Code of the firing event
- Returns
- False if the listener has to be removed; true to keep it
Reimplemented from ListenerObject.
Definition at line 113 of file RumbleManager.c.
# reset()
secure void RumbleManager::reset | ( | ) |
Reset the manager's state.
Definition at line 130 of file RumbleManager.c.
# setAsync()
|
static |
Set the async flag.
- Parameters
-
async If true, rumble commands are broadcasted asynchronously
Definition at line 88 of file RumbleManager.c.
# setOverridePreviousEffect()
|
static |
Set the flag to broadcast new effects regardless of if there is a previous queue effect pending broadcasted
- Parameters
-
overridePreviousEffect If true, new effects are broadcasted regardless of if there is a queued effect pending broadcasting
Definition at line 98 of file RumbleManager.c.
# startEffect()
|
static |
Start a rumble effect configured with the provided spec.
- Parameters
-
rumbleEffectSpec Specification of the rumble effect to play
Definition at line 29 of file RumbleManager.c.
# stopEffect()
|
static |
Stop a rumble effect configured with the provided spec.
- Parameters
-
rumbleEffectSpec Specification of the rumble effect to stop; if NULL, any playing effect is stoped
Definition at line 75 of file RumbleManager.c.
# Member Data Documentation
# async
|
protected |
Determines if the commands are broadcasted asynchronously, defaults to true
Definition at line 117 of file RumbleManager.h.
# cachedRumbleEffect
|
protected |
Cached rumble effect to prevent broadcasting again previous send commands.
Definition at line 130 of file RumbleManager.h.
# overridePreviousEffect
|
protected |
Determines if the broadcast of new effects should wait or not for a previous queue effect being completedly broadcasted
Definition at line 121 of file RumbleManager.h.
# rumbleCommandIndex
|
protected |
Index of the command in the queue to broadcast next.
Definition at line 124 of file RumbleManager.h.
# rumbleCommands
|
protected |
Queue of commands to broadcast.
Definition at line 113 of file RumbleManager.h.
# rumbleEffectSpec
|
protected |
Rumble effect spec being broadcasted.
Definition at line 127 of file RumbleManager.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Hardware/RumbleManager.h
- VUEngine-Core/source/Hardware/RumbleManager.c