org.vigia.client.driver
Class WiiUseJDriver

java.lang.Object
  extended by org.vigia.client.driver.WiiUseJDriver
All Implemented Interfaces:
java.util.EventListener, Driver, wiiusej.wiiusejevents.utils.WiimoteListener

public class WiiUseJDriver
extends java.lang.Object
implements Driver, wiiusej.wiiusejevents.utils.WiimoteListener

Driver implementation based on the API WiiUseJ.

Version:
1.1 (22/11/08)
Author:
Ada

Field Summary
private  java.util.List<IRListener> listeners
          A list containing all the infrared listeners for the Wiimote.
 
Constructor Summary
WiiUseJDriver()
          Detects the Wiimote and starts the thread that polls the events of the Wiimote.
 
Method Summary
 void addIRListener(IRListener l)
          Adds an infrared listener for the infrared events.
 void onButtonsEvent(wiiusej.wiiusejevents.physicalevents.WiimoteButtonsEvent arg0)
           
 void onClassicControllerInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerInsertedEvent arg0)
           
 void onClassicControllerRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerRemovedEvent arg0)
           
 void onDisconnectionEvent(wiiusej.wiiusejevents.wiiuseapievents.DisconnectionEvent arg0)
           
 void onExpansionEvent(wiiusej.wiiusejevents.physicalevents.ExpansionEvent arg0)
           
 void onGuitarHeroInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.GuitarHeroInsertedEvent arg0)
           
 void onGuitarHeroRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.GuitarHeroRemovedEvent arg0)
           
 void onIrEvent(wiiusej.wiiusejevents.physicalevents.IREvent irEv)
           
 void onMotionSensingEvent(wiiusej.wiiusejevents.physicalevents.MotionSensingEvent arg0)
           
 void onNunchukInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.NunchukInsertedEvent arg0)
           
 void onNunchukRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.NunchukRemovedEvent arg0)
           
 void onStatusEvent(wiiusej.wiiusejevents.wiiuseapievents.StatusEvent arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

private java.util.List<IRListener> listeners
A list containing all the infrared listeners for the Wiimote.

Constructor Detail

WiiUseJDriver

public WiiUseJDriver()
              throws VigiaClientException
Detects the Wiimote and starts the thread that polls the events of the Wiimote.

Throws:
VigiaClientException - driver error.
Method Detail

addIRListener

public void addIRListener(IRListener l)
                   throws VigiaClientException
Description copied from interface: Driver
Adds an infrared listener for the infrared events.

Specified by:
addIRListener in interface Driver
Parameters:
l - the listener.
Throws:
VigiaClientException - error from the driver.
See Also:
Driver.addIRListener(org.vigia.client.driver.IRListener)

onIrEvent

public void onIrEvent(wiiusej.wiiusejevents.physicalevents.IREvent irEv)
               throws VigiaClientException
Specified by:
onIrEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
Throws:
VigiaClientException
See Also:
WiimoteListener.onIrEvent(wiiusej.wiiusejevents.physicalevents.IREvent)

onButtonsEvent

public void onButtonsEvent(wiiusej.wiiusejevents.physicalevents.WiimoteButtonsEvent arg0)
Specified by:
onButtonsEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onButtonsEvent(wiiusej.wiiusejevents.physicalevents.WiimoteButtonsEvent)

onClassicControllerInsertedEvent

public void onClassicControllerInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerInsertedEvent arg0)
Specified by:
onClassicControllerInsertedEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onClassicControllerInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerInsertedEvent)

onClassicControllerRemovedEvent

public void onClassicControllerRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerRemovedEvent arg0)
Specified by:
onClassicControllerRemovedEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onClassicControllerRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerRemovedEvent)

onDisconnectionEvent

public void onDisconnectionEvent(wiiusej.wiiusejevents.wiiuseapievents.DisconnectionEvent arg0)
Specified by:
onDisconnectionEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onDisconnectionEvent(wiiusej.wiiusejevents.wiiuseapievents.DisconnectionEvent)

onExpansionEvent

public void onExpansionEvent(wiiusej.wiiusejevents.physicalevents.ExpansionEvent arg0)
Specified by:
onExpansionEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onExpansionEvent(wiiusej.wiiusejevents.physicalevents.ExpansionEvent)

onGuitarHeroInsertedEvent

public void onGuitarHeroInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.GuitarHeroInsertedEvent arg0)
Specified by:
onGuitarHeroInsertedEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onGuitarHeroInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.GuitarHeroInsertedEvent)

onGuitarHeroRemovedEvent

public void onGuitarHeroRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.GuitarHeroRemovedEvent arg0)
Specified by:
onGuitarHeroRemovedEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onGuitarHeroRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.GuitarHeroRemovedEvent)

onMotionSensingEvent

public void onMotionSensingEvent(wiiusej.wiiusejevents.physicalevents.MotionSensingEvent arg0)
Specified by:
onMotionSensingEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onMotionSensingEvent(wiiusej.wiiusejevents.physicalevents.MotionSensingEvent)

onNunchukInsertedEvent

public void onNunchukInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.NunchukInsertedEvent arg0)
Specified by:
onNunchukInsertedEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onNunchukInsertedEvent(wiiusej.wiiusejevents.wiiuseapievents.NunchukInsertedEvent)

onNunchukRemovedEvent

public void onNunchukRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.NunchukRemovedEvent arg0)
Specified by:
onNunchukRemovedEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onNunchukRemovedEvent(wiiusej.wiiusejevents.wiiuseapievents.NunchukRemovedEvent)

onStatusEvent

public void onStatusEvent(wiiusej.wiiusejevents.wiiuseapievents.StatusEvent arg0)
Specified by:
onStatusEvent in interface wiiusej.wiiusejevents.utils.WiimoteListener
See Also:
WiimoteListener.onStatusEvent(wiiusej.wiiusejevents.wiiuseapievents.StatusEvent)