discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] writing a c++ block that can access other blocks


From: Brett L. Trotter
Subject: Re: [Discuss-gnuradio] writing a c++ block that can access other blocks
Date: Sun, 22 May 2011 16:37:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10

Follow up to self here- can anyone confirm whether I'm understanding
this right?

Looks like gr_edge_vector_t is a shared/static vector with all the edges

Say I take this guy from gr_hier_block2_detail and modify it:

  gr_edge_vector_t edges, tmp = d_fg->edges();
  gr_edge_vector_t::iterator p;
  for (p = tmp.begin(); p != tmp.end(); p++) {
    if ((*p).src().block() == block || (*p).dst().block() == block) {
      edges.push_back(*p);

      if (GR_HIER_BLOCK2_DETAIL_DEBUG)
        std::cout << "disconnect: block found in edge " << (*p) <<
std::endl;
    }
  }


so that it tests to see if the block is an instance of a usrp/usrp2
block? Would that do? Ultimately I can assume there'll only be one usrp
connected in my application, and through the one (be it source or sink)
i can get to the dboard iface for either card (rx or tx) and manipulate io?

Assuming the above is sound, is there any potential for harm in messing
with things this way?

And taking my original goal a step further for the sake of discussion,
what if instead of an AGC I just wanted a block that gives a handle to
the gain controls. Does GnuRadio have any facility for blocks that
aren't really part of the flowgraph in terms of moving data, but just
provide an instance of some sort of control?

Thanks!



On 05/22/2011 04:09 PM, Brett L. Trotter wrote:
> I'm looking for a way to create a block that can find the USRP source
> and/or sync in the flowgraph and be able to get to the dboard iface for
> doing write_aux_dac and write_io. Bottom line I'd like to write an AGC
> block that can manipulate a custom card. Is there a facility for finding
> other block instances, or some other way of finding the USRP?
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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