Hi,
I installed BlinkToRadio application in one telosb mote..
and installed another application that uses LogWrite and LogRead..This
application receives packet(nodeid 2 bytes and counter 2 bytes) from
BlinkToRadio..
While reading from Log using LogRead.read, how to separate message as 2
bytes...ie how to retrieve nodeid and counter separately from log...
My sample code..
typedef nx_struct logentry_t{
nx_unit8_t len;
message_t msg;
}logentry_t;
logentry_t m_entry;
........
........
event LogRead.readDone(void* buf, storage_len_t len, error_t err)
{
logentry_t m_entry = (logentry_t*)buf;
printf("Message %u",m_entry->msg);
printfflush();
.....
...}
it returns default value 16657 for all messages...
i also tried using another structure
typedef nx_struct logentry_t{
nx_unit8_t len;
nx_unit16_t nodeid;
nx_uint16_t counter;
}logentry_t;
but it didn't work...and how to currrentoffset here...
Plz help..
Thanks in Advance..._______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help