Пример #1
0
 def __init__(self):
     # time in seconds between the measurement
     self._dt        = GlobalConfig.objects.get_value_by_key('stepsize')
     self._s         = -1                        # status of the service
     self._cl        = client()                  # init a client Instance for field data query
     self._backup_file_name = 'measurement_data' # name of the backupfile
     self._backup_file_path = os.path.expanduser('~/measurement_data') # default path to store the backupfiles
     if not os.path.exists(self._backup_file_path ):
         os.mkdir(self._backup_file_path)
     self._backup_thread = []
     self._query_thread = []    
     self._bf        = []
     self._new_file_timer = []
     self._new_backupfile()
Пример #2
0
 def __init__(self):
     self._dt        = GlobalConfig.objects.get_value_by_key('stepsize')
     self._cl        = client()                  # init a client Instance for field data query
     self._backup_file_name = 'measurement_data' # name of the backupfile
     self._backup_file_path = os.path.expanduser('~/measurement_data') # default path to store the backupfiles
     if not os.path.exists(self._backup_file_path ):
         os.mkdir(self._backup_file_path)
     self._backup_thread     = []
     self._query_thread      = []    
     self._bf                = []
     self._new_file_timer    = []
     self._new_backupfile()
     self._run = True
     self._query_timer = threading.Timer(0.1,self.run)
     self._query_timer.start()
Пример #3
0
 def _reinit(self):
     self._s   = 1                 # status of the service
     self._cl  = client()          # reinit a client Instance for field data query
     self._dt  = GlobalConfig.objects.get_value_by_key('stepsize')
     self._new_backupfile()
     self.service()