Thanks Philip. I did check on that and corrected some of them already.
I found this to be useful too:
http://enl.usc.edu/~jpaek/porting_tinyos_1_to_2.html
Other than those, I figured out ActiveMessageC is the equivalent of
RadioCRCPacket and we have to use interfaces like Packet,
PacketAcknowledgements too to retrieve some members of message_t.
BUT, I havent figured out how to access CRC of the message. If anyone knows,
pl reply.
Thanks,
Pratibha
On Tue, Aug 5, 2008 at 12:09 AM, Philip Levis <[EMAIL PROTECTED]> wrote:
>
> On Jul 23, 2008, at 9:13 PM, Pratibha S wrote:
>
> 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)
>>
>>
> Tahir Azim wrote a document on porting 1.x code to 2.x, based on his
> experiences porting Beacon Vector Routing (BVR). It's in
> doc/html/porting.html.
>
> Phil
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help