X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fmac%2Ftkn154%2Fdummies%2FNoBeaconSynchronizeP.nc;h=e1dee2c348621adbb683076d4e756af29135af58;hb=280de4fedba9a7080138600e623cdadf22bf728a;hp=5d49ff360d423d69574401bd2459f46a5c63de67;hpb=cfc8b8448d14883d4d47e0852797366ef0c13a75;p=tinyos-2.x.git diff --git a/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc b/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc index 5d49ff36..e1dee2c3 100644 --- a/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc +++ b/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc @@ -33,6 +33,7 @@ * ======================================================================== */ + /** Empty placeholder component for BeaconSynchronizeP. */ #include "TKN154_MAC.h" @@ -40,95 +41,87 @@ module NoBeaconSynchronizeP { provides { - interface Init; + interface Init as Reset; interface MLME_SYNC; interface MLME_BEACON_NOTIFY; interface MLME_SYNC_LOSS; + interface SuperframeStructure as IncomingSF; interface GetNow as IsTrackingBeacons; - interface Get as GetLastBeaconRxTime; - interface GetNow as CapStart; - interface GetNow as CapStartRefTime; - interface GetNow as CapLen; - interface GetNow as CapEnd; - interface GetNow as CfpEnd; - interface GetNow as CfpLen; - interface GetNow as BeaconInterval; - interface GetNow as IsBLEActive; - interface GetNow as BLELen; - interface GetNow as GtsField; - interface GetNow as SfSlotDuration; - interface GetNow as FinalCapSlot; - interface GetNow as NumGtsSlots; - interface GetNow as IsRxBroadcastPending; + interface StdControl as TrackSingleBeacon; } uses { interface MLME_GET; interface MLME_SET; interface FrameUtility; - interface Notify as FindBeacon; interface IEEE154BeaconFrame as BeaconFrame; interface Alarm as TrackAlarm; interface RadioRx as BeaconRx; interface RadioOff; - interface GetNow as IsBeaconEnabledPAN; interface DataRequest; interface FrameRx as CoordRealignmentRx; interface Resource as Token; interface GetNow as IsTokenRequested; - interface ResourceTransfer as TokenToCap; interface ResourceTransferred as TokenTransferred; - interface GetNow as IsSendingBeacons; + interface ResourceTransfer as TokenToCap; interface TimeCalc; interface IEEE154Frame as Frame; interface Leds; - interface Ieee802154Debug as Debug; } } implementation { + command error_t Reset.init() { return SUCCESS; } - command error_t Init.init() { return SUCCESS; } - - command ieee154_status_t MLME_SYNC.request ( - uint8_t logicalChannel, - uint8_t channelPage, - bool trackBeacon - ) + command ieee154_status_t MLME_SYNC.request ( uint8_t logicalChannel, uint8_t channelPage, bool trackBeacon) { return IEEE154_TRANSACTION_OVERFLOW; } event void Token.granted() { } - async event void TokenTransferred.transferred() { call Token.release(); } + async event void TokenTransferred.transferred() { } - async event void TrackAlarm.fired() {} + async event void RadioOff.offDone() { } - async event void BeaconRx.prepareDone() {} + async event void BeaconRx.enableRxDone() { } - event message_t* BeaconRx.received(message_t* frame, ieee154_reftime_t *timestamp) { return frame;} + async event void TrackAlarm.fired() { } - async event void RadioOff.offDone() {} + event message_t* BeaconRx.received(message_t *frame, const ieee154_timestamp_t *timestamp) { return frame; } - 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; } + 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(){} - 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 ){} + + 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; } }