def __init__(self, delay=0.001): RpcClient.__init__(self) self.udp_server = udp_server.UDPServer() self.udp_server.start() # Create a list of rolling buffers for the FFT data. self.eq_data = [] self.peak_buffer_size = 50 self.delay = delay for row in range(self.udp_server.num_fft_chan): # Each FFT channel has a rolling deque that will be used for peak detection self.eq_data.append(deque([0 for i in range(self.peak_buffer_size)], maxlen = self.peak_buffer_size))
def __init__(self, host=""): if host!="": RpcClient.__init__(self, host) else: RpcClient.__init__(self)