Show
Ignore:
Timestamp:
07/21/09 18:53:43 (15 years ago)
Author:
sriram
Message:

More changes for getting the sync and data going one after the other

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/branches/sriram/benchmark_txrxnode1.py

    r358 r359  
    9494        ######################### traffic ############################ 
    9595        if mode == "traffic": 
    96                 if ok == True: 
     96                (data_header,) = struct.unpack('!s', payload[0]) 
     97                if ok and data_header == 'd': 
    9798                        comm = struct.unpack('!14s', data) 
    9899                        print("received this ", comm)  
     
    313314        ################################################Communications mode#################################### 
    314315        if mode == "traffic": 
    315                 nbytes = 16 
    316                 pkt_size = 16 
     316                print "inside traffic mode \n" 
     317                nbytes = 15 
     318                pkt_size = 15 
    317319                sync_pktno = 0 
    318320                while n < nbytes: 
     
    320322                        if options_tx.from_file is None: 
    321323                                #data = (pkt_size - 2) * chr(data_pktno & 0xff) #0xff is 255 
    322                                 data = 'Hi how are you' #Sending this message 
     324                                data = 'dHi how are you' #Sending this message 
    323325                                #print >> myfile, data 
    324326                                #print "printing data",data,"****\n" 
     
    329331         
    330332                         
    331                         payload = struct.pack('!14s', data) 
     333                        payload = struct.pack('!15s', data) 
    332334                        #print "printing payload",payload,"**\n" 
    333335