#define IEEE154_BEACON_ENABLED_PAN FALSE
-// TODO: check the wiring!!
-
configuration TKN154NonBeaconEnabledP
{
provides
interface Notify<const void*> as PIBUpdate[uint8_t attributeID];
interface IEEE154Frame;
interface IEEE154BeaconFrame;
+ interface IEEE154TxBeaconPayload;
interface SplitControl as PromiscuousMode;
interface Get<uint64_t> as GetLocalExtendedAddress;
interface TimeCalc;
RadioControlP,
IndirectTxP,
PollP,
+ BeaconRequestRxP,
#ifndef IEEE154_SCAN_DISABLED
ScanP,
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() as ScanRadioClient;
+ components new RadioClientC(RADIO_CLIENT_SCAN) as ScanRadioClient;
PibP.MacReset -> ScanP;
ScanP.MLME_GET -> PibP;
ScanP.MLME_SET -> PibP.MLME_SET;
ScanP.ScanTimer = Timer1;
ScanP.TxFramePool -> TxFramePoolP;
ScanP.TxControlPool -> TxControlPoolP;
- ScanP.Token -> ScanRadioClient;
+ ScanP.RadioToken -> ScanRadioClient;
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;
DataP.CoordCapTx -> DispatchQueueP.FrameTx[unique(CAP_TX_CLIENT)];
DataP.DeviceCapRx -> PollP.DataRx;
DataP.DeviceCapRx -> PromiscuousModeP.FrameRx;
+ DataP.DeviceCapRx -> DispatchP.FrameRx[FC1_FRAMETYPE_DATA];
DataP.TxFramePool -> TxFramePoolP;
DataP.IndirectTx -> IndirectTxP.FrameTx[unique(INDIRECT_TX_CLIENT)];
DataP.FrameUtility -> PibP;
IndirectTxP.CoordCapTx -> DispatchQueueP.FrameTx[unique(CAP_TX_CLIENT)];
IndirectTxP.DataRequestRx -> DispatchP.FrameRx[FC1_FRAMETYPE_CMD + CMD_FRAME_DATA_REQUEST];
IndirectTxP.MLME_GET -> PibP;
- IndirectTxP.FrameUtility -> PibP;
+ IndirectTxP.IEEE154Frame -> PibP;
IndirectTxP.IndirectTxTimeout = Timer3;
IndirectTxP.TimeCalc -> PibP;
IndirectTxP.Leds = Leds;
DispatchQueueP.Queue -> DispatchQueueC;
DispatchQueueP.FrameTxCsma -> DispatchP;
- components new RadioClientC() as DispatchRadioClient;
+ components new RadioClientC(unique(IEEE802154_RADIO_RESOURCE)) as DispatchRadioClient;
PibP.DispatchReset -> DispatchP;
DispatchP.IndirectTxWaitTimer = Timer4;
- DispatchP.Token -> DispatchRadioClient;
+ DispatchP.RadioToken -> DispatchRadioClient;
DispatchP.SetMacSuperframeOrder -> PibP.SetMacSuperframeOrder;
DispatchP.SetMacPanCoordinator -> PibP.SetMacPanCoordinator;
- DispatchP.IsTokenRequested -> DispatchRadioClient;
DispatchP.IsRxEnableActive -> RxEnableP.IsRxEnableActive;
+ DispatchP.RadioTokenRequested -> DispatchRadioClient;
+ DispatchP.IsRadioTokenRequested -> PibP.IsRadioTokenRequested; // fan out...
+ DispatchP.IsRadioTokenRequested -> PromiscuousModeP.IsRadioTokenRequested;
+ DispatchP.IsRadioTokenRequested -> ScanP.IsRadioTokenRequested;
DispatchP.GetIndirectTxFrame -> IndirectTxP;
DispatchP.RxEnableStateChange -> RxEnableP.RxEnableStateChange;
+ DispatchP.PIBUpdateMacRxOnWhenIdle -> PibP.PIBUpdate[IEEE154_macRxOnWhenIdle];
DispatchP.FrameUtility -> PibP;
DispatchP.UnslottedCsmaCa -> DispatchRadioClient;
DispatchP.RadioRx -> DispatchRadioClient;
/* -------------------------- promiscuous mode ------------------------ */
- components new RadioClientC() as PromiscuousModeRadioClient;
+ components new RadioClientC(RADIO_CLIENT_PROMISCUOUSMODE) as PromiscuousModeRadioClient;
PibP.MacReset -> PromiscuousModeP;
- PromiscuousModeP.Token -> PromiscuousModeRadioClient;
+ PromiscuousModeP.RadioToken -> PromiscuousModeRadioClient;
PromiscuousModeP.PromiscuousRx -> PromiscuousModeRadioClient;
PromiscuousModeP.RadioOff -> PromiscuousModeRadioClient;
PromiscuousModeP.RadioPromiscuousMode = RadioPromiscuousMode;
/* ------------------------------- PIB -------------------------------- */
- components new RadioClientC() as PibRadioClient;
+ components new RadioClientC(RADIO_CLIENT_PIB) as PibRadioClient;
PIBUpdate = PibP;
MainC.SoftwareInit -> PibP.LocalInit;
PibP.RadioControl = PhySplitControl;
PibP.Random = Random;
PibP.PromiscuousModeGet -> PromiscuousModeP;
PibP.LocalTime = LocalTime;
- PibP.Token -> PibRadioClient;
+ PibP.RadioToken -> PibRadioClient;
PibP.RadioOff -> PibRadioClient;
/* ------------------------- Radio Control ---------------------------- */