Changeset 207


Ignore:
Timestamp:
10/12/09 17:37:00 (4 years ago)
Author:
thomas
Message:

all line-by-line status transmission done

Location:
apps/TSCH
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/TSCH/debugwsn.py

    r206 r207  
    335335 
    336336def displayOngoingRes(text_tag,input): 
    337    print "new packet" 
    338    print "0:"+input[0] 
    339    for i in range(1,27): 
    340       print str(i)+":"+str(ord(input[i])) 
    341337   #bytes 4 and 5 is the length 
    342338   length = ord(input[4])*256+ord(input[5]) 
     
    366362      #bytes 19,20,21,22 is timestamp 
    367363      output = output + " timestamp="+str(ord(input[22])*256*256*256+ord(input[21])*256*256+ord(input[20])*256+ord(input[19])) #little endian 
    368    print output 
    369364   status_elements[text_tag]["STATUS_RESERVATIONP_ONGOINGRES"].delete(1.0,END) 
    370365   status_elements[text_tag]["STATUS_RESERVATIONP_ONGOINGRES"].insert(END,output) 
     
    384379 
    385380def displayQueue(text_tag,input): 
    386    #bytes 4 and 5 is the length 
    387    length = ord(input[4])*256+ord(input[5]) 
     381   #print "new packet" 
     382   #print "0:"+input[0] 
     383   #for i in range(1,12): 
     384   #   print str(i)+":"+str(ord(input[i])) 
     385   #bytes 4 and 5 is the length 
     386   length = ord(input[4])*256+ord(input[5]) 
     387   #byte 6 is row 
     388   output = "row "+str(ord(input[6]))+":" 
     389   #byte 8 is used 
     390   if (ord(input[8])==0): 
     391      output = output + " unused" 
     392   else: 
     393      #byte 9 is retries 
     394      output = output + " retries=" + str(ord(input[9])) 
    388395   status_elements[text_tag]["STATUS_TSCHQUEUEP_QUEUE"].delete(1.0,END) 
    389    status_elements[text_tag]["STATUS_TSCHQUEUEP_QUEUE"].insert(END,"Queue TBC") 
     396   status_elements[text_tag]["STATUS_TSCHQUEUEP_QUEUE"].insert(END,output) 
    390397 
    391398def parseInput(text_tag,input): 
  • apps/TSCH/reservation/ReservationP.nc

    r206 r207  
    3333      uint8_t i; 
    3434      //make sure neighbor exists and I have TXRES to that neighbor 
    35       if ((call NeighborGet.isNeighbor(neighbor))==FALSE 
    36             || (call CellUsageGet.getCell(CELLTYPE_TXRES, neighbor)).exists==FALSE) { 
     35      if ((call NeighborGet.isNeighbor(neighbor))==FALSE || (call CellUsageGet.getCell(CELLTYPE_TXRES, neighbor)).exists==FALSE) { 
    3736         call SerialIO.printError(COMPONENT_RESERVATION,ERR_NEIGHBOR_NOT_REACHABLE_YET,(uint16_t)neighbor,0); 
    3837         return FAIL; 
  • apps/TSCH/tschqueue/TSCHQueue.h

    r59 r207  
    99} TSCHQueueEntry_t; 
    1010 
     11typedef struct debugTSCHQueueEntry_t { 
     12   uint8_t row; 
     13   TSCHQueueEntry_t queueEntry; 
     14} debugTSCHQueueEntry_t; 
     15 
    1116#endif 
  • apps/TSCH/tschqueue/TSCHQueueP.nc

    r200 r207  
    1919 
    2020   TSCHQueueEntry_t queue[QUEUELENGTH]; 
     21 
     22   uint8_t debugRow; 
    2123   message_t* current_msg; 
    2224   error_t current_error; 
     
    3234   task void sendDoneTaskADV(); 
    3335   void informRequester(); 
    34    task void printTable(); 
     36   task void taskPrintTable(); 
    3537 
    3638   /*-------------------------------- helper functions ----------------------------------*/ 
     
    136138   } 
    137139 
    138    task void printTable() { 
    139       //TBC 
     140   task void taskPrintTable() { 
     141      debugTSCHQueueEntry_t temp; 
     142      temp.row = debugRow; 
     143      temp.queueEntry  = queue[debugRow]; 
     144      call SerialIO.printStatus(STATUS_TSCHQUEUEP_QUEUE,(uint8_t*)&temp,sizeof(debugTSCHQueueEntry_t)); 
     145      debugRow = (debugRow+1)%QUEUELENGTH; 
    140146   } 
    141147 
     
    309315   //DebugPrint 
    310316   command void DebugPrint.print() { 
    311       post printTable(); 
     317      post taskPrintTable(); 
    312318   } 
    313319 
Note: See TracChangeset for help on using the changeset viewer.