From: discuss-gnuradio-bounces+sean.nowlan=gtri.gatech....@gnu.org [mailto:discuss-gnuradio-bounces+sean.nowlan=gtri.gatech....@gnu.org] On Behalf Of Activecat Sent: Wednesday, June 18, 2014 5:59 AM To: discuss-gnuradio@gnu.org Cc: sreena p h Subject: Re: [Discuss-gnuradio] testing block written in block
On Wed, Jun 18, 2014 at 4:57 PM, sreena p h <sreena...@yahoo.in<mailto:sreena...@yahoo.in>> wrote: Hi I'm new to GNU radio and is trying to develop my own block. I want to develop a block that intake a vector and out put sum of the vector elements. I used the out of tree module and followed tutorial using python code. How should be the arguments of blocks.vector_source_f to be given if i am inputting vector stream of four integers is used. the python code and test file is given below. Does your intake vectors have fixed-length or variable length? If they are variable length, then your sream_ff block won't be very useful in graphical GRC flowgraph, because there the vector streams are usually fixed-length. If they are fixed-length, then your problem could be easily solved; just create sream_ff as a decimator block. If you’d rather use stock GR blocks or you would like a flowgraph with identical functionality, you can hook up a Vector to Stream block (with num_items=vector_length) to an Integrate block (with decimation=vector_length). … vector_length = 10 self.vec2stream = blocks.vector_to_stream(gr.sizeof_gr_complex, vector_length) self.integrate = blocks.integrate_cc(vector_length) self.connect((self.vec2stream, 0), (self.integrate, 0)) … Sean
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio