WRClassicExtension
Keywords: wiiremotej.WRClassicExtension 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
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.

Constructor Summary
`WRClassicExtension(int payload)`

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 wiiremotej.WRExtension
`getPayload`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WRClassicExtension

    public WRClassicExtension(int payload)

Method Detail

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

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