[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/vu/tos/lib/TimeSync TimeSyncC.nc, 1.8, 1.9 TimeSyncM.nc, 1.12, 1.13

Brano Kusy kusyb at users.sourceforge.net
Tue Jun 27 07:47:34 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/vu/tos/lib/TimeSync
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11364

Modified Files:
	TimeSyncC.nc TimeSyncM.nc 
Log Message:


Index: TimeSyncC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/vu/tos/lib/TimeSync/TimeSyncC.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TimeSyncC.nc	28 Feb 2006 08:17:11 -0000	1.8
--- TimeSyncC.nc	27 Jun 2006 14:47:32 -0000	1.9
***************
*** 3,24 ****
   * All rights reserved.
   *
!  * Permission to use, copy, modify, and distribute this software and its
   * documentation for any purpose, without fee, and without written agreement is
!  * hereby granted, provided that the above copyright notice, the following
!  * two paragraphs and the author appear in all copies of this software.
   * 
!  * IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR
   * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
   * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT
   * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   * 
!  * THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
!  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
!  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
!  * ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO
!  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
   *
!  * Author: Miklos Maroti, Brano Kusy
!  * Date last modified: 3/17/03
   */
  
--- 3,24 ----
   * All rights reserved.
   *
!  * Permission to use, copy,	modify,	and	distribute this	software and its
   * documentation for any purpose, without fee, and without written agreement is
!  * hereby granted, provided	that the above copyright notice, the following
!  * two paragraphs and the author appear	in all copies of this software.
   * 
!  * IN NO EVENT SHALL THE VANDERBILT	UNIVERSITY BE LIABLE TO	ANY	PARTY FOR
   * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
   * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT
   * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   * 
!  * THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS	ANY	WARRANTIES,
!  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF	MERCHANTABILITY
!  * AND FITNESS FOR A PARTICULAR	PURPOSE.  THE SOFTWARE PROVIDED	HEREUNDER IS
!  * ON AN "AS IS" BASIS,	AND	THE	VANDERBILT UNIVERSITY HAS NO OBLIGATION	TO
!  * PROVIDE MAINTENANCE,	SUPPORT, UPDATES, ENHANCEMENTS,	OR MODIFICATIONS.
   *
!  * Author: Miklos Maroti, Brano	Kusy
!  * Date	last modified: 3/17/03
   */
  
***************
*** 27,96 ****
  configuration TimeSyncC
  {
!     provides interface StdControl;
!     provides interface GlobalTime;
  
!     //interfaces for extra fcionality: need not to be wired 
!     provides interface TimeSyncInfo;
!     provides interface TimeSyncMode;
!     provides interface TimeSyncNotify;
  }
  
  implementation 
  {
!     components TimeSyncM, TimerC, GenericComm, NoLeds as LedsC, Main,
  
! #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
!     #ifdef TIMESYNC_SYSTIME
!         SysTimeC, SysTimeStampingC as TimeStampingC;
!     #else
!         ClockC, ClockTimeStampingC as TimeStampingC;
!     #endif
  #elif PLATFORM_MICAZ
!     #ifdef TIMESYNC_SYSTIME
!         SysTimeC, SysTimeStampingC as TimeStampingC;
!     #else
!         #not_supported!
!         //implementation of CC2420 on micaZ uses Timer0 which conflicts with 
!         //Vanderbilt Clock* and Timer* components. as there is no component that 
!         //would provide 4 byte local time driven by 32kHz external crystal on 
!         //micaz, we support only CPU clock.
!     #endif
! #elif PLATFORM_TELOS
!     TimeStampingC
!     #ifdef TIMESYNC_SYSTIME
!         ,LocalTimeMicroC;
!     #else
!         ;
!     #endif
  #endif
  
!     GlobalTime = TimeSyncM;
!     StdControl = TimeSyncM;
!     TimeSyncInfo = TimeSyncM;
!     TimeSyncMode = TimeSyncM;
!     TimeSyncNotify = TimeSyncM;
!     
!     Main.StdControl -> TimerC;
!     Main.StdControl -> GenericComm;
  
!     TimeSyncM.SendMsg       -> GenericComm.SendMsg[AM_TIMESYNCMSG];
!     TimeSyncM.ReceiveMsg        -> GenericComm.ReceiveMsg[AM_TIMESYNCMSG];
!     TimeSyncM.Timer         -> TimerC.Timer[unique("Timer")];
!     TimeSyncM.Leds          -> LedsC;
!     TimeSyncM.TimeStamping      -> TimeStampingC;
  
! 
! #if TIMESYNC_SYSTIME
!     #ifdef PLATFORM_TELOS
!         TimeSyncM.LocalTime -> LocalTimeMicroC;
!     #else
!         TimeSyncM.SysTime       -> SysTimeC;
!     #endif
! #else
!     #ifdef PLATFORM_TELOS
!         TimeSyncM.LocalTime     -> TimerC;
      #else
!         TimeSyncM.LocalTime     -> ClockC;
!     #endif
  #endif
  }
--- 27,96 ----
  configuration TimeSyncC
  {
! 	provides interface StdControl;
! 	provides interface GlobalTime;
  
! 	//interfaces for extra fcionality: need	not	to be wired	
! 	provides interface TimeSyncInfo;
! 	provides interface TimeSyncMode;
! 	provides interface TimeSyncNotify;
  }
  
  implementation 
  {
! 	components TimeSyncM, TimerC, GenericComm, NoLeds as LedsC,	Main,
  
! #if	defined(PLATFORM_MICA2)	|| defined(PLATFORM_MICA2DOT)
! 	#ifdef TIMESYNC_SYSTIME
! 		SysTimeC, SysTimeStampingC as TimeStampingC;
! 	#else
! 		ClockC,	ClockTimeStampingC as TimeStampingC;
! 	#endif
  #elif PLATFORM_MICAZ
! 	#ifdef TIMESYNC_SYSTIME
! 		SysTimeC, SysTimeStampingC as TimeStampingC;
! 	#else
! 		#not_supported!
! 		//implementation of	CC2420 on micaZ	uses Timer0	which conflicts	with 
! 		//Vanderbilt Clock*	and	Timer* components. as there	is no component	that 
! 		//would	provide	4 byte local time driven by	32kHz external crystal on 
! 		//micaz, we	support	only CPU clock.
! 	#endif
! #elif defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB)
! 	TimeStampingC
! 	#ifdef TIMESYNC_SYSTIME
! 	    ,LocalTimeMicroC;
! 	#else
! 	    ;
! 	#endif
  #endif
  
! 	GlobalTime = TimeSyncM;
! 	StdControl = TimeSyncM;
! 	TimeSyncInfo = TimeSyncM;
! 	TimeSyncMode = TimeSyncM;
! 	TimeSyncNotify = TimeSyncM;
! 	
! 	Main.StdControl	-> TimerC;
! 	Main.StdControl	-> GenericComm;
  
! 	TimeSyncM.SendMsg		-> GenericComm.SendMsg[AM_TIMESYNCMSG];
! 	TimeSyncM.ReceiveMsg		-> GenericComm.ReceiveMsg[AM_TIMESYNCMSG];
! 	TimeSyncM.Timer			-> TimerC.Timer[unique("Timer")];
! 	TimeSyncM.Leds			-> LedsC;
! 	TimeSyncM.TimeStamping		-> TimeStampingC;
  
! 
! #if TIMESYNC_SYSTIME
!     #if defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB)
!         TimeSyncM.LocalTime -> LocalTimeMicroC;
      #else
! 	    TimeSyncM.SysTime		-> SysTimeC;
! 	#endif
! #else
!     #if defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB)
!         TimeSyncM.LocalTime -> TimerC;
!     #else
! 	    TimeSyncM.LocalTime		-> ClockC;
! 	#endif
  #endif
  }

Index: TimeSyncM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/vu/tos/lib/TimeSync/TimeSyncM.nc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TimeSyncM.nc	28 Feb 2006 08:17:11 -0000	1.12
--- TimeSyncM.nc	27 Jun 2006 14:47:32 -0000	1.13
***************
*** 47,56 ****
          interface Leds;
          interface TimeStamping;
! #ifdef PLATFORM_TELOS
!         interface LocalTime;
! #elif  TIMESYNC_SYSTIME
!         interface SysTime;
! #else
!         interface LocalTime;
  #endif
      }
--- 47,56 ----
          interface Leds;
          interface TimeStamping;
! #if defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB)
!         interface LocalTime;
! #elif  TIMESYNC_SYSTIME
!         interface SysTime;
! #else
!         interface LocalTime;
  #endif
      }
***************
*** 126,134 ****
      async command uint32_t GlobalTime.getLocalTime()
      {
! #ifdef PLATFORM_TELOS
!         return call LocalTime.read();
! #elif  TIMESYNC_SYSTIME
!         return call SysTime.getTime32();
! #else
          return call LocalTime.read();
  #endif
--- 126,134 ----
      async command uint32_t GlobalTime.getLocalTime()
      {
! #if defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB)
!         return call LocalTime.read();
! #elif  TIMESYNC_SYSTIME
!         return call SysTime.getTime32();
! #else
          return call LocalTime.read();
  #endif
***************
*** 314,318 ****
  
              processedMsg = p;
!             ((TimeSyncMsg*)(processedMsg->data))->arrivalTime = call TimeStamping.getStamp();
  
              state |= STATE_PROCESSING;
--- 314,318 ----
  
              processedMsg = p;
!             ((TimeSyncMsg*)(processedMsg->data))->arrivalTime = call TimeStamping.getStamp2(p);
  
              state |= STATE_PROCESSING;
***************
*** 363,367 ****
              }
              else
!                 call TimeStamping.addStamp2(&outgoingMsgBuffer, offsetof(TimeSyncMsg,sendingTime));
          }
      }
--- 363,367 ----
              }
              else
!                 call TimeStamping.addStamp2(&outgoingMsgBuffer, offsetof(TimeSyncMsg,sendingTime));
          }
      }



More information about the Tinyos-contrib-commits mailing list