[Tinyos-help] link between tossimpacketc.send and amsend.send
Greg Hackmann
gwh2 at cse.wustl.edu
Mon Dec 3 22:32:14 PST 2007
Vijayant Bhatnagar wrote:
> Hi,
> I need some help to figure out what is the relation between amsend.send
> and tossimpacketc.send. In tutorial 3 of tinyos 2-x, RadioCountToLed
> sends a packet using AMSend.send then how do i use tossimpacketc.send
> ?I am really confused.
>
> Any help appreciated.
>
> Thanks,
> Vijayant
When TOSSIM is enabled, ActiveMessageC's AMSend interface is passed
through to the TossimActiveMessageP component. TossimActiveMessageP
implements AMSend.send() by doing some bookkeeping on the packet header
and then calling TossimPacketModel.send() on TossimPacketModelC. Since
TossimPacketModelC expects TossimActiveMessageP to set up the packet
headers properly, you should avoid invoking the TossimPacketModel.send()
command directly and use ActiveMessageC's AMSend interface instead.
Greg Hackmann
More information about the Tinyos-help
mailing list