[Tinyos-devel] status of the default-lpl

Razvan Musaloiu-E. razvanm at cs.jhu.edu
Tue Jul 21 13:05:44 PDT 2009


Hi!

On Tue, 21 Jul 2009, Miklos Maroti wrote:

> Hi Razvan,
>
> I completely do not understand your naming of the commands.

It's not really mine. :P The names in the LowPowerListening were decided 
some time ago:
 	http://www.tinyos.net/tinyos-2.1.0/doc/html/tep105.html
 	http://hinrg.cs.jhu.edu/git/?p=tinyos-2.x.git;a=history;f=tos/interfaces/LowPowerListening.nc;h=b5225c4fe10c9e6333244aafa78aa435d93411d7;hb=HEAD

The only thing I did was to remove the calls that use duty cycle and keep 
the ones that deals with time.

> I think we should have
>
> void setTxSleepInterval(message_t *msg, uint16_t sleepIntervalMs);
>
> because that is the value we use to transmit the message (the length
> of the preamble / wakeup signal). Then we have the other command which
> controls how we sleep while receiving messages. I think that should be
> called:
>
> void setRxSleepInterval(uint16_t sleepIntervalMs);
>
> I like this much better than the "LocalSleepInterval". Maybe I am just
> wired in differently.
>

I don't have a strong attachment to any of the names. If you can 
convince Phil to use Tx/Rx let me know and I'll make the switch. :-)

--
Razvan ME

> On Tue, Jul 21, 2009 at 1:58 AM, Razvan Musaloiu-E.<razvanm at cs.jhu.edu> wrote:
>> Hi!
>>
>> On Mon, 20 Jul 2009, Razvan Musaloiu-E. wrote:
>>
>>> 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
>>>
>>
>> I manage to make a mistake: the default-lpl should be default-lpl-new. So
>> the above two sequence of commands are:
>>
>>   git clone git://hinrg.cs.jhu.edu/git/razvanm/tinyos-2.x.git
>>   cd tinyos-2.x
>>   git checkout -b default-lpl-new origin/default-lpl-new
>>
>> And:
>>
>>   git fetch git://hinrg.cs.jhu.edu/git/razvanm/tinyos-2.x.git default-lpl-new:refs/remotes/razvanm/default-lpl-new
>>   git checkout -b default-lpl-new razvanm/default-lpl-new
>>
>> Sorry for the mistake.
>>
>> --
>> Razvan ME
>>
>>> The test application is apps/tests/TestNetworkLpl.
>>>
>>> Any feedback and comments are welcome. :-)
>>>
>>> --
>>> Razvan ME
>>>
>>
>


More information about the Tinyos-devel mailing list