SourceForge.net Logo timeSeries: timeSeries Class Library

dataFrame Class Reference
[Data management]

defines a data 'record' as a vector of dataDef objects More...

#include <dataFrame.h>

Inherits std::vector< dataDef >.

List of all members.

Public Member Functions

 dataFrame (std::string fileName)
dataDeffindName (std::string varName)
 find a dataDef based on a variable name
unsigned int get_frameSize ()

Friends

class dataFile
std::ostream & operator<< (std::ostream &os, dataFrame &df)

Detailed Description

defines a data 'record' as a vector of dataDef objects

Overview
A dataFrame is constructed from an existing data file that must be in a supported format. Currently, there are two formats that dataFrame recognizes: dfm files and hdr files.
A dfm file is a general data defintion format. The file syntax mimics that of a C/C++ declarator:
    type    name;
or
    type    name[nelem];
where type is one of char, short, int, float or double and name is a text string that defines that name of the field. Name cannot contain whitespace. nelem is an integer defining the number of data elements that make up the field.
Fields are listed in the order that they appear in the data file.
Example:
    float CFS_Accelerator_Pedal_Position;
    short CFS_Auto_Transmission_Mode;
    float MIF_Head_Point_Angular_Velocities[3];
    char  SCC_DynObj_Name[640];
The hdr format is the traditional VIRTTEX post-processing file header format. The VIRTTEX data files are a special case of the more general dfm format where all fields are of type float and are scalars (i.e. nelem=1).
Examples:

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


Constructor & Destructor Documentation

dataFrame::dataFrame ( std::string  fileName  ) 

constructor for dataFrame objects. fileName must refer to an existing file with an extension of either ".dfm" or ".hdr".


Member Function Documentation

dataDef & dataFrame::findName ( std::string  varName  ) 

find a dataDef based on a variable name

This method is used to retreive a dataDef based on a variable name. Typically used when constructing a timeSeries or timeSeriesArray from a dataFile object:

timeSeries< float > throttle(nadsCampFrame.findName("CFS_Accelerator_Pedal_Position"),data);
Parameters:
varName variable name
Examples:
campAnalysis.cpp, and hmi04.cpp.
unsigned int dataFrame::get_frameSize (  )  [inline]

returns the number of bytes in a dataFrame


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
dataFrame df 
) [friend]

an output operator that writes a dataFrame to an output stream. Useful for debugging

Generated on Tue Mar 16 15:10:52 2010 for timeSeries by  doxygen 1.6.3