|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwiiremotej.WRExtension
public abstract class WRExtension
A class representing a Nintendo (R) Wii Remote (TM) extension, such as the Nunchuck. It has information about the extension and can create WRExtensionEvents. WRExtensions do support dynamic payloads, but the size of the payload must be controlled from WiiRemote.
Constructor Summary | |
---|---|
WRExtension(int payload)
Creates a new WRExtension with the given payload. |
Method Summary | |
---|---|
abstract WRExtensionEvent |
createWRExtensionEvent(WiiRemote source,
byte[] input,
int offset)
Creates and returns a new WRExtensionEvent from the given input. |
abstract short |
getCode()
Returns the extension code for this extension, used by WRExtensionFactories in determining what kind of if the given extension is this kind of extension. |
int |
getPayload()
Returns the number of maximum number of bytes that should be received on input from this extension. |
abstract boolean |
isPayloadValid(int payload)
Checks if the given payload is valid for this extension. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WRExtension(int payload)
payload
- the number of bytes needed to create an event with this extension.Method Detail |
---|
public int getPayload()
public abstract boolean isPayloadValid(int payload)
payload
- the payload to check.
true
if this extension will accept the given payload; otherwise, false
.public abstract short getCode()
public abstract WRExtensionEvent createWRExtensionEvent(WiiRemote source, byte[] input, int offset)
source
- the WiiRemote triggering this event.input
- the data input from the extension port.offset
- the position of the first byte of extension data in input.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |