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

#include <FiDACFile.H>

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

Public Member Functions

 FiDACFile (const char *devicename=NULL, Endianness format=LittleEndian)
 
virtual ~FiDACFile ()
 
virtual size_t getValueCount () const
 
virtual void getValueRange (double &min, double &max) const
 
virtual double getXAxisOrigin () const
 
virtual double getValue (double x, int=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=0.0, double maxX=-1.0, int=0)
 
virtual void setValue (double x, double y)
 
virtual bool setData (const std::vector< double > &x, const std::vector< double > &y)
 
- 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 bool getChannelList (std::vector< std::string > &)
 
virtual bool isChannelPresentInFile (int)
 
virtual int isChannelPresentInFile (const std::string &)
 
virtual void setTimeSpan (double)
 
virtual void setPrecision (int)
 
virtual void getData (std::vector< double > &x, std::vector< double > &y, const std::string &, double minX=0.0, double maxX=-1.0)
 
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 setDescription (const std::string &)
 
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)
 
void updateStatistics (double val)
 
- 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)
 

Protected Attributes

unsigned long myNumDatavals
 
double myXaxisOrigin
 
double myFirstReadValue
 
double myLastXVal
 
double myLastYVal
 
double myMean
 
double myMS
 
double myMaxVal
 
double myMinVal
 
unsigned long maxPos
 
unsigned long minPos
 
- Protected Attributes inherited from FiDeviceFunctionBase
FT_FILE myFile
 
std::string myParent
 
std::string myDatasetDevice
 
Endianness myOutputEndian
 
Endianness myInputEndian
 
double myStep
 
std::map< int, axisInfomyAxisInfo
 

Private Member Functions

double getValueAt (unsigned long pos)
 
float readFloat (int pos)
 
short readInt16 (int pos)
 
int readInt32 (int pos)
 
std::string readString (int start, int end, int startOffset=0, int endoffset=0)
 
void writeFloat (int pos, float val)
 
void writeInt16 (int pos, int val)
 
void writeInt32 (int pos, int val)
 
int writeString (int start, int end, const std::string &val, int startOffset=0, int endoffset=0)
 

Private Attributes

bool isDataWriteInited
 

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 }
 
- Static Protected Attributes inherited from FiDeviceFunctionBase
static Endianness myMachineEndian
 

Constructor & Destructor Documentation

◆ FiDACFile()

FiDACFile::FiDACFile ( const char *  devicename = NULL,
Endianness  format = LittleEndian 
)

◆ ~FiDACFile()

virtual FiDACFile::~FiDACFile ( )
inlinevirtual

Member Function Documentation

◆ concludingDeviceWrite()

bool FiDACFile::concludingDeviceWrite ( bool  )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ getRawData()

void FiDACFile::getRawData ( std::vector< double > &  x,
std::vector< double > &  y,
double  minX = 0.0,
double  maxX = -1.0,
int  = 0 
)
virtual

Implements FiDeviceFunctionBase.

◆ getValue()

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

Implements FiDeviceFunctionBase.

◆ getValueAt()

double FiDACFile::getValueAt ( unsigned long  pos)
private

◆ getValueCount()

virtual size_t FiDACFile::getValueCount ( ) const
inlinevirtual

Implements FiDeviceFunctionBase.

◆ getValueRange()

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

Reimplemented from FiDeviceFunctionBase.

◆ getValues()

bool FiDACFile::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.

◆ getXAxisOrigin()

virtual double FiDACFile::getXAxisOrigin ( ) const
inlinevirtual

Reimplemented from FiDeviceFunctionBase.

◆ initialDeviceRead()

bool FiDACFile::initialDeviceRead ( )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ preliminaryDeviceWrite()

bool FiDACFile::preliminaryDeviceWrite ( )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ readFloat()

float FiDACFile::readFloat ( int  pos)
private

◆ readInt16()

short FiDACFile::readInt16 ( int  pos)
private

◆ readInt32()

int FiDACFile::readInt32 ( int  pos)
private

◆ readString()

std::string FiDACFile::readString ( int  start,
int  end,
int  startOffset = 0,
int  endoffset = 0 
)
private

◆ setData()

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

Implements FiDeviceFunctionBase.

◆ setValue()

void FiDACFile::setValue ( double  x,
double  y 
)
virtual

Implements FiDeviceFunctionBase.

◆ updateStatistics()

void FiDACFile::updateStatistics ( double  val)
protected

◆ writeFloat()

void FiDACFile::writeFloat ( int  pos,
float  val 
)
private

◆ writeInt16()

void FiDACFile::writeInt16 ( int  pos,
int  val 
)
private

◆ writeInt32()

void FiDACFile::writeInt32 ( int  pos,
int  val 
)
private

◆ writeString()

int FiDACFile::writeString ( int  start,
int  end,
const std::string &  val,
int  startOffset = 0,
int  endoffset = 0 
)
private

Member Data Documentation

◆ isDataWriteInited

bool FiDACFile::isDataWriteInited
private

◆ maxPos

unsigned long FiDACFile::maxPos
protected

◆ minPos

unsigned long FiDACFile::minPos
protected

◆ myFirstReadValue

double FiDACFile::myFirstReadValue
protected

◆ myLastXVal

double FiDACFile::myLastXVal
protected

◆ myLastYVal

double FiDACFile::myLastYVal
protected

◆ myMaxVal

double FiDACFile::myMaxVal
protected

◆ myMean

double FiDACFile::myMean
protected

◆ myMinVal

double FiDACFile::myMinVal
protected

◆ myMS

double FiDACFile::myMS
protected

◆ myNumDatavals

unsigned long FiDACFile::myNumDatavals
protected

◆ myXaxisOrigin

double FiDACFile::myXaxisOrigin
protected

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