Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

org.nees.daq.DataThread Class Reference

Only one class, designed to be a separate thread. More...

List of all members.

Public Member Functions

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 to channel table.


Package Functions

 DataThread (Socket socket) throws IOException
 Just connect input stream to socket.


Detailed Description

Only one class, designed to be a separate thread.

Definition at line 15 of file DataThread.java.


Constructor & Destructor Documentation

org.nees.daq.DataThread.DataThread Socket  socket  )  throws IOException [package]
 

Just connect input stream to socket.

Note:
assumes TCP socket already connected

Constructor - tell JVM we are discardable on exit

Definition at line 28 of file DataThread.java.


Member Function Documentation

void org.nees.daq.DataThread.addListener String  name,
DaqListener  l
 

Add listener to channel table.

Parameters:
name Channel name
l DaqListener
Note:
I need to document this better!

Definition at line 114 of file DataThread.java.

void org.nees.daq.DataThread.removeListener String  name  ) 
 

Remove listener to channel table.

Parameters:
name Channel name
l DaqListener
Note:
I need to document this better!

Definition at line 125 of file DataThread.java.

void org.nees.daq.DataThread.run  ) 
 

Main method.

While have no errors, get and parse data from the DAQ. Convert the timestamps to our internal format, tokenize the data into channel/value, stuff it all into the turbine.

Note:
Assumes the turbine is keeping up - no double or circular buffering. Might need to be modified.

Turbine apparently has a second best-rate mode that discards if it falls behind.

Rest of line is 'channel' pairs

Bug:
Initial DAQ handshake should not include driverid! Check this!

Definition at line 60 of file DataThread.java.

References org.nees.daq.ISOtoRbnbTime.getValue(), and org.nees.daq.DaqListener.postData().


The documentation for this class was generated from the following file:
Generated on Tue Mar 23 11:54:24 2004 for Data turbine for NEESGrid by doxygen 1.3.6