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

Re: [ns] Problems with bind...



Hi,

Thanks for the reply..I tried it out, but it didnt work. I think

1) For this to work, I must have defined methods by which the param can be
transferred at command line option ..This is what I am trying to do here,
right ? .(please correct me if I am wrong)

2) Moreover, this will create a seperate instance of Queue/ARO. So if I gave
something like

$ns simplex-link $n0 $n1 0.5Mb 10ms ARO
$ns queue-limit $n0 $n1 10000
set aro [new Queue/ARO]
$aro set rho_targ_ 0.8

instead of just this
#Queue/ARO set rho_targ_ .8

then would both be attached to the same instance ?? Shouldnt I attach them
explicitly ?

Thanks

- Ganesh

Sowmya Manjanatha wrote:

> You can declare an object of "Queue/ARO" class, let's
> call it
>
> set aro [new Queue/ARO]
> $aro set rho_targ_ 0.8
>
> if that helps.
>
> Sowmya.
>
> On Thu, 5 Jul 2001, Ganesh wrote:
>
> > Hi,
> >
> > I have some variables in my C++ program, for which I need input from the
> > tcl file.
> > So I declared them in the header file and then tried binding them from
> > the .cc file.
> >
> > 1) declaration: (in .h)
> >  double rho_targ ;  /* this is in the structure aro_p, and aro_p_ is of
> > type aro_p */
> >
> > 2) binding(in .cc)
> > bind("rho_targ_", &aro_p_.rho_targ);
> >
> > 3) in ns-default.tcl file
> > Queue/ARO set rho_targ_ 0.9
> >
> > 4) And in simulation  tcl file
> > Queue/ARO set rho_targ_ 0.8
> >
> > But the problem I am facing is that, this new value of 0.8 isnt binded
> > to the C++ variable rho_targ. It still has the default value.
> > How can I come over this?
> >
> > Thanks
> > -Ganesh
> >
> >
> >
> > --
> >

--