Changeset 199


Ignore:
Timestamp:
10/07/09 22:41:53 (4 years ago)
Author:
thomas
Message:

cleaned the code (aesthetics)

Location:
apps/TSCH
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • apps/TSCH/TSCHP.nc

    r196 r199  
    7272 
    7373   task void addReservation() { 
    74          call ReservationUpdate.addSlot(nextHop.neighbor); 
     74      call ReservationUpdate.addSlot(nextHop.neighbor); 
    7575   } 
    7676 
    7777   task void removeReservation() { 
    78        call ReservationUpdate.removeSlot(nextHop.neighbor); 
     78      call ReservationUpdate.removeSlot(nextHop.neighbor); 
    7979   } 
    8080 
     
    165165   } 
    166166 
    167    //Notify 
     167   //Notify (button pressed) 
    168168   event void Notify.notify(button_state_t val) { 
    169169      if (val==TRUE) { 
     
    171171            post printDebug(); 
    172172         } else { 
    173            call TimerSend.startOneShot(2*((call Random.rand16())%SEND_PERIOD_MS)); 
     173            call TimerSend.startOneShot(2*((call Random.rand16())%SEND_PERIOD_MS)); 
    174174         } 
    175175      } 
  • apps/TSCH/cellusage/CellUsageP.nc

    r192 r199  
    1414} 
    1515implementation { 
     16   /*-------------------------------- variables -----------------------------------------*/ 
     17 
    1618   cellUsageInformation cellTable[LENGTHCELLFRAME]; 
    1719   bool cellStatsBusy; 
     
    1921   bool cellStatsACK; 
    2022 
    21    /***************************** prototypes *******************************/ 
     23   /*-------------------------------- prototypes ----------------------------------------*/ 
    2224 
    2325   task void printTable(); 
     
    3840   channelOffset_t  getCellChannelOffset(slotOffset_t slotOffset); 
    3941 
    40    /***************************** interfaces *******************************/ 
     42   /*-------------------------------- helper functions ----------------------------------*/ 
     43 
     44   task void cellStatsUpdate() { 
     45      cellType_t type = getCellType(cellStatsSlotOffset); 
     46      if (type==CELLTYPE_OFF || type==CELLTYPE_RESERVED){ 
     47         //not an error, this happens for the first ADv received 
     48         return; 
     49      } 
     50      incrementNumUsed(cellStatsSlotOffset); 
     51      updateLastUsedTimestamp(cellStatsSlotOffset); 
     52      if (cellStatsACK==TRUE) { 
     53         incrementNumACK(cellStatsSlotOffset); 
     54      } 
     55      cellStatsBusy = FALSE; 
     56   } 
     57 
     58   task void printTable() { 
     59      //TBC       
     60      signal DebugPrint.done(); 
     61   } 
     62 
     63   void setCellType(slotOffset_t slotOffset, cellType_t type) { 
     64      cellTable[slotOffset].myActivity = (cellTable[slotOffset].myActivity & ~0x70) |  (type<<4); 
     65      initCellStats(slotOffset); 
     66   } 
     67 
     68   void setCellNeighbor(slotOffset_t slotOffset, uint16_t neighborId) { 
     69      cellTable[slotOffset].neighbor=neighborId; 
     70   } 
     71 
     72   void setCellChannelOffset(slotOffset_t slotOffset, channelOffset_t channelOffset) { 
     73      cellTable[slotOffset].myActivity = (cellTable[slotOffset].myActivity & ~0x0F) | channelOffset; 
     74   } 
     75 
     76   void incrementNumUsed(slotOffset_t slotOffset) { 
     77      if (cellTable[slotOffset].numUsed<0xFF) { 
     78         cellTable[slotOffset].numUsed++; 
     79      } 
     80   } 
     81 
     82   void incrementNumACK(slotOffset_t slotOffset) { 
     83      if (cellTable[slotOffset].numUsed<0xFF) { 
     84         cellTable[slotOffset].numACK++; 
     85      } 
     86   } 
     87 
     88   void updateLastUsedTimestamp(slotOffset_t slotOffset) { 
     89      cellTable[slotOffset].lastUsedTimestamp=(call GlobalTime.getLocalTime()); 
     90   } 
     91 
     92   cellType_t getCellType(slotOffset_t slotOffset) { 
     93      if (call GlobalSync.isSync()==FALSE){ 
     94         return CELLTYPE_ADV; 
     95      } 
     96      return (cellTable[slotOffset].myActivity & 0x70)>>4; 
     97   } 
     98 
     99   uint16_t getCellNeighbor(slotOffset_t slotOffset) { 
     100      if (call GlobalSync.isSync()==FALSE){ 
     101         return 0; 
     102      } 
     103      return cellTable[slotOffset].neighbor; 
     104   } 
     105 
     106   channelOffset_t getCellChannelOffset(slotOffset_t slotOffset) { 
     107      if (call GlobalSync.isSync()==FALSE){ 
     108         return 0; 
     109      } 
     110      return (cellTable[slotOffset].myActivity & 0x0F); 
     111   } 
     112 
     113   uint8_t getNumUsed(slotOffset_t slotOffset) { 
     114      return cellTable[slotOffset].numUsed; 
     115   } 
     116 
     117   uint8_t getNumACK(slotOffset_t slotOffset) { 
     118      return cellTable[slotOffset].numACK; 
     119   } 
     120 
     121   uint32_t getLastUsedTimestamp(slotOffset_t slotOffset) { 
     122      return cellTable[slotOffset].lastUsedTimestamp; 
     123   } 
     124 
     125   void initCellStats(slotOffset_t slotOffset) { 
     126      cellTable[slotOffset].numUsed = 0; 
     127      cellTable[slotOffset].numACK = 0; 
     128      cellTable[slotOffset].lastUsedTimestamp = 0; 
     129   } 
     130 
     131   void initCellTable() { 
     132      slotOffset_t slotCounter; 
     133      //all slots OFF 
     134      for (slotCounter=0;slotCounter<LENGTHCELLFRAME;slotCounter++){ 
     135         setCellNeighbor(slotCounter,0); 
     136         setCellType(slotCounter,CELLTYPE_OFF); 
     137         setCellChannelOffset(slotCounter,0); 
     138         initCellStats(slotCounter); 
     139      } 
     140      //set CELLTYPE_ADV slot 
     141      setCellType(ADVSLOTOFFSET,CELLTYPE_ADV); 
     142      setCellChannelOffset(ADVSLOTOFFSET,ADVRESCHANNELOFFSET); 
     143      //set CELLTYPE_RXRES slot 
     144      slotCounter=ADVSLOTOFFSET; 
     145      while (slotCounter==ADVSLOTOFFSET) { 
     146         slotCounter=(call Random.rand16())%LENGTHCELLFRAME; 
     147      } 
     148      setCellType(slotCounter,CELLTYPE_RXRES); 
     149      setCellChannelOffset(slotCounter,ADVRESCHANNELOFFSET); 
     150   } 
     151 
     152   /*-------------------------------- interfaces ----------------------------------------*/ 
    41153 
    42154   //SoftwareInit 
     
    263375      //don't do anything. Should only be implemented by SlotEngineC 
    264376   } 
    265  
    266    /***************************** helper functions *******************************/ 
    267  
    268    task void cellStatsUpdate() { 
    269       cellType_t type = getCellType(cellStatsSlotOffset); 
    270       if (type==CELLTYPE_OFF || type==CELLTYPE_RESERVED){ 
    271          //not an error, this happens for the first ADv received 
    272          return; 
    273       } 
    274       incrementNumUsed(cellStatsSlotOffset); 
    275       updateLastUsedTimestamp(cellStatsSlotOffset); 
    276       if (cellStatsACK==TRUE) { 
    277          incrementNumACK(cellStatsSlotOffset); 
    278       } 
    279       cellStatsBusy = FALSE; 
    280    } 
    281  
    282    task void printTable() { 
    283       //TBC       
    284       signal DebugPrint.done(); 
    285    } 
    286  
    287    void setCellType(slotOffset_t slotOffset, cellType_t type) { 
    288       cellTable[slotOffset].myActivity = (cellTable[slotOffset].myActivity & ~0x70) |  (type<<4); 
    289       initCellStats(slotOffset); 
    290    } 
    291  
    292    void setCellNeighbor(slotOffset_t slotOffset, uint16_t neighborId) { 
    293       cellTable[slotOffset].neighbor=neighborId; 
    294    } 
    295  
    296    void setCellChannelOffset(slotOffset_t slotOffset, channelOffset_t channelOffset) { 
    297       cellTable[slotOffset].myActivity = (cellTable[slotOffset].myActivity & ~0x0F) | channelOffset; 
    298    } 
    299  
    300    void incrementNumUsed(slotOffset_t slotOffset) { 
    301       if (cellTable[slotOffset].numUsed<0xFF) { 
    302          cellTable[slotOffset].numUsed++; 
    303       } 
    304    } 
    305  
    306    void incrementNumACK(slotOffset_t slotOffset) { 
    307       if (cellTable[slotOffset].numUsed<0xFF) { 
    308          cellTable[slotOffset].numACK++; 
    309       } 
    310    } 
    311  
    312    void updateLastUsedTimestamp(slotOffset_t slotOffset) { 
    313       cellTable[slotOffset].lastUsedTimestamp=(call GlobalTime.getLocalTime()); 
    314    } 
    315  
    316    cellType_t getCellType(slotOffset_t slotOffset) { 
    317       if (call GlobalSync.isSync()==FALSE){ 
    318          return CELLTYPE_ADV; 
    319       } 
    320       return (cellTable[slotOffset].myActivity & 0x70)>>4; 
    321    } 
    322  
    323    uint16_t getCellNeighbor(slotOffset_t slotOffset) { 
    324       if (call GlobalSync.isSync()==FALSE){ 
    325          return 0; 
    326       } 
    327       return cellTable[slotOffset].neighbor; 
    328    } 
    329  
    330    channelOffset_t getCellChannelOffset(slotOffset_t slotOffset) { 
    331       if (call GlobalSync.isSync()==FALSE){ 
    332          return 0; 
    333       } 
    334       return (cellTable[slotOffset].myActivity & 0x0F); 
    335    } 
    336  
    337    uint8_t getNumUsed(slotOffset_t slotOffset) { 
    338       return cellTable[slotOffset].numUsed; 
    339    } 
    340  
    341    uint8_t getNumACK(slotOffset_t slotOffset) { 
    342       return cellTable[slotOffset].numACK; 
    343    } 
    344  
    345    uint32_t getLastUsedTimestamp(slotOffset_t slotOffset) { 
    346       return cellTable[slotOffset].lastUsedTimestamp; 
    347    } 
    348  
    349    void initCellStats(slotOffset_t slotOffset) { 
    350       cellTable[slotOffset].numUsed = 0; 
    351       cellTable[slotOffset].numACK = 0; 
    352       cellTable[slotOffset].lastUsedTimestamp = 0; 
    353    } 
    354  
    355    void initCellTable() { 
    356       slotOffset_t slotCounter; 
    357       //all slots OFF 
    358       for (slotCounter=0;slotCounter<LENGTHCELLFRAME;slotCounter++){ 
    359          setCellNeighbor(slotCounter,0); 
    360          setCellType(slotCounter,CELLTYPE_OFF); 
    361          setCellChannelOffset(slotCounter,0); 
    362          initCellStats(slotCounter); 
    363       } 
    364       //set CELLTYPE_ADV slot 
    365       setCellType(ADVSLOTOFFSET,CELLTYPE_ADV); 
    366       setCellChannelOffset(ADVSLOTOFFSET,ADVRESCHANNELOFFSET); 
    367       //set CELLTYPE_RXRES slot 
    368       slotCounter=ADVSLOTOFFSET; 
    369       while (slotCounter==ADVSLOTOFFSET) { 
    370          slotCounter=(call Random.rand16())%LENGTHCELLFRAME; 
    371       } 
    372       setCellType(slotCounter,CELLTYPE_RXRES); 
    373       setCellChannelOffset(slotCounter,ADVRESCHANNELOFFSET); 
    374    } 
    375377} 
  • apps/TSCH/debugwsn.py

    r192 r199  
    77 
    88root=Tk() 
    9 root.title("Wireless Sensor Network Debugging Tool") 
     9root.title("Wireless Sensor Network Debugger") 
    1010 
    1111#========================= helper functions ========================== 
  • apps/TSCH/forwarding/ForwardingP.nc

    r192 r199  
    1212} 
    1313implementation { 
     14   /*-------------------------------- variables -----------------------------------------*/ 
     15 
    1416   message_t* current_msg; 
    1517   error_t current_error; 
    1618   bool busy; 
    1719 
     20   /*-------------------------------- prototypes ----------------------------------------*/ 
     21 
     22   task void signalSendDone(); 
     23   task void printDebug(); 
     24 
     25   /*-------------------------------- helper functions ----------------------------------*/ 
    1826   task void signalSendDone(){ 
    1927      signal SentFromUpper.sendDone(current_msg,current_error); 
     
    2129   } 
    2230 
    23    task void printDebug(){ 
     31   task void printDebug() { 
    2432      signal DebugPrint.done(); 
    2533   } 
     34 
     35   /*-------------------------------- interfaces ----------------------------------------*/ 
    2636 
    2737   //SoftwareInit 
  • apps/TSCH/idmanager/IDManagerP.nc

    r196 r199  
    66} 
    77implementation { 
     8   /*-------------------------------- variables -----------------------------------------*/ 
     9 
    810   uint16_t myID; 
    911   uint16_t myPANID; 
    1012   bool isSink; 
     13 
     14   /*-------------------------------- interfaces ----------------------------------------*/ 
    1115 
    1216   //SoftwareInit 
  • apps/TSCH/keepalive/KeepAliveC.nc

    r192 r199  
    1010} 
    1111implementation { 
     12   /*-------------------------------- variables -----------------------------------------*/ 
     13 
    1214   message_t pkt; 
    1315   bool busy; 
     16 
     17   /*-------------------------------- prototypes ----------------------------------------*/ 
     18 
     19   task void sendKeepAlive(); 
     20 
     21   /*-------------------------------- helper functions ----------------------------------*/ 
    1422 
    1523   task void sendKeepAlive() { 
     
    2937      } 
    3038   } 
     39 
     40   /*-------------------------------- interfaces ----------------------------------------*/ 
    3141 
    3242   //SoftwareInit 
  • apps/TSCH/multiplex/MultiplexC.nc

    r192 r199  
    1010} 
    1111implementation { 
     12   /*-------------------------------- interfaces ----------------------------------------*/ 
    1213 
    1314   //ReceiveAll 
  • apps/TSCH/neighbors/NeighborsP.nc

    r192 r199  
    1919} 
    2020implementation { 
     21   /*-------------------------------- variables -----------------------------------------*/ 
     22 
    2123   neighborEntry_t neighbors[MAXNUMNEIGHBORS]; 
    2224 
     25   /*-------------------------------- prototypes ----------------------------------------*/ 
     26 
     27   void updateStatsAtTx(uint16_t dest, bool ack, uint32_t timestamp, error_t error); 
     28   bool isNeighborFunction(uint16_t neighbor); 
    2329   task void printTable(); 
     30 
     31   /*-------------------------------- helper functions ----------------------------------*/ 
    2432 
    2533   void updateStatsAtTx(uint16_t dest, bool ack, uint32_t timestamp, error_t error){ 
     
    5058   } 
    5159 
     60   task void printTable() { 
     61      //TBC 
     62      signal DebugPrint.done(); 
     63   } 
     64 
     65   /*-------------------------------- interfaces ----------------------------------------*/ 
     66 
    5267   //SoftwareInit 
    5368   command error_t SoftwareInit.init() { 
     
    146161   } 
    147162 
    148    //Receive 
     163   //ReceiveADV 
    149164   event message_t* ReceiveADV.receive(message_t *msg,void *payload,uint8_t len) { 
    150165      uint8_t i=0; 
     
    204219      return msg; 
    205220   } 
    206     
     221 
    207222   //IndicateRx 
    208223   event void IndicateRx.indicate(uint16_t src, uint32_t timestamp, uint16_t rssi){ 
     
    225240   } 
    226241 
     242   //SendDATA 
    227243   event void SendDATA.sendDone(message_t *msg, error_t error) { 
    228244      updateStatsAtTx(((cc2420_header_t*)msg->header)->dest, 
     
    231247            error); 
    232248   } 
     249 
     250   //SendRES 
    233251   event void SendRES.sendDone(message_t *msg, error_t error) { 
    234252      updateStatsAtTx(((cc2420_header_t*)msg->header)->dest, 
     
    237255            error); 
    238256   } 
     257 
     258   //SendADV 
    239259   event void SendADV.sendDone(message_t *msg, error_t error) { 
    240260   } 
     261 
     262   //SendKA 
    241263   event void SendKA.sendDone(message_t *msg, error_t error) { 
    242264      updateStatsAtTx(((cc2420_header_t*)msg->header)->dest, 
     
    254276      post printTable(); 
    255277   } 
    256  
    257    task void printTable() { 
    258       //TBC 
    259       signal DebugPrint.done(); 
    260    } 
    261278} 
  • apps/TSCH/reservation/ReservationP.nc

    r192 r199  
    1616} 
    1717implementation { 
     18   /*-------------------------------- variables -----------------------------------------*/ 
     19 
    1820   ongoingRes_t ongoingRes[NUMONGOINGRES]; 
    1921 
     22   /*-------------------------------- prototypes ----------------------------------------*/ 
     23 
     24   bool registerRES(uint16_t neighbor,uint8_t type,bool randomCell,slotOffset_t slotOffset,channelOffset_t channelOffset,bool localRequester); 
    2025   task void processOngoingRes(); 
    2126   task void printTable(); 
     27 
     28   /*-------------------------------- helper functions ----------------------------------*/ 
    2229 
    2330   bool registerRES(uint16_t neighbor, uint8_t type, bool randomCell, slotOffset_t slotOffset, 
     
    205212      return; 
    206213   } 
     214 
     215   task void printTable() { 
     216      //TBC 
     217      signal DebugPrint.done(); 
     218   } 
     219 
     220   /*-------------------------------- interfaces ----------------------------------------*/ 
    207221 
    208222   //SoftwareInit 
     
    289303   } 
    290304 
    291    //Send 
     305   //SimpleSend 
    292306   event void SimpleSend.sendDone(message_t *msg, error_t error) { 
    293307      uint8_t i=0; 
     
    344358      post printTable(); 
    345359   } 
    346  
    347    task void printTable() { 
    348       //TBC 
    349       signal DebugPrint.done(); 
    350    } 
    351360} 
  • apps/TSCH/serialio/SerialIOP.nc

    r196 r199  
    2727   bool allowedToUse; 
    2828   bool mode; 
     29 
     30   /*-------------------------------- prototypes ----------------------------------------*/ 
     31 
     32   uint16_t output_buffer_index_write_increment(); 
     33   uint16_t output_buffer_index_read_increment(); 
    2934 
    3035   /*------------------- helper functions ---------------------------*/ 
  • apps/TSCH/slotengine/SlotEngineP.nc

    r196 r199  
    11#include "CC2420.h" 
    22#include "TSCH.h" 
     3 
     4//slot states 
     5enum { 
     6   //startup 
     7   S_SETTING_CHAN, 
     8   S_STARTING, 
     9   S_STARTED, 
     10   //synchronizing 
     11   S_SYNCHRONIZING, 
     12   //transmitter 
     13   S_TXDATA, 
     14   S_WAIT_RXACK, 
     15   S_RXACK, 
     16   //receiver 
     17   S_RXDATA, 
     18   S_WAIT_TXACK, 
     19   S_TXACK, 
     20   //cooldown 
     21   S_STOPPING, 
     22   S_SLEEP 
     23}; 
    324 
    425module SlotEngineP @safe() { 
     
    2950 
    3051   /*------------------------------ variables ----------------------------------*/ 
    31    //slot states 
    32    enum { 
    33       //startup 
    34       S_SETTING_CHAN, 
    35       S_STARTING, 
    36       S_STARTED, 
    37       //synchronizing 
    38       S_SYNCHRONIZING, 
    39       //transmitter 
    40       S_TXDATA, 
    41       S_WAIT_RXACK, 
    42       S_RXACK, 
    43       //receiver 
    44       S_RXDATA, 
    45       S_WAIT_TXACK, 
    46       S_TXACK, 
    47       //cooldown 
    48       S_STOPPING, 
    49       S_SLEEP 
    50    }; 
    5152 
    5253   uint32_t timeReference; 
     
    6667   uint8_t lenval; 
    6768 
    68    task void printDebug(){ 
    69       signal DebugPrint.done(); 
    70    } 
    71  
    7269   /*------------------------------ prototypes ----------------------------------------*/ 
    7370 
    7471   void toggle_Port35_n_times(uint8_t num_times); 
     72   task void printDebug(); 
    7573   task void startSlotTask(); 
    7674   task void receiveTask(); 
     
    8482         num_times--; 
    8583      } 
     84   } 
     85 
     86   task void printDebug() { 
     87      //TBC 
     88      signal DebugPrint.done(); 
    8689   } 
    8790 
     
    399402      } 
    400403   } 
    401  
    402404   event void SubControl.stopDone(error_t error) { 
    403405      switch (state) { 
  • apps/TSCH/testlowertsch/TestLowerTSCHC.nc

    r197 r199  
    2222} 
    2323implementation { 
     24   /*-------------------------------- variables -----------------------------------------*/ 
     25 
    2426   message_t data_pkt; 
    2527   message_t adv_pkt; 
    2628   bool already_sent; 
     29 
     30   /*-------------------------------- interfaces ----------------------------------------*/ 
    2731 
    2832   //Boot 
     
    221225   event void DebugPrintSlotEngine.done() { 
    222226   } 
     227 
    223228   //DebugPrintGlobalTime 
    224229   event void DebugPrintGlobalTime.done() { 
  • apps/TSCH/tschqueue/TSCHQueueP.nc

    r196 r199  
    1616} 
    1717implementation { 
     18   /*-------------------------------- variables -----------------------------------------*/ 
     19 
    1820   TSCHQueueEntry_t queue[QUEUELENGTH]; 
    1921   message_t* current_msg; 
     
    2123   bool busy; 
    2224 
     25   /*-------------------------------- prototypes ----------------------------------------*/ 
     26 
     27   error_t putInQueue(message_t* msg); 
     28   task void cancelAll(); 
     29   task void sendDoneTaskDATA(); 
     30   task void sendDoneTaskKA(); 
     31   task void sendDoneTaskRES(); 
     32   task void sendDoneTaskADV(); 
     33   void informRequester(); 
    2334   task void printTable(); 
    24    void informRequester(); 
     35 
     36   /*-------------------------------- helper functions ----------------------------------*/ 
    2537 
    2638   error_t putInQueue(message_t* msg) { 
     
    7890   } 
    7991 
    80    task void sendDoneTaskDATA(){ 
     92   task void sendDoneTaskDATA() { 
    8193      signal SendDATA.sendDone(current_msg,current_error); 
    8294      busy=FALSE; 
    8395   } 
    8496 
    85    task void sendDoneTaskKA(){ 
     97   task void sendDoneTaskKA() { 
    8698      signal SendKA.sendDone(current_msg,current_error); 
    8799      busy=FALSE; 
     
    97109      busy=FALSE; 
    98110   } 
     111 
     112   void informRequester() { 
     113      switch(((cc2420_header_t*)current_msg->header)->type){ 
     114         case AM_TSCH_DATA: 
     115            if(((cc2420_header_t*)current_msg->header)->length==sizeof(cc2420_header_t)+1) {//KA 
     116               busy = TRUE; 
     117               post sendDoneTaskKA(); 
     118            } else {//DATA 
     119               busy = TRUE; 
     120               post sendDoneTaskDATA(); 
     121            } 
     122            break; 
     123         case AM_TSCH_RES: 
     124            busy = TRUE; 
     125            post sendDoneTaskRES(); 
     126            break; 
     127         case AM_TSCH_ADV: 
     128            busy = TRUE; 
     129            post sendDoneTaskADV(); 
     130            break; 
     131         case AM_TSCH_ACK: 
     132         default: 
     133            call SerialIO.printError(COMPONENT_TSCHQUEUE,ERR_MSG_UNKNOWN_TYPE,(uint16_t)((cc2420_header_t*)current_msg->header)->type,0); 
     134            return; 
     135      } 
     136   } 
     137 
     138   task void printTable() { 
     139      //TBC 
     140      signal DebugPrint.done(); 
     141   } 
     142 
     143   /*-------------------------------- interfaces ----------------------------------------*/ 
    99144 
    100145   //SoftwareInit 
     
    263308   } 
    264309 
    265    void informRequester() { 
    266       switch(((cc2420_header_t*)current_msg->header)->type){ 
    267          case AM_TSCH_DATA: 
    268             if(((cc2420_header_t*)current_msg->header)->length==sizeof(cc2420_header_t)+1) {//KA 
    269                busy = TRUE; 
    270                post sendDoneTaskKA(); 
    271             } else {//DATA 
    272                busy = TRUE; 
    273                post sendDoneTaskDATA(); 
    274             } 
    275             break; 
    276          case AM_TSCH_RES: 
    277             busy = TRUE; 
    278             post sendDoneTaskRES(); 
    279             break; 
    280          case AM_TSCH_ADV: 
    281             busy = TRUE; 
    282             post sendDoneTaskADV(); 
    283             break; 
    284          case AM_TSCH_ACK: 
    285          default: 
    286             call SerialIO.printError(COMPONENT_TSCHQUEUE,ERR_MSG_UNKNOWN_TYPE,(uint16_t)((cc2420_header_t*)current_msg->header)->type,0); 
    287             return; 
    288       } 
    289    } 
    290  
    291310   //DebugPrint 
    292311   command void DebugPrint.print() { 
     
    294313   } 
    295314 
    296    task void printTable() { 
    297       //TBC 
    298       signal DebugPrint.done(); 
    299    } 
    300  
    301315   //GlobalTime 
    302316   async event void GlobalTime.newSlot(uint32_t newASN) { 
Note: See TracChangeset for help on using the changeset viewer.