[Ns-bugs] [Bug 140] New: NodeList::Connect vs TraceConnect for each node: bug?
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri Feb 15 08:08:31 PST 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=140
Summary: NodeList::Connect vs TraceConnect for each node: bug?
Product: ns-3
Version: pre-release
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: simulation core
AssignedTo: ns-bugs at isi.edu
ReportedBy: gjcarneiro at gmail.com
Please tell me if I am doing something wrong:
for (NodeList::Iterator iter = NodeList::Begin ();
iter != NodeList::End (); iter++)
{
Ptr<BenchNode> node = dynamic_cast<BenchNode*> (PeekPointer<Node>
(*iter));
node->TraceConnect ("/devices/*/queue/dequeue", MakeCallback
(&MonitorNeighbors));
}
In this case, the MonitorNeighbor trace function gets called, but only for node
0, not for any other node. Changing to this line at the end of the for loop
fixes the problem for me:
NodeList::Connect ("/nodes/*/devices/*/queue/dequeue", MakeCallback
(&MonitorNeighbors));
But I thought they were supposed to be equivalent? Am I misunderstanding the
API, or have I found a bug?
--
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