Hi!
     I am new here to program with tinyos, on power saving problems.
     Recently I found in the tinyos wiki an article about LowPowerListening
http://docs.tinyos.net/index.php/Writing_Low-Power_Applications_(TOS_2.1.1)
     But I cannot find any version of tinyos, which has the
LowPowerListening.nc as in the article. I've check the tinyos google svn.
Yet there are all old versions of LowPowerListening.nc.
     Is there anyone who have the latest version of tinyos? or know how to
get one? Thanks a lot! :)
------------

version i want (in the wiki article example)

interface LowPowerListening {
  /**
   * Set this this node's radio sleep interval, in milliseconds.
   * Once every interval, the node will sleep and perform an Rx check
   * on the radio.  Setting the sleep interval to 0 will keep the radio
   * always on.
   *
   * This is the equivalent of setting the local duty cycle rate.
   *
   * @param sleepIntervalMs the length of this node's Rx check interval, in [ms]
   */
  command void setLocalSleepInterval(uint16_t sleepIntervalMs);

  /**
   * @return the local node's sleep interval, in [ms]
   */
  command uint16_t getLocalSleepInterval();

  /**
   * Set this node's radio duty cycle rate, in units of [percentage*100].
   * For example, to get a 0.05% duty cycle,
   *   call LowPowerListening.setDutyCycle(5);
   *
   * For a 100% duty cycle (always on),
   *   call LowPowerListening.setDutyCycle(10000);
   *
   * This is the equivalent of setting the local sleep interval explicitly.
   *
   * @param dutyCycle The duty cycle percentage, in units of [percentage*100]
   */
  command void setLocalDutyCycle(uint16_t dutyCycle);

  /**
   * @return this node's radio duty cycle rate, in units of [percentage*100]
   */
  command uint16_t getLocalDutyCycle();

  /**
   * Configure this outgoing message so it can be transmitted to a neighbor mote
   * with the specified Rx sleep interval.
   * @param msg Pointer to the message that will be sent
   * @param sleepInterval The receiving node's sleep interval, in [ms]
   */
  command void setRxSleepInterval(message_t *msg, uint16_t sleepIntervalMs);

  /**
   * @return the destination node's sleep interval configured in this message
   */
  command uint16_t getRxSleepInterval(message_t *msg);

  /**
   * Configure this outgoing message so it can be transmitted to a neighbor mote
   * with the specified Rx duty cycle rate.
   * Duty cycle is in units of [percentage*100], i.e. 0.25% duty cycle = 25.
   *
   * @param msg Pointer to the message that will be sent
   * @param dutyCycle The duty cycle of the receiving mote, in units of
   *     [percentage*100]
   */
  command void setRxDutyCycle(message_t *msg, uint16_t dutyCycle);

  /**
   * @return the destination node's duty cycle configured in this message
   *     in units of [percentage*100]
   */
  command uint16_t getRxDutyCycle(message_t *msg);

  /**
   * Convert a duty cycle, in units of [percentage*100], to
   * the sleep interval of the mote in milliseconds
   * @param dutyCycle The duty cycle in units of [percentage*100]
   * @return The equivalent sleep interval, in units of [ms]
   */
  command uint16_t dutyCycleToSleepInterval(uint16_t dutyCycle);

  /**
   * Convert a sleep interval, in units of [ms], to a duty cycle
   * in units of [percentage*100]
   * @param sleepInterval The sleep interval in units of [ms]
   * @return The duty cycle in units of [percentage*100]
   */
  command uint16_t sleepIntervalToDutyCycle(uint16_t sleepInterval);
 }

version  I've found in svn

interface LowPowerListening {
/**
* Set this this node's radio wakeup interval, in milliseconds. After
* each interval, the node will wakeup and check for radio activity.
*
* Note: The wakeup interval can be set to 0 to indicate that the radio
* should stay on all the time but in order to get a startDone this
* should only be done when the duty-cycling is off (after a stopDone).
*
* @param intervalMs the length of this node's Rx check interval, in [ms]
*/
command void setLocalWakeupInterval(uint16_t intervalMs);

/**
* @return the local node's wakeup interval, in [ms]
*/
command uint16_t getLocalWakeupInterval();

/**
* Configure this outgoing message so it can be transmitted to a neighbor mote
* with the specified wakeup interval.
* @param 'message_t* ONE msg' Pointer to the message that will be sent
* @param intervalMs The receiving node's wakeup interval, in [ms]
*/
command void setRemoteWakeupInterval(message_t *msg, uint16_t intervalMs);

/**
* @param 'message_t* ONE msg'
* @return the destination node's wakeup interval configured in this message
*/
command uint16_t getRemoteWakeupInterval(message_t *msg);
}
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to