

Public Member Functions | |
| TrafficTrace () | |
| int | command (int argc, const char *const *argv) |
| virtual double | next_interval (int &) |
| 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 | timeout () |
| void | init () |
| virtual void | start () |
| virtual void | stop () |
Protected Attributes | |
| TraceFile * | tfile_ |
| tracerec | trec_ |
| int | ndx_ |
| double | nextPkttime_ |
| int | size_ |
| int | running_ |
| TrafficTimer | timer_ |
| Agent * | agent_ |
| int | enableRecv_ |
| int | enableResume_ |
| Process * | target_ |
|
|
Definition at line 198 of file traffictrace.cc. References tfile_.
|
|
||||||||||||
|
Reimplemented from Application. Definition at line 209 of file traffictrace.cc. References Application::command(), and tfile_.
00210 {
00211 Tcl& tcl = Tcl::instance();
00212
00213 if (argc == 3) {
00214 if (strcmp(argv[1], "attach-tracefile") == 0) {
00215 tfile_ = (TraceFile *)TclObject::lookup(argv[2]);
00216 if (tfile_ == 0) {
00217 tcl.resultf("no such node %s", argv[2]);
00218 return(TCL_ERROR);
00219 }
00220 return(TCL_OK);
00221 }
00222 }
00223
00224 return (TrafficGenerator::command(argc, argv));
00225
00226 }
|
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 203 of file traffictrace.cc. References ndx_, TraceFile::setup(), and tfile_.
|
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 245 of file traffictrace.cc. References TraceFile::get_next(), ndx_, tfile_, trec_, tracerec::trec_size, and tracerec::trec_time. Referenced by timeout().
|
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 228 of file traffictrace.cc. References Application::agent_, next_interval(), TrafficGenerator::nextPkttime_, TimerHandler::resched(), TrafficGenerator::running_, Agent::sendmsg(), TrafficGenerator::size_, and TrafficGenerator::timer_.
00229 {
00230 if (! running_)
00231 return;
00232
00233 /* send a packet */
00234 // Note: May need to set "NEW_BURST" flag in sendmsg() for
00235 // signifying a new talkspurt when using vat traces.
00236 // (see expoo.cc, tcl/ex/test-rcvr.tcl)
00237 agent_->sendmsg(size_);
00238 /* figure out when to send the next one */
00239 nextPkttime_ = next_interval(size_);
00240 /* schedule it */
00241 timer_.resched(nextPkttime_);
00242 }
|
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(), EXPOO_Traffic::init(), CBR_Traffic::init(), CBR_PP_Traffic::init(), QA::rap(), MediaApp::rap(), Application::send(), TcpApp::TcpApp(), timeout(), TelnetApp::timeout(), EXPOO_Traffic::timeout(), CBR_PP_Traffic::timeout(), and TcpApp::~TcpApp(). |
|
|
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 89 of file traffictrace.cc. Referenced by init(), and next_interval(). |
|
|
Definition at line 74 of file trafgen.h. Referenced by TrafficGenerator::start(), TrafficGenerator::timeout(), timeout(), EXPOO_Traffic::timeout(), and CBR_PP_Traffic::timeout(). |
|
|
Definition at line 76 of file trafgen.h. Referenced by TrafficGenerator::start(), CBR_Traffic::start(), CBR_PP_Traffic::start(), TrafficGenerator::stop(), TrafficGenerator::timeout(), timeout(), EXPOO_Traffic::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 87 of file traffictrace.cc. Referenced by command(), init(), next_interval(), and TrafficTrace(). |
|
|
Definition at line 77 of file trafgen.h. Referenced by TrafficGenerator::start(), TrafficGenerator::stop(), TrafficGenerator::timeout(), timeout(), EXPOO_Traffic::timeout(), and CBR_PP_Traffic::timeout(). |
|
|
Definition at line 88 of file traffictrace.cc. Referenced by next_interval(). |
1.3.3