[Tinyos-help] Error and Warning while trying to get packet address

Modi, Jenis Ashokkumar jenis.modi at email.wsu.edu
Tue Aug 28 12:53:11 PDT 2012


Hi All,

I am trying to get packet address using AMPacket.source(&packet) in apps/RadioCountToLeds application.

Here is my RadioCountToLeds.h code:

#ifndef RADIO_COUNT_TO_LEDS_H
#define RADIO_COUNT_TO_LEDS_H

typedef nx_struct radio_count_msg {
  nx_uint16_t counter;
nx_am_addr_t senderId;
} radio_count_msg_t;

enum {
  AM_RADIO_COUNT_MSG = 6,
};

And then I use below line in RadioCountToLedsC.nc file to receive the address:

am_addr_t senderId = call AMPacket.source(&packet);

I get the following error when I compile my application with telosb:

RadioCountToLeds.h:46: syntax error before `nx_am_addr_t'
RadioCountToLeds.h:46: warning: no semicolon at end of struct or union
RadioCountToLeds.h:48: warning: data definition has no type or storage class
failed to parse message file RadioCountToLeds.h
make: *** [RadioCountMsg.py] Error 1


Can anybody help me out, what am I doing wrong? And why I am getting this error?

Thanks.
Jenis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20120828/f2014dc8/attachment.htm 


More information about the Tinyos-help mailing list