My question is related to the work function using block() as provided in
GRExtras. I have a block that input a gr_complex value and output a
gr_complex value. I’m trying to cast the input and output, in order to
them in my work function, what I have is:
const InputItems &input_items,
const OutputItems &output_items
std::complex<float> * in = input_items.cast<std::complex<float>
std::complex * out =
//Processing here } //End of work function
I can cast the output without problem, but I cannot do it for the input.
got the following error:
/home/project/grextras/include/gnuradio/block.h: In member function T
gnuradio::Buffer::cast() const [with T = std::complex,
PtrType = const void]:
reinterpret_cast from type const void* to type std::complex*
casts away qualifiers
So, I checked into the block.h I have the following:
typedef std::vector<Buffer<const void *> > InputItems;
typedef std::vector<Buffer<void *> > OutputItems;
Does it mean that I cannot cast my input_items in my work function?
If the answer is no, how can I use the input_items in my work function?,
because I have to receive a stream of values.
Thanks for your comments,