[Tinyos-help] Add time to packet??
Juan Antonio López Riquelme
ja.lopez.riquelme at gmail.com
Fri Apr 27 06:41:45 PDT 2007
Hi Sara,
tutorial 3 can help you
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson3.html, you can add
all variables thay you need in the struct for send the time:
typedef nx_struct BlinkToRadioMsg {
nx_uint16_t nodeid;
nx_uint16_t counter;
} BlinkToRadioMsg;
For update the value of variables before of send the message you can see
inside of source code of lesson 3.
For get the time, you can have three variables (hour, ..., seconds) and one
time of 1 second. Since second add 1 to variable seconds, if second == 60,
add 1 to minutes, ...problem the time of start, you can made that when you
reset the mote the hour start in the time that you wish.
I wait that help you.
A greeting,
Juan Antonio.
2007/4/27, sara Khad <sara.khad at gmail.com>:
>
> Hi all,
> I am new in tinyos and hope that someone can help me.
> I am using tinyos2 and tmote sky. How to add the time to the packet
> before sending it???
> Anyone have a simple example ??
> thanks
> sara
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070427/6c66530c/attachment.html
More information about the Tinyos-help
mailing list