コード例 #1
0
 def handleStatusAnswer(self,msg,timestamp):
     self.sendSysEx( MSCEIMessage(fromName="D_WAIT"),timestamp=timestamp+1)
     offset= 5 + 3*8
     cc = msg[offset]
     cc_calc = checksum(msg[1:offset])
     if cc == cc_calc:
         self.sendSysEx( MSCEIMessage(fromName="D_ACK"),
                         timestamp=timestamp+2)
         if self.dump_ram:
             self.dump_on = True
             self.startDump("ramdump_%s.bin" % mktimestamp(), 2097060)
             time.sleep(0.1)
             self.sendSysEx( MSCEIMessage(fromName="F_ACK"),
                             timestamp=timestamp+3)
             return True
     else:
         self.sendSysEx( MSCEIMessage(fromName="D_NACK"),
                         timestamp=timestamp+2)
     return False
コード例 #2
0
 def createDumpFile(self,filename=None):
     if not filename:
         timestamp = time.strftime("%Y%m%d%H%M%S")
         filename="dump_%s.bin" % mktimestamp()
     self.dump_file = open(filename,"wb")