def __init__(self): # split pipe ends self.gpsd_failed_connect = False self.pipe, pipe = NonBlockingPipe('gps pipe', True) super(gpsProcess, self).__init__(target=self.gps_process, args=(pipe, ), daemon=True)
def __init__(self): # split pipe ends self.pipe, pipe = NonBlockingPipe('gps_pipe', True) super(gpsProcess, self).__init__(target=self.gps_process, args=(pipe, ), daemon=True) self.devices = []
def pipe(self): if self.initialized: print('direct pipe clients must be created before the server is run') exit(0) pipe0, pipe1 = NonBlockingPipe('pypilotServer pipe' + str(len(self.pipes)), self.multiprocessing) self.pipes.append(pipe1) return pipe0
def __init__(self, server): self.client = pypilotClient(server) self.multiprocessing = server.multiprocessing self.pipe, self.pipe_out = NonBlockingPipe('nmea pipe', self.multiprocessing) if self.multiprocessing: self.process = multiprocessing.Process(target=self.nmea_process, daemon=True) self.process.start() else: self.process = False self.setup()
def __init__(self, server): self.client = pypilotClient(server) self.multiprocessing = server.multiprocessing if self.multiprocessing: self.pipe, pipe = NonBlockingPipe('imu pipe', self.multiprocessing) self.process = multiprocessing.Process(target=self.process, args=(pipe,), daemon=True) self.process.start() return self.process = False self.setup()
def __init__(self, server): if True: # direct connection to send raw sensors to calibration process is more # efficient than routing through server (save up to 2% cpu on rpi zero) self.cal_pipe, self.cal_pipe_process = NonBlockingPipe('cal pipe', True, sendfailok=True) else: self.cal_pipe, self.cal_pipe_process = False, False # use client self.client = pypilotClient(server) self.process = multiprocessing.Process(target=CalibrationProcess, args=(self.cal_pipe_process, self.client), daemon=True) self.process.start() self.cal_ready = False
def __init__(self, server): if True: # direct connection to send raw sensors to calibration process is more # efficient than routing through server (save up to 2% cpu on rpi zero) self.cal_pipe, cal_pipe = NonBlockingPipe('cal pipe', True, sendfailok=True) else: self.cal_pipe, cal_pipe = False, False # use client client = pypilotClient(server) super(AutomaticCalibrationProcess, self).__init__(target=CalibrationProcess, args=(cal_pipe, client), daemon=True) self.start()
def __init__(self, sensors=False): self.sensors = sensors if not sensors: # only signalk process for testing self.client = pypilotClient() self.multiprocessing = False else: server = sensors.client.server self.multiprocessing = server.multiprocessing self.client = pypilotClient(server) self.initialized = False self.missingzeroconfwarned = False self.signalk_access_url = False self.last_access_request_time = 0 self.sensors_pipe, self.sensors_pipe_out = NonBlockingPipe('signalk pipe', self.multiprocessing) if self.multiprocessing: import multiprocessing self.process = multiprocessing.Process(target=self.process, daemon=True) self.process.start() else: self.process = False