[Tinyos-devel] LPL API for protocols
Vlado Handziski
handzisk at tkn.tu-berlin.de
Tue May 20 12:01:50 PDT 2008
I personally prefer the setWakeupInterval variant you proposed.I think it
makes the intention more clear.
Vlado
On Tue, May 20, 2008 at 8:37 PM, David Moss <dmm at rincon.com> wrote:
> That would work too, and I'd be up for that. What do other folks think?
>
> -David
>
>
> -----Original Message-----
> From: mmaroti at gmail.com [mailto:mmaroti at gmail.com] On Behalf Of Miklos
> Maroti
> Sent: Tuesday, May 20, 2008 11:33 AM
> To: David Moss
> Cc: TinyOS Development
> Subject: Re: [Tinyos-devel] LPL API for protocols
>
> David,
>
> What about setLocalSleepInterval and setRemoteSleepInterval?
>
> Miklos
>
> On Tue, May 20, 2008 at 8:25 PM, David Moss <dmm at rincon.com> wrote:
> > It makes sense to decrease the number of commands here, and I like
> avoiding
> > added confusion and complexity. But if the local sleep interval also
> sets
> > the default rx sleep interval, maybe we should change the wording to
> > "setSleepInterval(uint16_t)" and drop the word "local"... or something
> > equivalent.
> >
> > Also, since we're already on the warpath of changing this interface, I
> think
> > the phrase "RxSleepInterval" is confusing. Really, the packet you're
> > transmitting is trying to wakeup a receiver. So what you're really
> setting
> > is the wakeup interval. If people don't like this, then no problem, we
> can
> > keep it as it is right now with setRxSleepInterval().
> >
> > I also think the interface is better named "LowPowerCommunications" but
> I'm
> > not going to go that far :)
> >
> >
> > Here's another proposal. We can keep iterating until there's consensus.
> >
> > interface LowPowerListening {
> >
> > /**
> > * Set your local sleep interval and the default wake-up interval
> > * for non-customized outbound packets.
> > * @param sleepInterval The amount of time to sleep between receive
> > * checks, in milliseconds (bms)
> > */
> > command void setSleepInterval(uint16_t sleepInterval);
> >
> > /**
> > * @return The local sleep interval between radio receive checks.
> > */
> > command uint16_t getSleepInterval();
> >
> >
> > /**
> > * Customize an outbound packet to be delivered to a node on a
> > * different sleep schedule.
> > * @param msg The outbound message to customize
> > * @param sleepInterval The
> > command void setWakeupInterval(message_t *msg, uint16_t wakeupInterval);
> >
> > /**
> > * @param msg The message for which to obtain the wakeup interval
> > * @return The wakeup interval used for this packet's transmission.
> > */
> > command uint16_t getWakeupInterval(message_t *msg);
> >
> > }
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: mmaroti at gmail.com [mailto:mmaroti at gmail.com] On Behalf Of Miklos
> > Maroti
> > Sent: Tuesday, May 20, 2008 11:01 AM
> > To: David Moss
> > Cc: TinyOS Development
> > Subject: Re: [Tinyos-devel] LPL API for protocols
> >
> > David,
> >
> > Can you give me a use case when the default rx sleep interval would be
> > different from the local sleep interval AND you do not manage the
> > sleep interval on a per-packet basis?
> >
> > Miklos
> >
> > On Tue, May 20, 2008 at 7:49 PM, David Moss <dmm at rincon.com> wrote:
> >> Here's a new LowPowerListening interface I'm just throwing out to keep
> our
> >> initial discussion rolling. I think an explicit command,
> >> setDefaultRxSleepInterval() in this example, could act as a reminder to
> > the
> >> developer that there is some default interval to be set (instead of
> > relying
> >> on your local sleep interval to be the default). If you don't set it,
> the
> >> default is assumed to be 0 (send to an always-on receiver).
> >>
> >> Calling getRxSleepInterval(msg) will return the default rx sleep
> interval
> > if
> >> the packet doesn't have a custom, overriding rx sleep interval set.
> >>
> >>
> >> interface LowPowerListening {
> >>
> >> command void setLocalSleepInterval(uint16_t sleepInterval);
> >>
> >> command uint16_t getLocalSleepInterval();
> >>
> >>
> >> command void setRxSleepInterval(message_t *msg, uint16_t
> sleepInterval);
> >>
> >> command uint16_t getRxSleepInterval(message_t *msg);
> >>
> >>
> >> command void setDefaultRxSleepInterval(uint16_t defaultSleepInterval);
> >>
> >> command uint16_t getDefaultRxSleepInterval();
> >>
> >> }
> >>
> >> Thoughts?
> >>
> >> -David
> >>
> >>
> >>
> >> _______________________________________________
> >> Tinyos-devel mailing list
> >> Tinyos-devel at millennium.berkeley.edu
> >>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
> >>
> >
> >
> >
>
>
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080520/6fd0e1f2/attachment.htm
More information about the Tinyos-devel
mailing list