org.wiigee.logic
Class TriggeredProcessingUnit

java.lang.Object
  extended by org.wiigee.logic.ProcessingUnit
      extended by org.wiigee.logic.TriggeredProcessingUnit
All Implemented Interfaces:
java.util.EventListener, AccelerationListener, ButtonListener

public class TriggeredProcessingUnit
extends ProcessingUnit

This class analyzes the AccelerationEvents emitted from a Wiimote and further creates and manages the different models for each type of gesture.


Field Summary
 
Fields inherited from class org.wiigee.logic.ProcessingUnit
classifier
 
Constructor Summary
TriggeredProcessingUnit()
           
 
Method Summary
 void accelerationReceived(AccelerationEvent event)
          Since this class implements the WiimoteListener this procedure is necessary.
 void buttonPressReceived(ButtonPressedEvent event)
          This method is from the WiimoteListener interface.
 void buttonReleaseReceived(ButtonReleasedEvent event)
          This method would be called if a Device button has been released.
 void handleStartEvent(ActionStartEvent event)
           
 void handleStopEvent(ActionStopEvent event)
           
 void loadGesture(java.lang.String filename)
           
 void motionStartReceived(MotionStartEvent event)
          This method would be called if a Device is in idle state and then a motion starts or if a Device is in motion and then the motion stops and the Device is in idle state.
 void motionStopReceived(MotionStopEvent event)
          This method would be called if a Device is in motion and then the motion stops and the Device is in idle state.
 void saveGesture(int id, java.lang.String filename)
           
 
Methods inherited from class org.wiigee.logic.ProcessingUnit
addGestureListener, fireGestureEvent, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriggeredProcessingUnit

public TriggeredProcessingUnit()
Method Detail

accelerationReceived

public void accelerationReceived(AccelerationEvent event)
Since this class implements the WiimoteListener this procedure is necessary. It contains the filtering (directional equivalence filter) and adds the incoming data to the current motion, we want to train or recognize.

Specified by:
accelerationReceived in interface AccelerationListener
Specified by:
accelerationReceived in class ProcessingUnit
Parameters:
event - The acceleration event which has to be processed by the directional equivalence filter and which has to be added to the current motion in recognition or training process.

buttonPressReceived

public void buttonPressReceived(ButtonPressedEvent event)
This method is from the WiimoteListener interface. A button press is used to control the data flow inside the structures.

Specified by:
buttonPressReceived in interface ButtonListener
Specified by:
buttonPressReceived in class ProcessingUnit
Parameters:
event - The button representation as an event.

buttonReleaseReceived

public void buttonReleaseReceived(ButtonReleasedEvent event)
Description copied from interface: ButtonListener
This method would be called if a Device button has been released.

Specified by:
buttonReleaseReceived in interface ButtonListener
Specified by:
buttonReleaseReceived in class ProcessingUnit
Parameters:
event - This is actually a meta-event NOT containing which button has been released.

motionStartReceived

public void motionStartReceived(MotionStartEvent event)
Description copied from interface: AccelerationListener
This method would be called if a Device is in idle state and then a motion starts or if a Device is in motion and then the motion stops and the Device is in idle state.

Specified by:
motionStartReceived in interface AccelerationListener
Specified by:
motionStartReceived in class ProcessingUnit
Parameters:
event - This is the event which contains if the Wiimote is now in motion or not.

motionStopReceived

public void motionStopReceived(MotionStopEvent event)
Description copied from interface: AccelerationListener
This method would be called if a Device is in motion and then the motion stops and the Device is in idle state.

Specified by:
motionStopReceived in interface AccelerationListener
Specified by:
motionStopReceived in class ProcessingUnit
Parameters:
event - This is the event which contains if the Device is now in motion or not.

handleStartEvent

public void handleStartEvent(ActionStartEvent event)

handleStopEvent

public void handleStopEvent(ActionStopEvent event)

loadGesture

public void loadGesture(java.lang.String filename)
Specified by:
loadGesture in class ProcessingUnit

saveGesture

public void saveGesture(int id,
                        java.lang.String filename)
Specified by:
saveGesture in class ProcessingUnit