discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Correct usage of gr::io_signature::makev


From: Sumit Kumar
Subject: Re: [Discuss-gnuradio] Correct usage of gr::io_signature::makev
Date: Sat, 28 Apr 2018 17:39:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Hi Marcus,

Actually I din't do that since the reference code which I was following, i.e.,

fll_band_edge_cc_impl.cc, has no such declaration in the corresponding header fll_band_edge_cc_impl.h

Sumit

On 28/04/2018 17:28, Marcus Müller wrote:
Hi Sumit,

I don't see where `ios` is being declared constantly and/or statically
before line 31? Does that happen in the header?

Best regards,
Marcus
On Sat, 2018-04-28 at 16:51 +0200, Sumit Kumar wrote:
Hi,
In order to look for correct usage of gr::io_signature::makev, I
checked this example https://github.com/gnuradio/gnuradio/blob/master
/gr-digital/lib/fll_band_edge_cc_impl.cc
and found
static int ios[] = {sizeof(gr_complex), sizeof(gr_complex),
sizeof(gr_complex), sizeof(float)};
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
and then use as io_signature::makev(1, 4, iosig))
Basically I have to use it in sync_short.cc from gr-ieee 80211 in
order to create more inputs.
But if I use the above two lines inside the class i.e.
sync_short_impl, I get lots of error. I have attached the file for
reference. Could you please suggest me correct usage. I can give more
information if needed.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~
/home/john/myprefix/src/gr-ieee-80211/lib/sync_short.cc:31:84: error:
in-class initialization of static data member ‘int
sync_short_impl::ios []’ of incomplete type
  tic int ios[] = {sizeof(gr_complex), sizeof(float), sizeof(float),
sizeof(float)};
^
/home/john/myprefix/src/gr-ieee-80211/lib/sync_short.cc:32:31: error:
‘ios’ is not a type
  static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
                                ^
/home/john/myprefix/src/gr-ieee-80211/lib/sync_short.cc:32:36: error:
‘ios’ is not a type
  static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
                                     ^
/home/john/myprefix/src/gr-ieee-80211/lib/sync_short.cc:32:39: error:
expected ‘,’ or ‘...’ before ‘+’ token
  static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
                                        ^
/home/john/myprefix/src/gr-ieee-80211/lib/sync_short.cc: In
constructor ‘sync_short_impl::sync_short_impl(double, unsigned int,
bool, bool)’:
/home/john/myprefix/src/gr-ieee-80211/lib/sync_short.cc:35:39: error:
no matching function for call to ‘gr::io_signature::makev(int, int,
std::vector<int> (&)(int, int))’
     gr::io_signature::makev(4, 4, iosig),
                                        ^
In file included from
/home/john/myprefix/include/gnuradio/basic_block.h:30:0,
                  from
/home/john/myprefix/include/gnuradio/block.h:27,
                  from /home/john/myprefix/src/gr-ieee-
80211/include/ieee802-11/sync_short.h:21,
                  from /home/john/myprefix/src/gr-ieee-
80211/lib/sync_short.cc:17:
/home/john/myprefix/include/gnuradio/io_signature.h:100:17: note:
candidate: static gr::io_signature::sptr gr::io_signature::makev(int,
int, const std::vector<int>&)
      static sptr makev(int min_streams, int max_streams,
                  ^
/home/john/myprefix/include/gnuradio/io_signature.h:100:17: note:
no known conversion for argument 3 from ‘std::vector<int>(int, int)’
to ‘const std::vector<int>&’
lib/CMakeFiles/gnuradio-ieee802_11.dir/build.make:584: recipe for
target 'lib/CMakeFiles/gnuradio-ieee802_11.dir/sync_short.cc.o'
failed
make[2]: *** [lib/CMakeFiles/gnuradio-ieee802_11.dir/sync_short.cc.o]
Error 1
CMakeFiles/Makefile2:200: recipe for target 'lib/CMakeFiles/gnuradio-
ieee802_11.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-ieee802_11.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
_______________________________________________
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]