X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Flib%2Fmac%2Ftkn154%2Fdummies%2FNoBeaconSynchronizeP.nc;h=30fa2ff7ccc53eb42e8934c715c2e9708b08b0e5;hp=92e8bb4819eefcc1b73cfe5232964911bf306a77;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc b/tos/lib/mac/tkn154/dummies/NoBeaconSynchronizeP.nc index 92e8bb48..30fa2ff7 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,94 +41,84 @@ 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 Get as IsBeaconEnabledPAN; interface DataRequest; interface FrameRx as CoordRealignmentRx; - interface Resource as Token; - interface ResourceTransfer as TokenToCap; - interface ResourceTransferred as TokenTransferred; - interface GetNow as IsSendingBeacons; + interface TransferableResource as RadioToken; 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() { } + event void RadioToken.granted() { } - event void TokenTransferred.transferred() { call Token.release(); } + async event void RadioToken.transferredFrom(uint8_t fromClient) { call RadioToken.transferTo(RADIO_CLIENT_BEACONTRANSMIT); } - 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; } }