X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fmac%2Ftkn154%2FTKN154NonBeaconEnabledP.nc;h=1adae7caa554e1aa504a968263ff882ea5d236a0;hb=1b3726eac744305a1446f78ec96e0ef774321354;hp=70f527bcc174b097f5efe6ba2c49338988bb25a6;hpb=9b7c447b3ec7173f2b22fce7452151bf209379f5;p=tinyos-2.x.git diff --git a/tos/lib/mac/tkn154/TKN154NonBeaconEnabledP.nc b/tos/lib/mac/tkn154/TKN154NonBeaconEnabledP.nc index 70f527bc..1adae7ca 100644 --- a/tos/lib/mac/tkn154/TKN154NonBeaconEnabledP.nc +++ b/tos/lib/mac/tkn154/TKN154NonBeaconEnabledP.nc @@ -65,6 +65,7 @@ configuration TKN154NonBeaconEnabledP interface Notify as PIBUpdate[uint8_t attributeID]; interface IEEE154Frame; interface IEEE154BeaconFrame; + interface IEEE154TxBeaconPayload; interface SplitControl as PromiscuousMode; interface Get as GetLocalExtendedAddress; interface TimeCalc; @@ -98,6 +99,7 @@ implementation RadioControlP, IndirectTxP, PollP, + BeaconRequestRxP, #ifndef IEEE154_SCAN_DISABLED ScanP, @@ -164,12 +166,13 @@ implementation MLME_SET = PibP; IEEE154Frame = PibP; IEEE154BeaconFrame = PibP; + IEEE154TxBeaconPayload = BeaconRequestRxP; PromiscuousMode = PromiscuousModeP; GetLocalExtendedAddress = PibP.GetLocalExtendedAddress; Packet = PibP; TimeCalc = PibP; FrameUtility = PibP; - + /* ----------------------- Scanning (MLME-SCAN) ----------------------- */ components new RadioClientC(RADIO_CLIENT_SCAN) as ScanRadioClient; @@ -189,6 +192,15 @@ implementation ScanP.Leds = Leds; ScanP.FrameUtility -> PibP; + /* -------------------- Responding to Active Scans --------------------- */ + + PibP.MacReset -> BeaconRequestRxP; + BeaconRequestRxP.BeaconRequestRx -> DispatchP.FrameRx[FC1_FRAMETYPE_CMD + CMD_FRAME_BEACON_REQUEST]; + BeaconRequestRxP.BeaconRequestResponseTx -> DispatchQueueP.FrameTx[unique(CAP_TX_CLIENT)]; + BeaconRequestRxP.MLME_GET -> PibP; + BeaconRequestRxP.FrameUtility -> PibP; + BeaconRequestRxP.Frame -> PibP; + /* -------------------- Association (MLME-ASSOCIATE) -------------------- */ PibP.MacReset -> AssociateP;