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

org.nees.rbnb.DataVideoSink Class Reference

Gets data from a data stream sink, and then fetches the "nearest" video for each data fetched. More...

List of all members.

Public Member Functions

boolean connect (String server, String sinkName)
 Connect to the RBNB server with two sinks one for a data stream and one for a coordinated video stream.

void disconnect ()
 Disconnect the RBNB connection.

void fetchData (String dataSourcePath, double startTime, double duration)
 Fetches data according to the values supplied.

void fetchData (String dataSourcePath, double startTime, double duration, String requestType)
 Fetch both the data and the time values for a single channel,.

void makeMovie (float frameRate, String oURL, String videoSourcePath, int dataItemsToSkip) throws Exception
 Make a movie (extension *.mov) of the images that corresond to the times currently in the time array (from the last data fetch).

int getNumberOfItems ()
 Returns the number of items fetched by the last fetch request.

double[] getTimeArray ()
 Returns the array of times corresponding to the data items fetched.

double[] getDataArray ()
 Returns the arrat of data items.

byte[] getRBNBImage (String videoSourcePath, double videoTime) throws SAPIException
 Get the "nearest" image after the time specified.


Static Public Member Functions

void main (String[] args)
boolean setArgs (String[] args) throws Exception
double getTimeOrDouble (String arg) throws Exception

Static Public Attributes

boolean DEBUG = false

Static Package Functions

 [static initializer]

Package Attributes

double[] dataArray = new double[0]
double[] timeArray = new double[0]
Sink dataSink
Sink videoSink
boolean connected = false
int videoWidth = 480
int videoHeight = 320
byte[] prevImage = (byte[]) null


Detailed Description

Gets data from a data stream sink, and then fetches the "nearest" video for each data fetched.

Author:
Terry E. Weymouth
Version:
Revision
1.9

Definition at line 52 of file DataVideoSink.java.


Member Function Documentation

boolean org.nees.rbnb.DataVideoSink.connect String  server,
String  sinkName
 

Connect to the RBNB server with two sinks one for a data stream and one for a coordinated video stream.

Returns:
boolean connected true when susessfully connected otherwise false

Definition at line 387 of file DataVideoSink.java.

References org.nees.rbnb.DataVideoSink.connect().

Referenced by org.nees.rbnb.DataVideoSink.connect().

void org.nees.rbnb.DataVideoSink.fetchData String  dataSourcePath,
double  startTime,
double  duration,
String  requestType
 

Fetch both the data and the time values for a single channel,.

Parameters:
dataSourcePath (String) the RBNB path to the source for the data itmes
startTime (double) the start time in seconds for the event stream desired
duration (double) the duration in secodns for the event stream desired
fetchType (String) the RBNB fetch type
See also:
the Request method of the RBNB Sink class

Definition at line 430 of file DataVideoSink.java.

void org.nees.rbnb.DataVideoSink.fetchData String  dataSourcePath,
double  startTime,
double  duration
 

Fetches data according to the values supplied.

Parameters:
startTime (double) the start time in seconds for the event stream desired
duration (double) the duration in secodns for the event stream desired

Definition at line 417 of file DataVideoSink.java.

References org.nees.rbnb.DataVideoSink.fetchData().

Referenced by org.nees.rbnb.DataVideoSink.fetchData().

double [] org.nees.rbnb.DataVideoSink.getDataArray  ) 
 

Returns the arrat of data items.

Returns:
double[] dataArray

Definition at line 535 of file DataVideoSink.java.

int org.nees.rbnb.DataVideoSink.getNumberOfItems  ) 
 

Returns the number of items fetched by the last fetch request.

Returns:

Definition at line 519 of file DataVideoSink.java.

byte [] org.nees.rbnb.DataVideoSink.getRBNBImage String  videoSourcePath,
double  videoTime
throws SAPIException
 

Get the "nearest" image after the time specified.

Throws exceptions if the requests times out or if the data is not availavbe.

Parameters:
videoSourcePath (String) the RBNB path of the video source (ie "InterestingVideoSource/Video.jpg")
videoTime (double) the RBNB time stamp to start from
Returns:
byte[] the "nearest" image after the time specified
Exceptions:
SAPIException when the request times out or when request channel is unavailable.

Definition at line 607 of file DataVideoSink.java.

References org.nees.rbnb.DataVideoSink.getRBNBImage().

Referenced by org.nees.rbnb.DataVideoSink.getRBNBImage().

double [] org.nees.rbnb.DataVideoSink.getTimeArray  ) 
 

Returns the array of times corresponding to the data items fetched.

Returns:
double timeArray

Definition at line 527 of file DataVideoSink.java.

void org.nees.rbnb.DataVideoSink.makeMovie float  frameRate,
String  oURL,
String  videoSourcePath,
int  dataItemsToSkip
throws Exception
 

Make a movie (extension *.mov) of the images that corresond to the times currently in the time array (from the last data fetch).

The images for the movie are from the image source specified by videoSourcePath. The movie is written to disk at the file specified by oURL (ie "file:/tmp/movie.mov). The items in TimeArray are treated as time marks for the images, intermitent time items can be skipped, using dataItemsToSkip. To find a image for every time stamp in timeArray, set dataItemsToSkip to zero (0). Setting dataItemsToSkip to 9 would use timeArray[0], timeArray[10], timeArray[20], etc. This throws exceptions when the movie can not be built or written.

Parameters:
frameRate (float) the frame rate, in frames per second
oURL 
videoSourcePath 
dataItemsToSkip 
Exceptions:
Exception 

Definition at line 490 of file DataVideoSink.java.

References org.nees.rbnb.JpegImagesToMovie.createMediaLocator(), org.nees.rbnb.DataVideoSink.makeMovie(), and org.nees.rbnb.JpegImagesToMovie.makeMovieFromPullBufferDataSource().

Referenced by org.nees.rbnb.DataVideoSink.makeMovie().


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