FEDEM Solver  R8.0
Source code of the dynamics solver
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FiRPC3File Class Reference

#include <FiRPC3File.H>

Inheritance diagram for FiRPC3File:
Inheritance graph
[legend]
Collaboration diagram for FiRPC3File:
Collaboration graph
[legend]

Classes

struct  chParams
 

Public Member Functions

 FiRPC3File ()
 
 FiRPC3File (const char *devicename=0)
 
 FiRPC3File (const char *devicename, int endianFormat)
 
 FiRPC3File (const char *devicename, int endianFormat, int numberOfChannels)
 
virtual ~FiRPC3File ()
 
virtual size_t getValueCount () const
 
virtual void getValueRange (double &min, double &max) const
 
virtual double getValue (double x, int channel=0, bool zeroAdjust=false, double vertShift=0.0, double scaleFac=1.0)
 
virtual bool getValues (double x0, double x1, std::vector< double > &x, std::vector< double > &y, int channel=0, bool zeroAdjust=false, double shift=0.0, double scale=1.0)
 
virtual void getRawData (std::vector< double > &x, std::vector< double > &y, double minX, double maxX, int channel=0)
 
virtual void getData (std::vector< double > &x, std::vector< double > &y, const std::string &channel, double minX=0.0, double maxX=-1.0)
 
virtual void setValue (double, double)
 
virtual bool setData (const std::vector< double > &x, const std::vector< double > &y)
 
virtual bool getChannelList (std::vector< std::string > &list)
 
virtual int isChannelPresentInFile (const std::string &channel)
 
virtual bool isChannelPresentInFile (int channel)
 
virtual void setDescription (const std::string &desc)
 
virtual void setTimeSpan (double timeSpan)
 
virtual void setPrecision (int type)
 
int getRepeats () const
 
void setRepeats (int rep)
 
int getAverages () const
 
void setAverages (int avg)
 
int getFramePoints () const
 
void setFramePoints (int frm)
 
int getGroupPoints () const
 
void setGroupPoints (int grp)
 
- Public Member Functions inherited from FiDeviceFunctionBase
virtual ~FiDeviceFunctionBase ()
 
bool open (const char *devicename, FileStatus status=Read_Only)
 
bool open (FileStatus status=Read_Only)
 
bool close (bool noHeader=false)
 
const std::string & getDevicename () const
 
void setExtrapolationPolicy (InterpolationPolicy policy=Constant)
 
void setInterpolationPolicy (InterpolationPolicy policy=Linear)
 
virtual double getXAxisOrigin () const
 
double integrate (double x, int order=1, int channel=0, double vertShift=0.0, double scaleFac=1.0)
 
int getRefCount () const
 
int ref ()
 
int unref ()
 
double getStep () const
 
double getFrequency () const
 
void setStep (double aStep)
 
void setFrequency (double aFreqency)
 
virtual void setEmptyChannel (const std::string &)
 
void setParent (const std::string &modelfile)
 
bool isReadOnly () const
 
FileStatus getFileStatus () const
 
void getAxisUnit (int axis, char *unitText, size_t n) const
 
void getAxisTitle (int axis, char *titleText, size_t n) const
 
void setAxisUnit (int axis, const char *unitText)
 
void setAxisTitle (int axis, const char *titleText)
 

Protected Member Functions

virtual bool initialDeviceRead ()
 
virtual bool preliminaryDeviceWrite ()
 
virtual bool concludingDeviceWrite (bool)
 
- Protected Member Functions inherited from FiDeviceFunctionBase
 FiDeviceFunctionBase (const char *devicename=NULL)
 
 FiDeviceFunctionBase (const FiDeviceFunctionBase &)=delete
 
FiDeviceFunctionBaseoperator= (const FiDeviceFunctionBase &)=delete
 
double interpolate (double x, double x0, double f0, double x1, double f1) const
 
double extrapolate (double x, double x0, double f0, double x1, double f1) const
 
bool writeString (const char *str)
 
bool writeString (const char *lab, const std::string &val)
 

Private Types

enum  FileType {
  Time_History , Matrix , Histogram , Regions ,
  Configuration , Fatigue , Road_Surface , Spectral ,
  Start
}
 
enum  TimeType {
  Drive , Response , Mult_Drive , Mult_Resp ,
  Config_Drive , Config_Resp , Peak_pick
}
 
enum  DataType { ShortInt , Float , Double }
 
enum  Action { toRead , toWrite }
 

Private Member Functions

void commonConstructor ()
 
bool readChannelList ()
 
bool initTHChannel (int channel, int action)
 
int getPartition (int channel)
 
void setReadParams (int channel)
 
void setKeyInt (const std::string &key, const int val, const int numb)
 
void setKeyFloat (const std::string &key, const float val, const int numb)
 
void setKeyString (const std::string &key, const std::string &val, const int numb)
 
int getKeyInt (const std::string &key, bool &ok)
 
float getKeyFloat (const std::string &key, bool &ok)
 
std::string getKeyString (const std::string &key, bool &ok)
 
void writeString (const std::string &buf, FT_int pos, bool skipRepos=false)
 
void writeDouble (const double val, FT_int pos, bool skipRepos=false)
 
void writeFloat (const float val, FT_int pos, bool skipRepos=false)
 
void writeInt16 (const short val, FT_int pos, bool skipRepos=false)
 
std::string readString (FT_int pos, bool castToUpperCase=false)
 
double readDouble (FT_int pos, bool asciiField=false)
 
float readFloat (FT_int pos, bool asciiField=false)
 
short readInt16 (FT_int pos, bool asciiField=false)
 
int readInt32 (FT_int pos, bool asciiField=false)
 
void dumpAllKeysToScreen () const
 

Private Attributes

double myMaxVal
 
double myMinVal
 
std::vector< std::string > myKeys
 
std::vector< std::string > myChannels
 
size_t myNumDatavals
 
int myNumHeaderBlocks
 
int myNumPartitions
 
int myNumChannels
 
int myNumGrpPts
 
int myNumFrames
 
int myNumFrmPts
 
int myNumParams
 
int myDataSize
 
bool myHalfFrameUse
 
double myXaxisOrigin
 
double myFirstReadValue
 
FT_int myByteShift
 
FT_int myPartShift
 
int myFileType
 
int myDataType
 
int myDataFormat
 
int myPartition
 
int myRepeats
 
int myAverages
 
int myChannel
 
bool myBypassFilter
 
double myChannelScale
 
double myTimeSpan
 
int myPhysChan
 
std::map< int, chParamsparameters
 
bool swapStringBytes
 
bool stepSet
 
int kInd
 

Additional Inherited Members

- Public Types inherited from FiDeviceFunctionBase
enum  Axis { X =0 , Y =1 }
 
enum  Endianness { LittleEndian , BigEndian }
 
enum  FileFormat { ascii , binary }
 
enum  FileStatus { Not_Loaded =-1 , Not_Open =0 , Read_Only =1 , Write_Only =2 }
 
enum  InterpolationPolicy { Constant , Linear , Previous_Value , Next_Value }
 
- Protected Attributes inherited from FiDeviceFunctionBase
FT_FILE myFile
 
std::string myParent
 
std::string myDatasetDevice
 
Endianness myOutputEndian
 
Endianness myInputEndian
 
double myStep
 
std::map< int, axisInfomyAxisInfo
 
- Static Protected Attributes inherited from FiDeviceFunctionBase
static Endianness myMachineEndian
 

Member Enumeration Documentation

◆ Action

enum FiRPC3File::Action
private
Enumerator
toRead 
toWrite 

◆ DataType

enum FiRPC3File::DataType
private
Enumerator
ShortInt 
Float 
Double 

◆ FileType

enum FiRPC3File::FileType
private
Enumerator
Time_History 
Matrix 
Histogram 
Regions 
Configuration 
Fatigue 
Road_Surface 
Spectral 
Start 

◆ TimeType

enum FiRPC3File::TimeType
private
Enumerator
Drive 
Response 
Mult_Drive 
Mult_Resp 
Config_Drive 
Config_Resp 
Peak_pick 

Constructor & Destructor Documentation

◆ FiRPC3File() [1/4]

FiRPC3File::FiRPC3File ( )

◆ FiRPC3File() [2/4]

FiRPC3File::FiRPC3File ( const char *  devicename = 0)

◆ FiRPC3File() [3/4]

FiRPC3File::FiRPC3File ( const char *  devicename,
int  endianFormat 
)

◆ FiRPC3File() [4/4]

FiRPC3File::FiRPC3File ( const char *  devicename,
int  endianFormat,
int  numberOfChannels 
)

◆ ~FiRPC3File()

virtual FiRPC3File::~FiRPC3File ( )
inlinevirtual

Member Function Documentation

◆ commonConstructor()

void FiRPC3File::commonConstructor ( )
private

◆ concludingDeviceWrite()

bool FiRPC3File::concludingDeviceWrite ( bool  )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ dumpAllKeysToScreen()

void FiRPC3File::dumpAllKeysToScreen ( ) const
private

◆ getAverages()

int FiRPC3File::getAverages ( ) const
inline

◆ getChannelList()

bool FiRPC3File::getChannelList ( std::vector< std::string > &  list)
virtual

Reimplemented from FiDeviceFunctionBase.

◆ getData()

void FiRPC3File::getData ( std::vector< double > &  x,
std::vector< double > &  y,
const std::string &  channel,
double  minX = 0.0,
double  maxX = -1.0 
)
virtual

Reimplemented from FiDeviceFunctionBase.

◆ getFramePoints()

int FiRPC3File::getFramePoints ( ) const
inline

◆ getGroupPoints()

int FiRPC3File::getGroupPoints ( ) const
inline

◆ getKeyFloat()

float FiRPC3File::getKeyFloat ( const std::string &  key,
bool &  ok 
)
private

◆ getKeyInt()

int FiRPC3File::getKeyInt ( const std::string &  key,
bool &  ok 
)
private

◆ getKeyString()

std::string FiRPC3File::getKeyString ( const std::string &  key,
bool &  ok 
)
private

◆ getPartition()

int FiRPC3File::getPartition ( int  channel)
private

◆ getRawData()

void FiRPC3File::getRawData ( std::vector< double > &  x,
std::vector< double > &  y,
double  minX,
double  maxX,
int  channel = 0 
)
virtual

Implements FiDeviceFunctionBase.

◆ getRepeats()

int FiRPC3File::getRepeats ( ) const
inline

◆ getValue()

double FiRPC3File::getValue ( double  x,
int  channel = 0,
bool  zeroAdjust = false,
double  vertShift = 0.0,
double  scaleFac = 1.0 
)
virtual

Implements FiDeviceFunctionBase.

◆ getValueCount()

virtual size_t FiRPC3File::getValueCount ( ) const
inlinevirtual

Implements FiDeviceFunctionBase.

◆ getValueRange()

void FiRPC3File::getValueRange ( double &  min,
double &  max 
) const
virtual

Reimplemented from FiDeviceFunctionBase.

◆ getValues()

bool FiRPC3File::getValues ( double  x0,
double  x1,
std::vector< double > &  x,
std::vector< double > &  y,
int  channel = 0,
bool  zeroAdjust = false,
double  shift = 0.0,
double  scale = 1.0 
)
virtual

Implements FiDeviceFunctionBase.

◆ initialDeviceRead()

bool FiRPC3File::initialDeviceRead ( )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ initTHChannel()

bool FiRPC3File::initTHChannel ( int  channel,
int  action 
)
private

◆ isChannelPresentInFile() [1/2]

int FiRPC3File::isChannelPresentInFile ( const std::string &  channel)
virtual

Reimplemented from FiDeviceFunctionBase.

◆ isChannelPresentInFile() [2/2]

bool FiRPC3File::isChannelPresentInFile ( int  channel)
virtual

Reimplemented from FiDeviceFunctionBase.

◆ preliminaryDeviceWrite()

bool FiRPC3File::preliminaryDeviceWrite ( )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ readChannelList()

bool FiRPC3File::readChannelList ( )
private

◆ readDouble()

double FiRPC3File::readDouble ( FT_int  pos,
bool  asciiField = false 
)
private

◆ readFloat()

float FiRPC3File::readFloat ( FT_int  pos,
bool  asciiField = false 
)
private

◆ readInt16()

short FiRPC3File::readInt16 ( FT_int  pos,
bool  asciiField = false 
)
private

◆ readInt32()

int FiRPC3File::readInt32 ( FT_int  pos,
bool  asciiField = false 
)
private

◆ readString()

std::string FiRPC3File::readString ( FT_int  pos,
bool  castToUpperCase = false 
)
private

◆ setAverages()

void FiRPC3File::setAverages ( int  avg)
inline

◆ setData()

bool FiRPC3File::setData ( const std::vector< double > &  x,
const std::vector< double > &  y 
)
virtual

Implements FiDeviceFunctionBase.

◆ setDescription()

void FiRPC3File::setDescription ( const std::string &  desc)
virtual

Reimplemented from FiDeviceFunctionBase.

◆ setFramePoints()

void FiRPC3File::setFramePoints ( int  frm)
inline

◆ setGroupPoints()

void FiRPC3File::setGroupPoints ( int  grp)
inline

◆ setKeyFloat()

void FiRPC3File::setKeyFloat ( const std::string &  key,
const float  val,
const int  numb 
)
private

◆ setKeyInt()

void FiRPC3File::setKeyInt ( const std::string &  key,
const int  val,
const int  numb 
)
private

◆ setKeyString()

void FiRPC3File::setKeyString ( const std::string &  key,
const std::string &  val,
const int  numb 
)
private

◆ setPrecision()

virtual void FiRPC3File::setPrecision ( int  type)
inlinevirtual

Reimplemented from FiDeviceFunctionBase.

◆ setReadParams()

void FiRPC3File::setReadParams ( int  channel)
private

◆ setRepeats()

void FiRPC3File::setRepeats ( int  rep)
inline

◆ setTimeSpan()

virtual void FiRPC3File::setTimeSpan ( double  timeSpan)
inlinevirtual

Reimplemented from FiDeviceFunctionBase.

◆ setValue()

virtual void FiRPC3File::setValue ( double  ,
double   
)
inlinevirtual

Implements FiDeviceFunctionBase.

◆ writeDouble()

void FiRPC3File::writeDouble ( const double  val,
FT_int  pos,
bool  skipRepos = false 
)
private

◆ writeFloat()

void FiRPC3File::writeFloat ( const float  val,
FT_int  pos,
bool  skipRepos = false 
)
private

◆ writeInt16()

void FiRPC3File::writeInt16 ( const short  val,
FT_int  pos,
bool  skipRepos = false 
)
private

◆ writeString()

void FiRPC3File::writeString ( const std::string &  buf,
FT_int  pos,
bool  skipRepos = false 
)
private

Member Data Documentation

◆ kInd

int FiRPC3File::kInd
private

◆ myAverages

int FiRPC3File::myAverages
private

◆ myBypassFilter

bool FiRPC3File::myBypassFilter
private

◆ myByteShift

FT_int FiRPC3File::myByteShift
private

◆ myChannel

int FiRPC3File::myChannel
private

◆ myChannels

std::vector<std::string> FiRPC3File::myChannels
private

◆ myChannelScale

double FiRPC3File::myChannelScale
private

◆ myDataFormat

int FiRPC3File::myDataFormat
private

◆ myDataSize

int FiRPC3File::myDataSize
private

◆ myDataType

int FiRPC3File::myDataType
private

◆ myFileType

int FiRPC3File::myFileType
private

◆ myFirstReadValue

double FiRPC3File::myFirstReadValue
private

◆ myHalfFrameUse

bool FiRPC3File::myHalfFrameUse
private

◆ myKeys

std::vector<std::string> FiRPC3File::myKeys
private

◆ myMaxVal

double FiRPC3File::myMaxVal
private

◆ myMinVal

double FiRPC3File::myMinVal
private

◆ myNumChannels

int FiRPC3File::myNumChannels
private

◆ myNumDatavals

size_t FiRPC3File::myNumDatavals
private

◆ myNumFrames

int FiRPC3File::myNumFrames
private

◆ myNumFrmPts

int FiRPC3File::myNumFrmPts
private

◆ myNumGrpPts

int FiRPC3File::myNumGrpPts
private

◆ myNumHeaderBlocks

int FiRPC3File::myNumHeaderBlocks
private

◆ myNumParams

int FiRPC3File::myNumParams
private

◆ myNumPartitions

int FiRPC3File::myNumPartitions
private

◆ myPartition

int FiRPC3File::myPartition
private

◆ myPartShift

FT_int FiRPC3File::myPartShift
private

◆ myPhysChan

int FiRPC3File::myPhysChan
private

◆ myRepeats

int FiRPC3File::myRepeats
private

◆ myTimeSpan

double FiRPC3File::myTimeSpan
private

◆ myXaxisOrigin

double FiRPC3File::myXaxisOrigin
private

◆ parameters

std::map<int,chParams> FiRPC3File::parameters
private

◆ stepSet

bool FiRPC3File::stepSet
private

◆ swapStringBytes

bool FiRPC3File::swapStringBytes
private

The documentation for this class was generated from the following files: