[Tinyos-2-commits] CVS: tinyos-2.x/apps/MultihopOscilloscope
MultihopOscilloscopeC.nc, 1.3, 1.4
Phil Levis
scipio at users.sourceforge.net
Thu Sep 13 16:10:52 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/apps/MultihopOscilloscope
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27056/apps/MultihopOscilloscope
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/MultihopOscilloscope/MultihopOscilloscopeC.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MultihopOscilloscopeC.nc 7 Nov 2006 19:30:34 -0000 1.3
--- MultihopOscilloscopeC.nc 13 Sep 2007 23:10:20 -0000 1.4
***************
*** 129,134 ****
oscilloscope_t* out;
if (uartbusy == FALSE) {
! out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf);
! if (len != sizeof(oscilloscope_t)) {
return msg;
}
--- 129,134 ----
oscilloscope_t* out;
if (uartbusy == FALSE) {
! out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf, sizeof(oscilloscope_t));
! if (len != sizeof(oscilloscope_t) || out == NULL) {
return msg;
}
***************
*** 148,153 ****
}
! //Prepare message to be sent over the uart
! out = (oscilloscope_t*)call SerialSend.getPayload(newmsg);
memcpy(out, in, sizeof(oscilloscope_t));
--- 148,156 ----
}
! //Serial port busy, so enqueue.
! out = (oscilloscope_t*)call SerialSend.getPayload(newmsg, sizeof(oscilloscope_t));
! if (out == NULL) {
! return msg;
! }
memcpy(out, in, sizeof(oscilloscope_t));
***************
*** 225,229 ****
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)
--- 228,236 ----
if (reading == NREADINGS) {
if (!sendbusy) {
! oscilloscope_t *o = (oscilloscope_t *)call Send.getPayload(&sendbuf, sizeof(oscilloscope_t));
! if (o == NULL) {
! fatal_problem();
! return;
! }
memcpy(o, &local, sizeof(local));
if (call Send.send(&sendbuf, sizeof(local)) == SUCCESS)
More information about the Tinyos-2-commits
mailing list