[Ns-bugs] [Bug 284] cannot use config paths to get a handle on an object

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Tue Aug 12 08:41:10 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=284





------- Comment #3 from raj.b at gatech.edu  2008-08-12 11:41 -------
(In reply to comment #0)
> some users asked me today why it was not possible to use
> /NodeList/x/DeviceList/y to get access to a specific device.
> 
> Of course, the answer is that there is not necessarily a single match for a
> specific string so, we would have to provide this:
> 
> namespace Config {
> 
> std::vector<Ptr<Object> > LookupMatching (std::string path);
> 
> }
> 

It seems to me that there are four types of things the config strings can
specify: trace sources, nodes, devices, and things aggregated to a node (I feel
like I'm forgetting some other use of these though...).  In the specific cases
of nodes or devices, it might be nice to have different APIs that return a more
specific container:

namespace Config {

NodeContainer LookupMatchingNodes (std::string path);
NetDeviceContainer LookupMatchingNetDevices (std::string path);
std::vector<Ptr<Object> > LookupMatchingObjects (std::string path);

}

And I can't think of why anyone would want to directly get a handle to a
TracedValue or TracedCallback, so perhaps this should be disallowed?


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list