|
|||||||||
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.WRStatusReportedEvent
public class WRStatusReportedEvent
Status reported event for Nintendo (R) Wii Remote (TM). Contains data from a status report.
Field Summary | |
---|---|
static int |
MAX_BATTERY_LEVEL
The maximum battery level. |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
WRStatusReportedEvent(WiiRemote source,
byte[] data)
Creates a new WRStatusReportedEvent from the given input data array. |
Method Summary | |
---|---|
int |
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 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 |
Field Detail |
---|
public static final int MAX_BATTERY_LEVEL
Constructor Detail |
---|
public WRStatusReportedEvent(WiiRemote source, byte[] data)
source
- the WiiRemote triggering this event.data
- the byte data to process for status information.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.IllegalArgumentException
public int getBatteryLevel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |