[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/dummies NoSlottedFrameDispatchP.nc, NONE, 1.1 NoAssociateP.nc, 1.1, 1.2 NoBeaconSynchronizeP.nc, 1.4, 1.5 NoBeaconTransmitP.nc, 1.5, 1.6 NoCoordBroadcastP.nc, 1.1, 1.2 NoCoordCfpP.nc, 1.5, 1.6 NoCoordRealignmentP.nc, 1.1, 1.2 NoDeviceCfpP.nc, 1.5, 1.6 NoDisassociateP.nc, 1.1, 1.2 NoFrameDispatchQueueP.nc, 1.1, 1.2 NoPromiscuousModeP.nc, 1.1, 1.2 NoRxEnableP.nc, 1.2, 1.3 NoScanP.nc, 1.2, 1.3 NoDebugP.nc, 1.1, NONE NoFrameDispatchP.nc, 1.1, NONE

Jan-Hinrich Hauer janhauer at users.sourceforge.net
Wed Mar 4 10:32:12 PST 2009


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17605/tos/lib/mac/tkn154/dummies

Modified Files:
	NoAssociateP.nc NoBeaconSynchronizeP.nc NoBeaconTransmitP.nc 
	NoCoordBroadcastP.nc NoCoordCfpP.nc NoCoordRealignmentP.nc 
	NoDeviceCfpP.nc NoDisassociateP.nc NoFrameDispatchQueueP.nc 
	NoPromiscuousModeP.nc NoRxEnableP.nc NoScanP.nc 
Added Files:
	NoSlottedFrameDispatchP.nc 
Removed Files:
	NoDebugP.nc NoFrameDispatchP.nc 
Log Message:
- re-designed the radio driver interfaces, restructured/improved the CC2420 radio driver
- split the main MAC configuration (was TKN154P.nc) in two: one for beacon-enabled mode the other for nonbeacon-enabled mode (this decision has to be made at compile time now)
- added (serial) debugging functions (compile with "TKN154_DEBUG=1 make telosb" and use the java PrintfClient, see tinyos-2.x/apps/tests/TestPrintf/README.txt)
- improved readability, added comments 

--- NEW FILE: NoSlottedFrameDispatchP.nc ---
/*
 * Copyright (c) 2008, Technische Universitaet Berlin
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions 
 * are met:
 * - Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright 
 *   notice, this list of conditions and the following disclaimer in the 
 *   documentation and/or other materials provided with the distribution.
 * - Neither the name of the Technische Universitaet Berlin nor the names 
 *   of its contributors may be used to endorse or promote products derived
 *   from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * - Revision -------------------------------------------------------------
 * $Revision: 1.1 $
 * $Date: 2009/03/04 18:31:40 $
 * @author Jan Hauer <hauer at tkn.tu-berlin.de>
 * ========================================================================
 */

 /** Empty placeholder component for SlottedFrameDispatchP. */

#include "TKN154_PHY.h"
#include "TKN154_MAC.h"

generic module NoSlottedFrameDispatchP(uint8_t superframeDirection)
{
  provides
  {
    interface Init as Reset;
    interface FrameTx as FrameTx;
    interface FrameRx as FrameRx[uint8_t frameType];
    interface FrameExtracted as FrameExtracted[uint8_t frameType];
    interface FrameTxNow as BroadcastTx;
    interface Notify<bool> as WasRxEnabled;
  }
  uses
  {
    interface Alarm<TSymbolIEEE802154,uint32_t> as CapEndAlarm;
    interface Alarm<TSymbolIEEE802154,uint32_t> as BLEAlarm;
    interface Alarm<TSymbolIEEE802154,uint32_t> as IndirectTxWaitAlarm;
    interface Alarm<TSymbolIEEE802154,uint32_t> as BroadcastAlarm;
    interface Resource as Token;
    interface GetNow<bool> as IsTokenRequested;
    interface ResourceTransfer as TokenToCfp;
    interface ResourceTransferred as TokenTransferred;
    interface SuperframeStructure; 
    interface GetNow<bool> as IsRxEnableActive; 
    interface Get<ieee154_txframe_t*> as GetIndirectTxFrame; 
    interface Notify<bool> as RxEnableStateChange;
    interface GetNow<bool> as IsTrackingBeacons;
    interface FrameUtility;
    interface SlottedCsmaCa;
    interface RadioRx;
    interface RadioOff;
    interface MLME_GET;
    interface MLME_SET;
    interface TimeCalc;
    interface Leds;
    interface SetNow<ieee154_cap_frame_backup_t*> as FrameBackup;
    interface GetNow<ieee154_cap_frame_backup_t*> as FrameRestore;
    interface StdControl as TrackSingleBeacon;
  }
}
implementation
{
  command error_t Reset.init() { return SUCCESS; }

  async event void TokenTransferred.transferred() { }

  command ieee154_status_t FrameTx.transmit(ieee154_txframe_t *frame) { return IEEE154_TRANSACTION_OVERFLOW; }

  async event void RadioOff.offDone(){ }

  async event void RadioRx.enableRxDone(){}

  async event void CapEndAlarm.fired(){ }

  async event void BLEAlarm.fired(){ }

  event void RxEnableStateChange.notify(bool whatever){ }

  async event void BroadcastAlarm.fired(){ }

  async event void IndirectTxWaitAlarm.fired() { }

  async event void SlottedCsmaCa.transmitDone(ieee154_txframe_t *frame, ieee154_csma_t *csma, 
      bool ackPendingFlag,  uint16_t remainingBackoff, error_t result) { }

  event message_t* RadioRx.received(message_t* frame, const ieee154_timestamp_t *timestamp) { return frame; }

  async command ieee154_status_t BroadcastTx.transmitNow(ieee154_txframe_t *frame) { }

  event void Token.granted() { }

  command error_t WasRxEnabled.enable(){return FAIL;}
  command error_t WasRxEnabled.disable(){return FAIL;}
}

Index: NoAssociateP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoAssociateP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoAssociateP.nc	21 Oct 2008 17:29:00 -0000	1.1
--- NoAssociateP.nc	4 Mar 2009 18:31:39 -0000	1.2
***************
*** 34,37 ****
--- 34,38 ----
   */
  
+  /** Empty placeholder component for AssociateP. */
  
  #include "TKN154_MAC.h"
***************
*** 61,65 ****
      interface IEEE154Frame as Frame;
      interface Get<uint64_t> as LocalExtendedAddress;
-     interface Ieee802154Debug as Debug;
    }
  }
--- 62,65 ----
***************
*** 69,73 ****
    command error_t Init.init() { return SUCCESS; }
  
! /* ------------------- MLME_ASSOCIATE Request ------------------- */
  
    command ieee154_status_t MLME_ASSOCIATE.request  (
--- 69,73 ----
    command error_t Init.init() { return SUCCESS; }
  
!   /* ------------------- MLME_ASSOCIATE Request ------------------- */
  
    command ieee154_status_t MLME_ASSOCIATE.request  (
***************
*** 92,96 ****
    event void DataRequest.pollDone() { }
  
! /* ------------------- MLME_ASSOCIATE Response ------------------- */
  
    event message_t* AssociationRequestRx.received(message_t* frame) { return frame; }
--- 92,96 ----
    event void DataRequest.pollDone() { }
  
!   /* ------------------- MLME_ASSOCIATE Response ------------------- */
  
    event message_t* AssociationRequestRx.received(message_t* frame) { return frame; }
***************
*** 108,112 ****
    event void AssociationResponseTx.transmitDone(ieee154_txframe_t *txFrame, ieee154_status_t status) { }
  
! /* ------------------- Defaults ------------------- */
  
    default event void MLME_ASSOCIATE.indication (
--- 108,112 ----
    event void AssociationResponseTx.transmitDone(ieee154_txframe_t *txFrame, ieee154_status_t status) { }
  
!   /* ------------------- Defaults ------------------- */
  
    default event void MLME_ASSOCIATE.indication (

Index: NoBeaconSynchronizeP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** NoBeaconSynchronizeP.nc	23 Oct 2008 16:09:28 -0000	1.4
--- NoBeaconSynchronizeP.nc	4 Mar 2009 18:31:39 -0000	1.5
***************
*** 34,37 ****
--- 34,38 ----
   */
  
+  /** Empty placeholder component for BeaconSynchronizeP. */
  
  #include "TKN154_MAC.h"
***************
*** 41,64 ****
    provides
    {
!     interface Init;
      interface MLME_SYNC;
      interface MLME_BEACON_NOTIFY;
      interface MLME_SYNC_LOSS;
      interface GetNow<bool> as IsTrackingBeacons;
!     interface Get<uint32_t> as GetLastBeaconRxTime;
!     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<uint32_t> as BeaconInterval; 
!     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<uint8_t> as FinalCapSlot; 
!     interface GetNow<uint8_t> as NumGtsSlots;
!     interface GetNow<bool> as IsRxBroadcastPending; 
    }
    uses
--- 42,52 ----
    provides
    {
!     interface Init as Reset;
      interface MLME_SYNC;
      interface MLME_BEACON_NOTIFY;
      interface MLME_SYNC_LOSS;
+     interface SuperframeStructure as IncomingSF;
      interface GetNow<bool> as IsTrackingBeacons;
!     interface StdControl as TrackSingleBeacon;
    }
    uses
***************
*** 67,99 ****
      interface MLME_SET;
      interface FrameUtility;
-     interface Notify<bool> as FindBeacon;
      interface IEEE154BeaconFrame as BeaconFrame;
      interface Alarm<TSymbolIEEE802154,uint32_t> as TrackAlarm;
      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;
!     interface GetNow<bool> as IsSendingBeacons;
      interface TimeCalc;
      interface IEEE154Frame as Frame;
      interface Leds;
-     interface Ieee802154Debug as Debug;
    }
  }
  implementation
  {
  
!   command error_t Init.init() { return SUCCESS; }
! 
!   command ieee154_status_t MLME_SYNC.request  (
!       uint8_t logicalChannel,
!       uint8_t channelPage,
!       bool trackBeacon
!       )
    {
      return IEEE154_TRANSACTION_OVERFLOW;
--- 55,78 ----
      interface MLME_SET;
      interface FrameUtility;
      interface IEEE154BeaconFrame as BeaconFrame;
      interface Alarm<TSymbolIEEE802154,uint32_t> as TrackAlarm;
      interface RadioRx as BeaconRx;
      interface RadioOff;
      interface DataRequest;
      interface FrameRx as CoordRealignmentRx;
      interface Resource as Token;
      interface GetNow<bool> as IsTokenRequested;
      interface ResourceTransferred as TokenTransferred;
!     interface ResourceTransfer as TokenToCap;
      interface TimeCalc;
      interface IEEE154Frame as Frame;
      interface Leds;
    }
  }
  implementation
  {
+   command error_t Reset.init() { return SUCCESS; }  
  
!   command ieee154_status_t MLME_SYNC.request  ( uint8_t logicalChannel, uint8_t channelPage, bool trackBeacon)
    {
      return IEEE154_TRANSACTION_OVERFLOW;
***************
*** 102,134 ****
    event void Token.granted() { }
  
!   async event void TokenTransferred.transferred() { call Token.release(); }
  
!   async event void TrackAlarm.fired() {}
  
!   async event void BeaconRx.prepareDone() {}
  
!   event message_t* BeaconRx.received(message_t* frame, ieee154_reftime_t *timestamp) { return frame;}
  
!   async event void RadioOff.offDone() {}
  
!   async command bool IsTrackingBeacons.getNow(){ return FALSE;}
!   command uint32_t GetLastBeaconRxTime.get(){ return 0;}
!   async command uint8_t* GtsField.getNow() { return 0; }
!   async command uint32_t SfSlotDuration.getNow() { return 0; }
!   async command uint8_t FinalCapSlot.getNow() { return 0; }
  
    event void DataRequest.pollDone(){}
!   async command uint32_t CapEnd.getNow() { return 0; }
!   async command uint32_t CapStart.getNow() { return 0; }
!   async command uint32_t CapLen.getNow() { return 0; }
!   async command uint32_t CfpEnd.getNow() { return 0; }
!   async command ieee154_reftime_t* CapStartRefTime.getNow() { return NULL; }
!   async command uint32_t CfpLen.getNow(){ return 0;}
!   async command uint32_t BeaconInterval.getNow(){ return 0;}
!   async command bool IsBLEActive.getNow(){ return 0;}
!   async command uint16_t BLELen.getNow(){ return 0;}
!   async command uint8_t NumGtsSlots.getNow() { return 0; }
!   async command bool IsRxBroadcastPending.getNow() { return FALSE; }
!   event message_t* CoordRealignmentRx.received(message_t* frame) {return frame;}
!   event void FindBeacon.notify( bool val ){}
  }
--- 81,127 ----
    event void Token.granted() { }
  
!   async event void TokenTransferred.transferred() { }
  
!   async event void RadioOff.offDone() { }
  
!   async event void BeaconRx.enableRxDone() { }
  
!   async event void TrackAlarm.fired() { }
  
!   event message_t* BeaconRx.received(message_t *frame, const ieee154_timestamp_t *timestamp) { return frame; }
  
!   command error_t TrackSingleBeacon.start()
!   {
!     return FAIL;
!   }
! 
!   command error_t TrackSingleBeacon.stop()
!   {
!     return FAIL;
!   }
!   
!   /* -----------------------  SF Structure, etc. ----------------------- */
! 
!   async command uint32_t IncomingSF.sfStartTime() { return 0; }
!   async command uint16_t IncomingSF.sfSlotDuration() { return 0; }
!   async command uint8_t IncomingSF.numCapSlots() { return 0; }
!   async command uint8_t IncomingSF.numGtsSlots() { return 0; }
!   async command uint16_t IncomingSF.battLifeExtDuration() { return 0; }
!   async command const uint8_t* IncomingSF.gtsFields() { return NULL; }
!   async command uint16_t IncomingSF.guardTime() { return 0; }
!   async command const ieee154_timestamp_t* IncomingSF.sfStartTimeRef() { return NULL; }
!   async command bool IncomingSF.isBroadcastPending() { return 0; }
!   async command bool IsTrackingBeacons.getNow() { return 0; }
  
    event void DataRequest.pollDone(){}
! 
!   default event message_t* MLME_BEACON_NOTIFY.indication (message_t* frame){return frame;}
!   default event void MLME_SYNC_LOSS.indication (
!                           ieee154_status_t lossReason,
!                           uint16_t panID,
!                           uint8_t logicalChannel,
!                           uint8_t channelPage,
!                           ieee154_security_t *security){}
! 
!   event message_t* CoordRealignmentRx.received(message_t* frame) { return frame; }
  }

Index: NoBeaconTransmitP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconTransmitP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NoBeaconTransmitP.nc	25 Nov 2008 09:35:09 -0000	1.5
--- NoBeaconTransmitP.nc	4 Mar 2009 18:31:39 -0000	1.6
***************
*** 34,37 ****
--- 34,39 ----
   */
  
+  /** Empty placeholder component for BeaconTransmitP. */
+ 
  #include "TKN154_MAC.h"
  #include "TKN154_PHY.h"
***************
*** 40,77 ****
    provides
    {
!     interface Init;
      interface MLME_START;
-     interface WriteBeaconField as SuperframeSpecWrite;
-     interface GetNow<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;
    } 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 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;
      interface FrameTx as RealignmentBeaconEnabledTx;
      interface FrameTx as RealignmentNonBeaconEnabledTx;
--- 42,64 ----
    provides
    {
!     interface Init as Reset;
      interface MLME_START;
      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 BeaconSendAlarm;
      interface Timer<TSymbolIEEE802154> as BeaconPayloadUpdateTimer;
      interface RadioOff;
      interface RadioTx as BeaconTx;
      interface MLME_GET;
      interface MLME_SET;
      interface Resource as Token;
      interface ResourceTransferred as TokenTransferred;
+     interface ResourceTransfer as TokenToBroadcast;
+     interface GetNow<bool> as IsTokenRequested;
      interface FrameTx as RealignmentBeaconEnabledTx;
      interface FrameTx as RealignmentNonBeaconEnabledTx;
***************
*** 81,87 ****
      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 Set<ieee154_macSuperframeOrder_t> as SetMacSuperframeOrder;
      interface Set<ieee154_macBeaconTxTime_t> as SetMacBeaconTxTime;
--- 68,72 ----
      interface FrameUtility;
      interface GetNow<bool> as IsTrackingBeacons;
!     interface SuperframeStructure as IncomingSF;
      interface Set<ieee154_macSuperframeOrder_t> as SetMacSuperframeOrder;
      interface Set<ieee154_macBeaconTxTime_t> as SetMacBeaconTxTime;
***************
*** 95,102 ****
  implementation
  {
!   command error_t Init.init()
!   {
!     return SUCCESS;
!   }
    command ieee154_status_t MLME_START.request  (
                            uint16_t panID,
--- 80,85 ----
  implementation
  {
!   command error_t Reset.init() { return SUCCESS; }
! 
    command ieee154_status_t MLME_START.request  (
                            uint16_t panID,
***************
*** 121,135 ****
    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 *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; }
--- 104,110 ----
    async event void RadioOff.offDone() { }
  
!   async event void BeaconSendAlarm.fired() {}
  
!   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; }
***************
*** 160,173 ****
    }
  
-   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)
    {
--- 135,138 ----
***************
*** 183,224 ****
    }
  
!   async command bool IsSendingBeacons.getNow(){ return FALSE;}
  
!   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 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; }
  
!   default event void MLME_START.confirm    (
!                           ieee154_status_t status
!                         ){}
  
!   default event void IEEE154TxBeaconPayload.setBeaconPayloadDone(void *beaconPayload, uint8_t length){}
  
!   default event void IEEE154TxBeaconPayload.modifyBeaconPayloadDone(uint8_t offset, void *buffer, uint8_t bufferLength){}
  
!   default event void IEEE154TxBeaconPayload.aboutToTransmit(){}
  
!   default event void IEEE154TxBeaconPayload.beaconTransmitted(){}
  
  }
--- 148,169 ----
    }
  
!   async command uint32_t OutgoingSF.sfStartTime() {return 0;}
  
!   async command uint16_t OutgoingSF.sfSlotDuration() {return 0;}
  
!   async command uint8_t OutgoingSF.numCapSlots() {return 0;}
  
!   async command uint8_t OutgoingSF.numGtsSlots() {return 0;}
  
!   async command uint16_t OutgoingSF.battLifeExtDuration() {return 0;}
  
!   async command const uint8_t* OutgoingSF.gtsFields() {return NULL;}
  
!   async command uint16_t OutgoingSF.guardTime() {return 0;}
  
!   async command const ieee154_timestamp_t* OutgoingSF.sfStartTimeRef() {return NULL;}
  
+   async command bool OutgoingSF.isBroadcastPending() {return FALSE;}
+ 
+   async command bool IsSendingBeacons.getNow() {return FALSE;}
  }

Index: NoCoordBroadcastP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordBroadcastP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoCoordBroadcastP.nc	21 Oct 2008 17:29:00 -0000	1.1
--- NoCoordBroadcastP.nc	4 Mar 2009 18:31:39 -0000	1.2
***************
*** 34,37 ****
--- 34,39 ----
   */
  
+  /** Empty placeholder component for CoordBroadcastP. */
+ 
  #include "TKN154_MAC.h"
  module NoCoordBroadcastP
***************
*** 49,52 ****
--- 51,55 ----
      interface ResourceTransferred as TokenTransferred;
      interface GetNow<bool> as BeaconFramePendingBit;
+     interface SuperframeStructure as OutgoingSF;
      interface Leds;
    }

Index: NoCoordCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordCfpP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NoCoordCfpP.nc	25 Nov 2008 09:35:09 -0000	1.5
--- NoCoordCfpP.nc	4 Mar 2009 18:31:39 -0000	1.6
***************
*** 33,37 ****
   * ========================================================================
   */
! 
  /**
   * The contention free period (CFP) in beacon mode, a.k.a. GTS, is not yet
--- 33,37 ----
   * ========================================================================
   */
!  
  /**
   * The contention free period (CFP) in beacon mode, a.k.a. GTS, is not yet
***************
*** 56,68 ****
      interface ResourceTransfer as TokenToBeaconTransmit;
      interface ResourceRequested as TokenRequested;
-     interface GetNow<bool> as IsTokenRequested;
-     interface GetNow<bool> as IsTrackingBeacons; 
-     interface GetNow<uint32_t> as CfpEnd; 
-     interface GetNow<ieee154_reftime_t*> as CapStartRefTime; 
-     interface GetNow<uint8_t*> as GtsField; 
-     interface GetNow<uint32_t> as SfSlotDuration; 
-     interface GetNow<uint8_t> as FinalCapSlot; 
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
      interface RadioTx;
      interface RadioRx;
--- 56,62 ----
      interface ResourceTransfer as TokenToBeaconTransmit;
      interface ResourceRequested as TokenRequested;
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
+     interface SuperframeStructure as OutgoingSF; 
      interface RadioTx;
      interface RadioRx;
***************
*** 97,102 ****
      // 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();
    }
--- 91,94 ----
***************
*** 124,132 ****
    }  
  
!   async event void RadioTx.loadDone(){}
!   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()
--- 116,123 ----
    }  
  
!   async event void RadioTx.transmitDone(ieee154_txframe_t *frame, const ieee154_timestamp_t *timestamp, error_t result){}
  
!   async event void RadioRx.enableRxDone(){} 
!   event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp){return frame;}
  
    async event void TokenRequested.requested()
***************
*** 138,144 ****
  
    async event void TokenRequested.immediateRequested(){ }
-   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){} 
  }
--- 129,131 ----

Index: NoCoordRealignmentP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordRealignmentP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoCoordRealignmentP.nc	21 Oct 2008 17:29:00 -0000	1.1
--- NoCoordRealignmentP.nc	4 Mar 2009 18:31:40 -0000	1.2
***************
*** 34,37 ****
--- 34,39 ----
   */
  
+  /** Empty placeholder component for CoordRealignmentP. */
+ 
  #include "TKN154_MAC.h"
  module NoCoordRealignmentP

Index: NoDeviceCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoDeviceCfpP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NoDeviceCfpP.nc	25 Nov 2008 09:35:09 -0000	1.5
--- NoDeviceCfpP.nc	4 Mar 2009 18:31:40 -0000	1.6
***************
*** 55,66 ****
      interface ResourceRequested as TokenRequested;
      interface ResourceTransfer as TokenToBeaconSync;
-     interface GetNow<ieee154_reftime_t*> as CapStartRefTime; 
-     interface GetNow<bool> as IsSendingBeacons; 
-     interface GetNow<uint32_t> as CfpEnd; 
-     interface GetNow<uint8_t*> as GtsField; 
-     interface GetNow<uint32_t> as SfSlotDuration; 
-     interface GetNow<uint8_t> as FinalCapSlot; 
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
      interface RadioTx;
      interface RadioRx;
--- 55,61 ----
      interface ResourceRequested as TokenRequested;
      interface ResourceTransfer as TokenToBeaconSync;
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
      interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
+     interface SuperframeStructure as IncomingSF; 
      interface RadioTx;
      interface RadioRx;
***************
*** 95,100 ****
      // 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();
    }
--- 90,93 ----
***************
*** 106,114 ****
    async event void RadioOff.offDone() {}
  
!   async event void RadioTx.loadDone(){}
!   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()
--- 99,105 ----
    async event void RadioOff.offDone() {}
  
!   async event void RadioTx.transmitDone(ieee154_txframe_t *frame, const ieee154_timestamp_t *timestamp, error_t result){}
!   async event void RadioRx.enableRxDone(){} 
!   event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp){return frame;} 
  
    async event void TokenRequested.requested()
***************
*** 120,127 ****
  
    async event void TokenRequested.immediateRequested(){ }
- 
-   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){} 
  }
--- 111,113 ----

Index: NoDisassociateP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoDisassociateP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoDisassociateP.nc	21 Oct 2008 17:29:00 -0000	1.1
--- NoDisassociateP.nc	4 Mar 2009 18:31:40 -0000	1.2
***************
*** 34,37 ****
--- 34,38 ----
   */
  
+  /** Empty placeholder component for DisassociateP. */
  
  #include "TKN154_MAC.h"
***************
*** 59,63 ****
      interface IEEE154Frame as Frame;
      interface Get<uint64_t> as LocalExtendedAddress;
-     interface Ieee802154Debug as Debug;
    }
  }
--- 60,63 ----
***************
*** 67,71 ****
    command error_t Init.init() { return SUCCESS; }
  
! /* ------------------- MLME_DISASSOCIATE (initiating) ------------------- */
  
    command ieee154_status_t MLME_DISASSOCIATE.request  (
--- 67,71 ----
    command error_t Init.init() { return SUCCESS; }
  
!   /* ------------------- MLME_DISASSOCIATE (initiating) ------------------- */
  
    command ieee154_status_t MLME_DISASSOCIATE.request  (
***************
*** 87,91 ****
    event void DisassociationDirectTx.transmitDone(ieee154_txframe_t *data, ieee154_status_t status) { }
  
! /* ------------------- MLME_DISASSOCIATE (receiving) ------------------- */
  
    event message_t* DisassociationDirectRxFromCoord.received(message_t* frame) { return frame; }
--- 87,91 ----
    event void DisassociationDirectTx.transmitDone(ieee154_txframe_t *data, ieee154_status_t status) { }
  
!   /* ------------------- MLME_DISASSOCIATE (receiving) ------------------- */
  
    event message_t* DisassociationDirectRxFromCoord.received(message_t* frame) { return frame; }
***************
*** 96,100 ****
    event message_t* DisassociationRxFromDevice.received(message_t* frame) { return frame; }
  
! /* ------------------- Defaults ------------------- */
  
    default event void MLME_DISASSOCIATE.indication (
--- 96,100 ----
    event message_t* DisassociationRxFromDevice.received(message_t* frame) { return frame; }
  
!   /* ------------------- Defaults ------------------- */
  
    default event void MLME_DISASSOCIATE.indication (

Index: NoFrameDispatchQueueP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoFrameDispatchQueueP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoFrameDispatchQueueP.nc	25 Nov 2008 09:35:09 -0000	1.1
--- NoFrameDispatchQueueP.nc	4 Mar 2009 18:31:40 -0000	1.2
***************
*** 33,36 ****
--- 33,39 ----
   * ========================================================================
   */
+ 
+  /** Empty placeholder component for FrameDispatchQueueP. */
+ 
  #include "TKN154_MAC.h"
  generic module NoFrameDispatchQueueP() {

Index: NoPromiscuousModeP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoPromiscuousModeP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoPromiscuousModeP.nc	21 Oct 2008 17:29:00 -0000	1.1
--- NoPromiscuousModeP.nc	4 Mar 2009 18:31:40 -0000	1.2
***************
*** 34,37 ****
--- 34,39 ----
   */
  
+  /** Empty placeholder component for PromiscuousModeP. */
+ 
  #include "TKN154_PHY.h"
  #include "TKN154_MAC.h"
***************
*** 48,52 ****
      interface RadioOff;
      interface Set<bool> as RadioPromiscuousMode;
-     interface Ieee802154Debug as Debug;
    }
  }
--- 50,53 ----
***************
*** 56,60 ****
    command error_t Init.init() { return SUCCESS; }
  
! /* ----------------------- Promiscuous Mode ----------------------- */
  
    command bool PromiscuousModeGet.get() { return FALSE; }
--- 57,61 ----
    command error_t Init.init() { return SUCCESS; }
  
!   /* ----------------------- Promiscuous Mode ----------------------- */
  
    command bool PromiscuousModeGet.get() { return FALSE; }
***************
*** 66,70 ****
    async event void PromiscuousRx.prepareDone() { }
  
!   event message_t* PromiscuousRx.received(message_t *frame, ieee154_reftime_t *timestamp) { return frame; }
  
    command error_t PromiscuousMode.stop() { return FAIL; }
--- 67,71 ----
    async event void PromiscuousRx.prepareDone() { }
  
!   event message_t* PromiscuousRx.received(message_t *frame, ieee154_timestamp_t *timestamp) { return frame; }
  
    command error_t PromiscuousMode.stop() { return FAIL; }

Index: NoRxEnableP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoRxEnableP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoRxEnableP.nc	23 Oct 2008 16:09:28 -0000	1.2
--- NoRxEnableP.nc	4 Mar 2009 18:31:40 -0000	1.3
***************
*** 34,37 ****
--- 34,39 ----
   */
  
+  /** Empty placeholder component for RxEnableP. */
+ 
  #include "TKN154_PHY.h"
  #include "TKN154_MAC.h"
***************
*** 47,60 ****
    uses
    {
-     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;
-     interface GetNow<uint32_t> as IncomingSfStart; 
-     interface GetNow<uint32_t> as IncomingBeaconInterval; 
      interface GetNow<bool> as IsSendingBeacons;
!     interface GetNow<uint32_t> as OutgoingSfStart; 
!     interface GetNow<uint32_t> as OutgoingBeaconInterval; 
      interface Notify<bool> as WasRxEnabled;
      interface TimeCalc;
--- 49,58 ----
    uses
    {
      interface Timer<TSymbolIEEE802154> as RxEnableTimer;
      interface Get<ieee154_macPanCoordinator_t> as IsMacPanCoordinator;
      interface GetNow<bool> as IsTrackingBeacons;
      interface GetNow<bool> as IsSendingBeacons;
!     interface SuperframeStructure as IncomingSuperframeStructure;
!     interface SuperframeStructure as OutgoingSuperframeStructure;
      interface Notify<bool> as WasRxEnabled;
      interface TimeCalc;
***************
*** 66,70 ****
    command error_t Init.init() { return SUCCESS; }
  
! /* ----------------------- MLME-RX-ENABLE ----------------------- */
  
    command ieee154_status_t MLME_RX_ENABLE.request  ( 
--- 64,68 ----
    command error_t Init.init() { return SUCCESS; }
  
!   /* ----------------------- MLME-RX-ENABLE ----------------------- */
  
    command ieee154_status_t MLME_RX_ENABLE.request  ( 

Index: NoScanP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoScanP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoScanP.nc	25 Nov 2008 09:35:09 -0000	1.2
--- NoScanP.nc	4 Mar 2009 18:31:40 -0000	1.3
***************
*** 34,37 ****
--- 34,39 ----
   */
  
+  /** Empty placeholder component for ScanP. */
+ 
  #include "TKN154_MAC.h"
  
***************
*** 89,109 ****
    event void EnergyDetection.done(error_t status, int8_t EnergyLevel){}
  
!   async event void RadioRx.prepareDone() { }
  
!   event message_t* RadioRx.received(message_t *frame, ieee154_reftime_t *time)
    {
      return frame;
    }
  
!   async event void RadioTx.loadDone() { }
! 
!   async event void RadioTx.transmitDone(ieee154_txframe_t *frame, ieee154_reftime_t *txTime){}
! 
!   async event void RadioTx.transmitUnslottedCsmaCaDone(ieee154_txframe_t *frame,
!       bool ackPendingFlag, ieee154_csma_t *csmaParameters, error_t result){}
  
-   async event void RadioTx.transmitSlottedCsmaCaDone(ieee154_txframe_t *frame, ieee154_reftime_t *txTime, 
-       bool ackPendingFlag, uint16_t remainingBackoff, ieee154_csma_t *csmaParameters, error_t result){}
-  
    event void ScanTimer.fired() { }
  
--- 91,104 ----
    event void EnergyDetection.done(error_t status, int8_t EnergyLevel){}
  
!   async event void RadioRx.enableRxDone(){}
  
!   event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp)
    {
      return frame;
    }
  
!   async event void RadioTx.transmitDone(ieee154_txframe_t *frame, 
!       const ieee154_timestamp_t *timestamp, error_t result){}
  
    event void ScanTimer.fired() { }
  

--- NoDebugP.nc DELETED ---

--- NoFrameDispatchP.nc DELETED ---



More information about the Tinyos-2-commits mailing list