Create python module for crc calculation from existing c++ code
€30-250 EUR
Pagado a la entrega
Create a module for use in python (2.7 and 3) on linux using existing c++ code for crc-8 calculation (listed below).
The function takes a string and its length and returns the crc. Optionally the function can take just the string and caluclate the length itself.
Source code and howto on compiling and the whole build process is neccesary.
c++ code for crc calculation:
BYTE CMicraIO::CRC8(char *data, int size)
{
ErrorFunction("CRC8");
BYTE CRC=0, tmp;
int l, a;
if (data != NULL)
{
for(a=0; a<size; a++)
{
tmp = data[a];
for(l=0; l<8; l++)
{
if ((CRC^tmp) & 1)
{
CRC = ((CRC^0x18)>>1) | 0x80;
}
else
{
CRC >>= 1;
}
tmp >>= 1;
}
}
}
else
{
Error("No data to process.");
}
ErrorFunction();
return CRC;
}
Nº del proyecto: #2376813
Sobre el proyecto
Adjudicado a:
Can finish it today for python 2.7, though I guess it will work on version 3 too. Source code + doc delivery Cheers;)