Re: [Tinyos-help] Reading sensor reading from a Multihop packet

2007-04-16 Thread Benjamin Madore

On Thu, April 12, 2007 1:19 pm, manu suryavansh said:
> Hi,
> I am sending 10 sensor readings in one packet using Multihop. I just want to
> store the reading in a text file corresponding to each mote. I don't want
> any GUI display.
> Can somebody please tell me how to get started?
> I have tried to understand the Trawler (Surge) but I find it very
> complicated and there is no documentation.
> I want to know that since I want to write readings in a file, should I write
> in the file in append mode. With the trawler application I think the
> readings are stored in an array and on selecting save all the reading are
> saved at once but in this case only approximately 16000 reading can be
> saved.
>
> Thank you
> Manu Suryavansh
> University of Florida

I usually use listen to save to a file directly. You can create a new file

  listen > file.log

or append

  listen >> file.log

then use your favorite scripting language (or any other language) to parse
the data and save a file for each mote. You could even use grep to sort out
the data manually.

I have used perl scripts by piping "|" the data from listen into the script.

  listen | perlscript.pl

you can save it as a file

  listen | perlscript.pl > file.log

and even monitor it

  listen | perlscript.pl | tee file.log

It is much easier to process the data afterward then to try to rewrite a
program, and you can choose how you do it.

-- 
The difference between the right word and the almost right word is really a
large matter- it's the difference between a lightning bug and the lightning.
-Twain

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Reading sensor reading from a Multihop packet

2007-04-12 Thread Michael Schippling

There is an incredibly arcane sequence of stream creations
that Java makes you jump through to do the equivalent of
fopen() and fprintf(). I have to re-find the last piece of
code that I wrote and copy it every time I need it.
OK I found it (again):

  PrintStream out =
new PrintStream(
new BufferedOutputStream(
 new FileOutputStream( new File( "file.txt" ) )), false );

  out.println( "whew" );

At least readline() type input is a bit easier:

  BufferedReader in =
new BufferedReader( new FileReader( "file.txt" ) );

  String got = instr.readLine();


One day I will put these someplace that I remember where they are,
but by then I will probably have forgotten what they are for...

MS


manu suryavansh wrote:

Hi,
Thanks for the help. I am planning to take the byte array and then write 
it to file using java i/o or may be to a database according to motes 
address. I don't understand what you meant by- work out the sequence of 
stream opens needed to use Java file i/o directly. 
Thank you

Manu Suryavansh


*/Michael Schippling <[EMAIL PROTECTED]>/* wrote:

You should be able to modify Listen.java to dump the data in any
format you like. You can then just redirect it's output to a file
Listen > file.txt
or for extra credit work out the sequence of stream opens needed
to use Java file i/o directly.

MS

manu suryavansh wrote:
 > Hi,
 > I am sending 10 sensor readings in one packet using Multihop. I just
 > want to store the reading in a text file corresponding to each
mote. I
 > don't want any GUI display.
 > Can somebody please tell me how to get started?
 > I have tried to understand the Trawler (Surge) but I find it very
 > complicated and there is no documentation.
 > I want to know that since I want to write readings in a file,
should I
 > write in the file in append mode. With the trawler application I
think
 > the readings are stored in an array and on selecting save all the
 > reading are saved at once but in this case only approximately 16000
 > reading can be saved.
 >
 > Thank you
 > Manu Suryavansh
 > University of Florida
 >
 >
 >

 > No need to miss a message. Get email on-the-go
 >
 > with Yahoo! Mail for Mobile. Get started.
 >
 >
 >
 >

 >
 > ___
 > Tinyos-help mailing list
 > [EMAIL PROTECTED]
 >
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos. 
 


___
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Reading sensor reading from a Multihop packet

2007-04-12 Thread manu suryavansh
Hi,
Thanks for the help. I am planning to take the byte array and then write it to 
file using java i/o or may be to a database according to motes address. I don't 
understand what you meant by- work out the sequence of stream opens needed to 
use Java file i/o directly. 
Thank you
Manu Suryavansh


Michael Schippling <[EMAIL PROTECTED]> wrote: You should be able to modify 
Listen.java to dump the data in any
format you like. You can then just redirect it's output to a file
Listen > file.txt
or for extra credit work out the sequence of stream opens needed
to use Java file i/o directly.

MS

manu suryavansh wrote:
> Hi,
> I am sending 10 sensor readings in one packet using Multihop. I just 
> want to store the reading in a text file corresponding to each mote. I 
> don't want any GUI display.
> Can somebody please tell me how to get started?
> I have tried to understand the Trawler (Surge) but I find it very 
> complicated and there is no documentation.
> I want to know that since I want to write readings in a file, should I 
> write in the file in append mode. With the trawler application I think 
> the readings are stored in an array and on selecting save all the 
> reading are saved at once but in this case only approximately 16000 
> reading can be saved.
> 
> Thank you
> Manu Suryavansh
> University of Florida
> 
> 
> 
> No need to miss a message. Get email on-the-go 
> 
> with Yahoo! Mail for Mobile. Get started. 
> 
> 
> 
> 
> 
> ___
> Tinyos-help mailing list
> [EMAIL PROTECTED]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.___
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Reading sensor reading from a Multihop packet

2007-04-12 Thread Michael Schippling

You should be able to modify Listen.java to dump the data in any
format you like. You can then just redirect it's output to a file
   Listen > file.txt
or for extra credit work out the sequence of stream opens needed
to use Java file i/o directly.

MS

manu suryavansh wrote:

Hi,
I am sending 10 sensor readings in one packet using Multihop. I just 
want to store the reading in a text file corresponding to each mote. I 
don't want any GUI display.

Can somebody please tell me how to get started?
I have tried to understand the Trawler (Surge) but I find it very 
complicated and there is no documentation.
I want to know that since I want to write readings in a file, should I 
write in the file in append mode. With the trawler application I think 
the readings are stored in an array and on selecting save all the 
reading are saved at once but in this case only approximately 16000 
reading can be saved.


Thank you
Manu Suryavansh
University of Florida



No need to miss a message. Get email on-the-go 

with Yahoo! Mail for Mobile. Get started. 






___
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Reading sensor reading from a Multihop packet

2007-04-12 Thread manu suryavansh
Hi,
I am sending 10 sensor readings in one packet using Multihop. I just want to 
store the reading in a text file corresponding to each mote. I don't want any 
GUI display.
Can somebody please tell me how to get started?
I have tried to understand the Trawler (Surge) but I find it very complicated 
and there is no documentation. 
I want to know that since I want to write readings in a file, should I write in 
the file in append mode. With the trawler application I think the readings are 
stored in an array and on selecting save all the reading are saved at once but 
in this case only approximately 16000 reading can be saved.

Thank you
Manu Suryavansh
University of Florida



   
-
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.___
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help