EMANE  1.2.1
EMANE::Utils::BitPool Class Reference

Implementation of a rate limiting bit pool. More...

#include <bitpool.h>

Public Member Functions

 BitPool (PlatformServiceProvider *pPlatformService, NEMId id)
 
 ~BitPool ()
 
std::uint64_t get (std::uint64_t u64Request, bool bFullFill=true)
 
std::uint64_t getCurrentSize ()
 
void setMaxSize (std::uint64_t u64NewSize)
 

Detailed Description

Implementation of a rate limiting bit pool.

Note
Uses a thread to allow blocking dequeues

Definition at line 52 of file bitpool.h.

Constructor & Destructor Documentation

◆ BitPool()

EMANE::Utils::BitPool::BitPool ( PlatformServiceProvider pPlatformService,
NEMId  id 
)
inline

Creates a BitPool instance

Definition at line 47 of file bitpool.inl.

◆ ~BitPool()

EMANE::Utils::BitPool::~BitPool ( )
inline

Destroys an instance

Definition at line 58 of file bitpool.inl.

Member Function Documentation

◆ get()

std::uint64_t EMANE::Utils::BitPool::get ( std::uint64_t  u64Request,
bool  bFullFill = true 
)
inline

Gets bits from pool

Parameters
u64Requestrequest size
bFullFillContinue until entire request is fulfilled
Returns
Number outstanding or 0 if disabled

Definition at line 97 of file bitpool.inl.

◆ getCurrentSize()

std::uint64_t EMANE::Utils::BitPool::getCurrentSize ( )
inline

Gets current pool size

Returns
the current pool size

Definition at line 164 of file bitpool.inl.

◆ setMaxSize()

void EMANE::Utils::BitPool::setMaxSize ( std::uint64_t  u64NewSize)
inline

Set pool size

Parameters
u64NewSizepool size request in bits

Definition at line 65 of file bitpool.inl.


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