[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/dummies NoBeaconSynchronizeP.nc, 1.5, 1.6 NoBeaconTransmitP.nc, 1.6, 1.7 NoCoordBroadcastP.nc, 1.2, 1.3 NoCoordCfpP.nc, 1.6, 1.7 NoDeviceCfpP.nc, 1.6, 1.7 NoDispatchSlottedCsmaP.nc, 1.1, 1.2 NoPromiscuousModeP.nc, 1.2, 1.3 NoScanP.nc, 1.3, 1.4
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Tue Mar 24 05:56:49 PDT 2009
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420_tkn154 CC2420ControlP.nc, 1.3, 1.4
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/interfaces/private TransferableResource.nc, NONE, 1.1 ResourceTransferConnector.nc, 1.1, NONE ResourceTransferControl.nc, 1.2, NONE ResourceTransfer.nc, 1.2, NONE ResourceTransferred.nc, 1.4, NONE
- 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-serv23986/tos/lib/mac/tkn154/dummies
Modified Files:
NoBeaconSynchronizeP.nc NoBeaconTransmitP.nc
NoCoordBroadcastP.nc NoCoordCfpP.nc NoDeviceCfpP.nc
NoDispatchSlottedCsmaP.nc NoPromiscuousModeP.nc NoScanP.nc
Log Message:
1) simplified the resource transfer: removed ResourceTransfer* interfaces and corresponding components, replaced them by a single new extended TransferableResource interface (the token passing mechanism remains the same, but now there are less interfaces/components involved).
2) made some small fixes/modifications to facilitate porting to micaz, as proposed by Daniel F. Piñeiro Santos
Index: NoBeaconSynchronizeP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NoBeaconSynchronizeP.nc 4 Mar 2009 18:31:39 -0000 1.5
--- NoBeaconSynchronizeP.nc 24 Mar 2009 12:56:47 -0000 1.6
***************
*** 61,68 ****
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;
--- 61,65 ----
interface DataRequest;
interface FrameRx as CoordRealignmentRx;
! interface TransferableResource as RadioToken;
interface TimeCalc;
interface IEEE154Frame as Frame;
***************
*** 79,85 ****
}
! event void Token.granted() { }
! async event void TokenTransferred.transferred() { }
async event void RadioOff.offDone() { }
--- 76,82 ----
}
! event void RadioToken.granted() { }
! async event void RadioToken.transferredFrom(uint8_t fromClient) { call RadioToken.transferTo(RADIO_CLIENT_BEACONTRANSMIT); }
async event void RadioOff.offDone() { }
Index: NoBeaconTransmitP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoBeaconTransmitP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** NoBeaconTransmitP.nc 4 Mar 2009 18:31:39 -0000 1.6
--- NoBeaconTransmitP.nc 24 Mar 2009 12:56:47 -0000 1.7
***************
*** 57,64 ****
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;
--- 57,61 ----
interface MLME_GET;
interface MLME_SET;
! interface TransferableResource as RadioToken;
interface FrameTx as RealignmentBeaconEnabledTx;
interface FrameTx as RealignmentNonBeaconEnabledTx;
***************
*** 98,104 ****
}
! event void Token.granted() { }
! async event void TokenTransferred.transferred() { call Token.release(); }
async event void RadioOff.offDone() { }
--- 95,101 ----
}
! event void RadioToken.granted() { }
! async event void RadioToken.transferredFrom(uint8_t from) { call RadioToken.transferTo(RADIO_CLIENT_BEACONSYNCHRONIZE); }
async event void RadioOff.offDone() { }
Index: NoCoordBroadcastP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordBroadcastP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoCoordBroadcastP.nc 4 Mar 2009 18:31:39 -0000 1.2
--- NoCoordBroadcastP.nc 24 Mar 2009 12:56:47 -0000 1.3
***************
*** 48,53 ****
interface Queue<ieee154_txframe_t*>;
interface FrameTxNow as CapTransmitNow;
! interface ResourceTransfer as TokenToCap;
! interface ResourceTransferred as TokenTransferred;
interface GetNow<bool> as BeaconFramePendingBit;
interface SuperframeStructure as OutgoingSF;
--- 48,52 ----
interface Queue<ieee154_txframe_t*>;
interface FrameTxNow as CapTransmitNow;
! interface TransferableResource as RadioToken;
interface GetNow<bool> as BeaconFramePendingBit;
interface SuperframeStructure as OutgoingSF;
***************
*** 75,81 ****
}
! async event void TokenTransferred.transferred()
{
! call TokenToCap.transfer();
}
--- 74,80 ----
}
! async event void RadioToken.transferredFrom(uint8_t fromClient)
{
! call RadioToken.transferTo(RADIO_CLIENT_COORDCAP);
}
***************
*** 83,85 ****
--- 82,85 ----
{
}
+ event void RadioToken.granted(){ }
}
Index: NoCoordCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoCoordCfpP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** NoCoordCfpP.nc 4 Mar 2009 18:31:39 -0000 1.6
--- NoCoordCfpP.nc 24 Mar 2009 12:56:47 -0000 1.7
***************
*** 53,59 ****
interface Purge;
} uses {
! interface ResourceTransferred as TokenTransferred;
! interface ResourceTransfer as TokenToBeaconTransmit;
! interface ResourceRequested as TokenRequested;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
--- 53,57 ----
interface Purge;
} uses {
! interface TransferableResource as RadioToken;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
***************
*** 86,95 ****
}
! async event void TokenTransferred.transferred()
{
// the CFP has started, this component now owns the token -
! // because GTS is not implemented we pass it back to the
! // BeaconTransmitP component
! call TokenToBeaconTransmit.transfer();
}
--- 84,96 ----
}
! async event void RadioToken.transferredFrom(uint8_t fromClient)
{
// the CFP has started, this component now owns the token -
! // because GTS is not implemented we pass it on
! #ifndef IEEE154_BEACON_SYNC_DISABLED
! call RadioToken.transferTo(RADIO_CLIENT_BEACONSYNCHRONIZE);
! #else
! call RadioToken.transferTo(RADIO_CLIENT_BEACONTRANSMIT);
! #endif
}
***************
*** 121,131 ****
event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp){return frame;}
! async event void TokenRequested.requested()
{
! // someone (e.g. SCAN component) requested access to the radio, we
! // should pass the token back to BeaconTransmitP, which can release it
! // call TokenToBeaconTransmit.transfer();
! }
!
! async event void TokenRequested.immediateRequested(){ }
}
--- 122,128 ----
event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp){return frame;}
! event void RadioToken.granted()
{
! ASSERT(0); // should never happen, because we never call RadioToken.request()
! }
}
Index: NoDeviceCfpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoDeviceCfpP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** NoDeviceCfpP.nc 4 Mar 2009 18:31:40 -0000 1.6
--- NoDeviceCfpP.nc 24 Mar 2009 12:56:47 -0000 1.7
***************
*** 52,58 ****
interface Purge;
} uses {
! interface ResourceTransferred as TokenTransferred;
! interface ResourceRequested as TokenRequested;
! interface ResourceTransfer as TokenToBeaconSync;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
--- 52,56 ----
interface Purge;
} uses {
! interface TransferableResource as RadioToken;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpSlotAlarm;
interface Alarm<TSymbolIEEE802154,uint32_t> as CfpEndAlarm;
***************
*** 85,94 ****
}
! async event void TokenTransferred.transferred()
{
// the CFP has started, this component now owns the token -
! // because GTS is not implemented we pass it back to the
! // BeaconTransmitP component
! call TokenToBeaconSync.transfer();
}
--- 83,95 ----
}
! async event void RadioToken.transferredFrom(uint8_t fromClient)
{
// the CFP has started, this component now owns the token -
! // because GTS is not implemented we pass it on
! #ifndef IEEE154_BEACON_TX_DISABLED
! call RadioToken.transferTo(RADIO_CLIENT_BEACONTRANSMIT);
! #else
! call RadioToken.transferTo(RADIO_CLIENT_BEACONSYNCHRONIZE);
! #endif
}
***************
*** 103,113 ****
event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp){return frame;}
! async event void TokenRequested.requested()
{
! // someone (e.g. SCAN component) requested access to the radio, we
! // should pass the token back to BeaconSynchronizeP, which can release it
! // call TokenToBeaconSync.transfer();
! }
!
! async event void TokenRequested.immediateRequested(){ }
}
--- 104,110 ----
event message_t* RadioRx.received(message_t *frame, const ieee154_timestamp_t *timestamp){return frame;}
! event void RadioToken.granted()
{
! ASSERT(0); // should never happen, because we never call RadioToken.request()
! }
}
Index: NoDispatchSlottedCsmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoDispatchSlottedCsmaP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NoDispatchSlottedCsmaP.nc 5 Mar 2009 10:07:14 -0000 1.1
--- NoDispatchSlottedCsmaP.nc 24 Mar 2009 12:56:47 -0000 1.2
***************
*** 39,43 ****
#include "TKN154_MAC.h"
! generic module NoDispatchSlottedCsmaP(uint8_t superframeDirection)
{
provides
--- 39,43 ----
#include "TKN154_MAC.h"
! generic module NoDispatchSlottedCsmaP(uint8_t sfDirection)
{
provides
***************
*** 56,63 ****
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;
--- 56,61 ----
interface Alarm<TSymbolIEEE802154,uint32_t> as IndirectTxWaitAlarm;
interface Alarm<TSymbolIEEE802154,uint32_t> as BroadcastAlarm;
! interface GetNow<token_requested_t> as IsRadioTokenRequested;
! interface TransferableResource as RadioToken;
interface SuperframeStructure;
interface GetNow<bool> as IsRxEnableActive;
***************
*** 80,86 ****
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; }
--- 78,90 ----
implementation
{
+ enum {
+ COORD_ROLE = (sfDirection == OUTGOING_SUPERFRAME),
+ DEVICE_ROLE = !COORD_ROLE,
+ RADIO_CLIENT_CFP = COORD_ROLE ? RADIO_CLIENT_COORDCFP : RADIO_CLIENT_DEVICECFP,
+ };
+
command error_t Reset.init() { return SUCCESS; }
! async event void RadioToken.transferredFrom(uint8_t c) { call RadioToken.transferTo(RADIO_CLIENT_CFP); }
command ieee154_status_t FrameTx.transmit(ieee154_txframe_t *frame) { return IEEE154_TRANSACTION_OVERFLOW; }
***************
*** 105,111 ****
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;}
--- 109,115 ----
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) { return IEEE154_TRANSACTION_OVERFLOW;}
! event void RadioToken.granted() { }
command error_t WasRxEnabled.enable(){return FAIL;}
Index: NoPromiscuousModeP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoPromiscuousModeP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NoPromiscuousModeP.nc 4 Mar 2009 18:31:40 -0000 1.2
--- NoPromiscuousModeP.nc 24 Mar 2009 12:56:47 -0000 1.3
***************
*** 45,48 ****
--- 45,49 ----
interface Get<bool> as PromiscuousModeGet;
interface FrameRx;
+ interface GetNow<token_requested_t> as IsRadioTokenRequested;
} uses {
interface Resource as Token;
***************
*** 75,77 ****
--- 76,79 ----
default event void PromiscuousMode.startDone(error_t error){}
default event void PromiscuousMode.stopDone(error_t error){}
+ async command token_requested_t IsRadioTokenRequested.getNow(){ return FALSE;}
}
Index: NoScanP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/dummies/NoScanP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NoScanP.nc 4 Mar 2009 18:31:40 -0000 1.3
--- NoScanP.nc 24 Mar 2009 12:56:47 -0000 1.4
***************
*** 45,48 ****
--- 45,49 ----
interface MLME_SCAN;
interface MLME_BEACON_NOTIFY;
+ interface GetNow<token_requested_t> as IsRadioTokenRequested;
}
uses
***************
*** 59,63 ****
interface Pool<ieee154_txframe_t> as TxFramePool;
interface Pool<ieee154_txcontrol_t> as TxControlPool;
! interface Resource as Token;
interface FrameUtility;
interface Leds;
--- 60,64 ----
interface Pool<ieee154_txframe_t> as TxFramePool;
interface Pool<ieee154_txcontrol_t> as TxControlPool;
! interface TransferableResource as RadioToken;
interface FrameUtility;
interface Leds;
***************
*** 84,90 ****
}
! event void Token.granted()
{
! call Token.release();
}
--- 85,91 ----
}
! event void RadioToken.granted()
{
! ASSERT(0);
}
***************
*** 104,106 ****
--- 105,109 ----
async event void RadioOff.offDone() { }
+ async event void RadioToken.transferredFrom(uint8_t fromClient){ASSERT(0);}
+ async command token_requested_t IsRadioTokenRequested.getNow(){ return FALSE;}
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420_tkn154 CC2420ControlP.nc, 1.3, 1.4
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154/interfaces/private TransferableResource.nc, NONE, 1.1 ResourceTransferConnector.nc, 1.1, NONE ResourceTransferControl.nc, 1.2, NONE ResourceTransfer.nc, 1.2, NONE ResourceTransferred.nc, 1.4, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list