[Ns-developers] Node names

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Fri May 30 08:18:38 PDT 2008


On Fri, 2008-05-30 at 02:30 -0400, Joseph Kopena wrote:

> Minor note that if this is enabled/promoted, users will expect and it
> would be useful to be able to use those names in attribute and trace
> paths:
> 
>   Config::Connect("/NodeList/my meaningful
> name/DeviceList/*/$ns3::WifiNetDevice/Tx",
>                   MakeBoundCallback(&TxCallback, totalTx));
> 
> Ditto for devices possibly.

Yeah, but that is not going to happen unless someone puts serious
thinking in designing a syntax for that and implementing it in the
Config code. A couple of people suggested to tom that we re-use the
XPath syntax and that is a great idea but doing so would require that:
  - we define a mapping from our data structures to XML
  - we get an XPath implementation in ns-3 (or use an external library)
  - generate an in-memory XML tree from our data structures
  - apply the XPath matching library to the XML tree
  - get the matches, use them to apply the changes to the underlying
data structures.

All of the above is perfectly feasible but it is a lot of work. Hint:
patches are welcome :)

regards,
Mathieu



More information about the Ns-developers mailing list