[Tinyos-help] message_t structure

Mohamed Ahmed mohamed7ahmed at yahoo.com
Thu Jan 18 15:04:21 PST 2007


Hi,
   
  I'm using micaz motes. The message_ structure is:
   
  typedef nx_struct message_t {
  nx_uint8_t header[sizeof(message_header_t)];
  nx_uint8_t data[TOSH_DATA_LENGTH];
  nx_uint8_t footer[sizeof(message_footer_t)];
  nx_uint8_t metadata[sizeof(message_metadata_t)];
} message_t;
   
  However, for micaz , we have:
   
  typedef union message_header {
  cc2420_header_t cc2420;
  serial_header_t serial;
} message_header_t;
  typedef union message_footer {
  cc2420_footer_t cc2420;
} message_footer_t;
  typedef union message_metadata {
  cc2420_metadata_t cc2420;
} message_metadata_t;
   
  I expected message_t to be like:
   
  typedef nx_struct message_t {
  message_header_t header[sizeof(message_header_t)];
  nx_uint8_t data[TOSH_DATA_LENGTH];
  message_footer_t footer[sizeof(message_footer_t)];
  message_metadata_t metadata[sizeof(message_metadata_t)];
} message_t;
   
  But then, the fields of message_t will not be of type "nx_*.
  I don't understand why message_t is not coherent
  with the declaration of micaz platform.
   
  Another question:
  Is "data[TOSH_DATA_LENGTH]" used to store the sensing data?
   
  Thanks,
  Mohamed

 
---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070118/92bff969/attachment.htm


More information about the Tinyos-help mailing list