Bug 225 - NodeList Total Count
NodeList Total Count
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
pre-release
All All
: P1 minor
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-17 23:27 UTC by Joe Kopena
Modified: 2008-07-01 13:32 UTC (History)
1 user (show)

See Also:


Attachments
Add NodeList::GetNNodes() method. (787 bytes, patch)
2008-06-18 12:07 UTC, Joe Kopena
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.