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