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