[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MAC internal variables




Every time I needed to plot any of the TCP internal variables binded in
tcp.cc, that is:

---tcp.cc-------------
// Defaults for bound variables should be set in ns-default.tcl.
        bind("window_", &wnd_);
        bind("windowInit_", &wnd_init_);
        bind("windowInitOption_", &wnd_init_option_);

...
----------------------

I have managed to get the value of them in my tcl script with commands
like this: 

	set curr_window [$tcp0 set window_]

(where tcp0 is the tcp agent I am interested in)



Now I would like to plot the values binded in mac-csma.cc, ie

---mac-csma.cc-----------
MacCsma::MacCsma() : txstart_(0), rtx_(0), csense_(1), hEoc_(this)
{
        bind_time("ifs_", &ifs_);
        bind_time("slotTime_", &slotTime_);
        bind("cwmin_", &cwmin_);

...
--------------------------

... but I don't know exactly how to do something similar to what I did
before with TCP. Let's say I want to set up a LAN with N hosts and I want
to show how the cwin_ parameter of one single host A changes in different
scenarios... shall I get a handle for the MAC part of that node, let's say
node0_mac, and then do something like a:

	set curr_cwin [$node0_mac set cwin_]

And if it is done in such way, how can I get that handle? Can anyone help
me? 


Thanks in advance,

/FCD


----------------------------------------------------------------------
Fernando Cela
email: [email protected]                     phone: +46 31 772 1709