#include <srm-topo.h>
Inheritance diagram for Line:


Public Member Functions | |
| Line (int n, int src) | |
| void | flood (int, int) |
| Interface_List * | oif (int node, int iif) |
| double | backoff (int dst) |
| double | delay (int src, int dst) |
| int | command (int argc, const char *const *argv) |
| int | idx () |
| SrmNode * | node (int nn) |
| double | delay () |
| double | D () |
| int | rtt_estimated () |
Protected Attributes | |
| int | src_ |
| int | c_ |
| double | alpha_ |
| double | beta_ |
| int | c2func_ |
| SrmNode * | node_ |
| int | idx_ |
| double | delay_ |
| double | D_ |
| double | frac_ |
| double | det_ |
| double | rand_ |
| int | rtt_est_ |
|
||||||||||||
|
Definition at line 168 of file srm-topo.h. References alpha_, beta_, c2func_, c_, and topology.
|
|
|
Implements Topology. Definition at line 82 of file srm-topo.cc. References c2func_, CONSTANT, Topology::D_, Topology::delay(), Topology::det_, Topology::frac_, LINEAR, LOG, Topology::rand_, Topology::rtt_estimated(), SQRT, topology, and Random::uniform().
00083 {
00084 double rtt;
00085
00086 if (topology->rtt_estimated() == 1)
00087 rtt = delay(dst, 0);
00088 else rtt = D_ * frac_;
00089 double b;
00090 double sqroot = sqrt(rtt);
00091 double r = Random::uniform(0.0, 1.0);
00092
00093 switch(c2func_) {
00094 case LOG :
00095 b = rtt * (det_ + rand_ * r * log(rtt)/log(D_));
00096 break;
00097 case SQRT :
00098 b = rtt * (det_ + rand_ * r * sqroot/sqrt(D_));
00099 break;
00100 case LINEAR :
00101 b = rtt * (det_ + rand_ * r * rtt/D_);
00102 break;
00103 case CONSTANT :
00104 b = rtt * (det_ + rand_ * r * 1.);
00105 break;
00106 }
00107 return b;
00108 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 53 of file srm-topo.cc. References Topology::flood().
00054 {
00055 //Tcl& tcl = Tcl::instance();
00056 if (argc == 3) {
00057 if (strcmp(argv[1], "flood") == 0) {
00058 flood(0, atoi(argv[2]));
00059 return (TCL_OK);
00060 }
00061 }
00062 return (TclObject::command(argc, argv));
00063 }
|
Here is the call graph for this function:

|
|
Definition at line 146 of file srm-topo.h. References Topology::D_. Referenced by BTree::backoff().
00146 { return D_;}
|
|
|
Definition at line 145 of file srm-topo.h. References Topology::delay_. Referenced by Star::backoff(), BTree::backoff(), backoff(), and SrmNode::send().
00145 { return delay_;}
|
|
||||||||||||
|
Implements Topology. Definition at line 156 of file srm-topo.cc. References abs(), Topology::D_, and Topology::delay_.
|
Here is the call graph for this function:

|
||||||||||||
|
Implements Topology. Definition at line 197 of file srm-topo.cc. References Topology::node_, SrmNode::send(), and SRM_DATA.
|
Here is the call graph for this function:

|
|
Definition at line 142 of file srm-topo.h. References Topology::idx_. Referenced by Star::backoff(), and Star::oif().
00142 { return idx_; }
|
|
|
Definition at line 65 of file srm-topo.cc. References Topology::idx_, and Topology::node_. Referenced by SrmNode::send().
|
|
||||||||||||
|
Implements Topology. Definition at line 136 of file srm-topo.cc. References Interface_List::append(), Topology::idx_, and SRM_NOIF.
00137 {
00138 //int oif;
00139 Interface_List *ilist = new Interface_List;
00140
00141 /* If there are no more nodes downstream, return -1 */
00142 if ((iif <= node && node >= idx_ - 1) || (iif > node && node == 0))
00143 return 0;
00144
00145 if (iif == SRM_NOIF)
00146 {
00147 ilist->append(node + 1);
00148 ilist->append(node - 1);
00149 } else if (iif <= node)
00150 ilist->append(node + 1);
00151 else
00152 ilist->append(node - 1);
00153 return (ilist);
00154 }
|
Here is the call graph for this function:

|
|
Definition at line 148 of file srm-topo.h. References Topology::rtt_est_. Referenced by BTree::backoff(), and backoff().
00148 { return rtt_est_; }
|
|
|
Definition at line 182 of file srm-topo.h. Referenced by Line(). |
|
|
Definition at line 183 of file srm-topo.h. Referenced by Line(). |
|
|
Definition at line 184 of file srm-topo.h. |
|
|
Definition at line 181 of file srm-topo.h. Referenced by Line(). |
|
|
Definition at line 156 of file srm-topo.h. Referenced by BTree::backoff(), backoff(), Topology::D(), BTree::delay(), Star::delay(), delay(), and Topology::Topology(). |
|
|
Definition at line 155 of file srm-topo.h. Referenced by Topology::delay(), BTree::delay(), Star::delay(), delay(), and Topology::Topology(). |
|
|
Definition at line 158 of file srm-topo.h. Referenced by Star::backoff(), BTree::backoff(), backoff(), and Topology::Topology(). |
|
|
Definition at line 157 of file srm-topo.h. Referenced by BTree::backoff(), backoff(), and Topology::Topology(). |
|
|
Definition at line 152 of file srm-topo.h. Referenced by Topology::idx(), Topology::node(), and oif(). |
|
|
Definition at line 151 of file srm-topo.h. Referenced by Star::flood(), BTree::flood(), flood(), Topology::node(), Topology::Topology(), and Topology::~Topology(). |
|
|
Definition at line 159 of file srm-topo.h. Referenced by Star::backoff(), BTree::backoff(), backoff(), and Topology::Topology(). |
|
|
Definition at line 160 of file srm-topo.h. Referenced by Topology::rtt_estimated(), and Topology::Topology(). |
|
|
Reimplemented from Topology. Definition at line 180 of file srm-topo.h. |
1.3.3