YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FpsStats Class Reference

Class used for calculate the fps. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/src/guis/yarpview/plugin/FpsStats.h>

Public Member Functions

 FpsStats ()
 
void reset ()
 This function must be called each time you want to reset the acquiring data period Typically if you want to track fps in temporal range of 3 seconds for example, you have to call this function every 3 seconds in order to reset the statistics.
 
void update ()
 This function must be called each time you want to track a frame.
 
void getStats (double &av, double &m, double &M)
 This function returns the Minimum, Maximum and Average values.
 
void getStats (double &av)
 This function returns the Average value.
 

Public Attributes

double average
 
double max
 
double min
 
unsigned int iterations
 
double t0
 
double prev
 

Detailed Description

Class used for calculate the fps.

Definition at line 15 of file FpsStats.h.

Constructor & Destructor Documentation

◆ FpsStats()

FpsStats::FpsStats ( )
inline

Definition at line 25 of file FpsStats.h.

Member Function Documentation

◆ getStats() [1/2]

void FpsStats::getStats ( double &  av)
inline

This function returns the Average value.

Parameters
avthe average value

Definition at line 84 of file FpsStats.h.

◆ getStats() [2/2]

void FpsStats::getStats ( double &  av,
double &  m,
double &  M 
)
inline

This function returns the Minimum, Maximum and Average values.

Parameters
avthe average value
mthe minimum value
Mthe maximum value

Definition at line 67 of file FpsStats.h.

◆ reset()

void FpsStats::reset ( )
inline

This function must be called each time you want to reset the acquiring data period Typically if you want to track fps in temporal range of 3 seconds for example, you have to call this function every 3 seconds in order to reset the statistics.

Definition at line 33 of file FpsStats.h.

◆ update()

void FpsStats::update ( )
inline

This function must be called each time you want to track a frame.

Typically you call this function each time you receive a frame if you want to track the receive Fps, or every time you display a frame if you want to track the display Fps

Definition at line 45 of file FpsStats.h.

Member Data Documentation

◆ average

double FpsStats::average

Definition at line 18 of file FpsStats.h.

◆ iterations

unsigned int FpsStats::iterations

Definition at line 21 of file FpsStats.h.

◆ max

double FpsStats::max

Definition at line 19 of file FpsStats.h.

◆ min

double FpsStats::min

Definition at line 20 of file FpsStats.h.

◆ prev

double FpsStats::prev

Definition at line 23 of file FpsStats.h.

◆ t0

double FpsStats::t0

Definition at line 22 of file FpsStats.h.


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