def state_def(self, callback): super(MonitorSink, self).state_def(callback) # TODO make this possible to be decorator style callback(StreamCell(self, 'fft', type=BulkDataT(array_format='b', info_format='dff'), label='Spectrum')) callback(StreamCell(self, 'scope', type=BulkDataT(array_format='f', info_format='d'), label='Scope'))
def state_def(self): for d in super(MonitorSink, self).state_def(): yield d # TODO make this possible to be decorator style yield 'fft', StreamCell(self, 'fft', type=BulkDataT(array_format='b', info_format='dff'), label='Spectrum') yield 'scope', StreamCell(self, 'scope', type=BulkDataT(array_format='f', info_format='d'), label='Scope')
def state_def(self): yield 's', StreamCell(self, 's', type=BulkDataT('', 'b'))