Hello again,

I defined a new CC2420 Packet-Headerformat and now I'm trying to use  
the message_t that's handed
down from "unique send" in CC2420ActiveMessageP.nc and create a new  
radiopacket with the original payload, but new header. I included the  
new headerformat in the union platform_message.h.

The way I understand TEP 111, the next step would be to create a  
packet interface for my new header. Is this correct? Or can I acces  
those fields directly in CC2420ActiveMessageP.nc for simplicity?

To this effect I tried to understand what the following command from  
CC2420PacketP.nc does:

   /***************** CC2420PacketBody Commands ****************/
   async command cc2420_header_t * ONE CC2420PacketBody.getHeader(  
message_t* ONE msg ) {
     return TCAST(cc2420_header_t* ONE, (uint8_t *)msg +  
offsetof(message_t, data) - sizeof( cc2420_header_t ));
   }

Could someone please explain? What does ONE mean, what happens here? I  
believe this is some pointer-arithmetic to find the beginning of the  
header in the platform_message-Union which is right-justified to the  
data, but I'm not sure.

Lastly how can I distinguish between headerformats when passing the  
new packet to CC2420CsmaP??

Thank you

Tobias


_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to