[ns] Mac - Link layer
nill_akaser_tara at yahoo.com
Tue Jul 14 03:06:39 PDT 2009
Well.If u want to enter into the wirelessPhy::command() ,you need to have a wirelessphy object in your tcl side. Suppose the name of the phy object for node 0 is obj(0).
Then in the tcl script if u put the command:
$obj(0) mystring .......... ,the control will go to the wirelessphy::command() function, where argv will be mystring in this case.
--- On Mon, 7/13/09, Santhosh Kumar <vsantu88 at gmail.com> wrote:
> From: Santhosh Kumar <vsantu88 at gmail.com>
> Subject: Re: [ns] Mac - Link layer
> To: "qweq adcsad" <nill_akaser_tara at yahoo.com>
> Cc: "NS Users" <ns-users at isi.edu>, "Dalton Cézane" <daltoncezane at gmail.com>
> Date: Monday, July 13, 2009, 11:47 PM
> On Tue, Jul
> 14, 2009 at 11:01 AM, qweq adcsad <nill_akaser_tara at yahoo.com>
> to insert your own hook from tcl script if necessary and
> take the
> control from the command() function. You can also insert
> ur own code
> without any hook.
> I have a nagging doubt. If you
> look at the code in wireless-phy.cc (in
> $NSROOT/ns-2.34/mac), or many
> other C++ files, there will be a member called
> "WirelessPhy::command(int argc, const char*const*
> in which there are commands like NodeOn/NodeOff,
> How do I access these functions from TCL Script. It is
> necessary for me
> to disable some nodes during the simluation of my project
> for which I
> am planning to use these functions.
> Any help would be appreciated. Thanks in Advance.
> Santhosh Kumar
> Senior Year, Electrical Engineering
> Indian Institute of Technology, Madras
More information about the Ns-users