[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestMultihopLqi
MultihopOscilloscopeC.nc, 1.2, 1.3
Phil Levis
scipio at users.sourceforge.net
Thu Sep 13 16:10:53 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestMultihopLqi
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27056/apps/tests/TestMultihopLqi
Modified Files:
MultihopOscilloscopeC.nc
Log Message:
The big interface switchover for Packet, Send, Receive, and AMSend.
Index: MultihopOscilloscopeC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestMultihopLqi/MultihopOscilloscopeC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MultihopOscilloscopeC.nc 4 Jul 2007 15:51:55 -0000 1.2
--- MultihopOscilloscopeC.nc 13 Sep 2007 23:10:20 -0000 1.3
***************
*** 137,142 ****
}
if (uartbusy == FALSE) {
! out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf);
! if (len != sizeof(oscilloscope_t)) {
return msg;
}
--- 137,142 ----
}
if (uartbusy == FALSE) {
! out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf, sizeof(oscilloscope_t));
! if (out == NULL || call Packet.payloadLength(&uartbuf) != sizeof(oscilloscope_t)) {
return msg;
}
***************
*** 157,161 ****
//Prepare message to be sent over the uart
! out = (oscilloscope_t*)call SerialSend.getPayload(newmsg);
memcpy(out, in, sizeof(oscilloscope_t));
--- 157,164 ----
//Prepare message to be sent over the uart
! out = (oscilloscope_t*)call SerialSend.getPayload(newmsg, sizeof(oscilloscope_t));
! if (out == NULL) {
! return;
! }
memcpy(out, in, sizeof(oscilloscope_t));
***************
*** 233,237 ****
if (reading == NREADINGS) {
if (!sendbusy) {
! oscilloscope_t *o = (oscilloscope_t *)call Send.getPayload(&sendbuf);
memcpy(o, &local, sizeof(local));
if (call Send.send(&sendbuf, sizeof(local)) == SUCCESS) {
--- 236,243 ----
if (reading == NREADINGS) {
if (!sendbusy) {
! oscilloscope_t *o = (oscilloscope_t *)call Send.getPayload(&sendbuf, sizeof(oscilloscope_t));
! if (o == NULL) {
! return;
! }
memcpy(o, &local, sizeof(local));
if (call Send.send(&sendbuf, sizeof(local)) == SUCCESS) {
More information about the Tinyos-2-commits
mailing list