|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
hmi.sensors.eyebox2.directaccess.DirectXuukReader
public class DirectXuukReader
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private HashMap<Integer,EyePair> |
eyes
|
private ArrayList<XuukListener> |
eyesAppearanceListeners
|
private ArrayList<XuukListener> |
eyesPositionListeners
|
private ArrayList<XuukListener> |
faceAppearanceListeners
|
private ArrayList<XuukListener> |
facePositionListeners
|
private HashMap<Integer,Face> |
faces
|
private String |
host
|
private BufferedReader |
in
|
private boolean |
isLogging
|
private boolean |
isReading
|
private XuukXMLLogger |
logger
|
private int |
port
|
private Socket |
sock
|
private boolean |
stopRunning
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DirectXuukReader(String host,
int port)
Creates a new instance of XuukReader, which will connect to the Xuuk-software with the given host and the given port. |
|
| Method Summary | |
|---|---|
void |
addListener(XuukListener listener,
boolean faceAppearances,
boolean eyesAppearances,
boolean facePositions,
boolean eyesPositions)
Used to add new interested Listeners. |
private void |
closeSocket()
|
static void |
main(String[] args)
|
private boolean |
openSocket()
|
void |
processLine(String line)
Processes a line that is received from the Xuuk-reader. |
void |
run()
Starts reading lines from the connection with the Xuuk-reader |
void |
setLogger(XuukXMLLogger xuukLogger)
Set the logger of the reader to xuukLogger |
void |
startLogging()
Starts logging the messages from the Xuuk-software Precondition 1: The reader has to reading messages Precondition 2: A logger has to be set for the reader |
void |
startReader()
Starts the reading of the socket connected to the Xuuk-software |
void |
stopLogging()
Stops logging the messages from the Xuuk-software |
void |
stopReader()
Stops the reading of the socket connected to the Xuuk-software |
void |
stopRunning()
|
| 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 |
| Field Detail |
|---|
private boolean stopRunning
private boolean isReading
private boolean isLogging
private String host
private int port
private Socket sock
private BufferedReader in
private XuukXMLLogger logger
private HashMap<Integer,Face> faces
private HashMap<Integer,EyePair> eyes
private ArrayList<XuukListener> faceAppearanceListeners
private ArrayList<XuukListener> eyesAppearanceListeners
private ArrayList<XuukListener> facePositionListeners
private ArrayList<XuukListener> eyesPositionListeners
| Constructor Detail |
|---|
public DirectXuukReader(String host,
int port)
host - the host of the Xuuk-softwareport - the port to contact the Xuuk-software| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Threadpublic void processLine(String line)
line -
public void addListener(XuukListener listener,
boolean faceAppearances,
boolean eyesAppearances,
boolean facePositions,
boolean eyesPositions)
addListener in interface XuukReaderlistener - the listener to addfaceAppearances - set this to 'true' to receive events about the appearances and disappearances of the faceeyesAppearances - set this to 'true' to receive events about the appearances and disappearances of the eyesfacePositions - set this to 'true' to receive events about positions of the detected faceseyesPositions - set this to 'true' to receive events about positions of the detected eyespublic void stopRunning()
public void stopReader()
public void startReader()
public void stopLogging()
public void startLogging()
public void setLogger(XuukXMLLogger xuukLogger)
xuukLogger - XuukXMLLogger to the file you want to write the logs toprivate void closeSocket()
private boolean openSocket()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||