kaos.robots.playerJavaClient
Class PlayerClient
java.lang.Object
java.lang.Thread
kaos.robots.playerJavaClient.PlayerClient
- All Implemented Interfaces:
- java.lang.Runnable
public class PlayerClient
- extends java.lang.Thread
Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary |
PlayerClient(java.lang.String serverName,
int portNumber)
Make a new player client connection for the url "servername" and port
"portNumber". |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PLAYER_DATAMODE_PUSH_ALL
public static final byte PLAYER_DATAMODE_PUSH_ALL
- See Also:
- Constant Field Values
PLAYER_DATAMODE_PULL_ALL
public static final byte PLAYER_DATAMODE_PULL_ALL
- See Also:
- Constant Field Values
PLAYER_DATAMODE_PUSH_NEW
public static final byte PLAYER_DATAMODE_PUSH_NEW
- See Also:
- Constant Field Values
PLAYER_DATAMODE_PULL_NEW
public static final byte PLAYER_DATAMODE_PULL_NEW
- See Also:
- Constant Field Values
PLAYER_PLAYER_DEVLIST_REQ
public static final short PLAYER_PLAYER_DEVLIST_REQ
- See Also:
- Constant Field Values
PLAYER_PLAYER_DRIVERINFO_REQ
public static final short PLAYER_PLAYER_DRIVERINFO_REQ
- See Also:
- Constant Field Values
PLAYER_PLAYER_DEV_REQ
public static final short PLAYER_PLAYER_DEV_REQ
- See Also:
- Constant Field Values
PLAYER_PLAYER_DATA_REQ
public static final short PLAYER_PLAYER_DATA_REQ
- See Also:
- Constant Field Values
PLAYER_PLAYER_DATAMODE_REQ
public static final short PLAYER_PLAYER_DATAMODE_REQ
- See Also:
- Constant Field Values
PLAYER_PLAYER_DATAFREQ_REQ
public static final short PLAYER_PLAYER_DATAFREQ_REQ
- See Also:
- Constant Field Values
PLAYER_PLAYER_AUTH_REQ
public static final short PLAYER_PLAYER_AUTH_REQ
- See Also:
- Constant Field Values
receivedAuthentication
public boolean receivedAuthentication
socket
protected java.net.Socket socket
is
public java.io.DataInputStream is
- The input stream for the socket connected to the player server
buffer
protected java.io.BufferedOutputStream buffer
os
public java.io.DataOutputStream os
- The input stream for the socket connected to the player server
It's buffered, so remember to flush()!!
N_DEVICES
protected static int N_DEVICES
MAX_DEVICES
protected static int MAX_DEVICES
subscribedSensors
protected int subscribedSensors
deviceCnt
protected int[] deviceCnt
deviceList
protected PlayerDevice[][] deviceList
succReadF
public boolean succReadF
PlayerClient
public PlayerClient(java.lang.String serverName,
int portNumber)
- Make a new player client connection for the url "servername" and port
"portNumber".
setNotThreaded
public void setNotThreaded()
runThreaded
public void runThreaded(long millis,
int nanos)
getI
public int getI()
incI
public void incI(int increment)
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
- Overrides:
run
in class java.lang.Thread
requestPosition
public PositionPlayerDevice requestPosition(int index,
char r)
- Request 'r' acces for device
If successful it returns the device. Otherwise it returns null
requestSonar
public SonarPlayerDevice requestSonar(int index,
char r)
requestLaser
public LaserPlayerDevice requestLaser(int index,
char r)
requestBlobfinder
public BlobfinderInterface requestBlobfinder(int index,
char r)
requestPtz
public PtzPlayerDevice requestPtz(int index,
char r)
requestFiducial
public FiducialInterface requestFiducial(int index,
char r)
requestTruth
public TruthPlayerDevice requestTruth(int index,
char r)
requestDeviceList
public void requestDeviceList()
- Add new device code here
requestDriverName
public void requestDriverName(short device)
requestData
public void requestData()
requestDataDeliveryMode
public void requestDataDeliveryMode(byte mode)
requestDataDeliveryFrequency
public void requestDataDeliveryFrequency(short frequency)
requestAuthentication
public void requestAuthentication(byte[] key)
readAll
public void readAll()
handleResponce
public void handleResponce(int size)
isReadyPDDT
public boolean isReadyPDDT()
getPDDT
public kaos.robots.playerJavaClient.PlayerDeviceDevlistT getPDDT()
isReadyPDDI
public boolean isReadyPDDI()
getPDDI
public kaos.robots.playerJavaClient.PlayerDeviceDriverInfo getPDDI()
isAuthenticated
public boolean isAuthenticated()