|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.IRInterface
public class IRInterface
The ir interface provides access to an array of infrared (IR) range sensors. This interface accepts no commands.
Field Summary | |
---|---|
static short |
PLAYER_IR_MAX_SAMPLES
maximum number of IR samples |
protected short |
PLAYER_IR_POSE_REQ
|
protected short |
PLAYER_IR_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 | |
---|---|
IRInterface(PlayerClient pc,
short indexOfDevice)
Constructor for IRInterface. |
Method Summary | |
---|---|
PlayerIRPoseReqT |
getPIPRT()
Get the geometry data. |
int |
getRangeCount()
Returns the number of IR sensors specified in the Player world file (the number of valid range readings). |
int[] |
getRanges()
Returns the IR array data ranges up to PLAYER_IR_MAX_SAMPLES. |
int[] |
getVoltages()
Returns the IR array data voltages up to PLAYER_IR_MAX_SAMPLES. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
boolean |
isPIPRTReady()
Check if geometry data is available. |
void |
queryPose()
Configuration request: Query pose. |
void |
readData()
Read the IR values. |
void |
setIRPower(int value)
Configuration request: IR 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 |
---|
public static final short PLAYER_IR_MAX_SAMPLES
protected final short PLAYER_IR_POSE_REQ
protected final short PLAYER_IR_POWER_REQ
Constructor Detail |
---|
public IRInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public int[] getVoltages()
public int[] getRanges()
public int getRangeCount()
public void queryPose()
public void setIRPower(int value)
value
- 0 for power off, 1 for power onpublic void handleResponse(int size)
handleResponse
in class PlayerDevice
size
- size of the payloadpublic boolean isPIPRTReady()
public PlayerIRPoseReqT getPIPRT()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |