[Tinyos-help] Receiving problem in tinyos
Bhairav Desai
desaibhairav at gmail.com
Mon Aug 13 12:31:01 PDT 2007
Hii,
I am using Moteworks to implement multihop network.
I am trying to receive (Intercept) the data at the intermediate node, so
that I can perform some aggregation. But data forwarded to the base station
is different and constant. Below is my intercept function. I think I have
some problem with the pointers.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
event result_t Intercept.intercept(TOS_MsgPtr pMsg, void* payload,
uint16_t payloadLen) {
if(TOS_LOCAL_ADDRESS==1)
{
TOS_MsgPtr temp_ptr = appmsg;
appmsg = pMsg;
pack = (struct XDataMsg *)payload; // or // pack = (struct XDataMsg
*)appmsg->data;
call Leds.yellowToggle();
post ReceivedTask();
}
return SUCCESS;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070813/3126e601/attachment.html
More information about the Tinyos-help
mailing list