]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/tda5250/mac/RedMacC.nc
- instrumented for performance evaluation
[tinyos-2.x.git] / tos / chips / tda5250 / mac / RedMacC.nc
index f3beede09938aec5b3d34a213d0097b533b68058..469fe5ce431e612f256471973fd93b5d3b44cff0 100644 (file)
  * ========================================================================
  */
 
+// #define REDMAC_DEBUG
+
+#ifdef REDMAC_PERFORMANCE
+#include <Performance.h>
+#endif
 
 configuration RedMacC {
   provides {
@@ -41,7 +46,7 @@ configuration RedMacC {
     interface MacReceive;
     interface Packet;
     interface LocalTime<T32khz> as LocalTime;
-    interface SleepTime;
+    interface Sleeptime;
     interface ChannelCongestion;
   }
   uses {
@@ -57,11 +62,10 @@ implementation {
     components  MainC,
         RedMacP,
         RssiFixedThresholdCMC as Cca,
-        new Alarm32khzC() as Timer,
-        new Alarm32khzC() as SampleTimer,
+        new Alarm32khz16C() as Timer,
+        new Alarm32khz16C() as SampleTimer,
         RandomLfsrC,
-        McuSleepC,
-        Counter32khzC;
+        Counter32khz16C as Counter;
     
     components ActiveMessageAddressC;
     RedMacP.amAddress -> ActiveMessageAddressC;
@@ -69,7 +73,6 @@ implementation {
     MainC.SoftwareInit -> RedMacP;
               
     SplitControl = RedMacP;
-    McuSleepC.McuPowerOverride -> RedMacP;
     MacSend = RedMacP;
     MacReceive = RedMacP;
     Tda5250Control = RedMacP;
@@ -82,7 +85,7 @@ implementation {
     RedMacP = PacketReceive;
     RedMacP = SubPacket;
     RedMacP = Packet;
-    RedMacP = SleepTime;
+    RedMacP = Sleeptime;
     
     RedMacP.CcaStdControl -> Cca.StdControl;
     RedMacP.ChannelMonitor -> Cca.ChannelMonitor;
@@ -95,13 +98,22 @@ implementation {
 
     RedMacP.Timer -> Timer;
     RedMacP.SampleTimer -> SampleTimer;
-    RedMacP.Counter32khz16 -> Counter32khzC.Counter32khz16;
-/*    
-    components PlatformLedsC;
+    RedMacP.Counter32khz16 -> Counter;
+    
+/*    components PlatformLedsC;
     RedMacP.Led0 -> PlatformLedsC.Led0;
     RedMacP.Led1 -> PlatformLedsC.Led1;
     RedMacP.Led2 -> PlatformLedsC.Led2;
     RedMacP.Led3 -> PlatformLedsC.Led3;
 */
+#ifdef REDMAC_DEBUG
+    components new SerialDebugC() as SD;
+    RedMacP.SerialDebug -> SD;
+#endif
+
+#ifdef REDMAC_PERFORMANCE
+    components new PerformanceC() as Perf;
+    RedMacP.Performance -> Perf;
+#endif
 }