Extending and Improving Avrora

The flexible architecture of Avrora was meant as an invitation for non-invasive
improvements and extensions from an interested community. Users who are interested
in monitoring a particular property of their program, researchers interested in
program analysis, and prototypers interested in simulating how their software will
interact with their devices might all way to extend Avrora in various ways.
This page explains some of the possibilities for extensions and some ideas on how
to go about them without making invasive changes or becoming to deeply involved
with the internals.

Adding a New Simulation Type

Avrora is not simply a single node simulator, nor just a simulator for sensor networks,
but it supports multiple different types of simulations. It is natural then that it has
an extension point that allows users to create a new simulation type. Adding a new
simulation type is the natural way to add simulations that have, for example, connections
between multiple microcontrollers, or have a built-in environment model. For more information
on how to add a simulation type, see this page.

Adding a New Monitor

Ever wanted to monitor a particular aspect of the execution of your program as
it runs? Suppose you wanted to collect some information about your program
as it runs, such as the execution frequency of an interrupt, the number of times function
A calls function B, or the timing of a microcontroller pin that your program is
controlling. It may be difficult or impossible to get all this information by
simply tracing (dumping out status information throughout simulation). Avrora allows
you to write monitors that can dynamically instrument your program
and collect information that YOU are interested in, without modifying a single
line of Avrora's code or recompiling it! For more information, see the page on
monitoring.

Adding New Testcases

Avrora makes it possible to build a regression test suite for your program by
providing an open and extensible testing harness. You can build tests that are
relavant to your program, such as test inputs and expected outputs, timing
validation, and behavioral tests for your microcontroller programs. You can
build a test harness specific to your application and use Avrora to run your
tests and collect the results from simulation, without modifying any of Avrora's
code or recompiling it. For more information, see the page on
testing.

Adding a New Action

Suppose you were interested in loading a machine code program and performing
some very simple action on it and outputting some results. You could use Avrora's
program loading capabilities and internal program representation as a good starting
point. You can even get Avrora to run your action without having to write your
own main class, or tediously parse command line options.
Best of all you can do all of this without changing a single line of code in Avrora!
For more information, see the page on actions.

Adding New Program Formats

Avrora currently supports 3 input formats for programs, but its flexible architecture
allows new program loaders to be plugged in without any modification. For example,
a new loader for the COFF format, the output of Windows based compilers, could be built
to allow these programs to be directly loaded into Avrora without using any disassemblers.
One format that Avrora is in real need of is an ELF loader. For more information, see the
page on loaders.

Adding New External Devices

Are you working with a new hardware device to add to your AVR or sensor node project?
Building software for this device can be difficult and tricky. Avrora allows you to
build a model of the device and execute the model within simulation, allowing you
to debug and inspect your software as it interacts with the model of the device. This
allows to you troubleshoot timing errors, bugs, and performance problems before ever
soldering a wire! For more information, see the page on external
devices.

Adding a New Platform

In addition to adding models of single devices to Avrora, you can build a complete
hardware platform model containing many devices configured according to your need.
For example, one such platform is the mica2 which is a
model of a sensor node that contains a sensor board, an AM radio, and LEDs. You
can build your own platform and plug it into Avrora, allowing you to test the
software in the presence of your entire design! For more information, see the
page on platforms.

Adding a New Microcontroller

Atmel has an entire line of microcontrollers based on AVR. They vary in storage capacity,
RAM capacity, clockspeed, and cost. Only one is currently supported by Avrora, but
it contains a flexible mechanism for adding more. For more information, see the
page on microcontrollers.

Adding a New Radio Model

One major component of sensor network simulation is a model of the radio. The model
may model attentuation due to distance, random errors and loss, as well as mobility,
noise, and other factors. Avrora currently has two radios; a lossless broadcast model,
and a distance-based attentuation model for modelling multi-hop networks. These models
can be extended, improved, or replaced. For more information, see the page on
radios.