EMANE  1.2.1
EMANE::FlowControlClient Class Reference

FlowControlClient is the token consumer side of nem layer to transport flow contol. More...

#include <flowcontrolclient.h>

Public Member Functions

 FlowControlClient (EMANE::UpstreamTransport &transport)
 
 ~FlowControlClient ()
 
void start ()
 
void stop ()
 
std::pair< std::uint16_t, bool > removeToken ()
 
void processFlowControlMessage (const Controls::FlowControlControlMessage *pMsg)
 

Detailed Description

FlowControlClient is the token consumer side of nem layer to transport flow contol.

Definition at line 50 of file flowcontrolclient.h.

Constructor & Destructor Documentation

◆ FlowControlClient()

EMANE::FlowControlClient::FlowControlClient ( EMANE::UpstreamTransport transport)

Creates a FlowControlClient instance

Parameters
transportreference to the UpstremTransport

Definition at line 124 of file flowcontrolclient.cc.

◆ ~FlowControlClient()

EMANE::FlowControlClient::~FlowControlClient ( )

Destory an instance

Definition at line 130 of file flowcontrolclient.cc.

Member Function Documentation

◆ processFlowControlMessage()

void EMANE::FlowControlClient::processFlowControlMessage ( const Controls::FlowControlControlMessage pMsg)

Handles a flow control update message

Parameters
pMsgflow control message containig the number of tokens avaialble

Definition at line 153 of file flowcontrolclient.cc.

◆ removeToken()

std::pair< std::uint16_t, bool > EMANE::FlowControlClient::removeToken ( )

Removes a flow control token, blocking until a token is available when flow control is enabled

Returns
Total number of tokens available and a flag indicating success

Definition at line 147 of file flowcontrolclient.cc.

◆ start()

void EMANE::FlowControlClient::start ( )

Start starts flow control processing

Definition at line 134 of file flowcontrolclient.cc.

◆ stop()

void EMANE::FlowControlClient::stop ( )

Stop stops flow control processing

Definition at line 140 of file flowcontrolclient.cc.


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