BBStatusEvent
Keywords: wiiremotej.event.BBStatusEvent class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary

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.

Method Summary
`double` | `getBatteryLevel()` Returns the battery level of the balance board.
`boolean` | `isLEDIlluminated()` Returns the status of the LED.

Methods inherited from class wiiremotej.event.BBEvent
`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

### 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).

Method Detail

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD