[Ns-developers] Substituting ns components

Markus Freitag ezed at bpkt.de
Tue Jun 30 11:17:35 PDT 2009


Hi all,

I need the functionality of the network simulator in a special context, 
and therefore I want to get the TCL component names to a certain level 
of abstraction.

When I talk about components I mean nodes, agents, links etc.. The aim 
is NOT renaming these components, rather than implementing components 
which fit the same purpose as other components.

A simple example would be, that I could write either "set n0 [$ns node]" 
or "set n0 [$ns myOwnNodeName]".

I experimented with different classes, but I can't get any clou for a 
simple way to do this.
Shouldn't it be possible to define classes as subclasses of the 
components I want to substitute, and inherit all of their behaviour just 
with a new name?

Thanks for answering.

Kind regards,
Markus Freitag


More information about the Ns-developers mailing list