[Click] nsclick - interfacing with ns2

Michael Neufeld Michael.Neufeld at colorado.edu
Thu Sep 30 10:50:41 EDT 2004


Yup -- Kendy Kutzner added nsclick support a while back for calling 
Click element read and write handlers from TCL, I guess it must not have 
made it into the documentation. Here's a code snippet which initializes 
some Click element parameters at the start of simulation:

       # Tell the antenna control to go into "receive" mode
       $ns_ at 0 "[$node_($i) set classifier_] writehandler 
\"antennactl\" \"mode\" \"receive\""
       # Set parameters for idle naash thing
       $ns_ at 0 "[$node_($i) set classifier_] writehandler 
\"antennactl\" \"unrelatedtrafficmax\" \"$naashunrelatedsaturate\""
       $ns_ at 0 "[$node_($i) set classifier_] writehandler 
\"antennactl\" \"unrelatedtrafficupsub\" \"$naashunrelatedupsub\""
       $ns_ at 0 "[$node_($i) set classifier_] writehandler 
\"antennactl\" \"unrelatedtrafficdownsub\" \"$naashunrelateddownsub\""


Basic calling scheme is:

writehandler "elementname" "handlername" "value"

-Mike

Michael Voorhaen wrote:
> Hi,
> 
> I'm working on extending a click OLSR implementation and am currently 
> developing and testing the code using nsclick.
> 
> At the moment I am stuck trying to get some parameters from my tcl 
> script into click. Is there anyway I can do this in an easy way? I've 
> checked the nsclick manual, but there only AddressInfo is given as an 
> example. Perhaps there is an easy way to do all of this, but I haven't 
> found it yet. If it is not available I would be willing to implement this.
> 
> In any case can someone here direct me to the files that implement the 
> integration of click and ns2? I think I found a lot of references in 
> nsclick.cc, simclick.h, router.hh & .cc, but I am still missing the 
> actual link to ns2. I found nsclick-test.cc, but I guess this is just a 
> dummy file testing out some of the functionality. Are there any files 
> added to the ns2 source tree when applying the patch that I need to look 
> at?
> 
> A push in the right direction could be useful.
> 
> Best Regards,
> Michael
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list