[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/dummies NoAssociateP.nc, NONE, 1.1 NoCoordBroadcastP.nc, NONE, 1.1 NoCoordRealignmentP.nc, NONE, 1.1 NoDisassociateP.nc, NONE, 1.1 NoPromiscuousModeP.nc, NONE, 1.1 NoRxEnableP.nc, NONE, 1.1 NoBeaconSynchronizeP.nc, 1.2, 1.3 NoBeaconTransmitP.nc, 1.2, 1.3 NoCoordCfpP.nc, 1.2, 1.3 NoCsmaP.nc, 1.1, 1.2 NoDeviceCfpP.nc, 1.2, 1.3
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Tue Oct 21 10:29:02 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154 DisassociateP.nc, NONE, 1.1 PromiscuousModeP.nc, NONE, 1.1 AssociateP.nc, 1.2, 1.3 BeaconSynchronizeP.nc, 1.4, 1.5 BeaconTransmitP.nc, 1.3, 1.4 CoordBroadcastP.nc, 1.2, 1.3 CsmaP.nc, 1.1, 1.2 DataP.nc, 1.1, 1.2 PibP.nc, 1.2, 1.3 RxEnableP.nc, 1.2, 1.3 TKN154_DEBUG.h, 1.1, 1.2 TKN154.h, 1.1, 1.2 TKN154_PIB.h, 1.1, 1.2 TKN154P.nc, 1.3, 1.4 TransferClientP.nc, 1.2, 1.3
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tosthreads/system TinyThreadSchedulerP.nc, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11326/tos/lib/mac/tkn154/dummies
Modified Files:
NoBeaconSynchronizeP.nc NoBeaconTransmitP.nc NoCoordCfpP.nc
NoCsmaP.nc NoDeviceCfpP.nc
Added Files:
NoAssociateP.nc NoCoordBroadcastP.nc NoCoordRealignmentP.nc
NoDisassociateP.nc NoPromiscuousModeP.nc NoRxEnableP.nc
Log Message:
- moved promiscuous mode into separate component
- separated association from disassociation component
- changed ResourceTransfer.tranfer to async
- added placeholders
--- NEW FILE: NoAssociateP.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: 2008/10/21 17:29:00 $
* @author Jan Hauer <hauer at tkn.tu-berlin.de>
* ========================================================================
*/
#include "TKN154_MAC.h"
module NoAssociateP
{
provides
{
interface Init;
interface MLME_ASSOCIATE;
interface MLME_COMM_STATUS;
}
uses
{
interface FrameRx as AssociationRequestRx;
interface FrameTx as AssociationRequestTx;
interface FrameExtracted as AssociationResponseExtracted;
interface FrameTx as AssociationResponseTx;
interface DataRequest;
interface Timer<TSymbolIEEE802154> as ResponseTimeout;
interface Pool<ieee154_txframe_t> as TxFramePool;
interface Pool<ieee154_txcontrol_t> as TxControlPool;
interface MLME_GET;
interface MLME_SET;
interface FrameUtility;
interface IEEE154Frame as Frame;
interface Get<uint64_t> as LocalExtendedAddress;
interface Ieee802154Debug as Debug;
}
}
implementation
{
command error_t Init.init() { return SUCCESS; }
/* ------------------- MLME_ASSOCIATE Request ------------------- */
command ieee154_status_t MLME_ASSOCIATE.request (
uint8_t LogicalChannel,
uint8_t ChannelPage,
uint8_t CoordAddrMode,
uint16_t CoordPANID,
ieee154_address_t CoordAddress,
ieee154_CapabilityInformation_t CapabilityInformation,
ieee154_security_t *security
)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
event void AssociationRequestTx.transmitDone(ieee154_txframe_t *txFrame, ieee154_status_t status) { }
event void ResponseTimeout.fired() { }
event message_t* AssociationResponseExtracted.received(message_t* frame, ieee154_txframe_t *txFrame) { return frame; }
event void DataRequest.pollDone() { }
/* ------------------- MLME_ASSOCIATE Response ------------------- */
event message_t* AssociationRequestRx.received(message_t* frame) { return frame; }
command ieee154_status_t MLME_ASSOCIATE.response (
uint64_t deviceAddress,
uint16_t assocShortAddress,
ieee154_association_status_t status,
ieee154_security_t *security
)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
event void AssociationResponseTx.transmitDone(ieee154_txframe_t *txFrame, ieee154_status_t status) { }
/* ------------------- Defaults ------------------- */
default event void MLME_ASSOCIATE.indication (
uint64_t DeviceAddress,
ieee154_CapabilityInformation_t CapabilityInformation,
ieee154_security_t *security
){}
default event void MLME_ASSOCIATE.confirm (
uint16_t AssocShortAddress,
uint8_t status,
ieee154_security_t *security
){}
default event void MLME_COMM_STATUS.indication (
uint16_t PANId,
uint8_t SrcAddrMode,
ieee154_address_t SrcAddr,
uint8_t DstAddrMode,
ieee154_address_t DstAddr,
ieee154_status_t status,
ieee154_security_t *security
){}
}
--- NEW FILE: NoCoordBroadcastP.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: 2008/10/21 17:29:00 $
* @author Jan Hauer <hauer at tkn.tu-berlin.de>
* ========================================================================
*/
#include "TKN154_MAC.h"
module NoCoordBroadcastP
{
provides
{
interface Init as Reset;
interface FrameTx as BroadcastDataFrame;
interface FrameTx as RealignmentTx;
interface GetNow<bool> as IsBroadcastReady;
} uses {
interface Queue<ieee154_txframe_t*>;
interface FrameTxNow as CapTransmitNow;
interface ResourceTransfer as TokenToCap;
interface ResourceTransferred as TokenTransferred;
interface GetNow<bool> as BeaconFramePendingBit;
interface Leds;
}
}
implementation
{
command error_t Reset.init() { return SUCCESS; }
command ieee154_status_t BroadcastDataFrame.transmit(ieee154_txframe_t *txFrame)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
command ieee154_status_t RealignmentTx.transmit(ieee154_txframe_t *frame)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
async command bool IsBroadcastReady.getNow()
{
return FALSE;
}
async event void TokenTransferred.transferred()
{
call TokenToCap.transfer();
}
async event void CapTransmitNow.transmitNowDone(ieee154_txframe_t *txFrame, ieee154_status_t status)
{
}
}
--- NEW FILE: NoCoordRealignmentP.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: 2008/10/21 17:29:00 $
* @author Jan Hauer <hauer at tkn.tu-berlin.de>
* ========================================================================
*/
#include "TKN154_MAC.h"
module NoCoordRealignmentP
{
provides
{
interface Init;
interface MLME_ORPHAN;
interface MLME_COMM_STATUS;
interface GetSet<ieee154_txframe_t*> as GetSetRealignmentFrame;
}
uses
{
interface FrameTx as CoordRealignmentTx;
interface FrameRx as OrphanNotificationRx;
interface FrameUtility;
interface MLME_GET;
interface IEEE154Frame as Frame;
interface Pool<ieee154_txframe_t> as TxFramePool;
interface Pool<ieee154_txcontrol_t> as TxControlPool;
interface Get<uint64_t> as LocalExtendedAddress;
}
}
implementation
{
command error_t Init.init() { return SUCCESS; }
command ieee154_txframe_t* GetSetRealignmentFrame.get() { return NULL; }
command void GetSetRealignmentFrame.set(ieee154_txframe_t* frame) { }
event message_t* OrphanNotificationRx.received(message_t* frame) { return frame; }
command ieee154_status_t MLME_ORPHAN.response (
uint64_t OrphanAddress,
uint16_t ShortAddress,
bool AssociatedMember,
ieee154_security_t *security
)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
event void CoordRealignmentTx.transmitDone(ieee154_txframe_t *txFrame, ieee154_status_t status)
{
}
default event void MLME_COMM_STATUS.indication (
uint16_t PANId,
uint8_t SrcAddrMode,
ieee154_address_t SrcAddr,
uint8_t DstAddrMode,
ieee154_address_t DstAddr,
ieee154_status_t status,
ieee154_security_t *security
){}
default event void MLME_ORPHAN.indication (
uint64_t OrphanAddress,
ieee154_security_t *security
){}
}
--- NEW FILE: NoDisassociateP.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: 2008/10/21 17:29:00 $
* @author Jan Hauer <hauer at tkn.tu-berlin.de>
* ========================================================================
*/
#include "TKN154_MAC.h"
module NoDisassociateP
{
provides
{
interface Init;
interface MLME_DISASSOCIATE;
} uses {
interface FrameTx as DisassociationIndirectTx;
interface FrameTx as DisassociationDirectTx;
interface FrameTx as DisassociationToCoord;
interface FrameRx as DisassociationDirectRxFromCoord;
interface FrameExtracted as DisassociationExtractedFromCoord;
interface FrameRx as DisassociationRxFromDevice;
interface Pool<ieee154_txframe_t> as TxFramePool;
interface Pool<ieee154_txcontrol_t> as TxControlPool;
interface MLME_GET;
interface FrameUtility;
interface IEEE154Frame as Frame;
interface Get<uint64_t> as LocalExtendedAddress;
interface Ieee802154Debug as Debug;
}
}
implementation
{
command error_t Init.init() { return SUCCESS; }
/* ------------------- MLME_DISASSOCIATE (initiating) ------------------- */
command ieee154_status_t MLME_DISASSOCIATE.request (
uint8_t DeviceAddrMode,
uint16_t DevicePANID,
ieee154_address_t DeviceAddress,
ieee154_disassociation_reason_t DisassociateReason,
bool TxIndirect,
ieee154_security_t *security
)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
event void DisassociationToCoord.transmitDone(ieee154_txframe_t *data, ieee154_status_t status) { }
event void DisassociationIndirectTx.transmitDone(ieee154_txframe_t *data, ieee154_status_t status) { }
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; }
event message_t* DisassociationExtractedFromCoord.received(message_t* frame, ieee154_txframe_t *txFrame) { return frame;
}
event message_t* DisassociationRxFromDevice.received(message_t* frame) { return frame; }
/* ------------------- Defaults ------------------- */
default event void MLME_DISASSOCIATE.indication (
uint64_t DeviceAddress,
ieee154_disassociation_reason_t DisassociateReason,
ieee154_security_t *security
){}
default event void MLME_DISASSOCIATE.confirm (
ieee154_status_t status,
uint8_t DeviceAddrMode,
uint16_t DevicePANID,
ieee154_address_t DeviceAddress
){}
}
--- NEW FILE: NoPromiscuousModeP.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: 2008/10/21 17:29:00 $
* @author Jan Hauer <hauer at tkn.tu-berlin.de>
* ========================================================================
*/
#include "TKN154_PHY.h"
#include "TKN154_MAC.h"
module NoPromiscuousModeP
{
provides {
interface Init;
interface SplitControl as PromiscuousMode;
interface Get<bool> as PromiscuousModeGet;
interface FrameRx;
} uses {
interface Resource as Token;
interface RadioRx as PromiscuousRx;
interface RadioOff;
interface Set<bool> as RadioPromiscuousMode;
interface Ieee802154Debug as Debug;
}
}
implementation
{
command error_t Init.init() { return SUCCESS; }
/* ----------------------- Promiscuous Mode ----------------------- */
command bool PromiscuousModeGet.get() { return FALSE; }
command error_t PromiscuousMode.start() { return FAIL; }
event void Token.granted() { call Token.release(); }
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; }
async event void RadioOff.offDone() { }
default event void PromiscuousMode.startDone(error_t error){}
default event void PromiscuousMode.stopDone(error_t error){}
}
--- NEW FILE: NoRxEnableP.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: 2008/10/21 17:29:00 $
* @author Jan Hauer <hauer at tkn.tu-berlin.de>
* ========================================================================
*/
#include "TKN154_PHY.h"
#include "TKN154_MAC.h"
module NoRxEnableP
{
provides
{
interface Init;
interface MLME_RX_ENABLE;
interface GetNow<bool> as IsRxEnableActive;
interface Notify<bool> as RxEnableStateChange;
}
uses
{
interface Ieee802154Debug as Debug;
interface Timer<TSymbolIEEE802154> as RxEnableTimer;
interface Get<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;
}
}
implementation
{
command error_t Init.init() { return SUCCESS; }
/* ----------------------- MLME-RX-ENABLE ----------------------- */
command ieee154_status_t MLME_RX_ENABLE.request (
bool DeferPermit,
uint32_t RxOnTime,
uint32_t RxOnDuration
)
{
return IEEE154_TRANSACTION_OVERFLOW;
}
event void RxEnableTimer.fired() {}
async command bool IsRxEnableActive.getNow() { return FALSE; }
event void WasRxEnabled.notify( bool val ) { }
command error_t RxEnableStateChange.enable(){return FAIL;}
command error_t RxEnableStateChange.disable(){return FAIL;}
default event void MLME_RX_ENABLE.confirm(ieee154_status_t status){}
}
Index: NoBeaconSynchronizeP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoBeaconSynchronizeP.nc 18 Jun 2008 15:52:53 -0000 1.2
--- NoBeaconSynchronizeP.nc 21 Oct 2008 17:29:00 -0000 1.3
***************
*** 101,105 ****
event void Token.granted() { }
! event void TokenTransferred.transferred() { call Token.release(); }
async event void TrackAlarm.fired() {}
--- 101,105 ----
event void Token.granted() { }
! async event void TokenTransferred.transferred() { call Token.release(); }
async event void TrackAlarm.fired() {}
Index: NoBeaconTransmitP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconTransmitP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoBeaconTransmitP.nc 18 Jun 2008 15:52:53 -0000 1.2
--- NoBeaconTransmitP.nc 21 Oct 2008 17:29:00 -0000 1.3
***************
*** 43,47 ****
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;
--- 43,47 ----
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;
***************
*** 72,75 ****
--- 72,76 ----
interface Resource as Token;
interface ResourceTransfer as TokenToBroadcast;
+ interface ResourceTransferred as TokenTransferred;
interface FrameTx as RealignmentBeaconEnabledTx;
interface FrameTx as RealignmentNonBeaconEnabledTx;
***************
*** 115,118 ****
--- 116,121 ----
event void Token.granted() { }
+ async event void TokenTransferred.transferred() { call Token.release(); }
+
async event void RadioOff.offDone() { }
***************
*** 174,178 ****
}
! command bool IsSendingBeacons.get(){ return FALSE;}
async command uint32_t CapStart.getNow() { return 0; }
--- 177,181 ----
}
! async command bool IsSendingBeacons.getNow(){ return FALSE;}
async command uint32_t CapStart.getNow() { return 0; }
Index: NoCoordCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordCfpP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoCoordCfpP.nc 18 Jun 2008 15:52:53 -0000 1.2
--- NoCoordCfpP.nc 21 Oct 2008 17:29:00 -0000 1.3
***************
*** 56,59 ****
--- 56,61 ----
interface ResourceTransferred as TokenTransferred;
interface ResourceRequested as TokenRequested;
+ interface ResourceTransfer as TokenToBeaconTransmit;
+ interface GetNow<bool> as IsTrackingBeacons;
interface GetNow<uint32_t> as CfpEnd;
interface GetNow<ieee154_reftime_t*> as CapStartRefTime;
***************
*** 90,110 ****
}
! event void TokenTransferred.transferred()
{
// the CFP has started, this component now owns the token -
// because GTS is not implemented we release the token
! // immediately; the general rule is: as long as a component
! // owns the token it has exclusive access to the radio
! call Token.release();
}
! async event void CfpEndAlarm.fired() { }
async event void CfpSlotAlarm.fired() {}
! async event void RadioOff.offDone()
! {
! call Token.release();
! }
command uint8_t GtsInfoWrite.write(uint8_t *gtsSpecField, uint8_t maxlen)
--- 92,112 ----
}
! 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 BeaconTransmitP if
! // we are not tracking beacons)
! if (call IsTrackingBeacons.getNow())
! call Token.release();
! else
! call TokenToBeaconTransmit.transfer();
}
! async event void CfpEndAlarm.fired() {}
async event void CfpSlotAlarm.fired() {}
! async event void RadioOff.offDone() {}
command uint8_t GtsInfoWrite.write(uint8_t *gtsSpecField, uint8_t maxlen)
Index: NoCsmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCsmaP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoCsmaP.nc 2 Aug 2008 16:56:21 -0000 1.1
--- NoCsmaP.nc 21 Oct 2008 17:29:00 -0000 1.2
***************
*** 91,95 ****
}
! event void TokenTransferred.transferred()
{
call TokenToCfp.transfer();
--- 91,95 ----
}
! async event void TokenTransferred.transferred()
{
call TokenToCfp.transfer();
Index: NoDeviceCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoDeviceCfpP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoDeviceCfpP.nc 18 Jun 2008 15:52:53 -0000 1.2
--- NoDeviceCfpP.nc 21 Oct 2008 17:29:00 -0000 1.3
***************
*** 55,59 ****
--- 55,61 ----
interface ResourceTransferred as TokenTransferred;
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;
***************
*** 89,109 ****
}
! event void TokenTransferred.transferred()
{
! // the CFP has started, this component now owns the token -
// because GTS is not implemented we release the token
! // immediately; the general rule is: as long as a component
! // owns the token it has exclusive access to the radio
! call Token.release();
}
! async event void CfpEndAlarm.fired() { }
async event void CfpSlotAlarm.fired() {}
! async event void RadioOff.offDone()
! {
! call Token.release();
! }
async event void RadioTx.loadDone(){}
--- 91,111 ----
}
! 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();
}
! async event void CfpEndAlarm.fired() {}
async event void CfpSlotAlarm.fired() {}
! async event void RadioOff.offDone() {}
async event void RadioTx.loadDone(){}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154 DisassociateP.nc, NONE, 1.1 PromiscuousModeP.nc, NONE, 1.1 AssociateP.nc, 1.2, 1.3 BeaconSynchronizeP.nc, 1.4, 1.5 BeaconTransmitP.nc, 1.3, 1.4 CoordBroadcastP.nc, 1.2, 1.3 CsmaP.nc, 1.1, 1.2 DataP.nc, 1.1, 1.2 PibP.nc, 1.2, 1.3 RxEnableP.nc, 1.2, 1.3 TKN154_DEBUG.h, 1.1, 1.2 TKN154.h, 1.1, 1.2 TKN154_PIB.h, 1.1, 1.2 TKN154P.nc, 1.3, 1.4 TransferClientP.nc, 1.2, 1.3
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tosthreads/system TinyThreadSchedulerP.nc, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list