[Tinyos-help] AMPacket.setType()

Eric Decker cire831 at gmail.com
Tue Dec 17 01:32:53 PST 2013


first, get a jtag and learn to single step the code.

I suspect that you have wired a hard coded am_type at a higher level.   You
can call AMPacket.type but it will get over written later.

However, that is just a guess.   It is impossible to determine what is
going on from the little bit of information you've provide.

Seriously, what do you want from us?   How about you think to your self
what would help us help you.

What code base are you working on?

Better would be if you are based on
github://github.com/tinyos/tinyos-mainand fork so you have your own
published copy.  Then
you could push your modifications up to your public tree.   Then you could
point us at the tree along with what particular application
you were building and for what platform.

Seriously, what did you expect us to do with the little bit of information
you gave us above.

Most folks would simply ignore you.   Hopefully I'm teaching you how to
fish.



On Tue, Dec 17, 2013 at 12:45 AM, Lin Hai <lin.hai at whu.edu.cn> wrote:

>
> Hi Guys,
>
> I am new to Tinyos. I am using AMSend.send(am_addr_t addr, message_t* msg,
> uint8_t len) to send packet to the destination. Before sending, I use l
> AMPacket.setType() to set type as follows:
>
>  uint8_t  AMID=3;
> call AMPacket.setType(&m_msg, AMID);
>
>
> But it seems the type of the packet fails to be set to 3. on the
> destination:
>
> call AMPacket.type(msg)
>
> The results is 123 (using %d to print it)
>
> I checked the AMPacket component. It indicates that
>
> "As the AM type is set as part
>    * of sending with the AMSend interface, this command is not used
>    * for sending packets."
>
> Does this mean that AMPacket.setType() function can not be used? So if I
> want to define different types of packet, how should I do?
>
> Thanks in advance
>
> Neil Lin
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20131217/5754e4ea/attachment.htm 


More information about the Tinyos-help mailing list