[Tinyos-help] pointer

chikh omar enis01amor at yahoo.fr
Sat Apr 17 13:52:39 PDT 2010


hello,

I add the following code into IPBaseStation:

riseg_msg_t *ptr_risegMsgSent=(riseg_msg_t*)(call RadioPacket.getPayload(&msgsent,sizeof(riseg_msg_t)));
      ptr_risegMsgSent->type=GROUP_CREATION_INVITE;
      printf("Av: ptr_risegMsgSent=%i;\n", ptr_risegMsgSent->type);

      ptr_risegMsgSent=(riseg_msg_t*)(call RadioPacket.getPayload(&msgsent,sizeof(riseg_msg_t)));

      printf("Ap: ptr_risegMsgSent=%i;\n", ptr_risegMsgSent->type);


 
however, the print instruction show different value of ptr_risegMsgSent->type.
I do not understand this, as ptr_risegMsgSent->type point to the same object.

any help please,

**********************************************
Omar Cheikhrouhou 
Engineer & Researcher @SENS Lab (Software Engineering and Network Security)
Higher Institute of Technological Studies - Address : Mahdia's road Km 2.5 Sfax. BP 88 A - 3099 El Bustan Sfax Telephone : (+216)74 237425 Poste : 437 Fax: : (+216)74 431 386
Ph.D @ CES Lab (Computer and Embedded System)-University of Sfax, National School of Engineers BP W, Sfax, 3038, Tunisia , Fax:(+216)74665369  
Coordinator C2i @ ISET Sfax (Certified C2i since 2008)



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100417/b2768a9c/attachment.htm 


More information about the Tinyos-help mailing list