def complete(self): print('complete', self.name, '| filepath', self._full_path) if not self._ready_to_collect: raise RuntimeError( "must called kickoff() method before calling complete()") # Stop adding new data to the file. set_and_wait(self.enable_sel, 1) return NullStatus()
def kickoff(self): print('kickoff', self.name) self._ready_to_collect = True "Start writing data into the file." set_and_wait(self.enable_sel, 0) # Return a 'status object' that immediately reports we are 'done' --- # ready to collect at any time. return NullStatus()
def complete(self): print('storing', self.name, 'in', self._full_path) if not self._ready_to_collect: raise RuntimeError( "must called kickoff() method before calling complete()") # Stop adding new data to the file. set_and_wait(self.ignore_sel, 1) #while not os.path.isfile(self._full_path): # ttime.sleep(.1) return NullStatus()
def complete(self): print('complete', self.name, '| filepath', self._full_path) if not self._ready_to_collect: raise RuntimeError( "must called kickoff() method before calling complete()") if self._twin_adc._complete_adc is False: # Stop adding new data to the file. #set_and_wait(self.enable_sel, 1) self.enable_sel.put(1) self._complete_adc = True else: print("Device already stopped by {}".format(self._twin_adc.name)) self._twin_adc._complete_adc = False self._complete_adc = False return NullStatus()
def set(self, val): return NullStatus()
def set(self, value): self._value = value return NullStatus()
def test_status_without_watch(): st = NullStatus() ProgressBar([st])