Public Member Functions | |
DataThread (Socket socket) throws IOException | |
Just connect input stream to socket. | |
void | start () |
Start the thread up. | |
void | stop () |
Stop the thread, by setting boolean flag. | |
void | run () |
Main method. | |
void | addListener (String name, DaqListener l) |
Add listener to channel table. | |
void | removeListener (String name) |
Remove listener from the channel list. | |
boolean | isRunning () |
Creates a runable for a java thread to monitor and relay data. Only relays data to those listeners that have been added. This thread sorts the data by channel name and that listeners are added by channel name. So, a listener gets only the data for that channel.
Definition at line 26 of file DataThread.java.
|
Just connect input stream to socket.
Definition at line 40 of file DataThread.java. |
|
Add listener to channel table. Add a DaQListener, by channel name, to the list of listeners. The listener gets called back (on the postData Method), with the channel name, the time stamp, and the data.
Definition at line 145 of file DataThread.java. References org.nees.daq.DataThread.addListener(). Referenced by org.nees.daq.DataThread.addListener(). |
|
Remove listener from the channel list. Remove the DaqListener for the named channel from the channel list.
Definition at line 160 of file DataThread.java. References org.nees.daq.DataThread.removeListener(). Referenced by org.nees.daq.DataThread.removeListener(). |
|
Main method. While thre are no errors and stop has not been called, loop "forever" to get and parse data from the DAQ. Convert the timestamps to our internal format, tokenize the data into channel/value, and call those listeners with the channel name that corresponds to the channel.
Rest of line is 'channel' pairs
Definition at line 75 of file DataThread.java. References org.nees.daq.ISOtoRbnbTime.getValue(), org.nees.daq.ISOtoRbnbTime.is_valid, and org.nees.daq.DaqListener.postData(). |