| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.EventObject
wiiremotej.event.WREvent
wiiremotej.event.WRStatusEvent
public class WRStatusEvent
Status reported event for Nintendo (R) Wii Remote (TM). Contains data from a status report.
| Field Summary | 
|---|
| Fields inherited from class java.util.EventObject | 
|---|
| source | 
| Constructor Summary | |
|---|---|
| WRStatusEvent(WiiRemote source,
              boolean extensionConnected,
              boolean speakerEnabled,
              boolean continuousEnabled,
              boolean[] LEDStatus,
              double batteryLevel)Creates a new WRStatusEvent from the given parameters. | |
| WRStatusEvent(WiiRemote source,
              byte[] data)Creates a new WRStatusEvent from the given input data array. | |
| Method Summary | |
|---|---|
|  double | getBatteryLevel()Returns the battery level of the remote. | 
|  boolean[] | getLEDStatus()Returns the status of the LED lights. | 
|  boolean | getLEDStatus(int light)Returns the status of the specified light. | 
|  boolean | isContinuousEnabled()Returns the status of continuous reporting. | 
|  boolean | isExtensionConnected()Returns the status of the extension port. | 
|  boolean | isSpeakerEnabled()Returns the status of the speaker. | 
| Methods inherited from class wiiremotej.event.WREvent | 
|---|
| getSource | 
| Methods inherited from class java.util.EventObject | 
|---|
| toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public WRStatusEvent(WiiRemote source,
                     byte[] data)
source - the WiiRemote triggering this event.data - the byte data to process for status information.
public WRStatusEvent(WiiRemote source,
                     boolean extensionConnected,
                     boolean speakerEnabled,
                     boolean continuousEnabled,
                     boolean[] LEDStatus,
                     double batteryLevel)
source - the WiiRemote triggering this event.extensionConnected - true if an extension is connected; otherwise false.speakerEnabled - true if the speaker is enabled; otherwise false.continuousEnabled - true if continuous output is enabled; otherwise false.LEDStatus - the status of each of the LED lights where true indicates on and false indicates off.batteryLevel - the battery level (percent).| Method Detail | 
|---|
public boolean isExtensionConnected()
true if an extension is connected; otherwise false.public boolean isSpeakerEnabled()
true if the speaker is enabled; otherwise false.public boolean isContinuousEnabled()
true if continuous reporting is enabled; otherwise false.public boolean[] getLEDStatus()
true indicates the light is on and false indicates it is off.
public boolean getLEDStatus(int light)
                     throws java.lang.IllegalArgumentException
light - the light to check the status of. 0 is the first light, 1 the second, etc.
true if light is on; otherwise false.
IllegalArgument - Exception if light is not one of 0, 1, 2, or 3.
java.lang.IllegalArgumentExceptionpublic double getBatteryLevel()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||