Forum: GNU Radio Error creating block with different input signature

A51ff7fbd720a0068ae0551254af2c91?d=identicon&s=25 sarankumar (Guest)
on 2014-06-08 15:34
(Received via mailing list)
Hi,
I am trying to create a C++ block with different input signatures in
each
of the inputs.I tried the following 2 methods.
1) I followed the example in "pfb_clock_sync_ccf" and created the io
signature as:


static int ios[] = {sizeof(gr_complex)*8, sizeof(float),
sizeof(float), sizeof(float)};
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));

beamforming_sum_vcc_impl::beamforming_sum_vcc_impl(int num_channels)
      : gr::sync_block("beamforming_sum_vcc",
              gr::io_signature::makev(1,4, iosig),
              gr::io_signature::make(1, 1, sizeof(gr_complex))),
              N(num_channels)

2) I also tried the method suggested in earlier posts.

static vector<int> get_input_sizes(){
    std::vector<int> input_sizes;
    input_sizes.push_back(sizeof(gr_complex)*8);
    input_sizes.push_back(sizeof(gr_complex));
    input_sizes.push_back(sizeof(gr_complex));
    input_sizes.push_back(sizeof(gr_complex));

    return input_sizes;
    }
beamforming_sum_vcc_impl::beamforming_sum_vcc_impl(int num_channels)
      : gr::sync_block("beamforming_sum_vcc",
              gr::io_signature::makev(1,4,get_input_sizes()),
              gr::io_signature::make(1, 1, sizeof(gr_complex))),
              N(num_channels)

In both the cases I am getting the following error when doing the
makexml
process.
Any help?

Error: Can't parse input signature.
Traceback (most recent call last):
  File "./gr_modtool", line 47, in <module>
    main()
  File "./gr_modtool", line 39, in main
    modtool.run()
  File
"/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py",
line 67, in run
    self._make_grc_xml_from_block_data(params, iosig, blockname)
  File
"/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py",
line 91, in _make_grc_xml_from_block_data
    if iosig[inout]['max_ports'] == '-1':
KeyError: 'in'

thanks,
Saran
D50c3828e720e33ce734d9124c97d960?d=identicon&s=25 Mostafa Alizadeh (m-alizadeh)
on 2014-06-09 07:32
(Received via mailing list)
Hi,

I don't know why you have a problem with this!
Just take a look at* fll_band_edge_cc_impl.cc* in the GNURadio tree :
.../gnuradio-3.7.3/gr-digital/lib/
Also see its grc in: .../gnuradio-3.7.3/gr-digital/grc

Best,
Mostafa
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-06-10 14:15
(Received via mailing list)
On 06/08/2014 03:32 PM, sarankumar wrote:
> In both the cases I am getting the following error when doing the
> makexml process.

As indicated, gr_modtool makexml is experimental and doesn't always
work. In this case, you will have to craft the XML files by hand. Check
those other blocks for examples.

M
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.