]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/dummies/NoBeaconTransmitP.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / lib / mac / tkn154 / dummies / NoBeaconTransmitP.nc
index 69b02085a778071443b6d389139480634c2308ea..673adbb1d4726919311b466807d7a36fe16a60f3 100644 (file)
  * ========================================================================
  */
 
+ /** Empty placeholder component for BeaconTransmitP. */
+
 #include "TKN154_MAC.h"
 #include "TKN154_PHY.h"
 module NoBeaconTransmitP
 {
   provides
   {
-    interface Init;
+    interface Init as Reset;
     interface MLME_START;
-    interface WriteBeaconField as SuperframeSpecWrite;
-    interface Get<bool> as IsSendingBeacons;
-    interface GetNow<uint32_t> as CapStart; 
-    interface GetNow<ieee154_reftime_t*> as CapStartRefTime; 
-    interface GetNow<uint32_t> as CapLen; 
-    interface GetNow<uint32_t> as CapEnd; 
-    interface GetNow<uint32_t> as CfpEnd; 
-    interface GetNow<uint32_t> as CfpLen; 
-    interface GetNow<bool> as IsBLEActive; 
-    interface GetNow<uint16_t> as BLELen; 
-    interface GetNow<uint8_t*> as GtsField; 
-    interface GetNow<uint32_t> as SfSlotDuration; 
-    interface GetNow<uint32_t> as BeaconInterval; 
-    interface GetNow<uint8_t> as FinalCapSlot;
-    interface GetNow<uint8_t> as NumGtsSlots;
-    interface GetNow<bool> as BeaconFramePendingBit;
     interface IEEE154TxBeaconPayload;
+    interface SuperframeStructure as OutgoingSF;
+    interface GetNow<bool> as IsSendingBeacons;
   } uses {
     interface Notify<bool> as GtsSpecUpdated;
     interface Notify<bool> as PendingAddrSpecUpdated;
     interface Notify<const void*> as PIBUpdate[uint8_t attributeID];
-    interface Alarm<TSymbolIEEE802154,uint32_t> as BeaconTxAlarm;
+    interface Alarm<TSymbolIEEE802154,uint32_t> as BeaconSendAlarm;
     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 TransferableResource as RadioToken;
     interface FrameTx as RealignmentBeaconEnabledTx;
     interface FrameTx as RealignmentNonBeaconEnabledTx;
     interface FrameRx as BeaconRequestRx;
@@ -78,24 +64,21 @@ module NoBeaconTransmitP
     interface WriteBeaconField as PendingAddrWrite;
     interface FrameUtility;
     interface GetNow<bool> as IsTrackingBeacons;
-    interface GetNow<uint32_t> as LastBeaconRxTime;
-    interface GetNow<ieee154_reftime_t*> as LastBeaconRxRefTime; 
-    interface Ieee802154Debug as Debug;
+    interface SuperframeStructure as IncomingSF;
     interface Set<ieee154_macSuperframeOrder_t> as SetMacSuperframeOrder;
     interface Set<ieee154_macBeaconTxTime_t> as SetMacBeaconTxTime;
     interface Set<ieee154_macPanCoordinator_t> as SetMacPanCoordinator;
     interface GetSet<ieee154_txframe_t*> as GetSetRealignmentFrame;
     interface GetNow<bool> as IsBroadcastReady; 
     interface TimeCalc;
+    interface Random;
     interface Leds;
   }
 }
 implementation
 {
-  command error_t Init.init()
-  {
-    return SUCCESS;
-  }
+  command error_t Reset.init() { return SUCCESS; }
+
   command ieee154_status_t MLME_START.request  (
                           uint16_t panID,
                           uint8_t logicalChannel,
@@ -112,16 +95,15 @@ implementation
     return IEEE154_TRANSACTION_OVERFLOW;
   }
 
-  event void Token.granted() { }
+  event void RadioToken.granted() { }
 
-  async event void RadioOff.offDone() { }
+  async event void RadioToken.transferredFrom(uint8_t from) { call RadioToken.transferTo(RADIO_CLIENT_BEACONSYNCHRONIZE); }
 
-  async event void BeaconTxAlarm.fired() {}
+  async event void RadioOff.offDone() { }
 
-  async event void BeaconTx.loadDone() {}
+  async event void BeaconSendAlarm.fired() {}
 
-  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, const ieee154_timestamp_t *timestamp, error_t result){}
 
   command error_t IEEE154TxBeaconPayload.setBeaconPayload(void *beaconPayload, uint8_t length) { return ESIZE; }
 
@@ -150,16 +132,6 @@ implementation
   {
   }
 
-  command uint8_t SuperframeSpecWrite.write(uint8_t *superframeSpecField, uint8_t maxlen)
-  {
-    return 0;
-  }
-
-  command uint8_t SuperframeSpecWrite.getLength()
-  {
-    return 0;
-  }
-
   event void RealignmentBeaconEnabledTx.transmitDone(ieee154_txframe_t *frame, ieee154_status_t status)
   {
   }
@@ -173,43 +145,23 @@ implementation
     return frame;
   }
 
-  command bool IsSendingBeacons.get(){ return FALSE;}
+  async command uint32_t OutgoingSF.sfStartTime() {return 0;}
 
-  async command uint32_t CapStart.getNow() { return 0; }
-  async command ieee154_reftime_t* CapStartRefTime.getNow() { return NULL; }
-  async command uint32_t CapLen.getNow() { return 0;}
-  async command uint32_t CapEnd.getNow() 
-  {
-    return 0;
-  }
-  async command uint32_t CfpEnd.getNow() 
-  {
-    return 0;
-  }
-  async command uint32_t CfpLen.getNow()
-  {
-    return 0;
-  }
-  async command bool IsBLEActive.getNow(){ return FALSE;}
-  async command uint16_t BLELen.getNow(){ return 0;}
-  async command bool BeaconFramePendingBit.getNow(){ return FALSE;}
+  async command uint16_t OutgoingSF.sfSlotDuration() {return 0;}
+
+  async command uint8_t OutgoingSF.numCapSlots() {return 0;}
 
-  async command uint8_t* GtsField.getNow() { return NULL; }
-  async command uint32_t SfSlotDuration.getNow() { return 0; }
-  async command uint32_t BeaconInterval.getNow() { return 0; }
-  async command uint8_t FinalCapSlot.getNow() { return 0; }
-  async command uint8_t NumGtsSlots.getNow() { return 0; }
+  async command uint8_t OutgoingSF.numGtsSlots() {return 0;}
 
-  default event void MLME_START.confirm    (
-                          ieee154_status_t status
-                        ){}
+  async command uint16_t OutgoingSF.battLifeExtDuration() {return 0;}
 
-  default event void IEEE154TxBeaconPayload.setBeaconPayloadDone(void *beaconPayload, uint8_t length){}
+  async command const uint8_t* OutgoingSF.gtsFields() {return NULL;}
 
-  default event void IEEE154TxBeaconPayload.modifyBeaconPayloadDone(uint8_t offset, void *buffer, uint8_t bufferLength){}
+  async command uint16_t OutgoingSF.guardTime() {return 0;}
 
-  default event void IEEE154TxBeaconPayload.aboutToTransmit(){}
+  async command const ieee154_timestamp_t* OutgoingSF.sfStartTimeRef() {return NULL;}
 
-  default event void IEEE154TxBeaconPayload.beaconTransmitted(){}
+  async command bool OutgoingSF.isBroadcastPending() {return FALSE;}
 
+  async command bool IsSendingBeacons.getNow() {return FALSE;}
 }