Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Process Class Reference

#include <ns-process.h>

Inheritance diagram for Process:

Inheritance graph
[legend]
Collaboration diagram for Process:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Process ()
Process *& target ()
virtual void process_data (int size, AppData *data)
virtual AppDataget_data (int &size, AppData *req_data=0)
virtual void send_data (int size, AppData *data=0)

Protected Member Functions

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

Protected Attributes

Processtarget_

Constructor & Destructor Documentation

Process::Process  )  [inline]
 

Definition at line 96 of file ns-process.h.

References target_.

00096 : target_(0) {}


Member Function Documentation

int Process::command int  argc,
const char *const *  argv
[protected, virtual]
 

Reimplemented in Application, MediaApp, QA, EXPOO_Traffic, POO_Traffic, TrafficTrace, HttpApp, HttpYucInvalServer, HttpMInvalCache, HttpPercInvalCache, HttpUInvalAgent, MediaCache, MediaClient, MediaServer, and TcpApp.

Definition at line 53 of file ns-process.cc.

References abort(), and target().

Referenced by Application::command().

00054 {
00055         Tcl& tcl = Tcl::instance();
00056         if (strcmp(argv[1], "target") == 0) {
00057                 if (argc == 2) {
00058                         Process *p = target();
00059                         tcl.resultf("%s", p ? p->name() : "");
00060                         return TCL_OK;
00061                 } else if (argc == 3) { 
00062                         Process *p = (Process *)TclObject::lookup(argv[2]);
00063                         if (p == NULL) {
00064                                 fprintf(stderr, "Non-existent media app %s\n",
00065                                         argv[2]);
00066                                 abort();
00067                         }
00068                         target() = p;
00069                         return TCL_OK;
00070                 }
00071         }
00072         return TclObject::command(argc, argv);
00073 }

Here is the call graph for this function:

AppData * Process::get_data int &  size,
AppData req_data = 0
[virtual]
 

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:

void Process::process_data int  size,
AppData data
[virtual]
 

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 send_data().

00042 {
00043         abort();
00044 }

Here is the call graph for this function:

virtual void Process::send_data int  size,
AppData data = 0
[inline, virtual]
 

Definition at line 106 of file ns-process.h.

References process_data(), and 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:

Process*& Process::target  )  [inline]
 

Definition at line 97 of file ns-process.h.

References target_.

Referenced by QA::check_availability(), command(), HttpApp::command(), MediaApp::get_data(), QA::output(), and TcpApp::process_data().

00097 { return target_; }


Member Data Documentation

Process* Process::target_ [protected]
 

Definition at line 113 of file ns-process.h.

Referenced by HttpUInvalAgent::command(), Process(), HttpUInvalAgent::process_data(), send_data(), and target().


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 13:08:51 2004 for NS2.26SourcesOriginal by doxygen 1.3.3