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

Re: [ns] MPLS simulation



the name of hte proc is what you'll say after node-config. the stuff after
enable-module should match your class name.

get-module returns a reference to a module instance inside a class. Not
really a typecast in the sense that you supply a module _name_ to it but
not a module _pointer_.

- Haobo

On Mon, 5 Feb 2001, Tulius Lima wrote:

> Haobo Yu,
> 
> 
>         Let's say that I want to create a new class RtModule/MPLS/TE. What should
> the code look like:
> 
> ___________
>     Simulator instproc TE { val } {
>           if { $val == "ON" } {
>                   Node enable-module "TE"
>           } else {
>                   Node disable-module "TE"
>           }
>      }
> ____________
> 
>         or it should be like this:
> 
> ____________
>     Simulator instproc TE { val } {
>           if { $val == "ON" } {
>                   Node enable-module "MPLS/TE"
>           } else {
>                   Node disable-module "MPLS/TE"
>           }
>      }
> ____________
> 
> 
>         I am making this question because the code is not working. Somehow, the
> child class don't know about the super class methods.
>         I noticed that there is a module_name() C++ function. What does it do?
>         Another question: I assume that the get-module{} tcl function is some
> sort of typecast, isn't it?
> 
> 
>         Thanks for your help!
>         Tulius
> 
> 
> 
> 
> 
>