[ns] call-back from mac-802.11.cc to interface queue

2012-12-03 Thread Behnaz Bostanipour

Hi all,


As I checked in mac-802.11.cc, it seems that interface queue only sends one 
packet at a time to MAC 802.11 (but i am not 100% sure) and it waits to dequeue 
and send the next packet to 802.11 MAC until a callback is triggered by 
mac-802.11.

So the call back is triggered by mac-802.11 in tx_resume()

oid
Mac802_11::tx_resume()
{
double rTime;
assert(mhSend_.busy() == 0);
assert(mhDefer_.busy() == 0);

if(pktCTRL_) {
….  }
} else if(pktTx_) {

….
}
}
} else if(callback_) {
Handler *h = callback_;
callback_ = 0;
h-handle((Event*) 0);
}
setTxState(MAC_IDLE);

}

am I right?

Thanks,
Behnaz



Re: [ns] Default Channel bandwidth in 802.11?

2012-12-03 Thread Behnaz Bostanipour

Hello,

Thanks for you reply but my question is :
 
 1) How we know the value of bandwidth_ is Phy/WirelessPhy
 set bandwidth_, I though that I should find something like
 Mac 802.11 set bandwidth_ in ns-default.tcl 

and

 
 2)How should I choose the value of basicRate_, if I would
 like to set it my self? 

I mean what are usually the values that we choose.

Best regards.
Behnaz


 - Original Message -
 Expéditeur: Saravanan Kandasamy svana...@gmail.com
 à: ns-users@ISI.EDU ns-users@ISI.EDU
 Sujet: Re: [ns] Default Channel bandwidth in 802.11?
 Date: Sun, 2 Dec 2012 13:28:46 +
 
  Dear Behnaz,
  
  Looks like you don't quite understand how MAC 802.11
  works.
  
  Phy/WirelessPhy set bandwidth_ 2e6 will only be used if
  you have not set basicRate_ or dataRate_ in your MAC
  setup.
  
  Even so the transmission time does not do packet
  size/channel bandwidth, suggest you to study how
  Mac802_11::txtime(double psz, double drt) function works
  in mac-802.11.cc
  
  Good Luck.
  
  rgds
  Saravanan K
  
  On Sun, Dec 2, 2012 at 1:02 PM, Behnaz Bostanipour
  behnaz.bostanip...@unil.ch wrote:
  
   Hello,
  
   I would like to calculate transmission time (tx_time)
  for packets sent by  CMU MAC 802.11. 
   Usually we have tx_time=packet size/channel bandwidth.
  
   I looked in the ns-default.tcl file and I have found
  this value: 
   Phy/WirelessPhy set bandwidth_ 2e6
  
   Is this the value used for calculation of tx_time by
  802.11? 
   Thanks,
   Behnaz
  
  
 
 
 



[ns] NAM 1.15 issue on Fedora 16

2012-12-03 Thread Osama Rehman

Apologies if multiple copies if this question was received!!!

Hello, I m facing an issue with NAM 1.15, that was installed as a package
within the ns-allinone-2.35. Installation and configuration were done
right. NS is working fine, where simulations are going smooth. I can add
new agents, generate trace and nam trace file, and do all kind of
simulations.

My problem is that i m getting the error below, when executing nam. The
current OS i m using in Fedora 16. Any suggestions would be highly
appreciated.


###

[root@osamarehman ~]# nam

nam: Can't find a usable tk.tcl in the following directories:
/root/ns-allinone-2.35/tcl8.5.10/library/tk8.5
/root/ns-allinone-2.35/tcl8.5.10/tk8.5 ./lib/tk8.5
/root/ns-allinone-2.35/lib/tk8.5 ./library

/root/ns-allinone-2.35/lib/tk8.5/tk.tcl: wrong # args: should be ::source
fileName
wrong # args: should be ::source fileName
while executing
::source -encoding utf-8 /root/ns-allinone-2.35/lib/tk8.5/msgs/en.msg
(uplevel body line 1)
invoked from within
uplevel 1 [list ::source -encoding utf-8 $langfile]
(procedure ::msgcat::mcload line 10)
invoked from within
::msgcat::mcload [file join $::tk_library msgs]
(in namespace eval ::tk::msgcat script line 23)
invoked from within
namespace eval msgcat {
namespace export mc mcmax
if {[interp issafe] || [catch {package require msgcat}]} {
# The msgcat package...
(in namespace eval ::tk script line 3)
invoked from within
namespace eval ::tk {
# Set up the msgcat commands
namespace eval msgcat {
namespace export mc mcmax
if {[interp issafe] || [catch {p...
(file /root/ns-allinone-2.35/lib/tk8.5/tk.tcl line 21)
invoked from within
source.orig /root/ns-allinone-2.35/lib/tk8.5/tk.tcl
(uplevel body line 1)
invoked from within
uplevel source.orig [list $fileName]
invoked from within
if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig [list $fileName]
...
(procedure source line 8)
invoked from within
source /root/ns-allinone-2.35/lib/tk8.5/tk.tcl
(uplevel body line 1)
invoked from within
uplevel #0 [list source $file]


This probably means that tk wasn't installed properly.


###

Regards,
Osama Rehman