def __init__(self, options, outputFolder, scenario='vanet-highway-test-thomas'):
     QRunnable.__init__(self)
     QObject.__init__(self)
     self.options = ''
     self.optionsDict = options
     self.prate = options['prate']
     #print self.optionsDict
     for option in options:
         if option=='vel1' or option=='spl':
             speedInMs = options[option].getValue()*1000/3600
             self.options += ' --%s=%s' % (option, speedInMs)
         else:
             self.options += ' --%s=%s' % (option, options[option])
     self.runNumber = random.randint(1,10000)
     #self.runNumber = 1
     self.options += ' --rn=%d' % self.runNumber   # randomize the results
     self.command = './waf'
     self.scenario = scenario
     self.outputFolder = outputFolder
     settings = {}
     for option in options:
         #self.output['settings'][option+'| '+self.options[option].getName()] = self.options[option].getValue()
         if option=='prate':
             settings[option] = options[option]
         else:
             settings[option] = options[option].getValue()
     self.output = {'scenario':scenario, 'settings':settings,'command':'%s %s%s' % (self.command, ' --run \'', self.scenario+self.options+'\'')}
示例#2
0
    def __init__(self, ui):
        self.logger = LogSystem.get_log("StartRunnable")
        self.ui = ui
        self.conf = ConfigureFile.get_config()
        self.short_delay = self.conf.getfloat('GUI_DELAY_DEFAULT',
                                              'ShortDelay')
        self.mid_delay = self.conf.getfloat('GUI_DELAY_DEFAULT', 'MiddleDelay')

        QRunnable.__init__(self)
示例#3
0
    def __init__(self, progressDialog=None):
        """
        Initialize the ProgressRunnable. Don't forget to call
        ProgressRunnable.__init__(self) when you override.
        It is possible to pass a QProgressDialog as parameter
        (equivalent to call setProgressDialog() after instantiation.
        """
        QObject.__init__(self)
        QRunnable.__init__(self)

        self.result = None

        self.__finishedCalled = False
        self.__startedCalled = False
        self.__progressDialog = None
        self.__isFinite = False
        self.__askedToCancel = False
        self.__hasCaughtException = False

        self.destroyed.connect(self.__onDestroy)

        if progressDialog is not None:
            self.setProgressDialog(progressDialog)
示例#4
0
 def __init__(self, imdb_db, imdb_id, stopvar):
     QRunnable.__init__(self)
     self.imdb_id = imdb_id
     self.imdb_db = imdb_db
     self.obj = WorkerObject()
     self.thread = stopvar
示例#5
0
 def __init__(self, imdb_db, imdb_id, stopvar): 
     QRunnable.__init__(self) 
     self.imdb_id = imdb_id 
     self.imdb_db = imdb_db
     self.obj = WorkerObject()
     self.thread = stopvar
示例#6
0
 def __init__(self, addOnName):
     QRunnable.__init__(self)
     self.addOnName = addOnName
     self.downloader = None
     self.setAutoDelete(False)
 def __init__(self, ui):
     self.ui = ui
     QRunnable.__init__(self)
示例#8
0
 def __init__(self):
     self.logger = LogSystem.get_log("StopRunnable")
     QRunnable.__init__(self)