Hi All,
Im trying to port a code from tinyos 1.x to tinyos 2.x. Can anyone help me
with the following questions?
1. Whats the equivalent of *BareSendMsg*, *RadioCRCPacket* in tinyos 2?
2. *Random.init()*, *Leds.init()* and *Timer.StdControl()* is not there in
tinyos 2. How to port those functions from 1?
3. How to get *Tos_Msg tos_msg->ack/crc/length* in tinyos 2? The equivalent
to Tos_Msg is message_t and they stopped allowing direct access to some of
the member functions in Tos_Msg. In tinyos 2.x, they have moved those
variables into a more platform specific structures. you have to navigate
like ("message.h")*message_t->*("platform_message.h")*message_metadata_t->*
("cc2420.h"/"cc1000.h"/..)*cc2420/cc1000/..->ack*. But I dont know how to
import it. when i do the folowing,
(make micaz sim)
*message_t * tos_msg;*
*message_metadata_t *msg_meta = tos_msg->metadata;*
*cc2420_metadata_t *cc2420_meta = msg_meta->cc2420;*
It gives error saying that cc2420 is not a member of the union.
For certain members like tos_msg->type/group, it provides a interface
AMPacket to access them by commands like AMPacket.group(message_t *) etc.
But when I do the following it gives error saying that comand has to be
called with 'call'
type=AMPacket.type(tos_msg) or if(AMPacket.group(tos_msg)==TOS_GROUP)
Awaiting your earliest reply.
Thanks in advance,
Pratibha
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help