User guide

10 / 18
UZL-Testbed User Guide
Foundations of Adaptive Networked Societies of Tiny Artefacts
arbitrary values. If you run the application their debug output will be shown in the Serial Monitor
plugin. Note, that it depends on the value of use_tag_ids if the numbers from 0 to n or the decimal
values of the MAC addresses must be used for a successful communication between Shawn and iShell.
Shawn offers the possibility of tracing radio messages and fill levels of queues in files while the
simulation is running. The following values for parameter create are implemented:
postscript_messages
msg_density_postscript
postscript_queues
postscript_timeout_task_queues
postscript_memory
gnuplot_memory
//------------------------------------------------
// Logging parameters (tracing in files)
//------------------------------------------------
// Trace every single message in the network into a .ps file
//shawn.runCommand("isense_trace", "create=postscript_messages
file=messages.ps message_delta=1");
// Trace the message density on the links of the network into a .ps file
//shawn.runCommand("isense_trace", "create=msg_density_postscript
file=msg_density.ps time_delta=100 max_width=3");
// Trace incomming and outgoing radio queues of the nodes into a .ps file
//shawn.runCommand("isense_trace", "create=postscript_queues
file=radio_queues.ps time_delta=1.0");
// Trace the timeout and task queues of the nodes into a .ps file
//shawn.runCommand("isense_trace", "create=postscript_timeout_task_queues
file=timeout_queues.ps time_delta=1.0");
// Trace the heap usage of the nodes into a .ps file
//shawn.runCommand("isense_trace", "create=postscript_memory
file=memory.ps time_delta=1.0");
// Trace the detailed heap usage of the nodes into a gnuplot data file
//shawn.runCommand("isense_trace", "create=gnuplot_memory fmalloc=1
ffree=1 nodes=* file=mem-of-node-");
Finally, run the simulation task to launch the execution of the simulation.
//------------------------------------------------
// Execution
//------------------------------------------------
// Run the simulations
shawn.runCommand("simulation", "max_iterations="+iterations);