wiiremotej.event
Class BBStatusEvent
java.lang.Object
java.util.EventObject
wiiremotej.event.BBEvent
wiiremotej.event.BBStatusEvent
- All Implemented Interfaces:
- java.io.Serializable
public class BBStatusEvent
- extends BBEvent
Status reported event for Nintendo (R) Balance Board (TM). Contains data from a status report.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
BBStatusEvent(BalanceBoard source,
boolean isLEDIlluminated,
double batteryLevel)
Creates a new BBStatusEvent from the given parameters. |
BBStatusEvent(BalanceBoard source,
byte[] data)
Creates a new BBStatusEvent from the given input data array. |
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 |
BBStatusEvent
public BBStatusEvent(BalanceBoard source,
byte[] data)
- Creates a new BBStatusEvent from the given input data array. This array contains ALL of the bits directly from input.
- Parameters:
source
- the BalanceBoard triggering this event.data
- the byte data to process for status information.
BBStatusEvent
public BBStatusEvent(BalanceBoard source,
boolean isLEDIlluminated,
double batteryLevel)
- Creates a new BBStatusEvent from the given parameters.
- Parameters:
source
- the BalanceBoard triggering this event.isLEDIlluminated
- true
indicates the LED is on and false
indicates it is off.batteryLevel
- the battery level (percent).
isLEDIlluminated
public boolean isLEDIlluminated()
- Returns the status of the LED.
- Returns:
true
if the light is on; otherwise false
.
getBatteryLevel
public double getBatteryLevel()
- Returns the battery level of the balance board. This a percent value (ranges from 0 to 1, e.g. 0.5 is 50%).
- Returns:
- the battery level of the balance board.