Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
GamepadController Class ReferenceListens to Gamepad events coming in from the gamepad port. More...
Inheritance diagram for GamepadController:
Detailed DescriptionListens to Gamepad events coming in from the gamepad port. The communication protocol is a simple, 5-byte group. The first byte indicates which button/joystick had a state change, and the next 4 bytes indicate the new state value for that input:
Definition at line 20 of file GamepadController.h.
Member Enumeration Documentation
The input indicator values.
Definition at line 29 of file GamepadController.h. Constructor & Destructor Documentation
don't call
Definition at line 67 of file GamepadController.h.
Definition at line 90 of file GamepadController.h. Member Function Documentation
Definition at line 15 of file GamepadController.cc. Referenced by GamepadController().
Delegate function for event processing, the event itself is pointed to (only for the duration of the doEvent() call!) by event. Default implementation watches for 'private' text message events (those forwarded by a BehaviorSwitchControl from ControllerGUI input) and will publically rebroadcast them. The idea is that your own processEvent gets first dibs, but if the behavior doesn't handle the text message, it will be handed off for others. Reimplemented from BehaviorBase. Definition at line 96 of file GamepadController.h.
Gives a short description of what this class of behaviors does... you should override this (but don't have to). If you do override this, also consider overriding getDescription() to return it Reimplemented from BehaviorBase. Definition at line 104 of file GamepadController.h. Referenced by getDescription().
Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis). By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!) This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so. Reimplemented from BehaviorBase. Definition at line 109 of file GamepadController.h.
Called when new data comes in over wireless. Definition at line 100 of file GamepadController.cc. Referenced by start().
don't call
Processes a received packet. Definition at line 19 of file GamepadController.cc. Referenced by input_callback().
Closes the server socket. Definition at line 82 of file GamepadController.cc.
Calling this signals that the behavior should start running. It will increment the reference counter, add to the registry, and call the subclass hooks (preStart() / doStart() postStart() ). Generally you shouldn't override this -- override some combination of preStart(), doStart(), and postStart() instead. Reimplemented from BehaviorBase. Definition at line 68 of file GamepadController.cc.
Calling this signals the behavior to stop running. In turn, this calls doStop(), then removes the behavior from the registry and subtracts from the reference counter Ñ thus may delete the object if no other references remain. You shouldn't override this — override doStop instead. Reimplemented from BehaviorBase. Definition at line 94 of file GamepadController.cc. Referenced by doEvent(). Member Data Documentation
The input stream socket. Definition at line 51 of file GamepadController.h. Referenced by shutdown(), and start().
The actual socket. Definition at line 53 of file GamepadController.h. Referenced by shutdown(), and start().
The last GamepadController that was theOne. Definition at line 48 of file GamepadController.h. Referenced by shutdown(), start(), and ~GamepadController().
Points to the one GamepadController object that the input stream is talking to. Definition at line 24 of file GamepadController.h. Referenced by shutdown(), start(), and ~GamepadController(). The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:08 2016 by Doxygen 1.6.3 |