]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/rf212/RF212RadioP.nc
Brano says that 20ms is required for ack reception
[tinyos-2.x.git] / tos / chips / rf2xx / rf212 / RF212RadioP.nc
index 699aeb56368d1f3626accc3de66e26e12a7ea1bd..16f93405627d204ecce2bd6d77acd264e63c20bd 100644 (file)
@@ -118,7 +118,7 @@ implementation
        }
 
 #ifndef SOFTWAREACK_TIMEOUT
-#define SOFTWAREACK_TIMEOUT    1000
+#define SOFTWAREACK_TIMEOUT    20000
 #endif
 
        async command uint16_t SoftwareAckConfig.getAckTimeout()
@@ -189,6 +189,14 @@ implementation
                call Ieee154PacketLayer.setDestPan(msg, grp);
        }
 
+       command error_t ActiveMessageConfig.checkFrame(message_t* msg)
+       {
+               if( ! call Ieee154PacketLayer.isDataFrame(msg) )
+                       call Ieee154PacketLayer.createDataFrame(msg);
+
+               return SUCCESS;
+       }
+
 /*----------------- CsmaConfig -----------------*/
 
        async command bool CsmaConfig.requiresSoftwareCCA(message_t* msg)
@@ -312,7 +320,12 @@ implementation
 
 #ifdef LOW_POWER_LISTENING
 
-       async command bool LowPowerListeningConfig.getAckRequired(message_t* msg)
+       command bool LowPowerListeningConfig.needsAutoAckRequest(message_t* msg)
+       {
+               return call Ieee154PacketLayer.getDestAddr(msg) != TOS_BCAST_ADDR;
+       }
+
+       command bool LowPowerListeningConfig.ackRequested(message_t* msg)
        {
                return call Ieee154PacketLayer.getAckRequired(msg);
        }