C++ application

Hello,
Â
I want to get familiar with C++ applications, for example, here input
some
integers and print the square of them( I have modified
howto_square_ff).

Now I want to input say -len=10 integers to “howto_square_vf” block and
print the
same number of squared results with “ACS_outputdata_vf”

My problem is , when i run the code … i see endless result on the
screen.
Please suggest me way to achieve my above task.

//…director.cc

#include <director.h>
#include <gr_io_signature.h>
#include <howto_square_vf.h>
#include <ACS_inputdata_vf.h>
#include <ACS_outputdata_vf.h>

// Shared pointer constructor
director_sptr make_director()
{
return director_sptr(new
director());
}

// Hierarchical block constructor, with no inputs or outputs
director::director() :
gr_top_block(“director”)
{

_len=10;

ACS_inputdata_vf_sptr src= ACS_make_inputdata_vf(_len);

howto_square_vf_sptr sqr = howto_make_square_vf(_len);

ACS_outputdata_vf_sptr dst = ACS_make_outputdata_vf(_len);


connect(src,0, sqr,0);
connect(sqr,0, dst,0);

}

//…main.cc…

#include <director.h>

int main()
{
director_sptr top_block = make_director();

top_block->run();

return 0;

}

Thanks in advance
Raman

On Tue, Jun 15, 2010 at 04:58:48AM +0530, ramanagouda odugoudar wrote:

Please suggest me way to achieve my above task.
Use gr_head in your flow graph.

Eric

Hello,

 Thanks for the hint. Since I am new to Gnuradio , an example would be
very much easy for me.

thanks
Raman

— On Tue, 15/6/10, Eric B. [email protected] wrote:

From: Eric B. [email protected]
Subject: Re: [Discuss-gnuradio] c++ application
To: “ramanagouda odugoudar” [email protected]
Cc: [email protected]
Date: Tuesday, 15 June, 2010, 8:13 AM

On Tue, Jun 15, 2010 at 04:58:48AM +0530, ramanagouda odugoudar wrote:

Please suggest me way to achieve my above task.
Use gr_head in your flow graph.

Eric