[TINYOS-Help]: So strange code in Nesc: IntMsg *message = (IntMsg *)data.data; ??

Renee Azhen azhen_renee at yahoo.com.cn
Sun Dec 2 06:30:17 PST 2007


dear all:
  In many examples exist this code:
  IntMsg *message = (IntMsg *)data.data;
   
  I am so puzzled here: 
  here is the definition of data and IntMsg:
   TOS_Msg data;
  typedef struct IntMsg {
  uint16_t val;
  uint16_t src;
} IntMsg;
   
  It is so differnet from C code.
  They are different kink data struct, how to convert a TOS_Msg to an IntMsg??
  Could you help me to make it clear?
  thanks and Best regards
  Sam

       
---------------------------------
进入雅虎游戏嘉年华,赢取液晶显示器! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20071202/bf6a22d7/attachment.html


More information about the Tinyos-help mailing list