DESERT 3.5.1
Loading...
Searching...
No Matches
UwVbrModule Class Reference

#include <uwvbr-module.h>

Inheritance diagram for UwVbrModule:
Collaboration diagram for UwVbrModule:

Public Member Functions

 UwVbrModule ()
 
virtual ~UwVbrModule ()
 
virtual void recv (Packet *)
 
virtual void recv (Packet *p, Handler *h)
 
virtual int command (int argc, const char *const *argv)
 
virtual int crLayCommand (ClMessage *m)
 
virtual double GetRTT () const
 
virtual double GetFTT () const
 
virtual double GetPER () const
 
virtual double GetTHR () const
 
virtual double GetRTTstd () const
 
virtual double GetFTTstd () const
 
virtual void resetStats ()
 

Protected Member Functions

virtual void initPkt (Packet *p)
 
virtual void sendPkt ()
 
virtual void transmit ()
 
virtual void start ()
 
virtual void stop ()
 
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 switchPeriod ()
 

Static Protected Member Functions

static const int getVbrHeaderSize ()
 

Protected Attributes

u_int16_t dstPort_
 
nsaddr_t dstAddr_
 
bool * sn_check
 
int PoissonTraffic_
 
int debug_
 
int drop_out_of_order_
 
int txsn
 
int hrsn
 
int pkts_recv
 
int pkts_ooseq
 
int pkts_lost
 
int pkts_invalid
 
int pkts_last_reset
 
double rftt
 
double srtt
 
double sftt
 
double lrtime
 
double sthr
 
int period_identifier_
 
double period1_
 
double period2_
 
double timer_switch_1_
 
double timer_switch_2_
 
UwVbrSendTimer sendTmr_
 
UwVbrPeriodSwitcher period_switcher_
 
int pktSize_
 
double sumrtt
 
double sumrtt2
 
int rttsamples
 
double sumftt
 
double sumftt2
 
int fttsamples
 
double sumbytes
 
double sumdt
 
uint32_t esn
 

Static Protected Attributes

static int uidcnt_ = 0
 

Friends

class UwVbrSendTimer
 
class UwVbrPeriodSwitcher
 

Detailed Description

UwVbrModule class is used to manage UWVBR packets, and to collect statistics about them.

Definition at line 164 of file uwvbr-module.h.

Constructor & Destructor Documentation

◆ UwVbrModule()

UwVbrModule::UwVbrModule ( )

Constructor of UwVbrModule class.

Definition at line 96 of file uwvbr-module.cpp.

◆ ~UwVbrModule()

UwVbrModule::~UwVbrModule ( )
virtual

Destructor of UwVbrModule class.

Definition at line 146 of file uwvbr-module.cpp.

Member Function Documentation

◆ command()

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

TCL command interpreter.

It implements the following OTcl methods:

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.

Definition at line 153 of file uwvbr-module.cpp.

◆ crLayCommand()

int UwVbrModule::crLayCommand ( ClMessage *  m)
virtual

Definition at line 212 of file uwvbr-module.cpp.

◆ GetFTT()

double UwVbrModule::GetFTT ( ) const
virtual

Returns the mean Forward Trip Time.

Returns
Forward Trip Time.

Definition at line 391 of file uwvbr-module.cpp.

◆ GetFTTstd()

double UwVbrModule::GetFTTstd ( ) const
virtual

Returns the mean Forward Trip Time Standard Deviation.

Returns
Forward Trip Time Standard Deviation.

Definition at line 409 of file uwvbr-module.cpp.

◆ GetPER()

double UwVbrModule::GetPER ( ) const
virtual

Returns the mean Packet Error Rate.

Returns
Packet Error Rate.

Definition at line 425 of file uwvbr-module.cpp.

◆ GetRTT()

double UwVbrModule::GetRTT ( ) const
virtual

Returns the mean Round Trip Time.

Returns
Round Trip Time.

Definition at line 385 of file uwvbr-module.cpp.

◆ GetRTTstd()

double UwVbrModule::GetRTTstd ( ) const
virtual

Returns the Round Trip Time Standard Deviation.

Returns
Round Trip Time Standard Deviation.

Definition at line 397 of file uwvbr-module.cpp.

◆ GetTHR()

double UwVbrModule::GetTHR ( ) const
virtual

Returns the mean Throughput.

Returns
Throughput.

Definition at line 442 of file uwvbr-module.cpp.

◆ getTimeBeforeNextPkt()

double UwVbrModule::getTimeBeforeNextPkt ( )
protectedvirtual

Returns the amount of time to wait before the next transmission.

It depends on the PoissonTraffic_ flag.

Returns
double Value to use as delay for the next transmission.
See also
PoissonTraffic_

Definition at line 520 of file uwvbr-module.cpp.

◆ getVbrHeaderSize()

static const int UwVbrModule::getVbrHeaderSize ( )
inlinestaticprotected

Returns the size in byte of a hdr_uwvbr packet header.

Returns
The size of a hdr_uwvbr packet header.

Definition at line 409 of file uwvbr-module.h.

◆ incrPktInvalid()

void UwVbrModule::incrPktInvalid ( )
protectedvirtual

Increases by one the number of invalid packets.

Definition at line 493 of file uwvbr-module.cpp.

◆ incrPktLost()

void UwVbrModule::incrPktLost ( const int &  npkts)
protectedvirtual

Increases the number of packets lost.

Parameters
intNumber of packets lost.

Definition at line 475 of file uwvbr-module.cpp.

◆ incrPktOoseq()

void UwVbrModule::incrPktOoseq ( )
protectedvirtual

Increases by one the number of out of sequence packets received.

Definition at line 487 of file uwvbr-module.cpp.

◆ incrPktRecv()

void UwVbrModule::incrPktRecv ( )
protectedvirtual

Increases by one the number of received packets.

Definition at line 481 of file uwvbr-module.cpp.

◆ initPkt()

void UwVbrModule::initPkt ( Packet *  p)
protectedvirtual

Initializes a data packet passed as argument with the default values.

Parameters
Packet*Pointer to a packet already allocated to fill with the right values.

Definition at line 221 of file uwvbr-module.cpp.

◆ recv() [1/2]

void UwVbrModule::recv ( Packet *  p)
virtual

Performs the reception of packets from upper and lower layers.

Parameters
Packet*Pointer to the packet will be received.

Definition at line 302 of file uwvbr-module.cpp.

◆ recv() [2/2]

void UwVbrModule::recv ( Packet *  p,
Handler *  h 
)
virtual

Performs the reception of packets from upper and lower layers.

Parameters
Packet*Pointer to the packet will be received.
Handler*Handler.

Definition at line 296 of file uwvbr-module.cpp.

◆ resetStats()

void UwVbrModule::resetStats ( )
virtual

Resets all the statistics of the UWVBR module.

Definition at line 499 of file uwvbr-module.cpp.

◆ sendPkt()

void UwVbrModule::sendPkt ( )
protectedvirtual

Allocates, initialize and sends a packet.

See also
UwVbrModule::initPkt()

Definition at line 254 of file uwvbr-module.cpp.

◆ start()

void UwVbrModule::start ( )
protectedvirtual

Start to send packets.

Definition at line 247 of file uwvbr-module.cpp.

◆ stop()

void UwVbrModule::stop ( )
protectedvirtual

Stop to send packets.

Definition at line 290 of file uwvbr-module.cpp.

◆ switchPeriod()

void UwVbrModule::switchPeriod ( )
protectedvirtual

Switches between the two different states in which UWVBR can operate.

Definition at line 278 of file uwvbr-module.cpp.

◆ transmit()

void UwVbrModule::transmit ( )
protectedvirtual

Creates and transmits a packet and schedules a new transmission.

See also
UwVbrModule::sendPkt()

Definition at line 270 of file uwvbr-module.cpp.

◆ updateFTT()

void UwVbrModule::updateFTT ( const double &  ftt)
protectedvirtual

Updates the Forward Trip Time.

Parameters
doubleNew Forward Trip Time entry.

Definition at line 456 of file uwvbr-module.cpp.

◆ updateRTT()

void UwVbrModule::updateRTT ( const double &  rtt)
protectedvirtual

Updates the Round Trip Time.

Parameters
doubleNew Round Trip Time entry.

Definition at line 448 of file uwvbr-module.cpp.

◆ updateThroughput()

void UwVbrModule::updateThroughput ( const int &  bytes,
const double &  dt 
)
protectedvirtual

Updates the Throughput.

Parameters
intBytes of the payload of the last packet received.
doubleDelay Time between the last two receipts.

Definition at line 464 of file uwvbr-module.cpp.

Friends And Related Symbol Documentation

◆ UwVbrPeriodSwitcher

friend class UwVbrPeriodSwitcher
friend

Definition at line 167 of file uwvbr-module.h.

◆ UwVbrSendTimer

friend class UwVbrSendTimer
friend

Definition at line 166 of file uwvbr-module.h.

Member Data Documentation

◆ debug_

int UwVbrModule::debug_
protected

Flag to enable or disable dirrefent levels of debug.

Definition at line 259 of file uwvbr-module.h.

◆ drop_out_of_order_

int UwVbrModule::drop_out_of_order_
protected

Flag to enable or disable the check for out of order packets.

Definition at line 260 of file uwvbr-module.h.

◆ dstAddr_

nsaddr_t UwVbrModule::dstAddr_
protected

IP of the destination.

Definition at line 253 of file uwvbr-module.h.

◆ dstPort_

u_int16_t UwVbrModule::dstPort_
protected

Destination port.

Definition at line 252 of file uwvbr-module.h.

◆ esn

uint32_t UwVbrModule::esn
protected

Expected serial number.

Definition at line 311 of file uwvbr-module.h.

◆ fttsamples

int UwVbrModule::fttsamples
protected

Number of FTT samples.

Definition at line 306 of file uwvbr-module.h.

◆ hrsn

int UwVbrModule::hrsn
protected

Highest received sequence number.

Definition at line 264 of file uwvbr-module.h.

◆ lrtime

double UwVbrModule::lrtime
protected

Time of last packet reception.

Definition at line 280 of file uwvbr-module.h.

◆ period1_

double UwVbrModule::period1_
protected

period between two consecutive packet transmissions (mode 1).

Definition at line 285 of file uwvbr-module.h.

◆ period2_

double UwVbrModule::period2_
protected

period between two consecutive packet transmissions (mode 2).

Definition at line 287 of file uwvbr-module.h.

◆ period_identifier_

int UwVbrModule::period_identifier_
protected

Flag used to identify in which one of the period the vbr module is.

Definition at line 283 of file uwvbr-module.h.

◆ period_switcher_

UwVbrPeriodSwitcher UwVbrModule::period_switcher_
protected

Timer which schedules the switch between different sending periods.

Definition at line 295 of file uwvbr-module.h.

◆ pkts_invalid

int UwVbrModule::pkts_invalid
protected

Total number of invalid packets received.

Definition at line 272 of file uwvbr-module.h.

◆ pkts_last_reset

int UwVbrModule::pkts_last_reset
protected

for error checking after stats are reset.

Set to pkts_lost+pkts_recv each time resetStats is called.

Definition at line 273 of file uwvbr-module.h.

◆ pkts_lost

int UwVbrModule::pkts_lost
protected

Total number of lost packets, including packets received out of sequence.

Definition at line 270 of file uwvbr-module.h.

◆ pkts_ooseq

int UwVbrModule::pkts_ooseq
protected

Total number of packets received out of sequence.

Definition at line 268 of file uwvbr-module.h.

◆ pkts_recv

int UwVbrModule::pkts_recv
protected

Total number of received packets.

Packet out of sequence are not counted here.

Definition at line 266 of file uwvbr-module.h.

◆ pktSize_

int UwVbrModule::pktSize_
protected

Packet size.

Definition at line 297 of file uwvbr-module.h.

◆ PoissonTraffic_

int UwVbrModule::PoissonTraffic_
protected

1 if the traffic is generated according to a poissonian distribution.

Definition at line 257 of file uwvbr-module.h.

◆ rftt

double UwVbrModule::rftt
protected

Forward Trip Time seen for last received packet.

Definition at line 277 of file uwvbr-module.h.

◆ rttsamples

int UwVbrModule::rttsamples
protected

Number of RTT samples.

Definition at line 302 of file uwvbr-module.h.

◆ sendTmr_

UwVbrSendTimer UwVbrModule::sendTmr_
protected

Timer which schedules packet transmissions.

Definition at line 293 of file uwvbr-module.h.

◆ sftt

double UwVbrModule::sftt
protected

Smoothed Forward Trip Time, calculated as srtt.

Definition at line 279 of file uwvbr-module.h.

◆ sn_check

bool* UwVbrModule::sn_check
protected

Used to keep track of the packets already received.

Definition at line 255 of file uwvbr-module.h.

◆ srtt

double UwVbrModule::srtt
protected

Smoothed Round Trip Time, calculated as for TCP.

Definition at line 278 of file uwvbr-module.h.

◆ sthr

double UwVbrModule::sthr
protected

Smoothed throughput calculation.

Definition at line 281 of file uwvbr-module.h.

◆ sumbytes

double UwVbrModule::sumbytes
protected

Sum of bytes received.

Definition at line 308 of file uwvbr-module.h.

◆ sumdt

double UwVbrModule::sumdt
protected

Sum of the delays.

Definition at line 309 of file uwvbr-module.h.

◆ sumftt

double UwVbrModule::sumftt
protected

Sum of FTT samples.

Definition at line 304 of file uwvbr-module.h.

◆ sumftt2

double UwVbrModule::sumftt2
protected

Sum of (FTT^2).

Definition at line 305 of file uwvbr-module.h.

◆ sumrtt

double UwVbrModule::sumrtt
protected

Sum of RTT samples.

Definition at line 300 of file uwvbr-module.h.

◆ sumrtt2

double UwVbrModule::sumrtt2
protected

Sum of (RTT^2).

Definition at line 301 of file uwvbr-module.h.

◆ timer_switch_1_

double UwVbrModule::timer_switch_1_
protected

Period in witch the node tramsmits with a packet every period1_ seconds.

Definition at line 289 of file uwvbr-module.h.

◆ timer_switch_2_

double UwVbrModule::timer_switch_2_
protected

Period in witch the node tramsmits with a packet every period2_ seconds.

Definition at line 291 of file uwvbr-module.h.

◆ txsn

int UwVbrModule::txsn
protected

Sequence number of next new packet to be transmitted.

Definition at line 263 of file uwvbr-module.h.

◆ uidcnt_

int UwVbrModule::uidcnt_ = 0
staticprotected

Unique id of the packet generated.

Definition at line 251 of file uwvbr-module.h.


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