SourceForge.net Logo timeSeries: timeSeries Class Library

dataFile Class Reference
[Data management]

loads a data file into memory More...

#include <dataFile.h>

Collaboration diagram for dataFile:
Collaboration graph
[legend]

List of all members.

Classes

class  dataInputExceptions
 exceptions thrown by the dataFile class More...
class  fileNotOpened
 exception thrown when a data file cannot be opened More...

Public Member Functions

 dataFile (std::string &fileName, dataFrame &df, double Ts, int flags)
double getSampleTime (void) const

Static Public Attributes

static const int BigEndian = 0x01
static const int LittleEndian = 0x02

Friends

class timeSeries< float >
class timeSeries< double >
class timeSeries< short >
class timeSeries< int >
class timeSeries< char >
class timeSeriesArray< float >
class timeSeriesArray< double >
class timeSeriesArray< short >
class timeSeriesArray< int >
class timeSeriesArray< char >

Detailed Description

loads a data file into memory

The dataFile class represents the contents of a simulation data file. It is assumed that such a file consists of data which is evenly spaced in time. For each instant of time there is a corresponding set of data called a dataFrame (defined in dataFrame.h). Each dataFrame consists of data items which are described by the dataDef class (also defined in dataFrame.h).

The dataFile class uses a dataFrame object and the data sampling time to construct a representation of the data from an existing data file. Currently, only binary data files are supported.

dataFile objects provide no mechanism for accessing the data itself. To gain access to the data items contained in a dataFile, the user must create a timeSeries or timeSeriesArray object.

Examples:

camp_utilities.h, campAnalysis.cpp, campVIRTTEXAnalysis.cpp, hmi04.cpp, hmi04_utilities.cpp, and hmi04_utilities.h.


Constructor & Destructor Documentation

dataFile::dataFile ( std::string &  fileName,
dataFrame df,
double  Ts,
int  flags 
)
Parameters:
fileName a std::string containing the name of an existing file
df a dataFrame object that defines the sequence of data items that make up a single record
Ts The sample time of the data in seconds
flags an integer containing flags associated with the data file. Currently the only flags defined are BigEndian or LittleEndian which allow the user to specify the byte ordering associated with the data.

Constructor for the dataFile class

Example:
dataFile data(dataFileName,nadsCampFrame,Ts,dataFile::LittleEndian);
Exceptions:
fileNotOpened if the data file cannot be opened for reading

Member Function Documentation

double dataFile::getSampleTime ( void   )  const [inline]

return sample time associated with data file

Returns:
return a double containing the sample time

Member Data Documentation

const int dataFile::BigEndian = 0x01 [static]

flag for data generated on Motorola-style processors

Examples:
campVIRTTEXAnalysis.cpp, and hmi04.cpp.
const int dataFile::LittleEndian = 0x02 [static]

flag for data generated on Intel-style processors

Examples:
campAnalysis.cpp.
Generated on Tue Mar 16 15:10:52 2010 for timeSeries by  doxygen 1.6.3