discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] (Python) Source Block Outputs All 0's


From: David Halls
Subject: [Discuss-gnuradio] (Python) Source Block Outputs All 0's
Date: Tue, 18 Feb 2014 18:50:22 +0000

Hi All,

I have implemented a python source block:

def __init__(self, kA1=4,kB1=4,k2=4,NA1=8,NB1=8,N2=8,M=8):
gr.sync_block.__init__(self,
name="blsd_enc_b",
in_sig=None,
out_sig=[numpy.uint8,numpy.uint8])


but I can't get it to output anything but 0's....

def work(self, input_items, output_items):
out_cA = output_items[0]
out_cB = output_items[1]

out_cA = [ 5, 6, 7, 8, 9, 10 ] #cA[0]
out_cB = [ 5, 6, 7, 8, 9, 10 ] #cB[0]
self.produce(0,len(out_cA))
self.produce(1,len(out_cB))
print 'out_cA = ', out_cA, ', len(out_cA) = ', len(out_cA)
print 'out_cB = ', out_cB, ', len(out_cB) = ', len(out_cB)
return -1 #-2


I connect both outputs to a file sync of type byte, and it stores 6 bytes but its all "\00\00\00\00\00\00"

The print lines give:

out_cA = [5, 6, 7, 8, 9, 10] , len(out_cA) = 6
out_cB = [5, 6, 7, 8, 9, 10] , len(out_cB) = 6

as expected.

Any advice?

Regards,

David

________________________________

NOTE: The information in this email and any attachments may be confidential and/or legally privileged. This message may be read, copied and used only by the intended recipient. If you are not the intended recipient, please destroy this message, delete any copies held on your system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales (2519556). Registered Office 208 Cambridge Science Park, Milton Road, Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl



This email has been scanned for email related threats and delivered safely by Mimecast.
For more information please visit http://www.mimecast.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]