On 07/18/2012 11:32 AM, Anisha Gorur wrote:
> Hello All,
>
> I've been attempting to create my own source block in Python. I have been
> reading the blocks coding guide here:
>
https://github.com/guruofquality/grextras/wiki/Blocks-Coding-Guide#wiki-work-operation-modes,
> but so far my source only outputs zeros.
> An outline of my code is as follows:
>
> class constSource(gr.block):
> def __init__(self):
> gr.block.__init__(self, name = "signal source", in_sig =
> None,out_sig = [numpy.complex64])
>
> def work(self, input_items, output_items):
> num_output_items = len(output_items[0])
>
> #I put the code to create what I want to stream here, the code
> creates a numpy.complex64 array with a length of 32. I then return
> num_output_items
You didnt include the code, but I am guessing that you are not assigning