For Data (Originated/Forward) Message and Command Message.
typedef struct TOS_Msg
{
/* The following fields are transmitted/received on the radio. */
uint16_t addr;
uint8_t type;
uint8_t group;
uint8_t length;
int8_t data[TOSH_DATA_LENGTH];
uint16_t crc;
/* 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.
*/
uint16_t strength;
uint8_t ack;
uint16_t time;
} TOS_Msg;
typedef struct VirtualCommheader
{
uint8_t source; //
uint8_t seqnum; //
} VirtualCommHeader
typedef Struct MHSenderHeader
{
uint8_t mhsendertype;
uint8_t dataseqnum;
uint8_t realsource; //address of mote which generate the message
} MHSenderHeader
|
Struct DataFormat_t
{
uint8_t addr; //the address of mote which generate the message
uint8_t cnt;
uint8_t sending1;
uint8_t sending2;
}
|
Struct DataFormat_t
{
uint8_t destaddr; // the mote address the base station send the cmd to.
xxxxxxxxx //... whatever
}
|
Struct RoutePacket
Struct RoutePacket
{
uint8_t parent;
uint8_t hop;
cost_t cost;
uint8_t estlength;
}
|
Mote1-MonteN The each mote does only three type of message processing:


Base Station(GenericBase.nc)