0

I am kind of new to c++, so I am not sure where to put the definition of the vector and the "input_sizes.push_back" in the .cc file. (after de include? after the sptr? in the definition of the sptr? in a new method?). Here is the "official" example:

-- A block with 2 inputs (float and double) and 1 output --

std::vector<int> input_sizes;
input_sizes.push_back(sizeof(float));
input_sizes.push_back(sizeof(double));

gnuradio::block("my block",
gr_make_io_signaturev(2, 2, input_sizes),
gr_make_io_signature(1, 1, sizeof(float)))

The example can be found in 1 :

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
xuandl
  • 183
  • 1
  • 2
  • 14

1 Answers1

0

Some people in Discuss-gnuradio@gnu.org mailing list answer me.The simplest answer (also the one I used) was: gr_make_io_signature2 (2, 2, sizeof(float), sizeof(double))

:) :)

xuandl
  • 183
  • 1
  • 2
  • 14