defines a data 'record' as a vector of dataDef objects More...
#include <dataFrame.h>
Inherits std::vector< dataDef >.
Public Member Functions | |
dataFrame (std::string fileName) | |
dataDef & | findName (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) |
defines a data 'record' as a vector of dataDef objects
type name;
type name[nelem];
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. float CFS_Accelerator_Pedal_Position; short CFS_Auto_Transmission_Mode; float MIF_Head_Point_Angular_Velocities[3]; char SCC_DynObj_Name[640];
nelem=1
). campAnalysis.cpp, campVIRTTEXAnalysis.cpp, hmi04.cpp, and hmi04.h.
dataFrame::dataFrame | ( | std::string | fileName | ) |
constructor for dataFrame objects. fileName must refer to an existing file with an extension of either ".dfm" or ".hdr".
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);
varName | variable name |
unsigned int dataFrame::get_frameSize | ( | ) | [inline] |
returns the number of bytes in a dataFrame