Bad bad bad!  Do not wire to any CC2420* components!

Instead, use SPC.SPSend.sendAdv().  There is a flag you can set for
time stamping.  See the documentation in /opt/moteiv/doc/nesdoc for
the SPSend interface:

SP_FLAG_C_TIMESTAMP == adds a timestamp to all outgoing messages.

You can then use SPUtil to extract the timestamp on the receiver:

command uint32_t getSenderTimestamp(TOS_MsgPtr msg, int8_t offset)

If a message is sent with the SP_FLAG_C_TIMESTAMP flag set, the sender
will append a timestamp to the end of the message with the sender's
local time. This time may be extracted from a received message by
passing it to the getSenderTimestamp function and specifying the
location of the timestamp. Usually, the timestamp is the last 4 bytes
of the data message.

The code in /opt/moteiv/tos/lib/NetSync/ uses the TIMESTAMP functions
of SP to timestamp sent and received messages.  You can look at this
code for additional information on how to use the functions.

-Joe

On 6/3/06, Preethi Naveen <[EMAIL PROTECTED]> wrote:

Hello,

I am trying to use TimeStamping.nc in my application to timestamp all the
received packets. I have wired this to CC2420TimeStampingC. However, while
compiling, i get an error saying that component CC2420TimeStampingC not
found. Can anyone help me


Naveen
_______________________________________________
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

Reply via email to