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

Re: how to add a member function to Simulator



On Thu, 09 Aug 2001 20:16:52 +0800, richard wrote: 
>hi:
>
>I want to add a member function(Tcl script) in Class
>Simulator(ns-lib.tcl) like
>
>Simulator instproc duplex-intserv-link { n1 n2 bw pd sched signal adc
>args } {
>        eval $self duplex-link $n1 $n2 $bw $pd intserv $sched $signal
>$adc $args
>}
>
>No matter  add this code to ns-lib.tcl or my Tcl scripts and recompile
>ok(make depend;make),it cannot find the c++ object which compiled ok!.
>
>Please tell me the right way to add/modify member function in ns-lib.tcl

You should be able to put OTcl code anywhere; putting this in your
script is the safest thing (so that you don't have to mess with
rebuilding ns every time you change this code).

You say you "cannot find the c++ object".  Can you report the exact
error?  It doesn't sound like it has anything to do with the rest of
your message.

   -John Heidemann