Error creating block with different input signature

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 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)

  1. I also tried the method suggested in earlier posts.

static vector get_input_sizes(){
std::vector 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
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

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

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