]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/TKN154_MAC.h
1) simplified the resource transfer: removed ResourceTransfer* interfaces and corresp...
[tinyos-2.x.git] / tos / lib / mac / tkn154 / TKN154_MAC.h
index 64d6af061e560e56fef9fa0f87eb19da5b857b8f..965e4c7534e98f1cb391a1067c1c56f894b81358 100644 (file)
@@ -135,6 +135,27 @@ enum {
 #define IEEE802154_RADIO_RESOURCE "RadioRxTxP.resource"
 
 enum {
+  // The following identfiers map to components that access the radio
+  // via RadioClientC(). They are used as parameters for RadioClientC(),
+  // the TransferableResource.transferTo() command and in
+  // the TransferableResource.transferredFrom() event
+
+  RADIO_CLIENT_SCAN = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_PIB = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_PROMISCUOUSMODE = unique(IEEE802154_RADIO_RESOURCE),
+
+  RADIO_CLIENT_BEACONTRANSMIT = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_COORDBROADCAST = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_COORDCAP = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_COORDCFP = unique(IEEE802154_RADIO_RESOURCE),
+
+  RADIO_CLIENT_BEACONSYNCHRONIZE = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_DEVICECAP = unique(IEEE802154_RADIO_RESOURCE),
+  RADIO_CLIENT_DEVICECFP = unique(IEEE802154_RADIO_RESOURCE),
+};
+
+enum {
+  // parameter for the generic DispatchSlottedCsmaP
   OUTGOING_SUPERFRAME,
   INCOMING_SUPERFRAME,
 };
@@ -258,6 +279,13 @@ enum {
   IEEE154_aUnitBackoffPeriod           = 20,
 };
 
+// combine function for IsRadioTokenRequested (GetNow) interface
+typedef bool token_requested_t __attribute__((combine(rcombine)));
+token_requested_t rcombine(token_requested_t r1, token_requested_t r2)
+{
+  return r1 && r2;
+}
+
 #ifdef TKN154_DEBUG
 
   /******************************************************************