|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for processing events sent from Labtec's Spaceball 4000 device.
Spaceball and Spaceball 4000 are Trademarks of Labtec Inc.
| Method Summary | |
void |
processAutoRezeroResponse(int autoZeroPeriod,
int autoZeroWindow,
boolean enabled)
Method for processing auto rezero responses. |
void |
processDeviceInfoResponse(int type,
int lineNumber,
java.lang.String content)
Method for processing device info events. |
void |
processEchoResponse(byte[] data)
Method to process echo respones. |
void |
processError(int errorCode,
java.lang.String errorString)
Method to process error responses. |
void |
processRequestResponse(int type)
|
void |
processSensitivityResponse(byte value)
Method for processing sensitivity Responses. |
void |
setHandedness(int handedness)
Method to process the handedness response. |
void |
setNumOfButtons(int numOfButtons)
Method to process the number of buttons of the device. |
| Method Detail |
public void processRequestResponse(int type)
type - use constants
Spaceball4000Packet.EMIT_SINGLE_BEEP
Spaceball4000Packet.ENABLE_BALL_DATA
Spaceball4000Packet.DISABLE_BALL_DATA
Spaceball4000Packet.GET_REZERO_BALL
public void processDeviceInfoResponse(int type,
int lineNumber,
java.lang.String content)
type - use constants
Spaceball4000Packet.GET_DEVICE_DESCRIPTOR
Spaceball4000Packet.GET_DEVICE_INFORMATION_RESPONSE:
"vFirmware version 2.42 created on 24-Oct-1997"
Spaceball4000Packet.RESET_DEVICE: When power is
applied to the device, it will perform its initialization.
During this initialization the current position will be used as
the Zero Position. The firmware will then wait a total of 2
seconds before sending the following strings and emitting a
double beep:
lineNumber - starting at 1; lineNumber = 0 means error
at decoding the line numbercontent - the received datapublic void processSensitivityResponse(byte value)
value - use constants
Spaceball4000Packet.CUBIC_SENSITIVITY_ENABLED
Spaceball4000Packet.STANDARD_SENSITIVITY_ENABLED
public void processAutoRezeroResponse(int autoZeroPeriod,
int autoZeroWindow,
boolean enabled)
autoZeroPeriod - [ms] 0 <= autoZeroPeriod <= 0xFFFFautoZeroWindow - [raw reading units] 0 <=
autoZeroWindow < 0xFFenabled - true if auto-rezero is enabledpublic void setHandedness(int handedness)
handedness - use constants
Spaceball4000Packet.LEFT
Spaceball4000Packet.RIGHT
public void setNumOfButtons(int numOfButtons)
numOfButtons -
public void processError(int errorCode,
java.lang.String errorString)
errorCode - use constants
Spaceball4000Packet.ECLIPSE_REGISTER_ERROR_CODE
Spaceball4000Packet.ECLIPSE_REGISTER_ERROR_CODE
Spaceball4000Packet.EEPROM_CHECKSUM_INCORRECT_ERROR_CODE
Spaceball4000Packet.ECLIPSE_TIMED_OUT_ERROR_CODE
Spaceball4000Packet.TRANSMIT_TIMEOUT_ERROR_CODE
Spaceball4000Packet.RECEIVE_QUEUE_OVERFLOW_ERROR_CODE
Spaceball4000Packet.RECEIVE_ERROR_ERROR_CODE
Spaceball4000Packet.PACKET_TOO_LONG_ERROR_CODE
Spaceball4000Packet.PACKET_IGNORED_ERROR_CODE
Spaceball4000Packet.COMMAND_UNRECOGNIZED_ERROR_CODE
public void processEchoResponse(byte[] data)
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||