If you call send() with a length of 2 bytes, only two bytes will be transmitted over the air. The TOSH_DATA_LENGTH paramter basically determines the maximum size of the payload you could ever send and receive. Essentially, it is used to define the size of the data portion of the message_t struct used to hold messages on your mote. The length passed to send() is stored in the header portion of message_t, and when the message is being spooled out over the radio, theis length field is read to determin how many of the bytes stored in the data portion of the message should actually be sent.
Kevin On Sun, Mar 30, 2008 at 11:37 PM, David <[EMAIL PROTECTED]> wrote: > Hi list. > > I've taken a look at tep111 and tep126, but there's something which > isn't clear to me from the teps. > > Are the packets transmitted over radio a fixed length or variable > (based on requested payload length)? > > eg, if you leave TOSH_DATA_LENGTH at 28, but send a payload of 2 > bytes, will the other 26 bytes worth of payload still be sent over > radio? > > I'm asking because one of my apps needs to send as small as possible > packets (reduce battery usage, and to hog the radio freqeuncy for as > short as possible). However, I would like the app to still be able to > receive larger packets. Otherwise all the apps in the mote network > need to have the smaller TOSH_DATA_LENGTH, which is bothersome. > > Any insights on this subject? > > David. > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- ~Kevin _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help