as I said, the length of the payload is in the message.length field.
I don't know about BareSend, it may be that you have to fill in the
length on the sender's side. SendMsg sounds more like what you should
be using...

MS


Debasmit Banerjee wrote:
> Thanks! But is there any way for the receiver to check the size of the 
> packet it receives? Also, I currently use BareSendMsg.send() to send 
> messages. I don't think there is any way to specify the size using that. 
> I found that there is a SendMsg.send() which has a 'length' argument. Is 
> that used to specify the length of the message? 
> 
> - DB
> 
> 
> On Thu, Feb 17, 2011 at 3:58 PM, Michael Schippling <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     That is exactly right. The payload size you specify in the send()
>     is the length that is received, where the maximum size is
>     TOSH_DATA_LENGTH or whatever they call it these days.
> 
>     MS
> 
>     Debasmit Banerjee wrote:
> 
>         Hi all,
> 
>         In my application, I need to send packets of variable size.
>         Also, can the receiver check the size of the received packet. I
>         know that you can change the size of the message using
>         TOSH_DATA_LENGTH. But is it possible to send messages with
>         different sizes in the same application. I read somewhere that
>         TOSH_DATA_LENGTH defines the maximum payload size and the actual
>         size depends on the number of bytes transmitted. In that case
>         how does the receiver measure the size of the packet received?
>         Any help is greatly appreciated!
> 
>         Thanks!
> 
> 
>         
> ------------------------------------------------------------------------
> 
>         _______________________________________________
>         Tinyos-help mailing list
>         [email protected]
>         <mailto:[email protected]>
>         
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to