From 6c81abe28abb030feb9f5063e6f31becc3f8b5f8 Mon Sep 17 00:00:00 2001 From: John Abraham Date: Sun, 19 Jan 2014 05:58:53 -0800 Subject: [PATCH] NetAnim: Update example to track counters for multiple nodes --- src/netanim/examples/resources_demo.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/netanim/examples/resources_demo.cc b/src/netanim/examples/resources_demo.cc index 96c5aa633..bb3978a90 100644 --- a/src/netanim/examples/resources_demo.cc +++ b/src/netanim/examples/resources_demo.cc @@ -96,11 +96,14 @@ void modify () 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