discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] C++ gnuradio apps


From: Dan Halperin
Subject: [Discuss-gnuradio] C++ gnuradio apps
Date: Fri, 22 Feb 2008 08:59:36 -0800
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Suppose I want to build a C++ application to drive GNU Radio, using
captured trace data -- so I don't need the USRP.

With the new top_block stuff we should be ready for this now, correct?
Here's a short program towards going down that path:

#include <gr_runtime_types.h>
#include <gr_top_block.h>
#include <gr_null_source.h>
#include <gr_null_sink.h>

int main()
{
    gr_top_block_sptr tb = gr_make_top_block("topblock");
    tb->connect(gr_make_null_source(sizeof(gr_complex)),
gr_make_null_sink(sizeof(gr_complex)));
    tb->run();
}

A few questions/observations:

1) Since most blocks don't have public constructors, we have to indirect
through the _make_ friend functions. Is this what we want?

2) This example doesn't compile. There are two candidates for connect:

/usr/local/include/gnuradio/gr_hier_block2.h:61: note: candidates are:
void gr_hier_block2::connect(gr_basic_block_sptr)
/usr/local/include/gnuradio/gr_hier_block2.h:64: note:
void gr_hier_block2::connect(gr_basic_block_sptr, int,
gr_basic_block_sptr, int)

What does the first one do?? It only takes a single block...

The second one is presumably with ports? I will try that next. Can we
add a connect method that takes two blocks and assumes the ports are both 0?

Thoughts? Thanks,

Dan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHvv94y9GYuuMoUJ4RAiV4AJ9VRjbz8dxiOPmqJh4ETZjuxiLhpQCgwd0Y
CdXVyDwdj1zHJxOhuhrM6Dw=
=oV3h
-----END PGP SIGNATURE-----




reply via email to

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