[op25-dev] need help using extract()

Matt D md123 at nycap.rr.com
Tue Dec 10 12:17:37 UTC 2013

> Lets see the code snippet for the function and we can help.

Hey thanks, i define th vecotr in the .h:

 //bit vector to store the errror corrected link control word
   bit_vector decoded_lcw_vec;

i fill th vector like this:

bit_vector decoded_lcw_vec(corrected_array, corrected_array + sizeof
corrected_array / sizeof corrected_array[0]) ;

and I can see the right values are there using cout.  i have a function
to return the vector:

ldu1::get_vec() const
  return decoded_lcw_vec;

and then I use the that funtion as the arguement in extract:

ldu1::lcf() const
   const size_t LCF_BITS[] = {
    0, 1, 2, 3, 4, 5, 6 , 7
   const size_t LCF_BITS_SZ = sizeof(LCF_BITS) / sizeof(LCF_BITS[0]);
   const uint16_t lcf = extract(get_vec(), LCF_BITS, LCF_BITS_SZ);
   return lcf;



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/op25-dev/attachments/20131210/66e1c885/attachment.html>

More information about the op25-dev mailing list