discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] testing block written in block


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
Sent: Wednesday, June 18, 2014 5:59 AM
To: address@hidden
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 <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. 

 


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


reply via email to

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