[Avrora] .dat file for simulation inputs
royshea at gmail.com
Wed May 13 10:36:30 PDT 2009
CCing the Avrora list so others can throw in comments / benefit from the
> 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
Best of luck,
More information about the Avrora