F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Utils::TokenBucket Class Reference

#include <Utils/TokenBucket.hpp>

Public Member Functions

 TokenBucket (U32 replenishInterval, U32 maxTokens, U32 replenishRate, U32 startTokens, Fw::Time startTime)
 
 TokenBucket (U32 replenishInterval, U32 maxTokens)
 
void setMaxTokens (U32 maxTokens)
 
void setReplenishInterval (U32 replenishInterval)
 
void setReplenishRate (U32 replenishRate)
 
U32 getMaxTokens () const
 
U32 getReplenishInterval () const
 
U32 getReplenishRate () const
 
U32 getTokens () const
 
void replenish ()
 
bool trigger (const Fw::Time time)
 

Detailed Description

Definition at line 24 of file TokenBucket.hpp.

Constructor & Destructor Documentation

◆ TokenBucket() [1/2]

Utils::TokenBucket::TokenBucket ( U32  replenishInterval,
U32  maxTokens,
U32  replenishRate,
U32  startTokens,
Fw::Time  startTime 
)

Definition at line 18 of file TokenBucket.cpp.

◆ TokenBucket() [2/2]

Utils::TokenBucket::TokenBucket ( U32  replenishInterval,
U32  maxTokens 
)

Definition at line 34 of file TokenBucket.cpp.

Member Function Documentation

◆ getMaxTokens()

U32 Utils::TokenBucket::getMaxTokens ( ) const

Definition at line 86 of file TokenBucket.cpp.

◆ getReplenishInterval()

U32 Utils::TokenBucket::getReplenishInterval ( ) const

Definition at line 80 of file TokenBucket.cpp.

◆ getReplenishRate()

U32 Utils::TokenBucket::getReplenishRate ( ) const

Definition at line 92 of file TokenBucket.cpp.

◆ getTokens()

U32 Utils::TokenBucket::getTokens ( ) const

Definition at line 98 of file TokenBucket.cpp.

◆ replenish()

void Utils::TokenBucket::replenish ( )

Definition at line 72 of file TokenBucket.cpp.

◆ setMaxTokens()

void Utils::TokenBucket::setMaxTokens ( U32  maxTokens)

Definition at line 56 of file TokenBucket.cpp.

◆ setReplenishInterval()

void Utils::TokenBucket::setReplenishInterval ( U32  replenishInterval)

Definition at line 48 of file TokenBucket.cpp.

◆ setReplenishRate()

void Utils::TokenBucket::setReplenishRate ( U32  replenishRate)

Definition at line 64 of file TokenBucket.cpp.

◆ trigger()

bool Utils::TokenBucket::trigger ( const Fw::Time  time)

Definition at line 104 of file TokenBucket.cpp.


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