implementation {
enum {
- TINYOS_N_NETWORKS = uniqueCount("RADIO_SEND_RESOURCE"),
+ TINYOS_N_NETWORKS = uniqueCount(RADIO_SEND_RESOURCE),
};
components MainC;
enum {
OWNER_NONE = 0xff,
- TINYOS_N_NETWORKS = uniqueCount("RADIO_SEND_RESOURCE"),
+ TINYOS_N_NETWORKS = uniqueCount(RADIO_SEND_RESOURCE),
} state;
norace uint8_t resource_owner = OWNER_NONE, next_owner;
#ifndef IEEE154FRAMES_ENABLED
#ifndef TFRAMES_ENABLED
components new AutoResourceAcquireLayerC();
- AutoResourceAcquireLayerC.Resource -> SendResourceC.Resource[unique("RADIO_SEND_RESOURCE")];
+ AutoResourceAcquireLayerC.Resource -> SendResourceC.Resource[unique(RADIO_SEND_RESOURCE)];
#else
components new DummyLayerC() as AutoResourceAcquireLayerC;
#endif
// -------- RadioSend Resource
#ifndef TFRAMES_ENABLED
- components new SimpleFcfsArbiterC("RADIO_SEND_RESOURCE") as SendResourceC;
+ components new SimpleFcfsArbiterC(RADIO_SEND_RESOURCE) as SendResourceC;
SendResource = SendResourceC;
// -------- Ieee154 Message
#ifndef IEEE154FRAMES_ENABLED
#ifndef TFRAMES_ENABLED
components new AutoResourceAcquireLayerC();
- AutoResourceAcquireLayerC.Resource -> SendResourceC.Resource[unique("RADIO_SEND_RESOURCE")];
+ AutoResourceAcquireLayerC.Resource -> SendResourceC.Resource[unique(RADIO_SEND_RESOURCE)];
#else
components new DummyLayerC() as AutoResourceAcquireLayerC;
#endif
// -------- RadioSend Resource
#ifndef TFRAMES_ENABLED
- components new SimpleFcfsArbiterC("RADIO_SEND_RESOURCE") as SendResourceC;
+ components new SimpleFcfsArbiterC(RADIO_SEND_RESOURCE) as SendResourceC;
SendResource = SendResourceC;
// -------- Ieee154 Message
#else
components ResourceSendP;
ResourceSendP.SubSend -> MessageC;
- ResourceSendP.Resource -> MessageC.SendResource[unique("RADIO_SEND_RESOURCE")];
+ ResourceSendP.Resource -> MessageC.SendResource[unique(RADIO_SEND_RESOURCE)];
IPDispatchP.Ieee154Send -> ResourceSendP.Ieee154Send;
#endif
nx_uint8_t metadata[sizeof(message_metadata_t)];
} message_t;
+/*
+ * This resource is used to arbitrate access between ActiveMessageC,
+ * Ieee154MessageC and possibly future MessageC components to the
+ * underlying radio driver.
+ */
+#define RADIO_SEND_RESOURCE "RADIO_SEND_RESOURCE"
+
#endif