diff --git a/doc/models/Makefile b/doc/models/Makefile index 528a63915..a348ad1cc 100644 --- a/doc/models/Makefile +++ b/doc/models/Makefile @@ -213,28 +213,20 @@ SOURCEFIGS = \ $(SRC)/stats/doc/gnuplot-example.png \ $(SRC)/stats/doc/gnuplot-helper-example.png \ $(SRC)/stats/doc/seventh-packet-byte-count.png \ - $(SRC)/netanim/doc/figures/Dumbbell.png \ - $(SRC)/netanim/doc/figures/Dumbbell.pdf \ $(SRC)/netanim/doc/figures/PacketStatistics.png \ $(SRC)/netanim/doc/figures/PacketStatistics.pdf \ - $(SRC)/netanim/doc/figures/FastForward.png \ - $(SRC)/netanim/doc/figures/FastForward.pdf \ - $(SRC)/netanim/doc/figures/Wireless.png \ - $(SRC)/netanim/doc/figures/Wireless.pdf \ - $(SRC)/netanim/doc/figures/Precision.png \ - $(SRC)/netanim/doc/figures/Precision.pdf \ - $(SRC)/netanim/doc/figures/Persist.png \ - $(SRC)/netanim/doc/figures/Persist.pdf \ - $(SRC)/netanim/doc/figures/SimTime.png \ - $(SRC)/netanim/doc/figures/SimTime.pdf \ + $(SRC)/netanim/doc/figures/NetAnim_3_105.png \ + $(SRC)/netanim/doc/figures/NetAnim_3_105.pdf \ $(SRC)/netanim/doc/figures/Trajectory.png \ $(SRC)/netanim/doc/figures/Trajectory.pdf \ - $(SRC)/netanim/doc/figures/UpdateRateInterval.png \ - $(SRC)/netanim/doc/figures/UpdateRateInterval.pdf \ - $(SRC)/netanim/doc/figures/WithoutPrecision.png \ - $(SRC)/netanim/doc/figures/WithoutPrecision.pdf \ - $(SRC)/netanim/doc/figures/WithPrecision.png \ - $(SRC)/netanim/doc/figures/WithPrecision.pdf \ + $(SRC)/netanim/doc/figures/NodeCountersChart.png \ + $(SRC)/netanim/doc/figures/NodeCountersChart.pdf \ + $(SRC)/netanim/doc/figures/NodeCountersTable.png \ + $(SRC)/netanim/doc/figures/NodeCountersTable.pdf \ + $(SRC)/netanim/doc/figures/RoutingTables.png \ + $(SRC)/netanim/doc/figures/RoutingTables.pdf \ + $(SRC)/netanim/doc/figures/PacketTimeline.png \ + $(SRC)/netanim/doc/figures/PacketTimeline.pdf \ $(SRC)/spectrum/doc/spectrum-channel-phy-interface.png \ $(SRC)/spectrum/doc/spectrum-channel-phy-interface.pdf \ $(SRC)/spectrum/doc/spectrum-analyzer-example.eps diff --git a/src/netanim/doc/animation.rst b/src/netanim/doc/animation.rst index 0b056d843..2bbc1898e 100644 --- a/src/netanim/doc/animation.rst +++ b/src/netanim/doc/animation.rst @@ -17,20 +17,13 @@ NetAnim NetAnim is a standalone, Qt4-based software executable that uses a trace file generated during an |ns3| simulation to display the topology and animate the packet flow between nodes. -.. figure:: figures/Dumbbell.* +.. figure:: figures/NetAnim_3_105.* :align: center :width: 500px :height: 400px An example of packet animation on wired-links -.. figure:: figures/Wireless.* - :align: center - :width: 480px - :height: 400px - - An example of packet animation on wireless-links - In addition, NetAnim also provides useful features such as tables to display meta-data of packets like the image below .. figure:: figures/PacketStatistics.* @@ -39,7 +32,7 @@ In addition, NetAnim also provides useful features such as tables to display met An example of tables for packet meta-data with protocol filters -and a way to visualize the trajectory of a mobile node +A way to visualize the trajectory of a mobile node .. figure:: figures/Trajectory.* :align: center @@ -47,6 +40,28 @@ and a way to visualize the trajectory of a mobile node An example of the trajectory of a mobile node +A way to display the routing-tables of multiple nodes at various points in time + +.. figure:: figures/RoutingTables.* + :align: center + :width: 500px + +A way to display counters associated with multiple nodes as a chart or a table + +.. figure:: figures/NodeCountersChart.* + :align: center + :width: 500px + +.. figure:: figures/NodeCountersTable.* + :align: center + :width: 500px + +A way to view the timeline of packet transmit and receive events + +.. figure:: figures/PacketTimeline.* + :align: center + :width: 500px + Methodology =========== The class ns3::AnimationInterface is responsible for the creation the trace XML file. @@ -200,6 +215,29 @@ With the above statement, AnimationInterface records the meta-data of each packe CAUTION: Enabling this feature will result in larger XML trace files. Please do NOT enable this feature when using Wimax links. +:: + + // Step 6 + anim.UpdateNodeDescription (5, "Access-point"); + +With the above statement, AnimationInterface assigns the text "Access-point" to node 5. + +:: + + // Step 7 + anim.UpdateNodeSize (6, 1.5, 1.5); + +With the above statement, AnimationInterface sets the node size to scale by 1.5. NetAnim automatically scales the graphics view to fit the oboundaries of the topology. This means that NetAnim, can abnormally scale a node's size too high or too low. Using AnimationInterface::UpdateNodeSize allows you to overwrite the default scaling in NetAnim and use your own custom scale. + +:: + + // Step 8 + anim.UpdateNodeCounter (89, 7, 3.4); + +With the above statement, AnimationInterface sets the counter with Id == 89, associated with Node 7 with the value 3.4. +The counter with Id 89 is obtained using AnimationInterface::AddNodeCounter. An example usage for this is in src/netanim/examples/resources_demo.cc. + + Step 2: Loading the XML in NetAnim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -210,138 +248,6 @@ Step 2: Loading the XML in NetAnim Here is a video illustrating this http://www.youtube.com/watch?v=tz_hUuNwFDs -Essential settings of NetAnim -============================= - -Persist combobox -~~~~~~~~~~~~~~~~ -.. figure:: figures/Persist.* - :width: 150px - - The persist combobox - -When packets are transmitted and received very quickly, they can be almost invisible. The persist time setting -allows the user to control the duration for which a packet should be visible on the animation canvas. - -Update-interval slider -~~~~~~~~~~~~~~~~~~~~~~ -.. figure:: figures/UpdateRateInterval.* - :width: 150px - - The update-interval slider - -The update-interval slider controls the rate at which NetAnim refreshes the canvas screen. For instance, -for the setting above, NetAnim, updates the position of nodes and packets only once in 250 ms. - - -Parts of the XML -================ -The XML trace files has the following main sections - -1. Topology - - - Nodes - - Links -2. packets (packets over wired-links) -3. wpackets (packets over wireless-links) - -XML tags -~~~~~~~~ -.. highlight:: xml - -Nodes are identified by their unique Node id. The XML begins with the "information" element describing the rest of the elements - - Element -############## - -This is the XML root element. All other elements fall within this element. - Attributes are:: - - lp = Logical Processor Id (Used for distributed simulations only) - - Element -################## - -This elements contains the Node and Link elements.It describes, the co-ordinates of the canvas used for animation. - Attributes are:: - - minX = minimum X coordinate of the animation canvas - minY = minimum Y coordinate of the animation canvas - maxX = maximum X coordinate of the animation canvas - maxY = maximum Y coordinate of the animation canvas - -Example:: - - - - Element -############## - -This element describes each Node's Id and X,Y co-ordinate (position). - Attributes are:: - - id = Node Id - locX = X coordinate - locY = Y coordinate - -Example:: - - - - Element -############## - -This element describes wired links between two nodes. - Attributes are:: - - fromId = From Node Id (first node id) - toId = To Node Id (second node id) - -Example:: - - - -

Element -########### - -This element describes a packet over wired links being transmitted at some node and received at another. - -The reception details are described in its associated rx element - Attributes are:: - - fId = Node Id transmitting the packet - fbTx = First bit transmit time of the packet - lbTx = Last bit transmit time of the packet - toId = Node Id receiving the packet - fbRx = First bit Reception Time of the packet - lbRx = Last bit Reception Time of the packet - -Example:: - -

- -A packet over wired-links from Node 1 was received at Node 0. The first bit of the packet was transmitted at the 1st second, the last bit was transmitted at the 1.000067199th second of the simulation Node 0 received the first bit of the packet at the 1.002th second and the last bit of the packet at the 1.002067199th second of the simulation -NOTE: A packet with fromId == toId is a dummy packet used internally by the AnimationInterface. Please ignore this packet - - Element -############ - -This element describes a packet over wireless links being transmitted at some node and received at another. - -The reception details are described in its associated rx element. - Attributes are:: - - fromId = Node Id transmitting the packet - fbTx = First bit transmit time of the packet - lbTx = Last bit transmit time of the packet - range = Range of the transmission - -Example:: - - - -A packet over wireless-links from Node 20 was received at Node 32. The first bit of the packet was transmitted at the 0.003th second, the last bit was transmitted at the 0.003254 second of the simulation Node 0 received the first bit of the packet at the 0.003000198 second and the last bit of the packet at the 0.003254198 second of the simulation - Wiki ==== For detailed instructions on installing "NetAnim", F.A.Qs and loading the XML trace file diff --git a/src/netanim/doc/figures/Dumbbell.pdf b/src/netanim/doc/figures/Dumbbell.pdf deleted file mode 100644 index 76108df7f..000000000 Binary files a/src/netanim/doc/figures/Dumbbell.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/Dumbbell.png b/src/netanim/doc/figures/Dumbbell.png deleted file mode 100644 index 0113840c0..000000000 Binary files a/src/netanim/doc/figures/Dumbbell.png and /dev/null differ diff --git a/src/netanim/doc/figures/FastForward.pdf b/src/netanim/doc/figures/FastForward.pdf deleted file mode 100644 index 525095b36..000000000 Binary files a/src/netanim/doc/figures/FastForward.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/FastForward.png b/src/netanim/doc/figures/FastForward.png deleted file mode 100644 index 5cb4c8557..000000000 Binary files a/src/netanim/doc/figures/FastForward.png and /dev/null differ diff --git a/src/netanim/doc/figures/PacketStats.png b/src/netanim/doc/figures/PacketStats.png deleted file mode 100644 index bb6af999b..000000000 Binary files a/src/netanim/doc/figures/PacketStats.png and /dev/null differ diff --git a/src/netanim/doc/figures/Persist.pdf b/src/netanim/doc/figures/Persist.pdf deleted file mode 100644 index 487a567bd..000000000 Binary files a/src/netanim/doc/figures/Persist.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/Persist.png b/src/netanim/doc/figures/Persist.png deleted file mode 100644 index 3fed9f34f..000000000 Binary files a/src/netanim/doc/figures/Persist.png and /dev/null differ diff --git a/src/netanim/doc/figures/SimTime.pdf b/src/netanim/doc/figures/SimTime.pdf deleted file mode 100644 index eee1b1cca..000000000 Binary files a/src/netanim/doc/figures/SimTime.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/SimTime.png b/src/netanim/doc/figures/SimTime.png deleted file mode 100644 index 0bae9ee6f..000000000 Binary files a/src/netanim/doc/figures/SimTime.png and /dev/null differ diff --git a/src/netanim/doc/figures/UpdateRateInterval.pdf b/src/netanim/doc/figures/UpdateRateInterval.pdf deleted file mode 100644 index 0a8f11dce..000000000 Binary files a/src/netanim/doc/figures/UpdateRateInterval.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/UpdateRateInterval.png b/src/netanim/doc/figures/UpdateRateInterval.png deleted file mode 100644 index 6ac83b088..000000000 Binary files a/src/netanim/doc/figures/UpdateRateInterval.png and /dev/null differ diff --git a/src/netanim/doc/figures/Wireless.pdf b/src/netanim/doc/figures/Wireless.pdf deleted file mode 100644 index 2cfba3dad..000000000 Binary files a/src/netanim/doc/figures/Wireless.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/Wireless.png b/src/netanim/doc/figures/Wireless.png deleted file mode 100644 index e5c3728ac..000000000 Binary files a/src/netanim/doc/figures/Wireless.png and /dev/null differ diff --git a/src/netanim/doc/figures/WithPrecision.pdf b/src/netanim/doc/figures/WithPrecision.pdf deleted file mode 100644 index ee06ee1dc..000000000 Binary files a/src/netanim/doc/figures/WithPrecision.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/WithPrecision.png b/src/netanim/doc/figures/WithPrecision.png deleted file mode 100644 index 0c61aa7c7..000000000 Binary files a/src/netanim/doc/figures/WithPrecision.png and /dev/null differ diff --git a/src/netanim/doc/figures/WithoutPrecision.pdf b/src/netanim/doc/figures/WithoutPrecision.pdf deleted file mode 100644 index cac9dce45..000000000 Binary files a/src/netanim/doc/figures/WithoutPrecision.pdf and /dev/null differ diff --git a/src/netanim/doc/figures/WithoutPrecision.png b/src/netanim/doc/figures/WithoutPrecision.png deleted file mode 100644 index f7a716050..000000000 Binary files a/src/netanim/doc/figures/WithoutPrecision.png and /dev/null differ