Changeset 359 for vtcross/branches/sriram/benchmark_txrxnode1.py
- Timestamp:
- 07/21/09 18:53:43 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/branches/sriram/benchmark_txrxnode1.py
r358 r359 94 94 ######################### traffic ############################ 95 95 if mode == "traffic": 96 if ok == True: 96 (data_header,) = struct.unpack('!s', payload[0]) 97 if ok and data_header == 'd': 97 98 comm = struct.unpack('!14s', data) 98 99 print("received this ", comm) … … 313 314 ################################################Communications mode#################################### 314 315 if mode == "traffic": 315 nbytes = 16 316 pkt_size = 16 316 print "inside traffic mode \n" 317 nbytes = 15 318 pkt_size = 15 317 319 sync_pktno = 0 318 320 while n < nbytes: … … 320 322 if options_tx.from_file is None: 321 323 #data = (pkt_size - 2) * chr(data_pktno & 0xff) #0xff is 255 322 data = ' Hi how are you' #Sending this message324 data = 'dHi how are you' #Sending this message 323 325 #print >> myfile, data 324 326 #print "printing data",data,"****\n" … … 329 331 330 332 331 payload = struct.pack('!1 4s', data)333 payload = struct.pack('!15s', data) 332 334 #print "printing payload",payload,"**\n" 333 335