

Public Member Functions | |
| EXPOO_Traffic () | |
| virtual double | next_interval (int &) |
| virtual void | timeout () |
| int | command (int argc, const char *const *argv) |
| virtual double | interval () |
| virtual int | on () |
| virtual void | recv () |
| virtual void | recv (int nbytes) |
| virtual void | resume () |
| virtual void | send (int nbytes) |
| Process *& | target () |
| virtual void | process_data (int size, AppData *data) |
| virtual AppData * | get_data (int &size, AppData *req_data=0) |
| virtual void | send_data (int size, AppData *data=0) |
Protected Member Functions | |
| void | init () |
| virtual void | start () |
| virtual void | stop () |
Protected Attributes | |
| double | ontime_ |
| double | offtime_ |
| double | rate_ |
| double | interval_ |
| unsigned int | rem_ |
| ExponentialRandomVariable | burstlen_ |
| ExponentialRandomVariable | Offtime_ |
| double | nextPkttime_ |
| int | size_ |
| int | running_ |
| TrafficTimer | timer_ |
| Agent * | agent_ |
| int | enableRecv_ |
| int | enableResume_ |
| Process * | target_ |
|
|
Definition at line 84 of file expoo.cc. References ExponentialRandomVariable::avgp(), Offtime_, ontime_, rate_, and TrafficGenerator::size_.
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from Application. Definition at line 71 of file expoo.cc. References burstlen_, Application::command(), Offtime_, and RandomVariable::seed().
00071 {
00072
00073 if(argc==3){
00074 if (strcmp(argv[1], "use-rng") == 0) {
00075 burstlen_.seed((char *)argv[2]);
00076 Offtime_.seed((char *)argv[2]);
00077 return (TCL_OK);
00078 }
00079 }
00080 return Application::command(argc,argv);
00081 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented in MediaApp, QA, HttpApp, HttpUInvalAgent, MediaCache, MediaServer, and TcpApp. Definition at line 46 of file ns-process.cc. References abort(). Referenced by QA::check_availability(), MediaApp::get_data(), RapAgent::IpgTimeout(), and QA::output().
00047 {
00048 abort();
00049 /* NOTREACHED */
00050 return NULL; // Make msvc happy
00051 }
|
Here is the call graph for this function:

|
|
Reimplemented from TrafficGenerator. Definition at line 92 of file expoo.cc. References Application::agent_, burstlen_, interval_, ontime_, PT_EXP, rate_, rem_, Agent::set_pkttype(), ExponentialRandomVariable::setavg(), and TrafficGenerator::size_.
00093 {
00094 /* compute inter-packet interval during bursts based on
00095 * packet size and burst rate. then compute average number
00096 * of packets in a burst.
00097 */
00098 interval_ = (double)(size_ << 3)/(double)rate_;
00099 burstlen_.setavg(ontime_/interval_);
00100 rem_ = 0;
00101 if (agent_)
00102 agent_->set_pkttype(PT_EXP);
00103 }
|
Here is the call graph for this function:

|
|
Reimplemented in CBR_PP_Traffic, and CBR_Traffic. Definition at line 63 of file trafgen.h. Referenced by SA_Agent::sendpkt().
00063 { return 0; }
|
|
|
Implements TrafficGenerator. Definition at line 105 of file expoo.cc. References burstlen_, interval_, Offtime_, rem_, TrafficGenerator::size_, and ExponentialRandomVariable::value(). Referenced by timeout().
00106 {
00107 double t = interval_;
00108
00109 if (rem_ == 0) {
00110 /* compute number of packets in next burst */
00111 rem_ = int(burstlen_.value() + .5);
00112 /* make sure we got at least 1 */
00113 if (rem_ == 0)
00114 rem_ = 1;
00115 /* start of an idle period, compute idle time */
00116 t += Offtime_.value();
00117 }
00118 rem_--;
00119
00120 size = size_;
00121 return(t);
00122 }
|
Here is the call graph for this function:

|
|
Reimplemented in POO_Traffic. Definition at line 64 of file trafgen.h. Referenced by SA_Agent::stoponidle(), and SA_Agent::timeout().
00064 { return 0; }
|
|
||||||||||||
|
Reimplemented in MediaApp, HttpApp, HttpMInvalCache, HttpUInvalAgent, MediaCache, MediaClient, and TcpApp. Definition at line 41 of file ns-process.cc. References abort(). Referenced by HttpUInvalAgent::process_data(), UdpAgent::recv(), RapAgent::recv(), and Process::send_data().
00042 {
00043 abort();
00044 }
|
Here is the call graph for this function:

|
|
Reimplemented in TcpApp. Definition at line 115 of file app.cc. References Application::enableRecv_. Referenced by SimpleTcpAgent::recv(), Agent::recv(), and Agent::recvBytes().
00116 {
00117 if (! enableRecv_)
00118 return;
00119 Tcl& tcl = Tcl::instance();
00120 tcl.evalf("%s recv %d", name_, nbytes);
00121 }
|
|
|
Definition at line 67 of file trafgen.h.
00067 {}
|
|
|
Reimplemented from Application. Definition at line 68 of file trafgen.h.
00068 {}
|
|
|
Definition at line 109 of file app.cc. References Application::agent_, and Agent::sendmsg(). Referenced by Application::command(), TcpApp::send(), and TrafficGenerator::timeout().
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 106 of file ns-process.h. References Process::process_data(), and Process::target_. Referenced by TcpApp::process_data(), and MediaApp::process_data().
00106 {
00107 if (target_)
00108 target_->process_data(size, data);
00109 }
|
Here is the call graph for this function:

|
|
Reimplemented from Application. Reimplemented in CBR_PP_Traffic, and CBR_Traffic. Definition at line 49 of file trafgen.cc. References TrafficGenerator::init(), TrafficGenerator::next_interval(), TrafficGenerator::nextPkttime_, TimerHandler::resched(), TrafficGenerator::running_, TrafficGenerator::size_, and TrafficGenerator::timer_.
00050 {
00051 init();
00052 running_ = 1;
00053 nextPkttime_ = next_interval(size_);
00054 timer_.resched(nextPkttime_);
00055 // Enable line below if you want to send immediately upon start
00056 //timeout();
00057 }
|
Here is the call graph for this function:

|
|
Reimplemented from Application. Definition at line 60 of file trafgen.cc. References TimerHandler::cancel(), TrafficGenerator::running_, and TrafficGenerator::timer_.
|
Here is the call graph for this function:

|
|
Definition at line 97 of file ns-process.h. References Process::target_. Referenced by QA::check_availability(), Process::command(), HttpApp::command(), MediaApp::get_data(), QA::output(), and TcpApp::process_data().
00097 { return target_; }
|
|
|
Reimplemented from TrafficGenerator. Definition at line 124 of file expoo.cc. References Application::agent_, interval_, next_interval(), TrafficGenerator::nextPkttime_, TimerHandler::resched(), TrafficGenerator::running_, Agent::sendmsg(), TrafficGenerator::size_, and TrafficGenerator::timer_.
00125 {
00126 if (! running_)
00127 return;
00128
00129 /* send a packet */
00130 // The test tcl/ex/test-rcvr.tcl relies on the "NEW_BURST" flag being
00131 // set at the start of any exponential burst ("talkspurt").
00132 if (nextPkttime_ != interval_ || nextPkttime_ == -1)
00133 agent_->sendmsg(size_, "NEW_BURST");
00134 else
00135 agent_->sendmsg(size_);
00136 /* figure out when to send the next one */
00137 nextPkttime_ = next_interval(size_);
00138 /* schedule it */
00139 if (nextPkttime_ > 0)
00140 timer_.resched(nextPkttime_);
00141 }
|
Here is the call graph for this function:

|
|
Definition at line 60 of file app.h. Referenced by Application::command(), RA_Traffic::init(), POO_Traffic::init(), init(), CBR_Traffic::init(), CBR_PP_Traffic::init(), QA::rap(), MediaApp::rap(), Application::send(), TcpApp::TcpApp(), TrafficTrace::timeout(), TelnetApp::timeout(), timeout(), CBR_PP_Traffic::timeout(), and TcpApp::~TcpApp(). |
|
|
Definition at line 52 of file expoo.cc. Referenced by command(), init(), and next_interval(). |
|
|
Definition at line 61 of file app.h. Referenced by Application::command(), and Application::recv(). |
|
|
Definition at line 62 of file app.h. Referenced by Application::command(), and Application::resume(). |
|
|
Definition at line 48 of file expoo.cc. Referenced by init(), next_interval(), and timeout(). |
|
|
Definition at line 74 of file trafgen.h. Referenced by TrafficGenerator::start(), TrafficGenerator::timeout(), TrafficTrace::timeout(), timeout(), and CBR_PP_Traffic::timeout(). |
|
|
Definition at line 53 of file expoo.cc. Referenced by command(), EXPOO_Traffic(), and next_interval(). |
|
|
|
|
|
Definition at line 45 of file expoo.cc. Referenced by EXPOO_Traffic(), and init(). |
|
|
Definition at line 47 of file expoo.cc. Referenced by EXPOO_Traffic(), and init(). |
|
|
Definition at line 49 of file expoo.cc. Referenced by init(), and next_interval(). |
|
|
Definition at line 76 of file trafgen.h. Referenced by TrafficGenerator::start(), CBR_Traffic::start(), CBR_PP_Traffic::start(), TrafficGenerator::stop(), TrafficGenerator::timeout(), TrafficTrace::timeout(), timeout(), and CBR_PP_Traffic::timeout(). |
|
|
|
Definition at line 113 of file ns-process.h. Referenced by HttpUInvalAgent::command(), Process::Process(), HttpUInvalAgent::process_data(), Process::send_data(), and Process::target(). |
|
|
Definition at line 77 of file trafgen.h. Referenced by TrafficGenerator::start(), TrafficGenerator::stop(), TrafficGenerator::timeout(), TrafficTrace::timeout(), timeout(), and CBR_PP_Traffic::timeout(). |
1.3.3