[Tinyos-help] Changing NREADING in OscilloscopeC
Mehmet Akif Antepli
akifantepli at gmail.com
Sat Apr 3 03:38:43 PDT 2010
>> Just to let you know that it is mentioned in the Oscilloscope.h that
increasing the number of readings per message may require >> to increase the
size of message_t. So, how can I increase it ?
Default payload length is 28 bytes (TOSH_DATA_LENGTH=28 defined in
/tinyos-2.1.0/tos/types/message.h). Wen you increase the NREADINGS,
calculate the total payload size and add the following line into the make of
CFLAGS += -DTOSH_DATA_LENGTH=xxx
xxx is your new payload size. So, you can increase packet length this way.
regenerate OscilloscopeMsg.java file, clean and rebuild java application.
>> What I understood from your message is that I should generate manually
the OscilloscopeMsg.java file using
>> MIG tool after I set the new value of NREADINGS, but this will be done
automatically in the Makefile which is in >> the Oscilloscope Java project
folder and the new OscilloscopeMsg.java file will be generated with the new
setting >> of NREADINGS. By opening the new OscilloscopeMsg.java file I can
see any change in NREADINGS value.
Since i have ported all the java and tinyos applications that i use in
Eclipse, i try to do every change through the IDE. Thats why i use Yeti2 mig
interface to regenerate OscilloscopeMsg.java file.
I dont want to memorize every makefile and application directory, that my
On Sat, Apr 3, 2010 at 1:03 PM, Omar Bouzid <o.m.bouzid at newcastle.ac.uk>wrote:
> Sorry to bother you again.
> Just to let you know that it is mentioned in the Oscilloscope.h that
> increasing the number of readings per message may require to increase the
> size of message_t. So, how can I increase it ?
> *From:* Mehmet Akif Antepli [mailto:akifantepli at gmail.com]
> *Sent:* 02 April 2010 10:58
> *To:* Omar Bouzid
> *Cc:* tinyos-help at millennium.berkeley.edu
> *Subject:* Re: [Tinyos-help] Changing NREADING in OscilloscopeC
> When you change your payload struct, you should reflect this change to the
> java application. Your payload struct is defined in OscilloscopeMsg.java
> file. So, you should regenerate OscilloscopeMsg.java file using MIG (Message
> Interface Generator) tool.
> I use Yeti2 with Eclipse. It has MIG support which makes it trivial to use
> When you generate OscilloscopeMsg.java file, copy it into Oscilloscope Java
> project folder, clean and rebuild it. Then, it will work
> On Thu, Apr 1, 2010 at 9:50 PM, Omar Bouzid <o.m.bouzid at newcastle.ac.uk>
> Hi all,
> I tried to modify the OscilloscaopC application in tinyos-2.x to sample the
> microphone sensor of mts310 (attached to micaz) and I have succeed to do
> that. However, when I tried to change the number of readings per message in
> the Oscilloscope.h (less or greater than 10), no data will be displayed in
> the GUI. So, any suggestion to solve this issue?
> Thanks in advance,
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> Mehmet Akif Antepli
> Telecommunications Lab. D-217
> Dept. of EEE
> Middle East Technical University
Mehmet Akif Antepli
Telecommunications Lab. D-217
Dept. of EEE
Middle East Technical University
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tinyos-help