[Tinyos-beta-commits] CVS: tinyos-1.x/beta/teps/txt tep102.txt, 1.6, 1.7

Cory Sharp cssharp at users.sourceforge.net
Wed May 18 04:16:30 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/teps/txt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26980

Modified Files:
	tep102.txt 
Log Message:
Reformatted. No change in content.


Index: tep102.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/teps/txt/tep102.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** tep102.txt	18 May 2005 10:49:29 -0000	1.6
--- tep102.txt	18 May 2005 11:16:28 -0000	1.7
***************
*** 139,143 ****
  advanced user components.  by precision and size.
  
! Alarm::
  
    interface Alarm<precision_tag,size_type>
--- 139,150 ----
  advanced user components.  by precision and size.
  
! 
! Alarm
! --------------------------------------------------------------------
! 
! All commands and events of the Alarm interface are asynchronous (or
! in "interrupt context").  The Alarm interface provides a set of
! "basic" commands for common usage and provides a set of "extended"
! commands for advanced use.  ::
  
    interface Alarm<precision_tag,size_type>
***************
*** 155,188 ****
    }
  
! All commands and events of the Alarm interface are asynchronous (or
! in "interrupt context").  The Alarm interface provides a set of
! "basic" commands for common usage and provides a set of "extended"
! commands for advanced use.
  
! startNow(dt) -- cancel any previously running alarm and set to fire
! in dt time units from the time of invocation.  The alarm will only
! fire once then stop.
  
! stop() -- cancel any previously running alarm.
  
! fired() -- signals that the alarm has occurred.
  
! isRunning() -- return TRUE if the alarm has been started and has not
! been cancelled or has not yet fired.  FALSE is returned otherwise.
  
! start(t0,dt) -- cancel any previously running alarm and set to fire
! at time t1 = t0+dt.  This form allows a delay to be anchored to some
! time t0 taken before the invocation of start.  This is also the form
! used internally in the timer subsystem to allow the use of the full
! width of an alarm while being able to detect if the alarm time for a
! short alarm prematurely elapsed.
  
! getNow() -- return the current time in the precision and width of
! the alarm.
  
- getAlarm() -- return the time the currently running alarm will fire
- or the time that the previously running alarm was set to fire.
  
! BusyWait::
  
    interface BusyWait<precision_tag,size_type>
--- 162,201 ----
    }
  
! startNow(dt) 
!   cancel any previously running alarm and set to fire in dt time units
!   from the time of invocation.  The alarm will only fire once then
!   stop.
  
! stop() 
!   cancel any previously running alarm.
  
! fired() 
!   signals that the alarm has occurred.
  
! isRunning() 
!   return TRUE if the alarm has been started and has not been cancelled
!   or has not yet fired.  FALSE is returned otherwise.
  
! start(t0,dt) 
!   cancel any previously running alarm and set to fire at time t1 =
!   t0+dt.  This form allows a delay to be anchored to some time t0
!   taken before the invocation of start.  This is also the form used
!   internally in the timer subsystem to allow the use of the full width
!   of an alarm while being able to detect if the alarm time for a short
!   alarm prematurely elapsed.
  
! getNow() 
!   return the current time in the precision and width of the alarm.
  
! getAlarm() 
!   return the time the currently running alarm will fire or the time
!   that the previously running alarm was set to fire.
  
  
! BusyWait
! --------------------------------------------------------------------
! 
! The BusyWait interface replaces the TOSH_uwait macro from TinyOS
! 1.x.  ::
  
    interface BusyWait<precision_tag,size_type>
***************
*** 191,200 ****
    }
  
! The BusyWait interface replaces the TOSH_uwait macro from TinyOS
! 1.x.
  
- wait(dt) -- block for no less than the specified amount of time.
  
! Counter::
  
    interface Counter<precision_tag,size_type>
--- 204,218 ----
    }
  
! wait(dt)
!   block for no less than the specified amount of time.
  
  
! Counter
! --------------------------------------------------------------------
! 
! The Counter interface returns the current time and provides commands
! and an event for managing overflow conditions.  These overflow
! commands and events are necessary for properly deriving larger width
! Counters from smaller widths.  ::
  
    interface Counter<precision_tag,size_type>
***************
*** 206,226 ****
    }
  
! The Counter interface returns the current time and provides commands
! and an event for managing overflow conditions.  These overflow
! commands and events are necessary for properly deriving larger width
! Counters from smaller widths.
  
! get() -- return the current time.
  
! isOverflowPending() -- return TRUE if an overflow interrupt will
! occur after the outermost atomic block is exits.  FALSE otherwise.
  
! clearOverflow() -- cancel the pending overflow interrupt.
  
- overflow() -- signals that an overflow in the current time.  That
- is, the current time has wrapped around from its maximum value to
- zero.
  
! LocalTime::
  
    interface LocalTime<precision_tag>
--- 224,248 ----
    }
  
! get() 
!   return the current time.
  
! isOverflowPending() 
!   return TRUE if an overflow interrupt will occur after the outermost
!   atomic block is exits.  FALSE otherwise.
  
! clearOverflow() 
!   cancel the pending overflow interrupt.
  
! overflow() 
!   signals that an overflow in the current time.  That is, the current
!   time has wrapped around from its maximum value to zero.
  
  
! LocalTime
! --------------------------------------------------------------------
! 
! The LocalTime interface exposes a 32-bit counter without overflow
! utilities.  This is primarily for application code that does not
! care about overflow conditions.  ::
  
    interface LocalTime<precision_tag>
***************
*** 229,239 ****
    }
  
! The LocalTime interface exposes a 32-bit counter without overflow
! utilities.  This is primarily for application code that does not
! care about overflow conditions.
  
- get() -- return the current time.
  
! Timer::
  
    interface Timer<precision_tag>
--- 251,266 ----
    }
  
! get() 
!   return the current time.
  
  
! Timer
! --------------------------------------------------------------------
! 
! All commands and events of the Timer interface are synchronous (or
! in "task context").  The Timer interface provides a set of "basic"
! commands for common usage and provides a set of "extended" commands
! for advanced use.  The Timer interface allows for periodic events.
! ::
  
    interface Timer<precision_tag>
***************
*** 255,304 ****
    }
  
! All commands and events of the Timer interface are synchronous (or
! in "task context").  The Timer interface provides a set of "basic"
! commands for common usage and provides a set of "extended" commands
! for advanced use.  The Timer interface allows for periodic events.
! 
! startPeriodicNow(dt) -- cancel any previously running timer and set
! to fire in dt time units from the time of invocation.  The timer
! will fire periodically every dt time units until stopped.
  
! startOneShotNow(dt) -- cancel any previously running timer and set
! to fire in dt time units from the time of invocation.  The timer
! will only fire once then stop.
  
! stop() -- cancel any previously running timer.
  
! fired(when,numMissed) -- signals that the timer has occurred.  The
! when parameter indicates when the timer should have fired.  Because
! the timers fire in synchronous context, some time may have elapsed
! from "when" until now.  For periodic timers, numMissed indicates how
! many events were outright missed and when indicates the time of the
! most recent event.  For one-shot timers, numMissed is always 0 and
! when is the time of the event.
  
! isRunning() -- return TRUE if the timer has been started and has not
! been cancelled and has not fired for the case of one-shot timers.
! One a periodic timer is started, isRunning will return TRUE until it
! is cancelled.
  
! isOneShot() -- return TRUE if the timer is a one-shot timer.  Return
! FALSE otherwise if the timer is a periodic timer.
  
! startPeriodic(t0,dt) -- cancel any previously running timer and set to fire
! at time t1 = t0+dt.  The timer will fire periodically every dt time
! units until stopped.
  
! startOneShot(t0,dt) -- cancel any previously running timer and set to fire
! at time t1 = t0+dt.  The timer will fire once then stop.
  
! getNow() -- return the current time in the precision and width of
! the timer.
  
! gett0() -- return the time anchor for the previously started timer
! or the time of the previous event for periodic timers.
  
! getdt() -- return the delay or period for the previously started
! timer.
  
  
--- 282,334 ----
    }
  
! startPeriodicNow(dt) 
!   cancel any previously running timer and set to fire in dt time units
!   from the time of invocation.  The timer will fire periodically every
!   dt time units until stopped.
  
! startOneShotNow(dt) 
!   cancel any previously running timer and set to fire in dt time units
!   from the time of invocation.  The timer will only fire once then
!   stop.
  
! stop() 
!   cancel any previously running timer.
  
! fired(when,numMissed) 
!   signals that the timer has occurred.  The when parameter indicates
!   when the timer should have fired.  Because the timers fire in
!   synchronous context, some time may have elapsed from "when" until
!   now.  For periodic timers, numMissed indicates how many events were
!   outright missed and when indicates the time of the most recent
!   event.  For one-shot timers, numMissed is always 0 and when is the
!   time of the event.
  
! isRunning() 
!   return TRUE if the timer has been started and has not been cancelled
!   and has not fired for the case of one-shot timers.  One a periodic
!   timer is started, isRunning will return TRUE until it is cancelled.
  
! isOneShot() 
!   return TRUE if the timer is a one-shot timer.  Return FALSE
!   otherwise if the timer is a periodic timer.
  
! startPeriodic(t0,dt) 
!   cancel any previously running timer and set to fire at time t1 =
!   t0+dt.  The timer will fire periodically every dt time units until
!   stopped.
  
! startOneShot(t0,dt) 
!   cancel any previously running timer and set to fire at time t1 =
!   t0+dt.  The timer will fire once then stop.
  
! getNow() 
!   return the current time in the precision and width of the timer.
  
! gett0() 
!   return the time anchor for the previously started timer or the time
!   of the previous event for periodic timers.
  
! getdt() 
!   return the delay or period for the previously started timer.
  
  
***************
*** 319,323 ****
  platform dependent components discussed in the next section.
  
! AlarmToTimerC::
  
    generic component AlarmToTimerC( typedef precision_tag )
--- 349,357 ----
  platform dependent components discussed in the next section.
  
! 
! AlarmToTimerC
! --------------------------------------------------------------------
! 
! AlarmToTimerC converts a 32-bit Alarm to a Timer.  ::
  
    generic component AlarmToTimerC( typedef precision_tag )
***************
*** 327,333 ****
    }
  
- AlarmToTimerC converts a 32-bit Alarm to a Timer.
  
! BusyWaitCounterC::
  
    generic component BusyWaitC( typedef precision_tag,
--- 361,370 ----
    }
  
  
! BusyWaitCounterC
! --------------------------------------------------------------------
! 
! BusyWaitCounterC uses a Counter to block until a specified amount of
! time elapses.  ::
  
    generic component BusyWaitC( typedef precision_tag,
***************
*** 338,345 ****
    }
  
- BusyWaitCounterC uses a Counter to block until a specified amount of
- time elapses.
  
! CounterToLocalTimeC::
  
    generic component CounterToLocalTimeC( precision_tag )
--- 375,383 ----
    }
  
  
! CounterToLocalTimeC
! --------------------------------------------------------------------
! 
! CounterToLocalTimeC converts from a 32-bit Counter to LocalTime.  ::
  
    generic component CounterToLocalTimeC( precision_tag )
***************
*** 349,355 ****
    }
  
- CounterToLocalTimeC converts from a 32-bit Counter to LocalTime.
  
! TransformAlarmC::
  
    generic component TransformAlarmC( 
--- 387,396 ----
    }
  
  
! TransformAlarmC
! --------------------------------------------------------------------
! 
! TransformAlarmC decreases precision and/or widens an Alarm.  An
! already widened Counter component is used to help.  ::
  
    generic component TransformAlarmC( 
***************
*** 365,375 ****
    }
  
! TransformAlarmC decreases precision and/or widens an Alarm.  An
! already widened Counter component is used to help.  to_precision_tag
! and to_size_type describe the final precision and final width for
! the provided Alarm.  from_precision_tag and from_size_type describe
! the precision and width for the source AlarmFrom.  bit_shift_right
! describes the bit-shift necessary to convert from the used
! precision to the provided precision.
  
  For instance to convert from an Alarm<T32khz,uint16_t> to an
--- 406,414 ----
    }
  
! to_precision_tag and to_size_type describe the final precision and
! final width for the provided Alarm.  from_precision_tag and
! from_size_type describe the precision and width for the source
! AlarmFrom.  bit_shift_right describes the bit-shift necessary to
! convert from the used precision to the provided precision.
  
  For instance to convert from an Alarm<T32khz,uint16_t> to an
***************
*** 379,383 ****
    new TransformAlarmC( TMilli, uint32_t, T32khz, uint16_t, 5 )
  
! TransformCounterC::
  
    generic component TransformCounterC(
--- 418,426 ----
    new TransformAlarmC( TMilli, uint32_t, T32khz, uint16_t, 5 )
  
! 
! TransformCounterC
! --------------------------------------------------------------------
! 
! TransformCounterC decreases precision and/or widens a Counter.  ::
  
    generic component TransformCounterC(
***************
*** 393,397 ****
    }
  
- TransformCounterC decreases precision and/or widens a Counter.
  to_precision_tag and to_size_type describe the final precision and
  final width for the provided Counter.  from_precision_tag and
--- 436,439 ----
***************
*** 410,414 ****
    new TransformCounterC( TMilli, uint32_t, T32khz, uint16_t, 5, uint32_t )
  
! VirtualizeTimerC::
  
    generic component VirtualizeTimerC( typedef precision_tag,
--- 452,461 ----
    new TransformCounterC( TMilli, uint32_t, T32khz, uint16_t, 5, uint32_t )
  
! 
! VirtualizeTimerC
! --------------------------------------------------------------------
! 
! VirtualizeTimerC uses a single Timer to create up to 255 virtual
! timers.  ::
  
    generic component VirtualizeTimerC( typedef precision_tag,
***************
*** 420,426 ****
    }
  
- VirtualizeTimerC uses a single Timer to create up to 255 virtual
- timers.
- 
  
  Platform dependent components
--- 467,470 ----
***************
*** 437,448 ****
  * TimerMilliC
  
- Alarm32khzC::
  
!   generic configuration Alarm32khzC()
!   {
!     provides interface Init;
!     provides interface Alarm<T32khz,uint16_t> as Alarm32khz16;
!     provides interface Alarm<T32khz,uint32_t> as Alarm32khz32;
!   }
  
  Alarm32khzC MUST provide Init and Alarm<T32khz,uint32_t> as
--- 481,487 ----
  * TimerMilliC
  
  
! Alarm32khzC
! --------------------------------------------------------------------
  
  Alarm32khzC MUST provide Init and Alarm<T32khz,uint32_t> as
***************
*** 451,464 ****
  component.  Each instantiation allocates a new, distinct Alarm.
  Each instance of an Alarm32khzC MAY directly map to a hardware
! timer.
! 
! AlarmMilliC::
  
!   generic configuration AlarmMilliC()
    {
      provides interface Init;
!     provides interface Alarm<TMilli,uint32_t> as AlarmMilli32;
    }
  
  AlarmMilliC MUST provide Init and Alarm<TMilli,uint32_t> as
  AlarmMilli32.  The configuration MAY provide additional
--- 490,506 ----
  component.  Each instantiation allocates a new, distinct Alarm.
  Each instance of an Alarm32khzC MAY directly map to a hardware
! timer.  ::
  
!   generic configuration Alarm32khzC()
    {
      provides interface Init;
!     provides interface Alarm<T32khz,uint16_t> as Alarm32khz16;
!     provides interface Alarm<T32khz,uint32_t> as Alarm32khz32;
    }
  
+ 
+ AlarmMilliC
+ --------------------------------------------------------------------
+ 
  AlarmMilliC MUST provide Init and Alarm<TMilli,uint32_t> as
  AlarmMilli32.  The configuration MAY provide additional
***************
*** 466,472 ****
  component.  Each instantiation allocates a new, distinct Alarm.
  Each instance of an AlarmMilliC MAY directly map to a hardware
! timer.
  
! BusyWait32khzC::
  
    configuration BusyWait32khzC
--- 508,526 ----
  component.  Each instantiation allocates a new, distinct Alarm.
  Each instance of an AlarmMilliC MAY directly map to a hardware
! timer.  ::
  
!   generic configuration AlarmMilliC()
!   {
!     provides interface Init;
!     provides interface Alarm<TMilli,uint32_t> as AlarmMilli32;
!   }
! 
! 
! BusyWait32khzC
! --------------------------------------------------------------------
! 
! BusyWait32khzC MUST provide BusyWait<T32khz,uint16_t> as
! BusyWait32khz16.  The configuration MAY provide additional
! hardware-specific BusyWait interfaces.  ::
  
    configuration BusyWait32khzC
***************
*** 475,483 ****
    }
  
- BusyWait32khzC MUST provide BusyWait<T32khz,uint16_t> as
- BusyWait32khz16.  The configuration MAY provide additional
- hardware-specific BusyWait interfaces.
  
! BusyWaitMicroC::
  
    configuration BusyWaitMicroC
--- 529,539 ----
    }
  
  
! BusyWaitMicroC
! --------------------------------------------------------------------
! 
! BusyWaitMicroC MUST provide BusyWait<TMicro,uint16_t> as
! BusyWaitMicro16.  The configuration MAY provide additional
! hardware-specific BusyWait interfaces.  ::
  
    configuration BusyWaitMicroC
***************
*** 486,494 ****
    }
  
- BusyWaitMicroC MUST provide BusyWait<TMicro,uint16_t> as
- BusyWaitMicro16.  The configuration MAY provide additional
- hardware-specific BusyWait interfaces.
  
! Counter32khzC::
  
    configuration Counter32khzC
--- 542,552 ----
    }
  
  
! Counter32khzC
! --------------------------------------------------------------------
! 
! Counter32khz MUST provide Counter<T32khz,uint32_t> as Counter32khz32
! and LocalTime<T32khz> as LocalTime32khz.  The configuration MAY
! provide additional hardware-specific Counter interfaces.  ::
  
    configuration Counter32khzC
***************
*** 498,506 ****
    }
  
- Counter32khz MUST provide Counter<T32khz,uint32_t> as Counter32khz32
- and LocalTime<T32khz> as LocalTime32khz.  The configuration MAY
- provide additional hardware-specific Counter interfaces.
  
! CounterMilliC::
  
    configuration CounterMilliC
--- 556,566 ----
    }
  
  
! CounterMilliC
! --------------------------------------------------------------------
! 
! CounterMilli MUST provide Counter<TMilli,uint32_t> as CounterMilli32
! and LocalTime<TMilli> as LocalTimeMilli.  The configuration MAY
! provide additional hardware-specific Counter interfaces.  ::
  
    configuration CounterMilliC
***************
*** 510,518 ****
    }
  
- CounterMilli MUST provide Counter<TMilli,uint32_t> as CounterMilli32
- and LocalTime<TMilli> as LocalTimeMilli.  The configuration MAY
- provide additional hardware-specific Counter interfaces.
  
! TimerMilliC::
  
    configuration TimerMilliC
--- 570,581 ----
    }
  
  
! TimerMilliC
! --------------------------------------------------------------------
! 
! TimerMilliC MUST provide Init and Timer<TMilli> as
! TimerMilli[uint8_t num].  TimerMilliC is used by OSKI to implement
! the generic component TimerMilli that allocates a new, virtual timer
! with each instantiation.  ::
  
    configuration TimerMilliC
***************
*** 522,530 ****
    }
  
- TimerMilliC MUST provide Init and Timer<TMilli> as
- TimerMilli[uint8_t num].  TimerMilliC is used by OSKI to implement
- the generic component TimerMilli that allocates a new, virtual timer
- with each instantiation.
- 
  
  Hardware differences between the current platforms
--- 585,588 ----



More information about the Tinyos-beta-commits mailing list