[Avrora] .dat file for simulation inputs

Zainul M Charbiwala zainul at ee.ucla.edu
Thu May 14 21:43:04 PDT 2009


Sending this email again. Apologies if anyone received duplicates.

Zainul.

---------- Forwarded message ----------
From: Zainul Charbiwala <zainulcharbiwala at gmail.com>
Date: Wed, May 13, 2009 at 10:52 AM
Subject: Re: [Avrora] .dat file for simulation inputs
To: "Mailing list for Avrora simulator users and developers."
<avrora at lists.ucla.edu>


Hi,

The .dat file format is:
---
<initial ADC value>
<time delta_1> <ADC value_1>
...
<time delta_n> <ADC value_n>
---

The ADC value has to be an integer between 0 and 1023. Any integer
outside this range will be clipped.
The time delta is a value in seconds that can be a floating point number.

The ADC would read the <initial ADC value> on bootup and then after
<time delta_1> seconds, it would read <ADC value_1>. After an
*additional* <time delta_2> seconds, it would read <ADC value_2>  and
so on.


Hope that helps,

Zainul.

On Wed, May 13, 2009 at 10:36 AM, Roy Shea <royshea at gmail.com> wrote:
> Howdy,
>
> CCing the Avrora list so others can throw in comments / benefit from the
> questions.
>
>> ve another question, the input through the .dat file would be accepted in
>> its own format only? i mean it can be entered as decimal notation itself?
>> no hex or anything like that?
>
> Try taking a look at src/avrora/sim/types/SensorSimulation.java where
> the file is parsed, in particular the functions processSensorInput and
> addSensorData seem to be the two you would be interested in.
>
> Off the top of my head I'm guessing:
>
> - No floats.  Remember that this is raw 10-bit ADC data, so floats (with
>  a decimal) don't make sense.
>
> - Probably able to use hex.  Try it and see if it fails.  The function
>  doing the conversion is StringUtil.evaluateIntegerLiteral.  I've no
>  idea if that handles hex conversion and a quick search didn't turn up
>  clear documentation.
>
> Best of luck,
> -Roy
> _______________________________________________
> Avrora mailing list
> Avrora at lists.ucla.edu
> http://lists.ucla.edu/cgi-bin/mailman/listinfo/avrora
>


More information about the Avrora mailing list