|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaclient.PlayerDevice
javaclient.SonarInterface
public class SonarInterface
The sonar interface provides access to a collection of fixed range sensors, such as a sonar array. This interface accepts no commands.
| Field Summary | |
|---|---|
protected short |
PLAYER_SONAR_GET_GEOM_REQ
|
static short |
PLAYER_SONAR_MAX_SAMPLES
maximum number of sonar samples |
protected short |
PLAYER_SONAR_POWER_REQ
|
| 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 | |
|---|---|
SonarInterface(PlayerClient pc,
short indexOfDevice)
Constructor for SonarInterface. |
|
| Method Summary | |
|---|---|
PlayerSonarGeomT |
getPSGT()
Get the geometry data. |
int[] |
getRanges()
Returns the sonar array data values up to PLAYER_SONAR_MAX_SAMPLES. |
int |
getSamplesCount()
Returns the number of ultrasonic sensors specified in the Player world file (the number of valid range readings). |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
boolean |
isPSGTReady()
Check if geometry data is available. |
void |
queryGeometry()
Configuration request: Query geometry. |
void |
readData()
Read the sonar values. |
void |
setSonarPower(int value)
Configuration request: Sonar power. |
| Methods inherited from class javaclient.PlayerDevice |
|---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, readHeader, sendHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final short PLAYER_SONAR_GET_GEOM_REQ
protected final short PLAYER_SONAR_POWER_REQ
public static final short PLAYER_SONAR_MAX_SAMPLES
| Constructor Detail |
|---|
public SonarInterface(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 int[] getRanges()
public int getSamplesCount()
public void queryGeometry()
public void setSonarPower(int value)
value - turn power off (0) or on (>0)public void handleResponse(int size)
handleResponse in class PlayerDevicesize - size of the payloadpublic boolean isPSGTReady()
public PlayerSonarGeomT getPSGT()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||