|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwiiusej.wiiusejevents.GenericEvent
wiiusej.wiiusejevents.wiiuseapievents.WiiUseApiEvent
wiiusej.wiiusejevents.wiiuseapievents.StatusEvent
public class StatusEvent
Class used to represent a status event. This class is used to know what are the settings of the wiimote.
Field Summary | |
---|---|
private int |
attachment
|
private float |
batteryLevel
|
private boolean |
connected
|
private static short |
EXP_CLASSIC
|
private static short |
EXP_GUITAR_HERO_3
|
private static short |
EXP_NONE
|
private static short |
EXP_NUNCHUK
|
private boolean |
isContinuousActive
|
private boolean |
isIrActive
|
private boolean |
isMotionSensingActive
|
private boolean |
isRumbleActive
|
private boolean |
isSpeakerEnabled
|
private short |
leds
|
protected static short |
WIIMOTE_LED_1
|
protected static short |
WIIMOTE_LED_2
|
protected static short |
WIIMOTE_LED_3
|
protected static short |
WIIMOTE_LED_4
|
Fields inherited from class wiiusej.wiiusejevents.wiiuseapievents.WiiUseApiEvent |
---|
DISCONNECTION_EVENT, GENERIC_EVENT, NONE_EVENT, STATUS_EVENT, WIIUSE_CLASSIC_CTRL_INSERTED, WIIUSE_CLASSIC_CTRL_REMOVED, WIIUSE_GUITAR_HERO_3_CTRL_INSERTED, WIIUSE_GUITAR_HERO_3_CTRL_REMOVED, WIIUSE_NUNCHUK_INSERTED, WIIUSE_NUNCHUK_REMOVED, WIIUSE_READ_DATA |
Constructor Summary | |
---|---|
StatusEvent(int id)
Construct the StatusEvent setting up the id. |
|
StatusEvent(int id,
boolean connect,
float batt,
short led,
boolean speak,
int attach,
boolean rumbleState,
boolean continuousState,
boolean irState,
boolean motionSensingState)
Build a StatusEvent with all fields set. |
Method Summary | |
---|---|
int |
getAttachment()
Get the int representing the attachment type. |
float |
getBatteryLevel()
Get battery level. |
short |
getLeds()
Get status of the leds . |
boolean |
isAttachmentConnected()
Tells if an attachment is connected. |
boolean |
isClassicControllerConnected()
Tells if a classic controller is connected. |
boolean |
isConnected()
True if the wiimote is connected false otherwise. |
boolean |
isContinuousActive()
Tell if the CONTINUOUS option is activated. |
boolean |
isGuitarHeroConnected()
Tells if a guitar hero controller is connected. |
boolean |
isIrActive()
Tell if the IR Tracking is active. |
boolean |
isLed1Set()
Get led1 status. |
boolean |
isLed2Set()
Get led2 status. |
boolean |
isLed3Set()
Get led3 status. |
boolean |
isLed4Set()
Get led4 status. |
boolean |
isMotionSensingActive()
Get the flag indicating if the motion sensing is active. |
boolean |
isNunchukConnected()
Tells if a nunchuk is connected. |
boolean |
isRumbleActive()
Get the status of rumble. |
boolean |
isSpeakerEnabled()
Tell if the speaker is enable for this wiimote |
private boolean |
ledStatusCheck(short led)
Tells if the given led is turned on according to the leds status int. |
java.lang.String |
toString()
|
Methods inherited from class wiiusej.wiiusejevents.wiiuseapievents.WiiUseApiEvent |
---|
getEventType |
Methods inherited from class wiiusej.wiiusejevents.GenericEvent |
---|
getWiimoteId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static short WIIMOTE_LED_1
protected static short WIIMOTE_LED_2
protected static short WIIMOTE_LED_3
protected static short WIIMOTE_LED_4
private static short EXP_NONE
private static short EXP_NUNCHUK
private static short EXP_CLASSIC
private static short EXP_GUITAR_HERO_3
private boolean connected
private float batteryLevel
private short leds
private boolean isSpeakerEnabled
private int attachment
private boolean isRumbleActive
private boolean isContinuousActive
private boolean isIrActive
private boolean isMotionSensingActive
Constructor Detail |
---|
public StatusEvent(int id)
id
- the Wiimote idpublic StatusEvent(int id, boolean connect, float batt, short led, boolean speak, int attach, boolean rumbleState, boolean continuousState, boolean irState, boolean motionSensingState)
id
- id of the wiimoteconnect
- true if the wiimote is connectedbatt
- battery levelled
- status of ledsspeak
- speakers statusattach
- attachment statusrumbleState
- true if rumble is activecontinuousState
- true if continuous flag is activatedirState
- true if ir is activemotionSensingState
- true if accelerometer is activeMethod Detail |
---|
public boolean isConnected()
public float getBatteryLevel()
public short getLeds()
private boolean ledStatusCheck(short led)
led
- the int encoding a led.
public boolean isLed1Set()
public boolean isLed2Set()
public boolean isLed3Set()
public boolean isLed4Set()
public boolean isSpeakerEnabled()
public int getAttachment()
public boolean isRumbleActive()
public boolean isContinuousActive()
public boolean isIrActive()
public boolean isMotionSensingActive()
public boolean isAttachmentConnected()
public boolean isNunchukConnected()
public boolean isClassicControllerConnected()
public boolean isGuitarHeroConnected()
public java.lang.String toString()
toString
in class WiiUseApiEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |