MULTIBODY SIMULATION SOFTWARE - API documentation
Public Member Functions
chrono::ChFunction_Oscilloscope Class Reference

#include <CHfunction_Oscilloscope.h>

Inheritance diagram for chrono::ChFunction_Oscilloscope:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChFunction_Oscilloscope:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void Copy (ChFunction_Oscilloscope *source)
ChFunctionnew_Duplicate ()
int AddLastPoint (double mx, double my)
void Reset ()
std::list< double > & GetPointList ()
double Get_dx ()
void Set_dx (double mdx)
int Get_max_amount ()
void Set_max_amount (int mnum)
double Get_amount ()
double Get_y (double x)
void Extimate_x_range (double &xmin, double &xmax)
int Get_Type ()
void StreamOUT (ChStreamOutAscii &mstream)
void StreamIN (ChStreamInBinary &mstream)
void StreamOUT (ChStreamOutBinary &mstream)

Detailed Description

OSCILLOSCOPE FUNCTION y = interpolation of array of (x,y) data, where (x,y) points must be inserted one after the other, strictly with a fixed dx interval. After a maximum amount of recordable points is reached, the firsts are deleted. Note: differently from ChFunction_Recorder, this 'basic' function does not allow not-uniform dx spacing between points, but may be faster and simplier to use in many cases.


Member Function Documentation

int chrono::ChFunction_Oscilloscope::AddLastPoint ( double  mx,
double  my 
)

Add a point at the head (right side of point array). Note that it is user's responsability to add points which are spaced uniformily (by dx) on the X axis! No checks are done on the correctness of the dx spacing, except that if you enter a point whose mx is less than the mx of the one you previously entered, the array is cleared.

void chrono::ChFunction_Oscilloscope::Extimate_x_range ( double &  xmin,
double &  xmax 
) [virtual]

These functions can be used to implement automatic zooming on the most representative range of function (if GUI is implemented)

Reimplemented from chrono::ChFunction.

int chrono::ChFunction_Oscilloscope::Get_max_amount ( )

Get the maximum amount of points which can be entered (after this, the first one will be deleted, as in a FIFO)

int chrono::ChFunction_Oscilloscope::Get_Type ( ) [virtual]

Each class inherited from the ChFunction class must return an unique integer identifier with the virtual function Get_type(). This is useful for fast run-time downcasting etc.

Reimplemented from chrono::ChFunction.

double chrono::ChFunction_Oscilloscope::Get_y ( double  x) [virtual]

Returns the y value of the function, at position x. (For this base class, it will be a constant value y=C).

Implements chrono::ChFunction.

void chrono::ChFunction_Oscilloscope::Set_max_amount ( int  mnum)

Set the maximum amount of points which can be entered (after this, the first one will be deleted, as in a FIFO)

void chrono::ChFunction_Oscilloscope::StreamIN ( ChStreamInBinary mstream) [virtual]

Method to allow deserializing a persistent binary archive (ex: a file) into transient data.

Reimplemented from chrono::ChFunction.

void chrono::ChFunction_Oscilloscope::StreamOUT ( ChStreamOutAscii mstream) [virtual]

Method to allow serialization of transient data in ascii, as a readable item, for example "chrono::GetLog() << myobject;"

Reimplemented from chrono::ChFunction.

void chrono::ChFunction_Oscilloscope::StreamOUT ( ChStreamOutBinary mstream) [virtual]

Method to allow serializing transient data into a persistent binary archive (ex: a file).

Reimplemented from chrono::ChFunction.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on Tue Jul 10 2012 by Doxygen