]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/CoordBroadcastP.nc
1) simplified the resource transfer: removed ResourceTransfer* interfaces and corresp...
[tinyos-2.x.git] / tos / lib / mac / tkn154 / CoordBroadcastP.nc
index 43bc855490574e5d692fc3f9a4e038a7fc755f84..e6000157fbaac0a06b045ac5b5a1e1071499f009 100644 (file)
@@ -49,10 +49,8 @@ module CoordBroadcastP
   } uses {
     interface Queue<ieee154_txframe_t*>; 
     interface FrameTxNow as CapTransmitNow;
-    interface ResourceTransfer as TokenToCap;
-    interface ResourceTransferred as TokenTransferred;
+    interface TransferableResource as RadioToken;
     interface SuperframeStructure as OutgoingSF;
-    interface Leds;
   }
 }
 implementation
@@ -106,7 +104,7 @@ implementation
       return (m_realignmentFrame != NULL || m_queueHead != NULL);
   }
 
-  async event void TokenTransferred.transferred()
+  async event void RadioToken.transferredFrom(uint8_t fromClient)
   {
     // CAP has started - are there any broadcast frames to be transmitted?
     if (call OutgoingSF.isBroadcastPending()) {
@@ -117,7 +115,7 @@ implementation
       m_lock = TRUE;
       call CapTransmitNow.transmitNow(broadcastFrame);
     }
-    call TokenToCap.transfer();
+    call RadioToken.transferTo(RADIO_CLIENT_COORDCAP);
   }
 
   async event void CapTransmitNow.transmitNowDone(ieee154_txframe_t *txFrame, ieee154_status_t status)
@@ -141,4 +139,6 @@ implementation
     }
     m_lock = FALSE;
   }
+
+  event void RadioToken.granted(){ ASSERT(0); }
 }