#include <channel.h>
Inheritance diagram for WirelessChannel:


Public Member Functions | |
| WirelessChannel (void) | |
| virtual int | command (int argc, const char *const *argv) |
| virtual void | recv (Packet *p, Handler *) |
| double | maxdelay () |
| int | index () |
Public Attributes | |
| if_head | ifhead_ |
| TclObject * | gridkeeper_ |
Protected Attributes | |
| int | index_ |
| double | delay_ |
| Trace * | trace_ |
Private Member Functions | |
| double | get_pdelay (Node *tnode, Node *rnode) |
|
|
Definition at line 305 of file channel.cc.
00305 : Channel() {} |
|
||||||||||||
|
Definition at line 97 of file channel.cc. References Channel::ifhead_, Channel::index_, and Channel::trace_.
00098 {
00099
00100 if (argc == 3) {
00101 TclObject *obj;
00102
00103 if( (obj = TclObject::lookup(argv[2])) == 0) {
00104 fprintf(stderr, "%s lookup failed\n", argv[1]);
00105 return TCL_ERROR;
00106 }
00107 if (strcmp(argv[1], "trace-target") == 0) {
00108 trace_ = (Trace*) obj;
00109 return (TCL_OK);
00110 }
00111 else if(strcmp(argv[1], "addif") == 0) {
00112 ((Phy*) obj)->insertchnl(&ifhead_);
00113 ((Phy*) obj)->setchnl(this);
00114 return TCL_OK;
00115 }
00116 // add interface for grid_keeper_
00117 /*else if(strncasecmp(argv[1], "grid_keeper", 5) == 0) {
00118 grid_keeper_ = (GridKeeper*)obj;
00119 return TCL_OK;
00120 }*/
00121 } else if (argc == 2) {
00122 Tcl& tcl = Tcl::instance();
00123 if (strcmp(argv[1], "trace-target") == 0) {
00124 tcl.resultf("%s", trace_->name());
00125 return (TCL_OK);
00126 }
00127 else if(strcmp(argv[1], "id") == 0) {
00128 tcl.resultf("%d", index_);
00129 return TCL_OK;
00130 }
00131 }
00132 return TclObject::command(argc, argv);
00133 }
|
|
||||||||||||
|
Reimplemented from Channel. Definition at line 308 of file channel.cc. References MobileNode::propdelay().
00309 {
00310 // Scheduler &s = Scheduler::instance();
00311 MobileNode* tmnode = (MobileNode*)tnode;
00312 MobileNode* rmnode = (MobileNode*)rnode;
00313 double propdelay = 0;
00314
00315 propdelay = tmnode->propdelay(rmnode);
00316
00317 assert(propdelay >= 0.0);
00318 if (propdelay == 0.0) {
00319 /* if the propdelay is 0 b/c two nodes are on top of
00320 each other, move them slightly apart -dam 7/28/98 */
00321 propdelay = 2 * DBL_EPSILON;
00322 //printf ("propdelay 0: %d->%d at %f\n",
00323 // tmnode->address(), rmnode->address(), s.clock());
00324 }
00325 return propdelay;
00326 }
|
Here is the call graph for this function:

|
|
Definition at line 67 of file channel.h. References Channel::index_.
00067 {return index_;}
|
|
|
Definition at line 66 of file channel.h. References Channel::delay_. Referenced by Mac802_3::sendDown().
00066 { return delay_; };
|
|
||||||||||||
|
Reimplemented in NoDupChannel. Definition at line 136 of file channel.cc. References Channel::sendUp(). Referenced by WirelessPhy::sendDown(), WiredPhy::sendDown(), RepeaterPhy::sendDown(), and SatPhy::sendDown().
|
Here is the call graph for this function:

|
|
Definition at line 80 of file channel.h. Referenced by Channel::Channel(), Channel::get_pdelay(), Channel::maxdelay(), and NoDupChannel::recv(). |
|
|
|
|
|
|
Definition at line 79 of file channel.h. Referenced by Channel::Channel(), Channel::command(), SatChannel::getId(), and Channel::index(). |
|
|
Definition at line 85 of file channel.h. Referenced by Channel::command(). |
1.3.3