Hi,
I am trying to create a C++ block with different input signatures in
each
of the inputs.I tried the following 2 methods.
- 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)
- 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