# HG changeset patch # User John Abraham # Date 1390139933 28800 # Node ID 4ec4b3dcb42a4527a0f79c7225789ae0841a17d5 # Parent 6cdf44cd956e871dd7113d7daa70592edb6ab8cb NetAnim: Update example to track counters for multiple nodes diff -r 6cdf44cd956e -r 4ec4b3dcb42a src/netanim/examples/resources_demo.cc --- a/src/netanim/examples/resources_demo.cc Sat Jan 18 20:03:20 2014 -0800 +++ b/src/netanim/examples/resources_demo.cc Sun Jan 19 05:58:53 2014 -0800 @@ -96,11 +96,14 @@ for (uint32_t nodeId = 4; nodeId < 12; ++nodeId) pAnim->UpdateNodeColor (nodeId, color.r, color.g, color.b); - // Update Node Counter for node 0, use some random number between 0 to 1000 for value + // Update Node Counter for node 0 and node 5, use some random number between 0 to 1000 for value Ptr rv = CreateObject (); pAnim->UpdateNodeCounter (nodeCounterIdUint32, 0, rv->GetValue (0, 1000)); pAnim->UpdateNodeCounter (nodeCounterIdDouble1, 0, rv->GetValue (100.0, 200.0)); pAnim->UpdateNodeCounter (nodeCounterIdDouble2, 0, rv->GetValue (300.0, 400.0)); + pAnim->UpdateNodeCounter (nodeCounterIdUint32, 5, rv->GetValue (0, 1000)); + pAnim->UpdateNodeCounter (nodeCounterIdDouble1, 5, rv->GetValue (100.0, 200.0)); + pAnim->UpdateNodeCounter (nodeCounterIdDouble2, 5, rv->GetValue (300.0, 400.0)); if (Simulator::Now ().GetSeconds () < 10) // This is important or the simulation // will run endlessly