Changeset 207
- Timestamp:
- 10/12/09 17:37:00 (4 years ago)
- Location:
- apps/TSCH
- Files:
-
- 4 edited
-
debugwsn.py (modified) (3 diffs)
-
reservation/ReservationP.nc (modified) (1 diff)
-
tschqueue/TSCHQueue.h (modified) (1 diff)
-
tschqueue/TSCHQueueP.nc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/TSCH/debugwsn.py
r206 r207 335 335 336 336 def 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]))341 337 #bytes 4 and 5 is the length 342 338 length = ord(input[4])*256+ord(input[5]) … … 366 362 #bytes 19,20,21,22 is timestamp 367 363 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 output369 364 status_elements[text_tag]["STATUS_RESERVATIONP_ONGOINGRES"].delete(1.0,END) 370 365 status_elements[text_tag]["STATUS_RESERVATIONP_ONGOINGRES"].insert(END,output) … … 384 379 385 380 def 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])) 388 395 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) 390 397 391 398 def parseInput(text_tag,input): -
apps/TSCH/reservation/ReservationP.nc
r206 r207 33 33 uint8_t i; 34 34 //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) { 37 36 call SerialIO.printError(COMPONENT_RESERVATION,ERR_NEIGHBOR_NOT_REACHABLE_YET,(uint16_t)neighbor,0); 38 37 return FAIL; -
apps/TSCH/tschqueue/TSCHQueue.h
r59 r207 9 9 } TSCHQueueEntry_t; 10 10 11 typedef struct debugTSCHQueueEntry_t { 12 uint8_t row; 13 TSCHQueueEntry_t queueEntry; 14 } debugTSCHQueueEntry_t; 15 11 16 #endif -
apps/TSCH/tschqueue/TSCHQueueP.nc
r200 r207 19 19 20 20 TSCHQueueEntry_t queue[QUEUELENGTH]; 21 22 uint8_t debugRow; 21 23 message_t* current_msg; 22 24 error_t current_error; … … 32 34 task void sendDoneTaskADV(); 33 35 void informRequester(); 34 task void printTable();36 task void taskPrintTable(); 35 37 36 38 /*-------------------------------- helper functions ----------------------------------*/ … … 136 138 } 137 139 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; 140 146 } 141 147 … … 309 315 //DebugPrint 310 316 command void DebugPrint.print() { 311 post printTable();317 post taskPrintTable(); 312 318 } 313 319
Note: See TracChangeset
for help on using the changeset viewer.
