Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdAnalysis Class Reference

An abstract class for specifying the interface for an analysis plugin. More...

#include <rdAnalysis.h>

Inheritance diagram for rdAnalysis:

suActuation suActuatorGeneralizedForces suBodyKinematics suContact suDecomp suGeneralizedForces suIndAcc suKinematics suPointKinematics List of all members.

Public Member Functions

 rdAnalysis (rdModel *aModel)
 Default constructor.

virtual ~rdAnalysis ()
 Destructor.

void setInDegrees (bool aTrueFalse)
 Set whether or not to write the output of angles in degrees.

bool getInDegrees () const
 Get whether or not output of angles will be in degrees or radians.

void setOn (bool aTrueFalse)
 Turn this analysis on or off.

bool getOn () const
 Get whether or not this analysis is on.

void setName (const char *aName)
 Set the name of this analysis.

const char * getName () const
 Get the name of this analysis.

void setDescription (const char *aDescrip)
 Set the description of this analysis.

const char * getDescription () const
 Get the description of this analysis.

void setColumnLabels (const char *aLabels)
 Set the column labels for this analysis.

const char * getColumnLabels () const
 Get the columns labels of this analysis.

void setStorageInterval (int aInterval)
 Set the storage interval.

int getStorageInterval () const
 Get the storage interval.

rdModelgetModel () const
 Get a pointer to the model on which this analysis is being performed.

virtual bool proceed (int aStep=0)
 Return whether or not to proceed with this analysis.

virtual int begin (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the beginning of an analysis so that any necessary initializations may be performed.

virtual int analyze (double *aXPrev, double *aYPrev, int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called to perform the analysis.

virtual int end (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the end of an analysis so that any necessary finalizations may be performed.

virtual int printResults (char *aBaseName, char *aDir=NULL, double aDT=-1.0, char *aExtension=".sto")
 Print the results of the analysis.


Static Public Attributes

const int NAME_LENGTH = rdAnalysis_NAME_LENGTH
const int DESCRIP_LENGTH = rdAnalysis_DESCRIP_LENGTH

Protected Attributes

bool _inDegrees
 Whether or not to write output of angles in degrees.

bool _on
 On or Off flag.

char _name [rdAnalysis_NAME_LENGTH]
 Name.

char _descrip [rdAnalysis_DESCRIP_LENGTH]
 Description.

char _labels [rdAnalysis_DESCRIP_LENGTH]
 Column labels.

rdModel_model
 Model.

int _storageInterval
 Step interval at which analysis results are stored.


Detailed Description

An abstract class for specifying the interface for an analysis plugin.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

rdAnalysis::rdAnalysis rdModel aModel  ) 
 

Default constructor.

Parameters:
aModel Model on which the analysis is to be performed.


Member Function Documentation

int rdAnalysis::analyze double *  aXPrev,
double *  aYPrev,
int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[virtual]
 

This method is called to perform the analysis.

It can be called during the execution of a forward integrations or after the integration by feeding it the necessary data.

When called during an integration, this method is meant to be called in rdModel::integStepCallback(), which has the same argument list.

This method should be overriden in derived classes. It is included here so that the derived class will not have to implement it if it is not necessary.

Parameters:
aXPrev Controls at the beginining of the current time step.
aYPrev States at the beginning of the current time step.
aStep Step number of the integration.
aDT Size of the time step that was just taken.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented in suActuation, suActuatorGeneralizedForces, suBodyKinematics, suContact, suDecomp, suGeneralizedForces, suKinematics, and suPointKinematics.

int rdAnalysis::begin int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[virtual]
 

This method is called at the beginning of an analysis so that any necessary initializations may be performed.

This method is meant to be called at the begining of an integration in rdModel::integBeginCallback() and has the same argument list.

This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.

Parameters:
aStep Step number of the integration.
aDT Size of the time step that will be attempted.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented in suActuation, suActuatorGeneralizedForces, suBodyKinematics, suContact, suDecomp, suDecompTaylor, suGeneralizedForces, suKinematics, and suPointKinematics.

int rdAnalysis::end int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[virtual]
 

This method is called at the end of an analysis so that any necessary finalizations may be performed.

This method is meant to be called at the end of an integration in rdModel::integEndCallback() and has the same argument list.

This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.

Parameters:
aStep Step number of the integration.
aDT Size of the time step that was just completed.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented in suActuation, suActuatorGeneralizedForces, suBodyKinematics, suContact, suDecomp, suGeneralizedForces, suKinematics, and suPointKinematics.

const char * rdAnalysis::getColumnLabels  )  const
 

Get the columns labels of this analysis.

Returns:
Labels for this analysis.

const char * rdAnalysis::getDescription  )  const
 

Get the description of this analysis.

Returns:
Description of this analysis.

bool rdAnalysis::getInDegrees  )  const
 

Get whether or not output of angles will be in degrees or radians.

Returns:
"true" if the output will be in degrees, "false" in radians.

rdModel * rdAnalysis::getModel  )  const
 

Get a pointer to the model on which this analysis is being performed.

Returns:
Pointer to the model.

const char * rdAnalysis::getName  )  const
 

Get the name of this analysis.

Returns:
Name of this analysis.

bool rdAnalysis::getOn  )  const
 

Get whether or not this analysis is on.

Returns:
True if on, false if off.

int rdAnalysis::printResults char *  aBaseName,
char *  aDir = NULL,
double  aDT = -1.0,
char *  aExtension = ".sto"
[virtual]
 

Print the results of the analysis.

Parameters:
aFileName File to which to print the data.
aDT Time interval between results (linear interpolation is used). If not included as an argument or negative, all time steps are printed without interpolation.
Returns:
-1 on error, 0 otherwise.

Reimplemented in suActuation, suActuatorGeneralizedForces, suBodyIndAcc, suBodyIndAccCOM, suBodyIndPowers, suBodyKinematics, suBodyPointIndAcc, suContact, suDecomp, suGeneralizedForces, suIndAcc, suIndContactPowers, suKinematics, and suPointKinematics.

bool rdAnalysis::proceed int  aStep = 0  )  [virtual]
 

Return whether or not to proceed with this analysis.

Returns:
True or False.

void rdAnalysis::setColumnLabels const char *  aLabels  ) 
 

Set the column labels for this analysis.

The length of the column labels string should be 8191 characters or shorter.

Parameters:
aLabels String of tab delimited labels.

void rdAnalysis::setDescription const char *  aDescrip  ) 
 

Set the description of this analysis.

The length of the description should be 8191 characters or shorter.

Parameters:
aDescrip Description.

void rdAnalysis::setInDegrees bool  aTrueFalse  ) 
 

Set whether or not to write the output of angles in degrees.

This flag must be set before an analysis is performed to ensure that the results are in the proper format.

Parameters:
aTureFalse Output will be in degrees if "true" and in radians if "false".

void rdAnalysis::setName const char *  aName  ) 
 

Set the name of this analysis.

The length of the name should be 2047 characters or shorter.

Parameters:
aName Name of this analysis.

void rdAnalysis::setOn bool  aTrueFalse  ) 
 

Turn this analysis on or off.

Parameters:
aTureFalse Turns analysis on if "true" and off if "false".


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:09 2003 for Simulation Software by doxygen1.3