[Ns-developers] Node names
Tom Henderson
tomh at tomh.org
Fri Jun 6 09:06:00 PDT 2008
Mathieu Lacage wrote:
> 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 :)
Returning to this thread, I did not patch the trace path system, but I
did create a patch to restore node names and to make it easy to fetch
nodes and devices by name. Comments?
http://www.nsnam.org/bugzilla/show_bug.cgi?id=215
- Tom
More information about the Ns-developers
mailing list