interface SlottedCsmaCa as SlottedCsmaCa[uint8_t client];
interface UnslottedCsmaCa as UnslottedCsmaCa[uint8_t client];
interface RadioOff as RadioOff[uint8_t client];
- interface Resource as Token[uint8_t client];
- interface ResourceRequested as TokenRequested[uint8_t client];
- interface ResourceTransferControl as TokenTransferControl;
- interface GetNow<bool> as IsResourceRequested;
- interface Leds as LedsRadioClient;
+ interface TransferableResource[uint8_t id];
+ interface ResourceRequested[uint8_t id];
} uses {
interface RadioRx as PhyRx;
interface RadioTx as PhyTx;
interface UnslottedCsmaCa as PhyUnslottedCsmaCa;
interface RadioOff as PhyRadioOff;
interface Get<bool> as RadioPromiscuousMode;
+ interface ResourceConfigure[uint8_t id];
interface Leds;
}
}
PhyRadioOff = RadioControlImplP.PhyRadioOff;
RadioPromiscuousMode = RadioControlImplP;
Leds = RadioControlImplP;
- LedsRadioClient = Leds;
- components new SimpleRoundRobinTransferArbiterC(IEEE802154_RADIO_RESOURCE) as Arbiter;
- Token = Arbiter;
- TokenRequested = Arbiter;
- TokenTransferControl = Arbiter;
- IsResourceRequested = Arbiter;
+ components MainC;
+ components new RoundRobinResourceQueueC(uniqueCount(IEEE802154_RADIO_RESOURCE)) as Queue;
+ components new SimpleTransferArbiterP() as Arbiter;
+
+ MainC.SoftwareInit -> Queue;
+
+ TransferableResource = Arbiter;
+ ResourceRequested = Arbiter;
RadioControlImplP.ArbiterInfo -> Arbiter;
+ ResourceConfigure = Arbiter;
+
+ Arbiter.Queue -> Queue;
}