Hi David,
thanks! I committed a fix to SVN [1]. It is a bit different from what
you suggested: I think your suggestion would not fix the problem,
because nesC will still complain that there is no PurgeGtsDevice
interface wired (nesC wouldn't know at compile time what branch in the
if-statement you will take at runtime); instead I added in DataP.nc
two default handlers that will return an error if the interfaces are
not wired.
Jan
[1] http://code.google.com/p/tinyos-main/
On Tue, Nov 27, 2012 at 10:32 AM, David Rodenas wrote:
> Hi Jan
>
> I found a possible bug in the "DataP.nc" and/or
> "TKN154NonBeaconEnabledP.nc". When you use the non-beacon enabled mode as
> well as the MCPS_PURGE functionality, the compiler suggests that
> PurgeGtsDevice and PurgeGtsCoord are not connected. In fact these don't need
> to be connected, but something should be changed at DataP.nc:
>
> command ieee154_status_t MCPS_PURGE.request (
> uint8_t msduHandle)
> {
> if (call PurgeDirect.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeIndirect.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeGtsDevice.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeGtsCoord.purge(msduHandle) == IEEE154_SUCCESS)
> return IEEE154_SUCCESS;
> else
> return IEEE154_INVALID_HANDLE;
> }
>
> Maybe change it for (I've not tested it):
>
> command ieee154_status_t MCPS_PURGE.request (
> uint8_t msduHandle)
> {
> if (MLME_GET.macBeaconOrder() != 15 && MLME_GET.macSuperframeOrder() !=
> 15) // beacon mode
> {
> if (call PurgeDirect.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeIndirect.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeGtsDevice.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeGtsCoord.purge(msduHandle) == IEEE154_SUCCESS)
> return IEEE154_SUCCESS;
> else
> return IEEE154_INVALID_HANDLE;
> }
> else// non-beacon mode
> {
> if (call PurgeDirect.purge(msduHandle) == IEEE154_SUCCESS ||
> call PurgeIndirect.purge(msduHandle) == IEEE154_SUCCESS)
> return IEEE154_SUCCESS;
> else
> return IEEE154_INVALID_HANDLE;
> }
> }
>
> Am I right?
>
> Regards
>
> David
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help