[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestOscilloscopeLQI MultihopOscilloscopeC.nc, 1.1, 1.2

Phil Levis scipio at users.sourceforge.net
Thu Sep 13 16:10:53 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestOscilloscopeLQI
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27056/apps/tests/TestOscilloscopeLQI

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/TestOscilloscopeLQI/MultihopOscilloscopeC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MultihopOscilloscopeC.nc	15 Feb 2007 19:01:24 -0000	1.1
--- MultihopOscilloscopeC.nc	13 Sep 2007 23:10:20 -0000	1.2
***************
*** 130,135 ****
      call Leds.led1Toggle();
      if (uartbusy == FALSE) {
!       out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf);
!       if (len != sizeof(oscilloscope_t)) {
  	return msg;
        }
--- 130,135 ----
      call Leds.led1Toggle();
      if (uartbusy == FALSE) {
!       out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf, sizeof(oscilloscope_t));
!       if (call Packet.payloadLength(msg) != sizeof(oscilloscope_t)) {
  	return msg;
        }
***************
*** 150,154 ****
  
        //Prepare message to be sent over the uart
!       out = (oscilloscope_t*)call SerialSend.getPayload(newmsg);
        memcpy(out, in, sizeof(oscilloscope_t));
  
--- 150,157 ----
  
        //Prepare message to be sent over the uart
!       out = (oscilloscope_t*)call SerialSend.getPayload(newmsg, sizeof(oscilloscope_t));
!       if (out == NULL) {
! 	return msg;
!       }
        memcpy(out, in, sizeof(oscilloscope_t));
  
***************
*** 227,231 ****
      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)
--- 230,237 ----
      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