|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaclient.PlayerDevice
javaclient.JoystickInterface
public class JoystickInterface
The joystick interface provides access to the state of a joystick. It allows
another driver or a (possibly off-board) client to read and use the state of a joystick.
This interface accepts no commands or configuration requests.
| Field Summary |
|---|
| Fields inherited from class javaclient.PlayerDevice |
|---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
| Constructor Summary | |
|---|---|
JoystickInterface(PlayerClient pc,
short indexOfDevice)
Constructor for JoystickInterface. |
|
| Method Summary | |
|---|---|
int |
getButtons()
Returns the current button states (bitmask). |
short |
getXPos()
Returns the current X joystick position (unscaled). |
short |
getXScale()
Returns the current X scaling factor. |
short |
getYPos()
Returns the current Y joystick position (unscaled). |
short |
getYScale()
Returns the current Y scaling factor. |
void |
readData()
The joystick data packet, which contains the current state of the joystick. |
| Methods inherited from class javaclient.PlayerDevice |
|---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, handleResponse, readHeader, sendHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JoystickInterface(PlayerClient pc,
short indexOfDevice)
pc - a reference to the PlayerClient objectindexOfDevice - the index of the device| Method Detail |
|---|
public void readData()
readData in class PlayerDevicepublic short getXPos()
public short getYPos()
public short getXScale()
public short getYScale()
public int getButtons()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||