ifw-fnd 1.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ifw::fnd::tools::LoopFrequencyCalculator Class Reference

Class to calculate the frequency of a loop using a moving average window. More...

#include <tools.hpp>

Public Member Functions

 LoopFrequencyCalculator (size_t window_size=100)
 
void SetWindowSize (const size_t window_size)
 
void Tick ()
 
double GetFrequency () const
 
void Reset ()
 

Detailed Description

Class to calculate the frequency of a loop using a moving average window.

Constructor & Destructor Documentation

◆ LoopFrequencyCalculator()

ifw::fnd::tools::LoopFrequencyCalculator::LoopFrequencyCalculator ( size_t window_size = 100)
explicit

Constructor to initialize with a specified window size.

Parameters
[in]window_sizeNumber of samples in the sliding window.

Member Function Documentation

◆ GetFrequency()

double ifw::fnd::tools::LoopFrequencyCalculator::GetFrequency ( ) const

◆ Reset()

void ifw::fnd::tools::LoopFrequencyCalculator::Reset ( )

◆ SetWindowSize()

void ifw::fnd::tools::LoopFrequencyCalculator::SetWindowSize ( const size_t window_size)

◆ Tick()

void ifw::fnd::tools::LoopFrequencyCalculator::Tick ( )

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