Antonio,

 

What you need is Msp430CounterMicroC. It provides a 16-bit-wide counter
with microsecond resolution.

 

I'm not particularly familiar with the telosb, but there's a chance that
the timer stops when the mote goes to sleep, so you might want to
completely disable sleeping. Somebody more knowledgeable than I am could
give you a more precise answer to this.

 

Janos

 

From: antonio gonga [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 23, 2008 1:12 PM
To: Janos Sallai
Subject: RE: [Tinyos-help] Struct_Timeval_Unix_in_Tinyos

 

Hey Janos,
I'm using Telosb platform.
 
I'm implementing a Packet sniffer with the correspondent parser. I need
a more precise timer to timestamp the packets when they arrive at
Base(inter arrival time).  A microsecond timer is more precise than the
current one that I'm using.
Basically I use the Timer.getNow() command which gives the number of
clock ticks since the mote was turned on instead of a time.
 
If there's a precise timer in Tinyos2 just tell me where I can find it.
Thanks in advance.

Antonio



________________________________

Subject: RE: [Tinyos-help] Struct_Timeval_Unix_in_Tinyos
Date: Wed, 23 Apr 2008 11:00:57 -0500
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [email protected]

Antonio:

 

sys/time.h is POSIX specific, but TinyOS is not a POSIX compliant OS, so
this will not work.

 

You can have microsecond-precision counters, though. What platform are
you using? What is it exactly that you want to achieve?

 

Janos

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
antonio gonga
Sent: Tuesday, April 22, 2008 12:20 PM
To: TINYOS
Subject: [Tinyos-help] Struct_Timeval_Unix_in_Tinyos

 

Hey all,
 
I would like to use a more precise timer, I was trying to make a C
function and to embed it in a nesC code, but the problem is that it
Tinyos  does not reconize the include #include<sys/time.h>.  I needed it
because I'd like to use the "struct timeval" to get time precision in
micro seconds.
 
If someone have already tried it, please attach me your code in the
reply.
 
Thanks in advance.
 
Antonio



________________________________

Invite your mail contacts to join your friends list with Windows Live
Spaces. It's easy! Try it!
<http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.
aspx&mkt=en-us> 

 

________________________________

Discover the new Windows Vista Learn more!
<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>


_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to