|
From: | Nowlan, Sean |
Subject: | Re: [Discuss-gnuradio] testing block written in block |
Date: | Wed, 18 Jun 2014 13:14:04 +0000 |
From: discuss-gnuradio-bounces+address@hidden [mailto:discuss-gnuradio-bounces+address@hidden
On Behalf Of Activecat On Wed, Jun 18, 2014 at 4:57 PM, sreena p h <address@hidden> 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.
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |