[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/dummies NoBeaconSynchronizeP.nc, 1.3, 1.4 NoBeaconTransmitP.nc, 1.3, 1.4 NoCoordCfpP.nc, 1.3, 1.4 NoCsmaP.nc, 1.2, 1.3 NoDeviceCfpP.nc, 1.3, 1.4 NoRxEnableP.nc, 1.1, 1.2
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Thu Oct 23 09:09:30 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6388/dummies
Modified Files:
NoBeaconSynchronizeP.nc NoBeaconTransmitP.nc NoCoordCfpP.nc
NoCsmaP.nc NoDeviceCfpP.nc NoRxEnableP.nc
Log Message:
Fixed a bug with the resource transfer
Index: NoBeaconSynchronizeP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NoBeaconSynchronizeP.nc 21 Oct 2008 17:29:00 -0000 1.3
--- NoBeaconSynchronizeP.nc 23 Oct 2008 16:09:28 -0000 1.4
***************
*** 72,79 ****
interface RadioRx as BeaconRx;
interface RadioOff;
! interface Get<bool> as IsBeaconEnabledPAN;
interface DataRequest;
interface FrameRx as CoordRealignmentRx;
interface Resource as Token;
interface ResourceTransfer as TokenToCap;
interface ResourceTransferred as TokenTransferred;
--- 72,80 ----
interface RadioRx as BeaconRx;
interface RadioOff;
! interface GetNow<bool> as IsBeaconEnabledPAN;
interface DataRequest;
interface FrameRx as CoordRealignmentRx;
interface Resource as Token;
+ interface GetNow<bool> as IsTokenRequested;
interface ResourceTransfer as TokenToCap;
interface ResourceTransferred as TokenTransferred;
Index: NoBeaconTransmitP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconTransmitP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NoBeaconTransmitP.nc 21 Oct 2008 17:29:00 -0000 1.3
--- NoBeaconTransmitP.nc 23 Oct 2008 16:09:28 -0000 1.4
***************
*** 66,74 ****
interface Timer<TSymbolIEEE802154> as BeaconPayloadUpdateTimer;
interface RadioOff;
! interface Get<bool> as IsBeaconEnabledPAN;
interface RadioTx as BeaconTx;
interface MLME_GET;
interface MLME_SET;
interface Resource as Token;
interface ResourceTransfer as TokenToBroadcast;
interface ResourceTransferred as TokenTransferred;
--- 66,75 ----
interface Timer<TSymbolIEEE802154> as BeaconPayloadUpdateTimer;
interface RadioOff;
! interface GetNow<bool> as IsBeaconEnabledPAN;
interface RadioTx as BeaconTx;
interface MLME_GET;
interface MLME_SET;
interface Resource as Token;
+ interface GetNow<bool> as IsTokenRequested;
interface ResourceTransfer as TokenToBroadcast;
interface ResourceTransferred as TokenTransferred;
Index: NoCoordCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordCfpP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NoCoordCfpP.nc 21 Oct 2008 17:29:00 -0000 1.3
--- NoCoordCfpP.nc 23 Oct 2008 16:09:28 -0000 1.4
***************
*** 53,60 ****
interface Purge;
} uses {
- interface Resource as Token;
interface ResourceTransferred as TokenTransferred;
- interface ResourceRequested as TokenRequested;
interface ResourceTransfer as TokenToBeaconTransmit;
interface GetNow<bool> as IsTrackingBeacons;
interface GetNow<uint32_t> as CfpEnd;
--- 53,60 ----
interface Purge;
} uses {
interface ResourceTransferred as TokenTransferred;
interface ResourceTransfer as TokenToBeaconTransmit;
+ interface ResourceRequested as TokenRequested;
+ interface GetNow<bool> as IsTokenRequested;
interface GetNow<bool> as IsTrackingBeacons;
interface GetNow<uint32_t> as CfpEnd;
***************
*** 95,105 ****
{
// the CFP has started, this component now owns the token -
! // because GTS is not implemented we release the token
! // (or pass it back to BeaconTransmitP if
! // we are not tracking beacons)
! if (call IsTrackingBeacons.getNow())
! call Token.release();
! else
! call TokenToBeaconTransmit.transfer();
}
--- 95,103 ----
{
// the CFP has started, this component now owns the token -
! // because GTS is not implemented we pass it back to the
! // BeaconTransmitP component
! // Note: this component must not use the Resource
! // interface to release the token!
! call TokenToBeaconTransmit.transfer();
}
***************
*** 135,143 ****
async event void TokenRequested.requested()
{
! // someone (e.g. SCAN component) requested access to the radio,
! // you might want to release the token...
}
async event void TokenRequested.immediateRequested(){ }
- event void Token.granted(){ }
}
--- 133,141 ----
async event void TokenRequested.requested()
{
! // someone (e.g. SCAN component) requested access to the radio, we
! // should pass the token back to BeaconTransmitP, which can release it
! // call TokenToBeaconTransmit.transfer();
}
async event void TokenRequested.immediateRequested(){ }
}
Index: NoCsmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCsmaP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoCsmaP.nc 21 Oct 2008 17:29:00 -0000 1.2
--- NoCsmaP.nc 23 Oct 2008 16:09:28 -0000 1.3
***************
*** 74,78 ****
interface RadioRx;
interface RadioOff;
! interface Get<bool> as IsBeaconEnabledPAN;
interface MLME_GET;
interface MLME_SET;
--- 74,78 ----
interface RadioRx;
interface RadioOff;
! interface GetNow<bool> as IsBeaconEnabledPAN;
interface MLME_GET;
interface MLME_SET;
Index: NoDeviceCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoDeviceCfpP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NoDeviceCfpP.nc 21 Oct 2008 17:29:00 -0000 1.3
--- NoDeviceCfpP.nc 23 Oct 2008 16:09:28 -0000 1.4
***************
*** 52,56 ****
interface Purge;
} uses {
- interface Resource as Token;
interface ResourceTransferred as TokenTransferred;
interface ResourceRequested as TokenRequested;
--- 52,55 ----
***************
*** 93,104 ****
async event void TokenTransferred.transferred()
{
! // the CFP has started, this component now owns the token.
! // because GTS is not implemented we release the token
! // (or pass it back to BeaconSynchronizeP if
! // we are not transmitting beacons)
! if (call IsSendingBeacons.getNow())
! call Token.release();
! else
! call TokenToBeaconSync.transfer();
}
--- 92,101 ----
async event void TokenTransferred.transferred()
{
! // the CFP has started, this component now owns the token -
! // because GTS is not implemented we pass it back to the
! // BeaconTransmitP component
! // Note: this component must not use the Resource
! // interface to release the token!
! call TokenToBeaconSync.transfer();
}
***************
*** 118,126 ****
async event void TokenRequested.requested()
{
! // someone requested access to the radio, you might
! // consider releasing it...
}
async event void TokenRequested.immediateRequested(){ }
- event void Token.granted(){ }
}
--- 115,123 ----
async event void TokenRequested.requested()
{
! // someone (e.g. SCAN component) requested access to the radio, we
! // should pass the token back to BeaconSynchronizeP, which can release it
! // call TokenToBeaconSync.transfer();
}
async event void TokenRequested.immediateRequested(){ }
}
Index: NoRxEnableP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoRxEnableP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoRxEnableP.nc 21 Oct 2008 17:29:00 -0000 1.1
--- NoRxEnableP.nc 23 Oct 2008 16:09:28 -0000 1.2
***************
*** 49,53 ****
interface Ieee802154Debug as Debug;
interface Timer<TSymbolIEEE802154> as RxEnableTimer;
! interface Get<bool> as IsBeaconEnabledPAN;
interface Get<ieee154_macPanCoordinator_t> as IsMacPanCoordinator;
interface GetNow<bool> as IsTrackingBeacons;
--- 49,53 ----
interface Ieee802154Debug as Debug;
interface Timer<TSymbolIEEE802154> as RxEnableTimer;
! interface GetNow<bool> as IsBeaconEnabledPAN;
interface Get<ieee154_macPanCoordinator_t> as IsMacPanCoordinator;
interface GetNow<bool> as IsTrackingBeacons;
More information about the Tinyos-2-commits
mailing list