Bug 225

Summary: NodeList Total Count
Product: ns-3 Reporter: Joe Kopena <tjkopena>
Component: networkAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: craigdo
Priority: P1    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: Add NodeList::GetNNodes() method.

Description Joe Kopena 2008-06-17 23:27:56 UTC
Currently NodeList does not have a method to fetch the total number of nodes, though it does present a GetNode(uint32_t n) method.  Note that NodeListPriv has this function, but it is not exposed in NodeList.  It seems natural to include the GetNNodes() function if a GetNode(n) function is presented.  This would be useful in cases where some generic code is interacting with the NodeList, i.e. to pick a random node, but doesn't necessarily know how many nodes the simulation script created.
Comment 1 Mathieu Lacage 2008-06-18 11:40:09 UTC
sounds good.
Comment 2 Joe Kopena 2008-06-18 12:07:15 UTC
Created attachment 171 [details]
Add NodeList::GetNNodes() method.

Attaching a patch in hopes of getting this minor fix included in RC1.
Comment 3 Joe Kopena 2008-06-18 12:08:24 UTC
Upping priority, CC'ing Craig explicitly to get this noticed for RC1.