]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/dummies/NoBeaconTransmitP.nc
+ modified radio driver (PHY) interfaces: CSMA-CA algorithm is now pushed to radio...
[tinyos-2.x.git] / tos / lib / mac / tkn154 / dummies / NoBeaconTransmitP.nc
index 69b02085a778071443b6d389139480634c2308ea..7bed6f11b30d4b7d8bb0ee59c2de70bc2eeb0a97 100644 (file)
@@ -42,7 +42,7 @@ module NoBeaconTransmitP
     interface Init;
     interface MLME_START;
     interface WriteBeaconField as SuperframeSpecWrite;
-    interface Get<bool> as IsSendingBeacons;
+    interface GetNow<bool> as IsSendingBeacons;
     interface GetNow<uint32_t> as CapStart; 
     interface GetNow<ieee154_reftime_t*> as CapStartRefTime; 
     interface GetNow<uint32_t> as CapLen; 
@@ -65,12 +65,14 @@ module NoBeaconTransmitP
     interface Alarm<TSymbolIEEE802154,uint32_t> as BeaconTxAlarm;
     interface Timer<TSymbolIEEE802154> as BeaconPayloadUpdateTimer;
     interface RadioOff;
-    interface Get<bool> as IsBeaconEnabledPAN;
+    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;
     interface FrameTx as RealignmentBeaconEnabledTx;
     interface FrameTx as RealignmentNonBeaconEnabledTx;
     interface FrameRx as BeaconRequestRx;
@@ -114,14 +116,21 @@ implementation
 
   event void Token.granted() { }
 
+  async event void TokenTransferred.transferred() { call Token.release(); }
+
   async event void RadioOff.offDone() { }
 
   async event void BeaconTxAlarm.fired() {}
 
   async event void BeaconTx.loadDone() {}
 
-  async event void BeaconTx.transmitDone(ieee154_txframe_t *frame, 
-      ieee154_reftime_t *referenceTime, bool pendingFlag, error_t error) { }
+  async event void BeaconTx.transmitDone(ieee154_txframe_t *frame, ieee154_reftime_t *txTime){}
+
+  async event void BeaconTx.transmitUnslottedCsmaCaDone(ieee154_txframe_t *frame,
+      bool ackPendingFlag, ieee154_csma_t *csmaParameters, error_t result){}
+
+  async event void BeaconTx.transmitSlottedCsmaCaDone(ieee154_txframe_t *frame, ieee154_reftime_t *txTime, 
+      bool ackPendingFlag, uint16_t remainingBackoff, ieee154_csma_t *csmaParameters, error_t result){}
 
   command error_t IEEE154TxBeaconPayload.setBeaconPayload(void *beaconPayload, uint8_t length) { return ESIZE; }
 
@@ -173,7 +182,7 @@ implementation
     return frame;
   }
 
-  command bool IsSendingBeacons.get(){ return FALSE;}
+  async command bool IsSendingBeacons.getNow(){ return FALSE;}
 
   async command uint32_t CapStart.getNow() { return 0; }
   async command ieee154_reftime_t* CapStartRefTime.getNow() { return NULL; }