loads a data file into memory More...
#include <dataFile.h>
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 > |
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.
camp_utilities.h, campAnalysis.cpp, campVIRTTEXAnalysis.cpp, hmi04.cpp, hmi04_utilities.cpp, and hmi04_utilities.h.
dataFile::dataFile | ( | std::string & | fileName, | |
dataFrame & | df, | |||
double | Ts, | |||
int | flags | |||
) |
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
dataFile data(dataFileName,nadsCampFrame,Ts,dataFile::LittleEndian);
fileNotOpened | if the data file cannot be opened for reading |
double dataFile::getSampleTime | ( | void | ) | const [inline] |
return sample time associated with data file
const int dataFile::BigEndian = 0x01 [static] |
flag for data generated on Motorola-style processors
const int dataFile::LittleEndian = 0x02 [static] |
flag for data generated on Intel-style processors