I have the next code working, in the firsts seconds I have erroneous
bits, after 10 seconds I don't have any error... another thing if I put
Max Number of Output = 0 always have a ber of 40%...
Umbrella_encodconv_vff::Umbrella_encodconv_vff (const std::vector<int>
&val1, int val2, int val3)
: gr_sync_block ("encodconv_vff",
gr_make_io_signature (1, 1, sizeof (float) * val3),
gr_make_io_signature (1, 1, sizeof (float) * val3 * val1.size()))
{
polsize = val1.size();
cl = val2;
pz = val3;
for (int i = 0; i < 0x100; i++){
polynom[i] = i;
}
unsigned int size = std::min((size_t) 0x100, val1.size());
for (unsigned int i = 0; i < size; i++){
polynom[i] = val1[i];
}
// -- Channel code parameters --
itpp::ivec generator(polsize);
for (int i = 0; i < polsize; i++){
generator[i] = polynom[i];
}
code.set_generator_polynomials(generator, cl);
}
int
Umbrella_encodconv_vff::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
const float *in = (const float *) input_items[0];
float *out = (float *) output_items[0];
itpp::bvec tempin(pz * sizeof(float));
itpp::bvec tempout(pz * polsize * sizeof(float));
for (int j = 0; j < (pz * sizeof(float)); j++){
tempin[j] = in[j];
}
code.encode_tailbite(tempin, tempout);
for (int k = 0; k < (pz * polsize * sizeof(float)); k++){
out[k] = tempout[k];
}
// Tell runtime system how many output items we produced.
return noutput_items;
}
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio