- Download and read Tech report 08-13 to gain a basic
understanding of the intent of this work. This paper will also give a basic overview of what will be discussed here in more depth.
- Ensure you have downloaded and installed SENSE 3.1, or if you've already installed SENSE, all files referenced in the tutorial
are available via link within the tutorial.
- Visualization in iNSpect requires three separate files. These files include mobility, simulation, and configuration
- Mobility: Identify a place in your protocol code that has access to the locations of all nodes. For the SSR protocols,
see here. Set your location output to match those in lines 67-69, ensuring
that the printed line begins with a $ and provides X, Y, and Z locations. Upon completion of your simulation,
a script will be run to extract all lines beginning with $ and move them into the mobility file. In our implementation, nodes
remain stationary throughout the life of the simulation, hence simulation time is always 0.0 in the mobility file. If you wish
to implement mobile nodes, simply output new locations at their respective simualtion times.
- Simulation: In order to produce the simulation file required by iNSpect, you must first identify the events that you want to
visualize. In our implementation, we've chosen to visualize the broadcast and reception of DREQ, DREP, and data packets. In
addition to this, we include intentionally dropped packets, origination of new packets, and delivery of packets. For simulation
output, you must find the locations within your protocol to output text that identifies your events. Each event must meet the
format of the table below. Examples of our implementation can be seen here for
DREQ and DREP packets (lines 862,879,1036,1077,1103). In addition to these locations, line 907-908 were necessary to ensure
that originating nodes appeared correctly in the visualizer. Examples of both data packet and DREQ/DREP implementations
are shown here . A search for the phrase "sending to" or "received from" will return the locations
of all visualization output lines.
- Once all ouput lines have been inserted, the next step is to run a Simulation with whatever parameters you desire, and redirect
the output to a text file. For illustration purpose, we'll call this file "foo", but can be named anything you like. foo now contains all
simulator output, which includes all original
sense output on lines that begin with a "#", all mobility file output on lines that begin with a "$", and all iNSpect visualization output
on the other lines.
- The next step is to separate "foo" into different files that will be required for visualization. To do this, simply run "filtersortnam.pl"
on "foo". This is a simple PERL script which parses foo, resulting in foo, foo.sense, foo.mob, and foo.sim
- Install iNSpect: Download it here, or for the latest version that we
have, here
- Once iNSpect has been installed and tested using their instructions, create a working folder within the iNSpect folder. I used
"working" within /iNSpect-release3.x/. Copy foo.config (here) into your iNSpect working folder.
- Copy foo.mob and foo.sim from SENSE into your iNSpect working folder
- In my example, since my working directory is in the same iNSpect directory as src, from within your working directory,
run iNSpect with "../src/iNSpect -v foo.config foo.mob foo.sim"
- Necessary Files:
- foo: As previously described, this is the original output file from SENSE. It includes all output lines.
- foo.sense (sample): All lines within foo that began with a "#" are placed into this file. This results in SENSE's original output.
- foo.mob (sample): Mobility file for use with iNSpect that contains a list of all nodes and their respective X, Y, and Z locations. All
lines from this file were created by the filtersortnam.pl script by searching for lines beginning with "$". In our current
implementation, mobility has not been utilized, so we simply ouput locations at time 0.00, which do not change. If node
mobility is desired, outputing new locations at different simulation times is all that is required.
- foo.sim (sample): Simulation file for use with iNSpect. This contains a list of all events to be visualized and the time that such
events occur.
- foo.config(sample): Configuration file for running visualization within iNSpect. For simulations
to work correctly, you must modify maxX and maxY to the size of your simulation field. You must also modify numNodes to the
number of nodes you are simulating. Last, you should modify colorMaps to match the event statuses that you output from SENSE.
These will also be the statistical collection categories used during a visualization. Colors are in an RGB configuration, with each color's
value on a scale from 0 to 1. All of the other fields in foo.config may be modified to suit your visualization, but those items listed above
must be correct for the visualization to work.
note: The figure shown above is used from: S. Kurkowski, T. Camp, and M. Colagrosso, A visualization and analysis tool for wireless simulations: inspect,
ACM's Mobile Computing and Communications Review, to appear (2008).