[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net DisseminationEngineImplP.nc, 1.6, 1.7 SendVirtualizerP.nc, 1.1, 1.2 UARTDebugSenderP.nc, 1.2, 1.3

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


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

Modified Files:
	DisseminationEngineImplP.nc SendVirtualizerP.nc 
	UARTDebugSenderP.nc 
Log Message:
The big interface switchover for Packet, Send, Receive, and AMSend.


Index: DisseminationEngineImplP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/DisseminationEngineImplP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DisseminationEngineImplP.nc	14 Apr 2007 00:31:29 -0000	1.6
--- DisseminationEngineImplP.nc	13 Sep 2007 23:10:18 -0000	1.7
***************
*** 117,128 ****
    void sendProbe( uint16_t key ) {
      dissemination_probe_message_t* dpMsg = 
!       (dissemination_probe_message_t*) call ProbeAMSend.getPayload( &m_buf );
!     
!     m_bufBusy = TRUE;
!     
!     dpMsg->key = key;
!     
!     call ProbeAMSend.send( AM_BROADCAST_ADDR, &m_buf,
! 			   sizeof( dissemination_probe_message_t ) );
    }
  
--- 117,129 ----
    void sendProbe( uint16_t key ) {
      dissemination_probe_message_t* dpMsg = 
!       (dissemination_probe_message_t*) call ProbeAMSend.getPayload( &m_buf, sizeof(dissemination_probe_message_t));
!     if (dpMsg != NULL) {
!       m_bufBusy = TRUE;
!       
!       dpMsg->key = key;
!       
!       call ProbeAMSend.send( AM_BROADCAST_ADDR, &m_buf,
! 			     sizeof( dissemination_probe_message_t ) );
!     }
    }
  
***************
*** 132,152 ****
      
      dissemination_message_t* dMsg = 
!       (dissemination_message_t*) call AMSend.getPayload( &m_buf );
!     
!     m_bufBusy = TRUE;
!     
!     dMsg->key = key;
!     dMsg->seqno = call DisseminationCache.requestSeqno[ key ]();
! 
!     if ( dMsg->seqno != DISSEMINATION_SEQNO_UNKNOWN ) {
!       object = call DisseminationCache.requestData[ key ]( &objectSize );
!       if ((objectSize + sizeof(dissemination_message_t)) > 
!            call AMSend.maxPayloadLength()) {
!         objectSize = call AMSend.maxPayloadLength() - sizeof(dissemination_message_t);
!       }
!       memcpy( dMsg->data, object, objectSize );
!     }      
!     call AMSend.send( AM_BROADCAST_ADDR,
! 		      &m_buf, sizeof( dissemination_message_t ) + objectSize );
    }
  
--- 133,154 ----
      
      dissemination_message_t* dMsg = 
!       (dissemination_message_t*) call AMSend.getPayload( &m_buf, sizeof(dissemination_message_t) );
!     if (dMsg != NULL) {
!       m_bufBusy = TRUE;
!       
!       dMsg->key = key;
!       dMsg->seqno = call DisseminationCache.requestSeqno[ key ]();
!       
!       if ( dMsg->seqno != DISSEMINATION_SEQNO_UNKNOWN ) {
! 	object = call DisseminationCache.requestData[ key ]( &objectSize );
! 	if ((objectSize + sizeof(dissemination_message_t)) > 
! 	    call AMSend.maxPayloadLength()) {
! 	  objectSize = call AMSend.maxPayloadLength() - sizeof(dissemination_message_t);
! 	}
! 	memcpy( dMsg->data, object, objectSize );
!       }      
!       call AMSend.send( AM_BROADCAST_ADDR,
! 			&m_buf, sizeof( dissemination_message_t ) + objectSize );
!     }
    }
  

Index: SendVirtualizerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/SendVirtualizerP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SendVirtualizerP.nc	7 Apr 2007 01:58:04 -0000	1.1
--- SendVirtualizerP.nc	13 Sep 2007 23:10:18 -0000	1.2
***************
*** 183,188 ****
      }
  
!     command void* Send.getPayload[uint8_t id](message_t* m) {
!         return call SubSend.getPayload(m);
      }
  
--- 183,188 ----
      }
  
!     command void* Send.getPayload[uint8_t id](message_t* m, uint8_t len) {
!       return call SubSend.getPayload(m, len);
      }
  

Index: UARTDebugSenderP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/UARTDebugSenderP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** UARTDebugSenderP.nc	6 Nov 2006 11:57:16 -0000	1.2
--- UARTDebugSenderP.nc	13 Sep 2007 23:10:18 -0000	1.3
***************
*** 80,84 ****
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg);
              memset(dbg_msg, 0, len);
  
--- 80,88 ----
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg, sizeof(CollectionDebugMsg));
! 	    if (dbg_msg == NULL) {
! 	      return FAIL;
! 	    }
! 	    
              memset(dbg_msg, 0, len);
  
***************
*** 103,107 ****
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg);
              memset(dbg_msg, 0, len);
  
--- 107,114 ----
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg, sizeof(CollectionDebugMsg));
! 	    if (dbg_msg == NULL) {
! 	      return FAIL;
! 	    }
              memset(dbg_msg, 0, len);
  
***************
*** 129,133 ****
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg);
              memset(dbg_msg, 0, len);
  
--- 136,143 ----
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg, sizeof(CollectionDebugMsg));
! 	    if (dbg_msg == NULL) {
! 	      return FAIL;
! 	    }
              memset(dbg_msg, 0, len);
  
***************
*** 155,159 ****
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg);
              memset(dbg_msg, 0, len);
  
--- 165,172 ----
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg, sizeof(CollectionDebugMsg));
! 	    if (dbg_msg == NULL) {
! 	      return FAIL;
! 	    }
              memset(dbg_msg, 0, len);
  
***************
*** 179,183 ****
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg);
              memset(dbg_msg, 0, len);
  
--- 192,199 ----
          } else {
              message_t* msg = call MessagePool.get();
!             CollectionDebugMsg* dbg_msg = call UARTSend.getPayload(msg, sizeof(CollectionDebugMsg));
! 	    if (dbg_msg == NULL) {
! 	      return FAIL;
! 	    }
              memset(dbg_msg, 0, len);
  



More information about the Tinyos-2-commits mailing list