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


Public Member Functions | |
| Star (int n, int src) | |
| void | flood (int, int) |
| Interface_List * | oif (int node, int iif) |
| double | backoff (int dst) |
| int | c () |
| 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_ |
| SrmNode * | node_ |
| int | idx_ |
| double | delay_ |
| double | D_ |
| double | frac_ |
| double | det_ |
| double | rand_ |
| int | rtt_est_ |
|
||||||||||||
|
Definition at line 224 of file srm-topo.h. References alpha_, beta_, c_, and topology.
|
|
|
Implements Topology. Definition at line 511 of file srm-topo.cc. References alpha_, beta_, c_, Topology::delay(), Topology::det_, Topology::idx(), Topology::rand_, topology, and Random::uniform().
00512 {
00513 double rtt = topology->delay(id, 0);
00514 double rbackoff;
00515 double p = Random::uniform(0.0, 1.0);
00516 static int bin = 0;
00517 int copies = c_;
00518 int size = topology->idx();
00519
00520 if (p <= copies * 1./size) {
00521 rbackoff = Random::uniform(0.0, alpha_);
00522 bin ++;
00523 } else {
00524 rbackoff = Random::uniform(beta_, 1.0 + beta_);
00525 }
00526 return (rtt * (det_ + rand_ * rbackoff));
00527 }
|
Here is the call graph for this function:

|
|
Definition at line 235 of file srm-topo.h. References c_.
00235 { return c_; }
|
|
||||||||||||
|
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 backoff(), BTree::backoff(), Line::backoff(), and SrmNode::send().
00145 { return delay_;}
|
|
||||||||||||
|
Implements Topology. Definition at line 165 of file srm-topo.cc. References Topology::D_, and Topology::delay_.
|
|
||||||||||||
|
Implements Topology. Definition at line 486 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 backoff(), and 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 492 of file srm-topo.cc. References Interface_List::append(), Topology::idx(), and topology.
00493 {
00494 int i;
00495 Interface_List *ilist = new Interface_List;
00496
00497 /* Make a list with every node except myself */
00498 for (i = 0; i < topology->idx(); i ++)
00499 {
00500 if (i != node && i != iif) {
00501 ilist->append(i);
00502 }
00503 }
00504
00505 return (ilist);
00506 }
|
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 Line::backoff().
00148 { return rtt_est_; }
|
|
|
Definition at line 241 of file srm-topo.h. |
|
|
Definition at line 242 of file srm-topo.h. |
|
|
Definition at line 240 of file srm-topo.h. |
|
|
Definition at line 156 of file srm-topo.h. Referenced by BTree::backoff(), Line::backoff(), Topology::D(), BTree::delay(), delay(), Line::delay(), and Topology::Topology(). |
|
|
Definition at line 155 of file srm-topo.h. Referenced by Topology::delay(), BTree::delay(), delay(), Line::delay(), and Topology::Topology(). |
|
|
Definition at line 158 of file srm-topo.h. Referenced by backoff(), BTree::backoff(), Line::backoff(), and Topology::Topology(). |
|
|
Definition at line 157 of file srm-topo.h. Referenced by BTree::backoff(), Line::backoff(), and Topology::Topology(). |
|
|
Definition at line 152 of file srm-topo.h. Referenced by Topology::idx(), Topology::node(), and Line::oif(). |
|
|
Definition at line 151 of file srm-topo.h. Referenced by flood(), BTree::flood(), Line::flood(), Topology::node(), Topology::Topology(), and Topology::~Topology(). |
|
|
Definition at line 159 of file srm-topo.h. Referenced by backoff(), BTree::backoff(), Line::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 239 of file srm-topo.h. |
1.3.3