]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/rf212/RF212ActiveMessageP.nc
make the software ack timeout configurable
[tinyos-2.x.git] / tos / chips / rf2xx / rf212 / RF212ActiveMessageP.nc
index 86e74556f32ed5c6fdfe508b63dbc9e2215d1593..f5a47923ae3963a125867813d358a53b93b12a50 100644 (file)
@@ -118,14 +118,20 @@ implementation
                call IEEE154MessageLayer.createAckReply(data, ack);
        }
 
+#ifndef SOFTWAREACK_TIMEOUT
+#define SOFTWAREACK_TIMEOUT    1000
+#endif
+
        async command uint16_t SoftwareAckConfig.getAckTimeout()
        {
-               return (uint16_t)(800 * RADIO_ALARM_MICROSEC);
+               return (uint16_t)(SOFTWAREACK_TIMEOUT * RADIO_ALARM_MICROSEC);
        }
 
        tasklet_async command void SoftwareAckConfig.reportChannelError()
        {
+#ifdef TRAFFIC_MONITOR
                signal TrafficMonitorConfig.channelError();
+#endif
        }
 
 /*----------------- UniqueConfig -----------------*/
@@ -147,7 +153,9 @@ implementation
 
        tasklet_async command void UniqueConfig.reportChannelError()
        {
+#ifdef TRAFFIC_MONITOR
                signal TrafficMonitorConfig.channelError();
+#endif
        }
 
 /*----------------- ActiveMessageConfig -----------------*/
@@ -220,11 +228,6 @@ implementation
                return call IEEE154MessageLayer.getSrcAddr(msg);
        }
 
-       tasklet_async command void TrafficMonitorConfig.timerTick()
-       {
-               signal SlottedCollisionConfig.timerTick();
-       }
-
 /*----------------- RandomCollisionConfig -----------------*/
 
        /*
@@ -300,8 +303,6 @@ implementation
                return (uint16_t)(2 * 7 * 32 * RADIO_ALARM_MICROSEC);
        }
 
-       default tasklet_async event void SlottedCollisionConfig.timerTick() { }
-
 /*----------------- Dummy -----------------*/
 
        async command void DummyConfig.nothing()