A Chunks to Symbols Related Question

All,
In creating an application that requires Pulse Position Modulation
we
generated a GRC file using the chunks to symbols block. Everything
worked
perfectly except in small areas where we need the amplitude to remain
unchanged (~ at zero). 1s are mapped to 10 and 0’s are mapped to 01.
Does
anybody have input or ideas on how to create ‘space’ for lack of a
better
word between 1’s and 0’s at desired points.

Example 1010_____0101_______

Amplitude increase at 0 seconds for 10 and increase at 1 microsecond for
the second 10. Then there should be a gap in amplitude change and
continue
with amplitude change for 01 01…so on and so on.

Thank you
Domenic

On Thu, Jan 12, 2012 at 11:15 AM, Domenic Magazu III
[email protected]wrote:

Amplitude increase at 0 seconds for 10 and increase at 1 microsecond for
the second 10. Then there should be a gap in amplitude change and continue
with amplitude change for 01 01…so on and so on.

Thank you
Domenic

For this one, the best thing might be to make your own block that
handles
this.

The other thing that I’ll suggest, and you’ll have to play with it to
see
if it’ll actually work, is to use the sample_and_hold block. If you can
generate a square wave with the period that you want out of the signal,
you
can use that as the control line into this block. The work function is
simple (and pasted below); it’s in the gnuradio-core/src/lib/gengen
directory, which is why it looks the way it does with the @X_TYPE@.

Tom

int
@NAME@::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
@I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
const char *ctrl = (const char *) input_items[1];
@O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];

for (int i = 0; i < noutput_items; i++){
if(ctrl[i]) {
d_data = iptr[i];
}
optr[i] = d_data;
}
return noutput_items;
}