wiiremotej
Class WRClassicExtension
java.lang.Object
wiiremotej.WRExtension
wiiremotej.WRClassicExtension
public class WRClassicExtension
- extends WRExtension
A class representing a Nintendo (R) Wii Remote (TM) Classic controller extension. It has information about the extension and can create
WRClassicExtensionEvents. NOT IMPLEMENTED. DO NOT USE. SERIOUSLY, THIS DOES NOTHING.
Method Summary |
WRExtensionEvent |
createWRExtensionEvent(WiiRemote remote,
byte[] input,
int offset)
Creates and returns a new WRExtensionEvent from the given input. |
static 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. |
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 |
WRClassicExtension
public WRClassicExtension(int payload)
createWRExtensionEvent
public WRExtensionEvent createWRExtensionEvent(WiiRemote remote,
byte[] input,
int offset)
- Description copied from class:
WRExtension
- Creates and returns a new WRExtensionEvent from the given input.
- Specified by:
createWRExtensionEvent
in class WRExtension
- Parameters:
remote
- the WiiRemote triggering this event.input
- the data input from the extension port.offset
- the position of the first byte of extension data in the array.
- Returns:
- a new WRExtensionEvent.
isPayloadValid
public boolean isPayloadValid(int payload)
- Checks if the given payload is valid for this extension. The classic controller only accepts a payload of 6.
- Specified by:
isPayloadValid
in class WRExtension
- Parameters:
payload
- the payload to check.
- Returns:
true
if this extension will accept the given payload; otherwise, false
.
getCode
public static 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.
Note this is the decrypted code.
- Returns:
- the extension code for this extension.