![]() |
VR-Forces 4.0.4 Class Documentation
|
Public Types | |
| typedef std::vector < DtSimulationAddress > | DtFrameRateRequesters |
| typedef DtFrameRateRequesters::iterator | DtFrameRateRequestersIter |
| typedef DtFrameRateRequesters::const_iterator | DtFrameRateRequestersConstIter |
Public Member Functions | |
| DtFrameRateMonitor () | |
| Default constructor; note that if this form is used and a sim manager is not set, reports will not be sent (but console output can still be generated.) | |
| DtFrameRateMonitor (DtSimManager *simManager) | |
| standard constructor | |
| DtFrameRateMonitor (const DtFrameRateMonitor &orig) | |
| copy constructor; report timer is currently not copied. | |
| const DtFrameRateMonitor & | operator= (const DtFrameRateMonitor &orig) |
| assignment operator; see copy constructor above. | |
| virtual bool | init () |
| Calls register callbacks. | |
| virtual void | setSimManager (DtSimManager *simManager) |
| If the default constructor was used, you can supply a sim manager later; however, if you do, you must also call registerInterfaceCallbacks(). | |
| virtual bool | registerInterfaceCallbacks () |
| virtual double | meanFrameRate () |
| virtual double | medianFrameRate () |
| virtual double | standardDeviationFrameRate () |
| virtual double | minimumFrameRate () |
| virtual double | maximumFrameRate () |
| virtual double | simTimeToRealTimeRatio () |
| virtual void | addSample (double frameTime) |
| If the frameTime is > 0, it calculates the current frame rate as 1/frameTime. | |
| virtual double | lastSample () const |
| virtual void | reset (bool sendReport=false) |
| Clear out the array of frame rates and start over. | |
| virtual void | setNumberOfFramesToAverage (unsigned int numFramesToAverage) |
| Can also be set in a frameRateRequestMessage. A zero turns off averaging. | |
| virtual unsigned int | numberOfFramesToAverage () |
| virtual void | setReportMean (bool reportMean) |
| virtual bool | reportMean () const |
| virtual void | setReportMedian (bool reportMedian) |
| virtual bool | reportMedian () const |
| virtual void | setReportStandardDeviation (bool reportStandardDeviation) |
| virtual bool | reportStandardDeviation () const |
| virtual void | setReportMinimum (bool reportMinimum) |
| virtual bool | reportMinimum () const |
| virtual void | setReportMaximum (bool reportMaximum) |
| virtual bool | reportMaximum () const |
| virtual void | setReportToConsole (bool reportToConsole) |
| virtual bool | reportToConsole () const |
| virtual void | setReportSimTimeToRealTimeRatio (bool reportSimTimeToRealTimeRatio) |
| virtual bool | reportSimTimeToRealTimeRatio () const |
| virtual void | processFrameRateRequestMessage (DtSimInterfaceMessage *message) |
| handles requests | |
| virtual void | generateReport () |
| Send report to requester. | |
| virtual void | pause () |
| When paused, will not add samples to the. | |
| virtual void | resume () |
| virtual bool | isPaused () const |
| When paused, will not add samples to the. | |
| virtual | ~DtFrameRateMonitor () |
| destructor | |
Static Public Member Functions | |
| static void | frameRateRequestCallback (DtSimMessage *msg, void *usr) |
| static void | reportTimerCallback (DtTimer *timer) |
Protected Member Functions | |
| virtual void | removeTimer () |
| virtual void | setTimer (double period) |
Protected Attributes | |
| double | myCurrentFrameRate |
| If not currently averaging, this is returned for mean or median requests set by tick. | |
| bool | myReportMeanFlag |
| The values of these will determine what gets put into a report. | |
| bool | myReportMedianFlag |
| bool | myReportStandardDeviationFlag |
| bool | myReportMinimumFlag |
| bool | myReportMaximumFlag |
| bool | myReportToConsoleFlag |
| bool | myReportSimTimeToRealTimeRatioFlag |
| DtAverager | myAverager |
| DtSimManager * | mySimManager |
| DtPeriodicTimer * | myReportTimer |
| double | myCurrentResponsePeriod |
| DtTime | myLastReportTimerCbSimTime |
| DtTime | myLastReportTimerCbRealTime |
| DtTime | mySimTimeRealTimeRatio |
| DtFrameRateRequesters | myRequesters |
| Contains simulation addresses of everyone who has requested reports. | |
Private Attributes | |
| bool | myIsPaused |
| When paused, the frame rate logger will ignore any specified samples. | |
| typedef std::vector<DtSimulationAddress> DtFrameRateMonitor::DtFrameRateRequesters |
| typedef DtFrameRateRequesters::iterator DtFrameRateMonitor::DtFrameRateRequestersIter |
| typedef DtFrameRateRequesters::const_iterator DtFrameRateMonitor::DtFrameRateRequestersConstIter |
Default constructor; note that if this form is used and a sim manager is not set, reports will not be sent (but console output can still be generated.)
| DtFrameRateMonitor::DtFrameRateMonitor | ( | DtSimManager * | simManager | ) |
standard constructor
| DtFrameRateMonitor::DtFrameRateMonitor | ( | const DtFrameRateMonitor & | orig | ) |
copy constructor; report timer is currently not copied.
| virtual DtFrameRateMonitor::~DtFrameRateMonitor | ( | ) | [virtual] |
destructor
| const DtFrameRateMonitor& DtFrameRateMonitor::operator= | ( | const DtFrameRateMonitor & | orig | ) |
assignment operator; see copy constructor above.
| virtual bool DtFrameRateMonitor::init | ( | ) | [virtual] |
Calls register callbacks.
| virtual void DtFrameRateMonitor::setSimManager | ( | DtSimManager * | simManager | ) | [virtual] |
If the default constructor was used, you can supply a sim manager later; however, if you do, you must also call registerInterfaceCallbacks().
| virtual bool DtFrameRateMonitor::registerInterfaceCallbacks | ( | ) | [virtual] |
| virtual double DtFrameRateMonitor::meanFrameRate | ( | ) | [virtual] |
| virtual double DtFrameRateMonitor::medianFrameRate | ( | ) | [virtual] |
| virtual double DtFrameRateMonitor::standardDeviationFrameRate | ( | ) | [virtual] |
| virtual double DtFrameRateMonitor::minimumFrameRate | ( | ) | [virtual] |
| virtual double DtFrameRateMonitor::maximumFrameRate | ( | ) | [virtual] |
| virtual double DtFrameRateMonitor::simTimeToRealTimeRatio | ( | ) | [virtual] |
| virtual void DtFrameRateMonitor::addSample | ( | double | frameTime | ) | [virtual] |
If the frameTime is > 0, it calculates the current frame rate as 1/frameTime.
Then it adds this frameTime (either 0 or calculated value) to its averager as another sample point.
| virtual double DtFrameRateMonitor::lastSample | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::reset | ( | bool | sendReport = false | ) | [virtual] |
Clear out the array of frame rates and start over.
If sendReport is true, will send out a frame rate report if there are any requestors
| virtual void DtFrameRateMonitor::setNumberOfFramesToAverage | ( | unsigned int | numFramesToAverage | ) | [virtual] |
Can also be set in a frameRateRequestMessage. A zero turns off averaging.
| virtual unsigned int DtFrameRateMonitor::numberOfFramesToAverage | ( | ) | [virtual] |
| virtual void DtFrameRateMonitor::setReportMean | ( | bool | reportMean | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportMean | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::setReportMedian | ( | bool | reportMedian | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportMedian | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::setReportStandardDeviation | ( | bool | reportStandardDeviation | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportStandardDeviation | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::setReportMinimum | ( | bool | reportMinimum | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportMinimum | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::setReportMaximum | ( | bool | reportMaximum | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportMaximum | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::setReportToConsole | ( | bool | reportToConsole | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportToConsole | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::setReportSimTimeToRealTimeRatio | ( | bool | reportSimTimeToRealTimeRatio | ) | [virtual] |
| virtual bool DtFrameRateMonitor::reportSimTimeToRealTimeRatio | ( | ) | const [virtual] |
| virtual void DtFrameRateMonitor::processFrameRateRequestMessage | ( | DtSimInterfaceMessage * | message | ) | [virtual] |
handles requests
| virtual void DtFrameRateMonitor::generateReport | ( | ) | [virtual] |
Send report to requester.
| virtual void DtFrameRateMonitor::pause | ( | ) | [virtual] |
When paused, will not add samples to the.
| virtual void DtFrameRateMonitor::resume | ( | ) | [virtual] |
| virtual bool DtFrameRateMonitor::isPaused | ( | ) | const [virtual] |
When paused, will not add samples to the.
| static void DtFrameRateMonitor::frameRateRequestCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| static void DtFrameRateMonitor::reportTimerCallback | ( | DtTimer * | timer | ) | [static] |
| virtual void DtFrameRateMonitor::removeTimer | ( | ) | [protected, virtual] |
| virtual void DtFrameRateMonitor::setTimer | ( | double | period | ) | [protected, virtual] |
double DtFrameRateMonitor::myCurrentFrameRate [protected] |
If not currently averaging, this is returned for mean or median requests set by tick.
bool DtFrameRateMonitor::myReportMeanFlag [protected] |
The values of these will determine what gets put into a report.
bool DtFrameRateMonitor::myReportMedianFlag [protected] |
bool DtFrameRateMonitor::myReportMinimumFlag [protected] |
bool DtFrameRateMonitor::myReportMaximumFlag [protected] |
bool DtFrameRateMonitor::myReportToConsoleFlag [protected] |
DtAverager DtFrameRateMonitor::myAverager [protected] |
DtSimManager* DtFrameRateMonitor::mySimManager [protected] |
DtPeriodicTimer* DtFrameRateMonitor::myReportTimer [protected] |
double DtFrameRateMonitor::myCurrentResponsePeriod [protected] |
DtTime DtFrameRateMonitor::myLastReportTimerCbSimTime [protected] |
DtTime DtFrameRateMonitor::myLastReportTimerCbRealTime [protected] |
DtTime DtFrameRateMonitor::mySimTimeRealTimeRatio [protected] |
Contains simulation addresses of everyone who has requested reports.
bool DtFrameRateMonitor::myIsPaused [private] |
When paused, the frame rate logger will ignore any specified samples.