Sorry, I don't have RssiDemo...possibly a TOS2.x improvement?

But, roughly, the message structure for 2420 radio motes is
as shown in the page you ref. Find an AM.h file for your platform
(for micaZ in T1 it was: /opt/tinyos-1.x/tos/platform/micaz/AM.h).
The message structure is/was:

typedef struct TOS_Msg
{
   /* The following fields are transmitted/received on the radio. */
   uint8_t length;
   uint8_t fcfhi;
   uint8_t fcflo;
   uint8_t dsn;
   uint16_t destpan;
   uint16_t addr;
   uint8_t type;
   uint8_t group;
   int8_t data[TOSH_DATA_LENGTH];

   /* The following fields are not actually transmitted or received
    * on the radio! They are used for internal accounting only.
    * The reason they are in this structure is that the AM interface
    * requires them to be part of the TOS_Msg that is passed to
    * send/receive operations.
    */
   uint8_t strength;
   uint8_t lqi;
   bool crc;
   uint8_t ack;
   uint16_t time;
} TOS_Msg;

Where the "length" seems to align with "Frame Length" in the
"PHY Layer" of the spec sheet diagram. I imagine that the
preamble and CRC are chopped off by the radio hardware or
software. The "not actually transmitted" fields in the struct
above are added by the radio receive code, and you can look
at them in your message Receive() method. "strength" and "lqi"
are analogous to "rssi" in mica2 systems.

RssiDemo may take those values and put them in the message data[]
(Frame payload) using the RssiMsg struct you found, then resend
the message. Only reading the code will tell...

Sorry I can't be of more help.
MS


raoudha baklouti wrote:
> Thank you,
> I want to know in the application RssiDemo, the data frame is like that ?? :
> http://enaweb.eng.yale.edu/drupal/system/files/CC2420_Data_Sheet_1_4.pdf
> (page 36) ??
> 
> 
> --- En date de : *Mar 18.5.10, Michael Schippling /<sc...@santafe.edu>/* 
> a écrit :
> 
> 
>     De: Michael Schippling <sc...@santafe.edu>
>     Objet: Re: [Tinyos-help] types
>     À: "raoudha baklouti" <raoudha_baklo...@yahoo.fr>
>     Cc: tinyos-help@millennium.berkeley.edu
>     Date: Mardi 18 mai 2010, 19h59
> 
>     In common TOS usage a structure with "Msg" in it is the payload
>     portion of a TOS_Msg or message_t structure that is transmitted
>     over the radio, or serial UART between the base-station and host.
>     Usually you can imagine the Msg being overlaid on the TOS_Msg.data[]
>     array set aside for user payload.
> 
>     This particular "RssiMsg" contains a single field "rssi" so it's
>     a kinda redundant structure definition. As you say, "rssi" is a
>     16 bit signed quantity -- a "short int" on most 32-64 bit machines,
>     but most likely an actual "int" on the micro-controller itself.
>     The extra-added-complication is the "nx" part. This flags it to
>     the Nescc compiler as "network byte order" -- big-endian -- or
>     reversed byte order on just about every platform we use...
> 
>     I think that was the question, if not, ask more.
>     MS
> 
>     raoudha baklouti wrote:
> 
>      > Subject:
>      > types
>      > From:
>      > raoudha baklouti <raoudha_baklo...@yahoo.fr
>     </mc/compose?to=raoudha_baklo...@yahoo.fr>>
>      > Date:
>      > Tue, 18 May 2010 12:06:07 +0000 (GMT)
>      > To:
>      > tinyos-help@millennium.berkeley.edu
>     </mc/compose?to=tinyos-h...@millennium.berkeley.edu>
>      >
>      >
>      > Hi,
>      > I want to know the meaning of
>      >
>      > typedef nx_struct RssiMsg{
>      > nx_int16_t rssi;
>      > }RssiMsg;
>      >
>      > is the meaning is that a variable RssiMsg that is stored in a
>     byte arrays, have an attribute rssi that is a short int (nx_int16_t)
>      >
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Tinyos-help mailing list
>      > Tinyos-help@millennium.berkeley.edu
>     </mc/compose?to=tinyos-h...@millennium.berkeley.edu>
>      >
>     https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to