[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Phy/WirelessPhy set Rb_ 2*1e6 ??????? (fwd)
hi Vikram,
If bandwidth has been moved to phy.{cc,h}, the files in tcl/ex and
tcl/test should use a set bandwidth_ and not set Rb_ . What say?
btw, it seems this message of yours never got to the list becuase it
was your first after they started sending that faq new people. I am
inclkuding it in here.
..vikas
Date: Mon, 25 Dec 2000 13:01:12 -0600 (CST)
From: Vikram Kanodia <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: [ns] Phy/WirelessPhy set Rb_ 2*1e6 ???????
I agree....I have been using the original cmu extensions for mobile
networks (implemented for ns2.1b3) and their file named
sharedmedia.{cc,h}
(which is equivalent to wireless-phy.{cc,h} in ns2.1b6) has the parameter
Rb instead of bandwidth......
below is the snippet of their code:
as can be seen from their code everything in wireless-phy.cc is same as
theirs but for the parameter Rb/bandwidth.....maybe someone changed this
parameter to bandwidth in the .cc files but forgot to change in .tcl
file...
hope this helps...but i would love to know the exact answer too :)
-Vikram
SharedMedia::SharedMedia(void) : NetIf()
{
Rb = 2*1e6; // 2 Mb
Pt = pow(10, 2.45) * 1e-3; // 24.5 dbm, ~ 281.8mw
lambda = SPEED_OF_LIGHT / (914 * 1e6); // 914 mHz
L = 1.0;
freq = -1.0;
/*
* It sounds like 10db should be the capture threshold.
*
* If a node is presently receiving a packet a a power level
* Pa, and a packet at power level Pb arrives, the following
* comparion must be made to determine whether or not capture
* occurs:
*
* 10 * log(Pa) - 10 * log(Pb) > 10db
*
* OR equivalently
*
* Pa/Pb > 10.
*
*/
CPThresh = 10.0;
CSThresh = 1.559e-11;
RXThresh = 3.652e-10;
bind("CPThresh_", &CPThresh);
bind("CSThresh_", &CSThresh);
bind("RXThresh_", &RXThresh);
bind("Rb_", &Rb);
bind("Pt_", &Pt);
bind("freq_", &freq);
bind("L_", &L);
if (freq != -1.0)
{ // freq was set by tcl code
lambda = SPEED_OF_LIGHT / freq;
}
}
> I am quite puzzled by this. This variable Rb_ is set to 2Megs in a
> bunch of example and test files (in tcl/ex and tcl/test directories) using
> Phy/WirelessPhy set Rb_ 2*1e6. But quite astonishinlgy no such variable
> has been defined in wireless-phy.{cc,h} or any other file for that matter.
> It is there in phy.cc but the corresponding code is masked. Looking thru
> wireless-phy.cc it seems that set Rb_ should be actually set bandwidth_
> Here is the grep output in the ns_tree
>
>
> [vikas@indore ns-2.1b7]$ grep -r Rb_ *
> Binary file linkstate/ls.o matches
> Binary file linkstate/rtProtoLS.o matches
> Binary file ns matches
> phy.cc:// return hdr->size() * 8.0 /Rb_; ----->> this is masked !
> tcl/ex/PIdemo/estudy.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/diffusion-prob-run.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/diffusion-rate-run.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/flooding-run.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/grid2.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/gridkeeper.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/omni-run.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wired-cum-wireless-sim.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-demo-csci694.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-dsdv-newnode.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-landmark.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-mip-test.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-newnode-energy.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-pkt-demo.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless-test.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/wireless.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/ex/vikas-wireless-pkt-demo.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-energy.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-diffusion.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-gridkeeper.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-lan-aodv.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-lan-newnode.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-lan-tora.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-lan.tcl:Phy/WirelessPhy set Rb_ 2*1e6
> tcl/test/test-suite-wireless-tdma.tcl:Phy/WirelessPhy set Rb_ 2*1e6
>
>
>
> ..vikas
>
>
Department of ECE, Rice University | 713 348 3786 (O)| 713 664 5650(H)
http://www.ece.rice.edu/~kanodia