def read(self): if DaqAsyncTurn.is_my_turn(self.name): DaqMultiPlotter.send_data(self.data) # Wait for new data on Ring Buffer DaqDictRingBuffer.status(status=False) DaqAsyncTurn.next_turn()
def __init__(self, samples_per_channel=1000): self.samples_per_channel = samples_per_channel self.name = 'plotter' DaqAsyncTurn.bind(self.name) DaqMultiPlotter.configure(samples_per_channel) DaqMultiPlotter.start()
def __init__(self, samples_per_channel=1000): asyncore.dispatcher.__init__(self) self.create_socket(socket.AF_INET, socket.SOCK_STREAM) self.samples_per_channel = samples_per_channel self.name = 'plotter' DaqMultiPlotter.configure(samples_per_channel) DaqMultiPlotter.start()
def handle_read(self): if DaqAsyncTurn.is_my_turn(self.name): data = DaqDictRingBuffer.extract(chunk=self.samples_per_channel) DaqMultiPlotter.send_data(data) # Wait for new data on Ring Buffer DaqDictRingBuffer.status(status=False) DaqAsyncTurn.next_turn()
def __init__(self, samples_per_channel=15000, tree_channels={}): self.samples_per_channel = samples_per_channel self.name = 'async-plotter' self.data = defaultdict(dict) for group_name in tree_channels: for channel_name in tree_channels[group_name]: self.data[group_name][channel_name] = [0] * samples_per_channel DaqAsyncTurn.bind(self.name) DaqMultiPlotter.configure(samples_per_channel) DaqMultiPlotter.start()
def handle_close(self): DaqMultiPlotter.stop()
def handle_expt(self): DaqMultiPlotter.stop()