Imágenes integradas 1
This block just receive signal for one of the two ports at the same
time. In this way, for example if it receives in the IN0, in the IN1
there's nothing. Depending on the parameter Initial Standard I select
which input must pass to the output, that as supposed, is the input in
which I have signal.
Then, i wrote the next forecast() method.
void forecast(int noutput_items, gr_vector_int &ninput_items_required){
if(d_st_aux == 0){
ninput_items_required[0] = 0;
ninput_items_required[1] = noutput_items;//Tx Xbee
}else{
ninput_items_required[0] = noutput_items;//Tx Wifi
ninput_items_required[1] = 0;
}
}
In that way I just take the input that has signal, and that works perfectly.
The problem is when, through the third input, I send a command in order
to change the input that I want to read. That's done by way of
re-writing the value of *d_st_aux*, it occurs in real time. For this
case, I would need that forecast method changes in real time, the
ninput_items_required, but it doesn't work. I think the block is just
calling the forecast method when it starts, but I need to call forecast
in real time.