On Tue, Apr 14, 2009 at 04:03:13AM -0700, karim wrote:
> Eric Blossom wrote:
>> On Thu, Apr 09, 2009 at 09:46:43AM -0700, karim wrote:
>>> Hi,
>>> I am trying to use the dqpsk modulator block to modulate some data 
>>> and  then take the output and separate it to real and imag. This is 
>>> the code,   it runs but the sinks are empty and have no data. What am 
>>> I doing wrong?
>>
>> You're printing the contents of the vector sinks in your
>> initialization code, before the graph has started running.
>>
>> Try printing their contents after my_top_block().run() returns.
>>
>> Eric
>>
>
> I added a function to print the sinks after I call my_top_block().run()
>
> But the sinks are still empty. I also tried directing the output of the  
> qpsk modulator to a file and it's also empty (the code below).


You may want to spend some time with the most excellent Python 2.X
tutorial:  http://www.python.org/doc

You are creating two instances of my_top_block(), calling run() on the
first one and calling print_data() on the second.

Try this instead:

if __name__ == '__main__':
    try:
        tb = my_top_block()
        tb.run()
        tb.print_data()
    except KeyboardInterrupt:
        pass


Eric


_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to