def funclet(self): """download and start funclet""" sys.stderr.write("Download and execute of funclet...\n") if len(self.data) > 1: raise JTAGException("don't know how to handle multiple segments in funclets") _parjtag.funclet(self.data[0].data) sys.stderr.write("Funclet OK.\n")
def funclet(self): """download and start funclet""" sys.stderr.write("Download and execute of funclet...\n") if len(self.data) > 1: raise JTAGException( "don't know how to handle multiple segments in funclets") _parjtag.funclet(self.data[0].data) sys.stderr.write("Funclet OK.\n")
def actionFunclet(self): """Download and start funclet""" if self.data is not None: if self.verbose: sys.stderr.write("Download and execute funclet...\n") sys.stderr.flush() if len(self.data) != 1: raise JTAGException("Funclets must have exactly one segment") _parjtag.funclet(self.data[0].data) if self.verbose: sys.stderr.write("Funclet OK.\n") sys.stderr.flush() else: raise JTAGException("No funclet available, set data")
def actionFunclet(self, timeout=1): """Download and start funclet. Timeout in seconds.""" if self.data is not None: if self.verbose: sys.stderr.write("Download and execute funclet...\n") sys.stderr.flush() if len(self.data) != 1: raise JTAGException("Funclets must have exactly one segment") runtime = _parjtag.funclet(self.data[0].data, int(timeout*1000)) / 1000.0 if runtime >= timeout: sys.stderr.write("Funclet stopped on timeout\n") sys.stderr.flush() if self.verbose: sys.stderr.write("Funclet OK (%.2fs).\n" % (runtime,)) sys.stderr.flush() else: raise JTAGException("No funclet available, set data")