|
DESERT 4.0.0
|
#include <uwvbr-module.h>


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 |
UwVbrModule class is used to manage UWVBR packets, and to collect statistics about them.
| UwVbrModule::UwVbrModule | ( | ) |
Constructor of UwVbrModule class.
References debug_, drop_out_of_order_, dstAddr_, dstPort_, period1_, period2_, pktSize_, PoissonTraffic_, sn_check, timer_switch_1_, and timer_switch_2_.
|
virtual |
Destructor of UwVbrModule class.
|
virtual |
TCL command interpreter. It implements the following OTcl methods:
| argc | Number of arguments in argv. |
| argv | Array of strings which are the command parameters (Note that argv[0] is the name of the object). |
References GetFTT(), GetFTTstd(), GetPER(), GetRTT(), GetRTTstd(), GetTHR(), getVbrHeaderSize(), hrsn, pkts_last_reset, pkts_recv, resetStats(), sendPkt(), start(), stop(), and txsn.

|
virtual |
|
virtual |
Returns the mean Forward Trip Time.
References fttsamples, and sumftt.
Referenced by command().
|
virtual |
Returns the mean Forward Trip Time Standard Deviation.
References fttsamples, sumftt, and sumftt2.
Referenced by command().
|
virtual |
Returns the mean Packet Error Rate.
References drop_out_of_order_, esn, pkts_lost, and pkts_recv.
Referenced by command().
|
virtual |
Returns the mean Round Trip Time.
References rttsamples, and sumrtt.
Referenced by command().
|
virtual |
Returns the Round Trip Time Standard Deviation.
References rttsamples, sumrtt, and sumrtt2.
Referenced by command().
|
virtual |
|
protectedvirtual |
Returns the amount of time to wait before the next transmission. It depends on the PoissonTraffic_ flag.
References period1_, period2_, period_identifier_, and PoissonTraffic_.
Referenced by start(), and transmit().
|
inlinestaticprotected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Increases by one the number of out of sequence packets received.
References pkts_ooseq.
Referenced by recv().
|
protectedvirtual |
|
protectedvirtual |
Initializes a data packet passed as argument with the default values.
| Packet* | Pointer to a packet already allocated to fill with the right values. |
References hdr_uwip::access(), hdr_uwudp::access(), hdr_uwip::daddr(), hdr_uwudp::dport(), dstAddr_, dstPort_, pktSize_, PT_UWVBR, hdr_uwvbr::rftt(), rftt, hdr_uwvbr::rftt_valid(), hdr_uwvbr::sn(), txsn, and uidcnt_.
Referenced by sendPkt().

|
virtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
References debug_, drop_out_of_order_, esn, hrsn, incrPktInvalid(), incrPktLost(), incrPktOoseq(), incrPktRecv(), lrtime, pkts_last_reset, pkts_lost, pkts_recv, PT_UWVBR, hdr_uwvbr::rftt(), rftt, hdr_uwvbr::rftt_valid(), hdr_uwvbr::sn(), sn_check, updateFTT(), updateRTT(), and updateThroughput().
Referenced by recv().

|
virtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
| Handler* | Handler. |
References recv().

|
virtual |
Resets all the statistics of the UWVBR module.
References fttsamples, pkts_last_reset, pkts_lost, pkts_ooseq, pkts_recv, rftt, rttsamples, sftt, srtt, sthr, sumbytes, sumdt, sumftt, sumftt2, sumrtt, and sumrtt2.
Referenced by command().
|
protectedvirtual |
Allocates, initialize and sends a packet.
References debug_, initPkt(), and hdr_uwvbr::sn().
Referenced by command(), and transmit().

|
protectedvirtual |
Start to send packets.
References getTimeBeforeNextPkt(), period_switcher_, sendTmr_, and timer_switch_1_.
Referenced by command().

|
protectedvirtual |
|
protectedvirtual |
Switches between the two different states in which UWVBR can operate.
References period_identifier_, period_switcher_, timer_switch_1_, and timer_switch_2_.
|
protectedvirtual |
Creates and transmits a packet and schedules a new transmission.
References getTimeBeforeNextPkt(), sendPkt(), and sendTmr_.

|
protectedvirtual |
Updates the Forward Trip Time.
| double | New Forward Trip Time entry. |
References fttsamples, sumftt, and sumftt2.
Referenced by recv().
|
protectedvirtual |
Updates the Round Trip Time.
| double | New Round Trip Time entry. |
References rttsamples, sumrtt, and sumrtt2.
Referenced by recv().
|
protectedvirtual |
|
friend |
|
friend |
|
protected |
Flag to enable or disable dirrefent levels of debug.
Referenced by recv(), sendPkt(), updateThroughput(), and UwVbrModule().
|
protected |
Flag to enable or disable the check for out of order packets.
Referenced by GetPER(), recv(), and UwVbrModule().
|
protected |
IP of the destination.
Referenced by initPkt(), and UwVbrModule().
|
protected |
Destination port.
Referenced by initPkt(), and UwVbrModule().
|
protected |
Number of FTT samples.
Referenced by GetFTT(), GetFTTstd(), resetStats(), and updateFTT().
|
protected |
|
protected |
Time of last packet reception.
Referenced by recv().
|
protected |
period between two consecutive packet transmissions (mode 1).
Referenced by getTimeBeforeNextPkt(), and UwVbrModule().
|
protected |
period between two consecutive packet transmissions (mode 2).
Referenced by getTimeBeforeNextPkt(), and UwVbrModule().
|
protected |
Flag used to identify in which one of the period the vbr module is.
Referenced by getTimeBeforeNextPkt(), and switchPeriod().
|
protected |
Timer which schedules the switch between different sending periods.
Referenced by start(), and switchPeriod().
|
protected |
Total number of invalid packets received.
Referenced by incrPktInvalid().
|
protected |
for error checking after stats are reset. Set to pkts_lost+pkts_recv each time resetStats is called.
Referenced by command(), recv(), and resetStats().
|
protected |
Total number of lost packets, including packets received out of sequence.
Referenced by GetPER(), incrPktLost(), recv(), and resetStats().
|
protected |
Total number of packets received out of sequence.
Referenced by incrPktOoseq(), and resetStats().
|
protected |
Total number of received packets. Packet out of sequence are not counted here.
Referenced by command(), GetPER(), incrPktRecv(), recv(), and resetStats().
|
protected |
Packet size.
Referenced by initPkt(), and UwVbrModule().
|
protected |
1 if the traffic is generated according to a poissonian distribution.
Referenced by getTimeBeforeNextPkt(), and UwVbrModule().
|
protected |
Forward Trip Time seen for last received packet.
Referenced by initPkt(), recv(), and resetStats().
|
protected |
Number of RTT samples.
Referenced by GetRTT(), GetRTTstd(), resetStats(), and updateRTT().
|
protected |
Timer which schedules packet transmissions.
Referenced by start(), stop(), and transmit().
|
protected |
Smoothed Forward Trip Time, calculated as srtt.
Referenced by resetStats().
|
protected |
Used to keep track of the packets already received.
Referenced by recv(), and UwVbrModule().
|
protected |
Smoothed Round Trip Time, calculated as for TCP.
Referenced by resetStats().
|
protected |
Smoothed throughput calculation.
Referenced by resetStats().
|
protected |
Sum of bytes received.
Referenced by GetTHR(), resetStats(), and updateThroughput().
|
protected |
Sum of the delays.
Referenced by GetTHR(), resetStats(), and updateThroughput().
|
protected |
Sum of FTT samples.
Referenced by GetFTT(), GetFTTstd(), resetStats(), and updateFTT().
|
protected |
Sum of (FTT^2).
Referenced by GetFTTstd(), resetStats(), and updateFTT().
|
protected |
Sum of RTT samples.
Referenced by GetRTT(), GetRTTstd(), resetStats(), and updateRTT().
|
protected |
Sum of (RTT^2).
Referenced by GetRTTstd(), resetStats(), and updateRTT().
|
protected |
Period in witch the node tramsmits with a packet every period1_ seconds.
Referenced by start(), switchPeriod(), and UwVbrModule().
|
protected |
Period in witch the node tramsmits with a packet every period2_ seconds.
Referenced by switchPeriod(), and UwVbrModule().
|
protected |
|
staticprotected |
Unique id of the packet generated.
Referenced by initPkt().