Sorry, but your use of the word "accede" is confusing...but
I think you are asking how to copy a TOS_Msg to a new buffer.

If that is the case the syntax you show
    msg = *pMsg;
is called structure assignment, and may or may not work
depending on the compiler. I would expect the compiler to
complain if it can't do it, but I would also want to try
some experiments to verify the behavior.

Another way to do it is brute force:
    memcpy( destptr, srcptr, numbytes );

MS

Elena Lamaza wrote:
Hello,

I am working with the SurgeTelos application and I have a doubt that is centered in the SurgeM.nc file. I need to accede to the package (to the TOS_Msg), that is given back to the Send.sendDone (). One of the parameters of the method event result_t Send.sendDone (TOS_MsgPtr pMsg, result_t success) of the SurgeM.nc, is the message that has been sent by the node, no? From the TOS_MsgPtr it would have to obtain the TOS_Msg thus to be able to put it like parameter in the Send.send (&gMsgBuffer, sizeof (SurgeMsg)). The way that I have thought is:

TOS_Msg msg = *pMsg;

But, not if it is the correct way to do it.

Somebody could say to me if it is it, and in other case, to give some alternative me?

Thanks

_________________________________________________________________
¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en MSN Motor. http://motor.msn.es/researchcentre/

_______________________________________________
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