]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/mac/tkn154/DispatchSlottedCsmaP.nc
Indirect transmissions in nonbeacon-enabled PANs on coordinator side were not properl...
[tinyos-2.x.git] / tos / lib / mac / tkn154 / DispatchSlottedCsmaP.nc
index 9d551042bb4e16dacaea188d9988a73304600a48..eccccc19eb8efdf36c304e813e900f6e05dd21a2 100644 (file)
  * typically switch the radio off unless it has a frame to transmit.
  */
 
-#ifndef IEEE154_BEACON_ENABLED_PAN
-#error "The IEEE154_BEACON_ENABLED_PAN macro MUST be defined when using this component!"
-#endif
-
 generic module DispatchSlottedCsmaP(uint8_t sfDirection)
 {
   provides
@@ -205,7 +201,6 @@ implementation
       m_lastFrame = m_currentFrame;
       m_currentFrame = NULL;
       m_txStatus = IEEE154_NO_BEACON;
-      dbg_serial("DispatchSlottedCsmaP", "CAP component got token, remaining time: %lu\n");
       post signalTxDoneTask();
       return;
     } else if (capDuration < guardTime) {
@@ -644,8 +639,11 @@ implementation
     uint8_t *payload = (uint8_t *) frame->data;
     uint8_t *mhr = MHR(frame);
     uint8_t frameType = mhr[MHR_INDEX_FC1] & FC1_FRAMETYPE_MASK;
+
     if (frameType == FC1_FRAMETYPE_CMD)
       frameType += payload[0];
+    dbg("DispatchSlottedCsmaP", "Received frame, DSN: %lu, type: 0x%lu\n", 
+        (uint32_t) mhr[MHR_INDEX_SEQNO], (uint32_t) frameType);
     atomic {
       if (DEVICE_ROLE && m_indirectTxPending) {
         message_t* frameBuf;