DESERT 4.0.0
CoolAddon Class Reference

#include <cool-addon.h>

Inheritance diagram for CoolAddon:
Inheritance graph
Collaboration diagram for CoolAddon:
Collaboration graph

Public Member Functions

 CoolAddon ()
 
virtual ~CoolAddon ()=default
 
virtual int command (int argc, const char *const *argv)
 
virtual void start ()
 
virtual void stop ()
 
void recv (Packet *p)
 
void initTHRPacket (Packet *p)
 
void sendTHRWarning (double throughput)
 
- Public Member Functions inherited from UwCbrModule
 UwCbrModule ()
 
virtual ~UwCbrModule ()=default
 
virtual void recv (Packet *p, Handler *h) override
 
virtual double GetRTT () const
 
virtual double GetFTT () const
 
virtual double GetTxTime () const
 
virtual double GetPER () const
 
virtual double GetTHR () const
 
virtual double GetRTTstd () const
 
virtual double GetFTTstd () const
 
virtual void resetStats ()
 
void printIdsPkts () const
 

Protected Attributes

THRMonitorTimer cool_timer
 
- Protected Attributes inherited from UwCbrModule
uint16_t dstPort_
 
std::string log_suffix
 
nsaddr_t dstAddr_
 
char priority_
 
std::ofstream tracefile
 
std::string tracefilename
 
bool * sn_check
 
int PoissonTraffic_
 
int debug_
 
int drop_out_of_order_
 
uint traffic_type_
 
UwSendTimer sendTmr_
 
int txsn
 
int hrsn
 
int pkts_recv
 
int pkts_ooseq
 
int pkts_lost
 
int pkts_invalid
 
int pkts_last_reset
 
int cnt
 
double rftt
 
double srtt
 
double sftt
 
double lrtime
 
double sthr
 
double period_
 
int pktSize_
 
double sumrtt
 
double sumrtt2
 
int rttsamples
 
double sumftt
 
double sumftt2
 
int fttsamples
 
double sumtxtimes = 0
 
double sumbytes
 
double sumdt
 
uint32_t esn
 
int tracefile_enabler_
 

Private Attributes

double thr_thresh
 
double thr_check_period
 
int receiving
 

Friends

class THRMonitorTimer
 

Additional Inherited Members

- Protected Member Functions inherited from UwCbrModule
virtual void initPkt (Packet *p)
 
virtual void sendPkt ()
 
virtual void sendPktLowPriority ()
 
virtual void sendPktHighPriority ()
 
virtual void transmit ()
 
virtual void updateRTT (const double &)
 
virtual void updateFTT (const double &)
 
virtual void updateThroughput (const int &, const double &)
 
virtual void incrPktLost (const int &)
 
virtual void incrPktRecv ()
 
virtual void incrPktOoseq ()
 
virtual void incrPktInvalid ()
 
virtual double getTimeBeforeNextPkt ()
 
virtual void printReceivedPacket (Packet *p)
 
- Static Protected Member Functions inherited from UwCbrModule
static int getCbrHeaderSize ()
 
- Static Protected Attributes inherited from UwCbrModule
static int uidcnt_ = 0
 

Constructor & Destructor Documentation

◆ CoolAddon()

CoolAddon::CoolAddon ( )

Constructor

References receiving, thr_check_period, and thr_thresh.

◆ ~CoolAddon()

virtual CoolAddon::~CoolAddon ( )
virtualdefault

Destructor

Member Function Documentation

◆ command()

int CoolAddon::command ( int  argc,
const char *const *  argv 
)
virtual

Tcl Command interpreter

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

Reimplemented from UwCbrModule.

References UwCbrModule::command().

Here is the call graph for this function:

◆ initTHRPacket()

void CoolAddon::initTHRPacket ( Packet *  p)

Initialize the PDR warning packet

Parameters
pthe packet to be initialized

References PT_COOLADDON_THR.

Referenced by sendTHRWarning().

◆ recv()

void CoolAddon::recv ( Packet *  p)
virtual

Function that receives a packet

Parameters
pPacket to be received

Reimplemented from UwCbrModule.

References hdr_cooladdon::access(), PT_COOLADDON_THR, UwCbrModule::recv(), and hdr_cooladdon::throughput().

Here is the call graph for this function:

◆ sendTHRWarning()

void CoolAddon::sendTHRWarning ( double  throughput)

Methods that sends out a warning when throughput reaches a certain threshold

References cool_timer, UwCbrModule::initPkt(), initTHRPacket(), thr_check_period, thr_thresh, and hdr_cooladdon::throughput().

Here is the call graph for this function:

◆ start()

void CoolAddon::start ( )
virtual

Start the addon operations

Reimplemented from UwCbrModule.

References cool_timer, receiving, UwCbrModule::start(), and thr_check_period.

Here is the call graph for this function:

◆ stop()

void CoolAddon::stop ( )
virtual

Stop operations

Reimplemented from UwCbrModule.

References cool_timer, and UwCbrModule::stop().

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ THRMonitorTimer

friend class THRMonitorTimer
friend

Member Data Documentation

◆ cool_timer

THRMonitorTimer CoolAddon::cool_timer
protected

Referenced by sendTHRWarning(), start(), and stop().

◆ receiving

int CoolAddon::receiving
private

The node is able to measeure throughput if it's receiving

Referenced by CoolAddon(), and start().

◆ thr_check_period

double CoolAddon::thr_check_period
private

How often to check the throughput

Referenced by CoolAddon(), sendTHRWarning(), and start().

◆ thr_thresh

double CoolAddon::thr_thresh
private

Throughput threshold that triggers printout and sending

Referenced by CoolAddon(), and sendTHRWarning().


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