interface FrameTx as CfpTx;
interface Purge;
} uses {
- interface Resource as Token;
interface ResourceTransferred as TokenTransferred;
interface ResourceRequested as TokenRequested;
interface ResourceTransfer as TokenToBeaconSync;
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();
+ // 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();
}
async event void CfpEndAlarm.fired() {}
async event void RadioOff.offDone() {}
async event void RadioTx.loadDone(){}
- async event void RadioTx.transmitDone(ieee154_txframe_t *frame,
- ieee154_reftime_t *referenceTime, bool ackPendingFlag, error_t error){}
+ async event void RadioTx.transmitDone(ieee154_txframe_t *frame, ieee154_reftime_t *txTime){}
async event void RadioRx.prepareDone(){}
event message_t* RadioRx.received(message_t *frame, ieee154_reftime_t *timestamp){return frame;}
async event void TokenRequested.requested()
{
- // someone requested access to the radio, you might
- // consider releasing it...
+ // 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(){ }
- event void Token.granted(){ }
+
+ async event void RadioTx.transmitUnslottedCsmaCaDone(ieee154_txframe_t *frame,
+ bool ackPendingFlag, ieee154_csma_t *csmaParams, error_t result){}
+ async event void RadioTx.transmitSlottedCsmaCaDone(ieee154_txframe_t *frame, ieee154_reftime_t *txTime,
+ bool ackPendingFlag, uint16_t remainingBackoff, ieee154_csma_t *csmaParams, error_t result){}
}