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

org.nees.daq.ControlPort Class Reference

Mediates the connection between DAQ and any internal requester. More...

List of all members.

Public Member Functions

 ControlPort (Socket socket) throws UnknownHostException, IOException
 Constructor - get reader/writer from socket.

String[] getChannels () throws IOException
 Routine to query and parse the list of DAQ channels.

void subscribe (String channel) throws IOException
 Subscribe to a DAQ channel.

void unsubscribe (String channel) throws IOException
 Unsubscribe from a previously subscribed DAQ channel.


Detailed Description

Mediates the connection between DAQ and any internal requester.

This class presents a DAQ control port with support to get the DAQ channel list. One uses this to connect to the controller, get the list of availabe channels, and subscribe or unsubscribe to a specific channel, by name. THe data for the subscribed channels is delivered on a seperate socket (see DaqToRbnb)

See also:
DaqToRbnb

Definition at line 28 of file ControlPort.java.


Constructor & Destructor Documentation

org.nees.daq.ControlPort.ControlPort Socket  socket  )  throws UnknownHostException, IOException
 

Constructor - get reader/writer from socket.

Parameters:
socket TCP socket to DAQ control port
Note:
We assume the socket is in place before we are called

Definition at line 38 of file ControlPort.java.


Member Function Documentation

String [] org.nees.daq.ControlPort.getChannels  )  throws IOException
 

Routine to query and parse the list of DAQ channels.

Note:
DAQ comms must be open and ready.
Return values:
ChannelList List of channels, array of Strings

Definition at line 53 of file ControlPort.java.

void org.nees.daq.ControlPort.subscribe String  channel  )  throws IOException
 

Subscribe to a DAQ channel.

This method turns on the data flow from the specified DAQ channel. If the connection (to a socket) was not made, if the connection failes, if the attempt to write to the socket fails, or if the channel is not available, then an IOException will be thrown.

Exceptions:
IOException 
Parameters:
channel DAQ channel ID

Definition at line 149 of file ControlPort.java.

References org.nees.daq.ControlPort.subscribe().

Referenced by org.nees.daq.ControlPort.subscribe().

void org.nees.daq.ControlPort.unsubscribe String  channel  )  throws IOException
 

Unsubscribe from a previously subscribed DAQ channel.

This method turns off data flow from the specified DAQ channel. If the connection (to a socket) was not made, if the connection failes, if the attempt to write to the socket fails, or if the channel is not available, then an IOException will be thrown.

Exceptions:
IOExcption 
Parameters:
channel DAQ channel ID

Definition at line 166 of file ControlPort.java.

References org.nees.daq.ControlPort.unsubscribe().

Referenced by org.nees.daq.ControlPort.unsubscribe().


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 11:12:27 2004 for Data turbine for NEESGrid by doxygen 1.3.7