Public Member Functions

cl.utfsm.samplingSystemUI.SamplingDataCorrelator Class Reference

List of all members.

Public Member Functions

 SamplingDataCorrelator (String group, long frequency, Date startTimestamp)
void addSamplingSet (String filename)
void dumpToFile ()
void dumpToFile (double prec)
boolean consume ()
String getFilename ()

Detailed Description

This class correlates various sampling sets through time, and outputs them in a nicely csv file.

This class takes various Sampling Data file outputs, which are passed through the addSamplingSet method. Once finished adding Sampling Set, just call the dumpToFile method, and the data will be correlated. Please notice that the usage of memory is minimal and has to be kept whis way.

Author:
Arturo Hoffstadt Urrutia <ahoffsta@inf.utfsm.cl>

Constructor & Destructor Documentation

cl.utfsm.samplingSystemUI.SamplingDataCorrelator.SamplingDataCorrelator ( String  group,
long  frequency,
Date  startTimestamp 
)

Default constructor, takes the parameters, stores them, and creates the filename.

Parameters:
group The name of the Sampling Group to which the data belongs to.
frequency The Frequency at which the data was sampled.
startTimestamp At which time that sampling process started.

Member Function Documentation

void cl.utfsm.samplingSystemUI.SamplingDataCorrelator.addSamplingSet ( String  filename  ) 

Registers a Sampling Set, and read the first line, obtaining the component and the property which sampled.

Parameters:
filaname Name of the file in which the data for this Sampling Set was dumped.
boolean cl.utfsm.samplingSystemUI.SamplingDataCorrelator.consume (  ) 

Method that consumes one line on every cvs file, storing them on memory.

Returns:
True in case that there remains lines to be consumed, and false in case that no lines remain in every file.

Referenced by cl.utfsm.samplingSystemUI.SamplingDataCorrelator.dumpToFile().

void cl.utfsm.samplingSystemUI.SamplingDataCorrelator.dumpToFile (  ) 

Start the Correlation and Dumping to File process.

void cl.utfsm.samplingSystemUI.SamplingDataCorrelator.dumpToFile ( double  prec  ) 

Starts the correlation process. This method should only be called if you know what you are doing.
Setting the prec lower or higher will get you leaks of data.

Parameters:
prec How much of the Frequency will each entry take as a valid interval of time to look forward and backward for data.

References cl.utfsm.samplingSystemUI.SamplingDataCorrelator.consume(), cl.utfsm.samplingSystemUI.core.DataItem.getTime(), and cl.utfsm.samplingSystemUI.core.DataItem.getValue().

String cl.utfsm.samplingSystemUI.SamplingDataCorrelator.getFilename (  ) 

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties