[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to add a member function to Simulator
> 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!.
What do you mean c++ object? If you define an instproc in otcl you'll be
able to use it after you define it.
Pls do a grep on "Simulator instproc" on tcl/ex/*.tcl for examples.
- haobo