Simbody  3.7
SimTK::TextDataEventReporter Class Reference

This is an EventReporter which prints out numeric data at regular intervals in tabular form. More...

+ Inheritance diagram for SimTK::TextDataEventReporter:

Classes

class  UserFunction
 This template class defines a standard interface for objects that calculate a function based on a System and State for use in a TextDataEventReporter. More...
 

Public Member Functions

 TextDataEventReporter (const System &system, UserFunction< Real > *function, Real reportInterval)
 Create a TextDataEventReporter which calculates a single number at each reporting interval, and displays it along with the time. More...
 
 TextDataEventReporter (const System &system, UserFunction< Vector > *function, Real reportInterval)
 Create a TextDataEventReporter which calculates a vector of numbers at each reporting interval, and displays them along with the time. More...
 
 ~TextDataEventReporter ()
 The destructor will take care of deleting the UserFunction object; don't delete it yourself. More...
 
void handleEvent (const State &state) const override
 This is the implementation of the EventReporter virtual. More...
 
- Public Member Functions inherited from SimTK::PeriodicEventReporter
 ~PeriodicEventReporter ()
 
Real getNextEventTime (const State &state, bool includeCurrentTime) const override
 Get the next time at which an event will occur. More...
 
 PeriodicEventReporter (Real eventInterval)
 Create a PeriodicEventReporter. More...
 
Real getEventInterval () const
 Get the time interval at which events occur. More...
 
void setEventInterval (Real eventInterval)
 Set the time interval at which events occur. More...
 
- Public Member Functions inherited from SimTK::ScheduledEventReporter
virtual ~ScheduledEventReporter ()
 
- Public Member Functions inherited from SimTK::EventReporter
virtual ~EventReporter ()
 

Protected Member Functions

const TextDataEventReporterRep & getRep () const
 
TextDataEventReporterRep & updRep () const
 

Protected Attributes

TextDataEventReporterRep * rep
 

Detailed Description

This is an EventReporter which prints out numeric data at regular intervals in tabular form.

You provide it with a UserFunction, which calculates the values to be reported. At every reporting interval, it invokes the UserFunction, then prints out the current time along with the value or values returned by the function.

After creating a TextDataEventReporter, add it to the System by calling the addEventReporter() method.

Constructor & Destructor Documentation

◆ TextDataEventReporter() [1/2]

SimTK::TextDataEventReporter::TextDataEventReporter ( const System system,
UserFunction< Real > *  function,
Real  reportInterval 
)

Create a TextDataEventReporter which calculates a single number at each reporting interval, and displays it along with the time.

Takes ownership of the UserFunction object.

◆ TextDataEventReporter() [2/2]

SimTK::TextDataEventReporter::TextDataEventReporter ( const System system,
UserFunction< Vector > *  function,
Real  reportInterval 
)

Create a TextDataEventReporter which calculates a vector of numbers at each reporting interval, and displays them along with the time.

Takes ownership of the UserFunction object.

◆ ~TextDataEventReporter()

SimTK::TextDataEventReporter::~TextDataEventReporter ( )

The destructor will take care of deleting the UserFunction object; don't delete it yourself.

Member Function Documentation

◆ handleEvent()

void SimTK::TextDataEventReporter::handleEvent ( const State state) const
overridevirtual

This is the implementation of the EventReporter virtual.

Implements SimTK::EventReporter.

◆ getRep()

const TextDataEventReporterRep& SimTK::TextDataEventReporter::getRep ( ) const
inlineprotected

◆ updRep()

TextDataEventReporterRep& SimTK::TextDataEventReporter::updRep ( ) const
inlineprotected

Member Data Documentation

◆ rep

TextDataEventReporterRep* SimTK::TextDataEventReporter::rep
protected

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