Hi Hamdi, in "TOS_MsgPtr pMsg" you must provide a pointer to a TOS_Msg field, which is defined in tinyos-1.x/tos/types/AM.h. In order to fill this TOS_Msg you mus previously call to
command void* Send.getBuffer[uint8_t id](TOS_MsgPtr msg, uint16_t* length); to get a pointer to the payload and fill the message. For instance, you can do a cast from the void* returned by previous command to the type of message you want to send, and then fill the message by using the pointer to your message type. Regards, Pablo Gil ----- Mensaje original ---- De: Hamdi Roumani <[EMAIL PROTECTED]> Para: [email protected] Enviado: viernes, 26 de enero, 2007 11:49:47 Asunto: [Tinyos-help] TinyOS: MultiHop Hello, I'd like to use MultiHopEngine .. particularly the send and recieve interfaces. I'm not exactly sure how to do this though: command result_t Send.send[uint8_t id](TOS_MsgPtr pMsg, uint16_t PayloadLen) what excatly needs to go in the TOS_MsgPtr for example? Also, is this a good algorithm to use for MultiHop protocols? or is there a simple alternative. Thanks! -- Regards, Hamdi ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ 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
