[Tinyos-devel] status of the default-lpl

Razvan Musaloiu-E. razvanm at cs.jhu.edu
Mon Jul 20 16:55:20 PDT 2009


Hi!

Here is a quick summary of the default-lpl I have so far.

The LowPowerListening is simplified and contains only 4 calls:

   interface LowPowerListening {
     command void setLocalSleepInterval(uint16_t sleepIntervalMs);
     command uint16_t getLocalSleepInterval();

     command void setRxSleepInterval(message_t *msg, uint16_t sleepIntervalMs);
     command uint16_t getRxSleepInterval(message_t *msg);
   }

The LowPowerListening is disable by default and can be enabled by the 
following define:

   CFLAGS += -DLOW_POWER_LISTENING

The default-lpl settings are controlled by 3 others defines:

   CFLAGS += -DLPL_DEF_LOCAL_SLEEP=512
   CFLAGS += -DLPL_DEF_RX_SLEEP=512
   CFLAGS += -DDELAY_AFTER_RECEIVE=20

At run time these can also be changed using the SystemLowPowerListening 
interface:

   interface SystemLowPowerListening
   {
     command void setDefaultDestinationSleepInterval(uint16_t interval);
     command void setDelayAfterReceive(uint16_t interval);

     command uint16_t getDefaultDestinationSleepInterval();
     command uint16_t getDelayAfterReceive();
   }

Note that setLocalSleepInterval is missing from SystemLowPowerListening. I 
took it out because it had the same functionality as the 
setLocalSleepInterval from LowPowerListening.

And second note: RxSleep is the same thing as DestinationSleep. 
DestinationSleep was called RxSleep in the beginning but I was asked to 
rename it in the SystemLowPowerListening in order to improve the clarity. :P

This code is in the default-lpl-new branch from here:
 	http://hinrg.cs.jhu.edu/git/?p=razvanm/tinyos-2.x.git

Getting it by cloning the whole repository can be done using the following 
commands:

   git clone git://hinrg.cs.jhu.edu/git/razvanm/tinyos-2.x.git
   cd tinyos-2.x
   git checkout -b default-lpl origin/default-lpl

In an already existing git tree the default-lpl can be imported using 
these commands:

   git fetch git://hinrg.cs.jhu.edu/git/razvanm/tinyos-2.x.git default-lpl:refs/remotes/razvanm/default-lpl
   git checkout -b default-lpl razvanm/default-lpl

The test application is apps/tests/TestNetworkLpl.

Any feedback and comments are welcome. :-)

--
Razvan ME


More information about the Tinyos-devel mailing list