Application/Traffic/CBR\_PP set PBM\_ 2 #Default value;
The OTcl instvar bounded variable PBM_ (same name in C++ and in OTcl) specifies the number of back-to-back packets to be sent. For PBM_=1 we have a CBR source, for PBM_=2 we have a Packet Pair source (a source which sends two packets back-to-back), etc. The mean rate of the PP source is rate_, but the packets are sent in burst of PBM_ packets. Note that we also use the terminology Packet Pair source and Packet Pair burst for PBM_>2. We compute the next_interval as:
double CBR\_PP\_Traffic::next\_interval(int& size) { /*(PP\_ - 1) is the number of packets in the current burst.*/ if (PP\_ \>= (PBM\_ - 1)){ interval\_ = PBM\_*(double)(size\_ \<\< 3)/(double)rate\_; PP\_ = 0; } else { interval\_ = 1e-100; //zero PP\_ += 1 ; } ... }
The timeout method puts the NEW_BURST flag in the first packet of a burst. This is useful for the PLM protocol to identify the beginning of a PP burst.
void CBR\_PP\_Traffic::timeout() { ... if (PP\_ == 0) agent\_-\>sendmsg(size\_, "NEW\_BURST"); else agent\_-\>sendmsg(size\_); ... }