[Tinyos-devel] [Tinyos Core WG] TEP105: LowPowerListening Duty Cycles
Andreas Koepke
koepke at tkn.tu-berlin.de
Fri May 16 11:10:23 PDT 2008
> >> I think TEP 105 should redefine the semantics of cancel, without the
> >>
> >> clause that requires that the packet is not transmitted yet (or with
> >>
> >> an error code different than ECANCEL in sendDone?).
> >
> >[..]
> >If it
> >is using XMAC-style cyclic sending, then it must return FAIL on
> >cancel(), but can signal an early sendDone() with SUCCESS. The packet
> >did go out over the air; the chances the receiver got it are much
> >lower than if the complete send cycle occurred, but they are non-zero.
>
> Yes, this is in sync with TEP 116. But this implies that a cancel that
> returns FAIL does have an effect on the behavior of the radio stack,
> which is a bit counterintuitive. Anyway, this appears to be the best
> solution so far.
>
> Janos
Counter-intuitive indeed it is. If I remember correctly, X-MAC sends wakeup
packets, not the full packet. So cancel on X-MAC most likely returns SUCCESS
and signals an ECANCEL. SpeckMacD and RedMac send full packets instead of
wake up packets. To keep the semantics of the TEP, we would have to predict
the future whether we will get an ACK and depending on this prediction return
either SUCCESS or FAIL to the cancel call. As Einstein said: Predictions are
always hard, especially those concerning the future...
More information about the Tinyos-devel
mailing list