Writing a new correlator block

Hi i am trying to make a correlator block. i have attached the .cc and
.h files. i have written a simple code in python which has this flow

vector source - dbpsk mod - dbpsk demod - rfid_rcv_bb - sink

it goes into an infinite loop. using the printf commands i can verify
that im getting the correct output. however if i use sink.data() and
then print it in python is gives a different output than the input. Can
anybody please help me on this? i am an undergrad student with no prior
knowledge of c++ and python.

Also the header has to be 8 bits and the payload has to be 32 bits. im
trying to synchronize the recievr end by comparing 8 bits and then
outputting the next incoming 32 bits if the 8 bits match, or move the
next bit in the 8 bit header register and compare it again.

Please is there anyone who can help me?!

Does anyone know anything?