|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwiiremotej.WiiRemoteExtension
public abstract class WiiRemoteExtension
A class representing a Nintendo (R) Wii Remote (TM) extension, such as the Nunchuk. It has information about the extension and can create WRExtensionEvents. WiiRemoteExtensions do support dynamic payloads, but the size of the payload must be controlled from WiiRemote.
Constructor Summary | |
---|---|
WiiRemoteExtension(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 void |
decryptExtensionInput(byte[] bytes,
int firstIndex,
int len)
Applies any necessary transformation to the specified byte array to decrypt extension input. |
abstract short |
getCode()
Returns the extension code for this extension, used by WRExtensionFactories in determining what kind of extension this is. |
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 WiiRemoteExtension(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 void decryptExtensionInput(byte[] bytes, int firstIndex, int len)
bytes
- the byte array to decrypt.firstIndex
- the first index to decrypt.len
- the number of bytes to decrypt.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 |