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> > Date: > Tue, 18 May 2010 12:06:07 +0000 (GMT) > To: > tinyos-help@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 > 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