Thank you for your answer.

I am still curious to know the relation between msg and tosmsg. Should msg
be a structure of TOS_Msg?
You say that send() only sends one packet: why then the nesdoc for send()
says ' tosmsg - the first TOS_Msg packet in the SP message'??

I think this SP thing looks powerful and interesting, but in my opinion it
lacks usage examples. The paper mentioned is too high. Does anybody have
examples or how-to for the whole SP?

Yours sincerely.


On 6/22/07, Joe Polastre <[EMAIL PROTECTED]> wrote:

Hi Julien,

  The send() function only sends one packet through the radio.  If you
want to send multiple packets, you'll need to use the sendAdv()
function.  In this function, you specify the first packet and the
number of total packets.  SP will alert you when it is ready for the
next packet by signalling the SPSendNext.request() function (your
application must wire and use the SPSendNext interface from SPC on
your AM handler id).  You respond with the next packet using the
SPSendNext.response() function.

  This is described in greater detail as "SP Message Futures" in the SP
paper:
http://www.polastre.com/papers/sensys05-sp.pdf

-Joe

On 6/22/07, julien falco <[EMAIL PROTECTED]> wrote:
> I would like to send several packet of AM_TYPE from tmote sky to pc.
> I use SPSend. I have so far made tries with just one packet of this
type:
>
> typedef struct SkyetekM1miniCommand
> {
>     uint16_t src;            // Source address
>     uint8_t M1miniCmdArray[20];
>
> }SkyetekM1miniCommand;
>
> Now I would like to send more packets. What is the relation between msg
and
> tosmsg? For my tries, I send a pointer to tosmsg, which is okay, and for
> *msg I just declare it once like that (as In Joe's example):
sp_message_t
> m_spmsg;. But now, if I want to send more packets whithin the same
'msg',
> how am I supposed to tell t1.1 the relation between the two? Is nesdoc
it is
> said:
>
> SPSend submits messages (which are composed of packets) to the SP
message
> pool for transmission.
> Could someone be more specific?
>
> Moreover, it is only required to specify the first packet. What rule
applies
> for the following ones?
>
> In other words, how should SPSend be used for a message containing
several
> packets? (I have already read all docs).
>
> Thank you,
> Best Regards,
>
> -j
>
> send command result_t send(sp_message_t *msg, sp_message_t *tosmsg,
> sp_address_t addr, uint8_t length)
>
>  Send a message using the SP abstraction.
>
>  All sp_message_t fields other than msg->msg are *internal* to SP and
should
> not be set by the user. Doing so may result in unpredictable results.
>
>  Each sp_message_t must define the first TOS_Msg to be sent over the
radio.
>
>  Parameters: msg - the SP message to send. tosmsg - the first TOS_Msg
packet
> in the SP message addr - the destination address of the message length -
the
> length of the first TOS_Msg Returns: SUCCESS if the SP message pool has
room
> to accept the message
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
>
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to